Skip to content

About

Client-side web application for generating MeshCore-compatible Ed25519 keys with custom hex prefixes

Resources

Stars

38 stars

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

MeshCore Web Key Generator

A web application that generates Ed25519 keys compatible with MeshCore. Runs entirely in your browser.

What it does

Generates Ed25519 key pairs where the public key starts with a specific hex prefix. MeshCore uses the first two characters of the public key as a node identifier, so this helps avoid collisions with neighboring nodes.

Features

  • Generate Ed25519 keys with custom hex prefixes (1-8 characters)
  • Real-time progress display (attempts, speed, time)
  • JSON export of generated keys
  • Import instructions for MeshCore nodes
  • URL parameter support for pre-filling prefixes

Usage

  1. Open index.html in a web browser
  2. Enter a hex prefix (e.g., "F8", "F8A1")
  3. Click "Generate Key"
  4. Download the JSON file when complete

URL Parameters

Pre-fill the prefix input:

  • index.html?prefix=FA - Sets prefix to "FA"
  • index.html?prefix=f8a1 - Sets prefix to "F8A1"

Key Format

  • Private Key: 64 bytes (128 hex characters): clamped Ed25519 scalar || signing nonce
  • Public Key: 32 bytes (64 hex characters)

MeshCore derives the public key with ge_scalarmult_base on the first 32 bytes, so the search walks a clamped scalar (s += 8, P += 8G) instead of SHA-512 expanding a new seed for every candidate. The nonce half is random.

Performance

Search uses all CPU cores via WASM workers. The UI estimates about 1 million keys/sec per core; the live counter is the actual rate on your machine.

Measured: 12.3 million keys/sec on an M4 Pro.

Expected time at that rate:

  • 1-4 character prefix: instant
  • 5-character prefix: ~0.1 seconds
  • 6-character prefix: ~1 second
  • 7-character prefix: ~22 seconds
  • 8-character prefix: ~6 minutes

If WASM is unavailable, the page falls back to the same walk in JavaScript.

Performance Debugging

  • index.html?perfDebug=1 enables live worker performance counters in the progress line.
  • Browser console helper: await runPerfSmoke('F8', 10) runs a fixed-duration smoke test and returns sampled keys/sec plus median throughput.
  • window.keyGenerator is exposed for quick manual inspection while tuning worker/batch behavior.

Browser Support

Chrome 60+, Firefox 55+, Safari 11+, Edge 79+

Importing to MeshCore

Companion Nodes

  1. Connect to your node using the MeshCore app
  2. Tap the Settings gear icon
  3. Tap "Manage Identity Key"
  4. Paste your Private Key into the text box
  5. Tap "Import Private Key"
  6. Tap the checkmark ✓ to save changes

Repeater Nodes

  1. Flash companion firmware temporarily
  2. Follow companion instructions above
  3. Re-flash to repeater firmware

JSON Import

  1. MeshCore app → Import Config
  2. Select downloaded JSON file

Example Output

{
  "public_key": "F8A1B2C3D4E5F6789012345678901234567890ABCDEF1234567890ABCDEF12",
  "private_key": "305e0b1b3142a95882915c43cd806df904247a2d505505f73dfb0cde9e666c4d656591bb4b5a23b6f47c786bf6cccfa0c4423c4617bbc9ab51dfb6f016f84144"
}

Filename: meshcore_[PREFIX]_[TIMESTAMP].json

Security

  • All processing happens in your browser
  • No network requests during generation
  • Keys never leave your device

Advanced Usage

For more complex key generation patterns (cosmetic patterns, longer prefixes, multi-processing), see the Python version which supports:

  • Multi-threaded generation for faster performance
  • Cosmetic pattern matching (palindromic keys, etc.)
  • Watchlist monitoring for multiple patterns
  • Advanced pattern modes and batch processing

Troubleshooting

Slow performance: Close other tabs, use desktop, try shorter prefixes

Browser freezes: Refresh the page

No match found: Normal for difficult patterns, try shorter prefix

About

Client-side web application for generating MeshCore-compatible Ed25519 keys with custom hex prefixes

Resources

Stars

38 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages