Skip to content

Elektr0Vodka/meshcore-web-keygen-pro

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 up to 64 characters
  • Python-style pro pattern modes: simple first-two, cosmetic 2/4/6/8, and prefix + cosmetic
  • Watchlist monitoring using FIRST...LAST | Description patterns
  • Optional WebGPU acceleration for prefix-gated searches
  • Generation tuning controls for GPU batch size, WASM worker count, WASM batch size, and JS fallback batch size
  • 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)
  • Public Key: 32 bytes (64 hex characters)

Performance

Baseline: ~100,000 keys/second on modern devices. Example measurements:

  • iPhone 15 Pro: ~100k keys/sec
  • M4 Mac Mini: ~300k keys/sec
  • Intel i7-9700K: ~85k keys/sec
  • AMD Ryzen 9950X: ~417k keys/sec

Expected time to find a key at 100k keys/second:

  • 1-character prefix: < 0.01 seconds
  • 2-character prefix: ~0.003 seconds
  • 3-character prefix: ~0.04 seconds
  • 4-character prefix: ~0.7 seconds
  • 5-character prefix: ~10 seconds
  • 6-character prefix: ~3 minutes
  • 7-character prefix: ~45 minutes
  • 8-character prefix: ~12 hours

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

Pro Modes

This web version includes the browser-safe pattern functions from the Python generator:

  • Prefix only, including prefixes longer than 8 characters
  • Simple first-two node ID search
  • Cosmetic 2/4/6/8 matching, where the first N hex characters match the last N characters or their reverse
  • Prefix + cosmetic matching
  • Watchlist monitoring while searching

Tuning

The browser UI exposes performance controls:

  • Enable or disable GPU acceleration when WebGPU is available
  • Set WASM worker count, which maps to the number of Web Workers used by the WASM prefix engine
  • Tune GPU, WASM, and JS batch sizes with plain numbers or K/M suffixes

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors