Skip to main content

mehvault

a client-side multi-chain wallet generator and encrypted vault for solana and ethereum

mehvault

When I first started exploring Web3 and blockchain engineering, wallets like MetaMask and Phantom felt like black boxes. I wanted to know the exact math happening under the hood. How does a single string of words mathematically produce an address on Ethereum’s secp256k1 curve and simultaneously produce an address on Solana’s ed25519 curve ? When I searched for online tools to experiment with seed generation and derivation paths, I found two extremes. On one side were clunky command-line utilities requiring Python or Rust setups with complex dependencies. On the other side were sketchy-looking web utilities where you never really know if your generated keys are secretly being transmitted to a remote server. I wanted something transparent, clean and entirely client-side a fast browser playground where developers and crypto enthusiasts can generate BIP-39 seed phrases, watch BIP-44 derivation trees fork into Solana and Ethereum and securely lock their vault with password-based AES-256-GCM encryption without a single byte ever touching a remote network socket. That is why I built mehVault.

The Problem and The Idea

The Opaque Black Box

Most web-based crypto tools hide the mechanics of key derivation. Worse, trusting online generators is inherently dangerous malicious sites can log private keys, inject malicious entropy or silently forward secret recovery phrases to backend databases.

The mehVault Idea

A zero-upload, multi-chain HD wallet generator running purely inside the browser sandbox. Generate BIP-39 mnemonic phrases, derive Solana and Ethereum wallets with standard BIP-44 paths and protect secrets with client-side Web Crypto AES-256-GCM encryption.

What mehVault Is

mehVault is an open-source, client-side cryptocurrency wallet generator and key management workspace built with Next.js 16, React 19, TypeScript and Tailwind CSS. It focuses on clarity, speed and strict client-side isolation.

  • Mnemonic Engine: Generates BIP-39 compliant seed phrases using cryptographically secure random entropy (128-bit for 12 words or 256-bit for 24 words). Features instant mnemonic validation, wordlist checking and seed derivation.
  • Multi-Chain HD Derivation: Derives multiple child wallets from a single master seed using standardized BIP-44 paths.
    • Solana (m/44'/501'/index'/0'): Employs the Ed25519 curve via ed25519-hd-key and tweetnacl, integrating directly with @solana/web3.js to produce base58-encoded public keys.
    • Ethereum (m/44'/60'/0'/0/index): Employs the Secp256k1 curve via ethers.js HDNodeWallet to compute standard EIP-55 checksummed Ethereum addresses.
  • Encrypted Local Vault: Secures generated keys behind a user password. Uses the native Web Crypto API (crypto.subtle) to run PBKDF2 with 100,000 iterations of SHA-256, deriving an AES-256-GCM key with a unique 16-byte salt and 12-byte initialization vector (IV).
  • Solana Devnet Faucet: Connects to Solana devnet via a Next.js Server Action (actions/airdrop.ts) to request test SOL (up to 2 SOL) directly to derived public keys for fast development testing.
  • Zero Network Key Leakage: Private keys, seed phrases and passwords exist solely in browser memory and local encrypted storage. No external telemetry, no remote key tracking and no server database logging.

How HD Wallet Derivation Works

The biggest technical challenge in building a multi-chain wallet is that different blockchains rely on fundamentally different elliptic curves and derivation standards.

1. The Ethereum Pipeline (Secp256k1): Ethereum follows standard BIP-32 and BIP-44 specifications on the secp256k1 curve. Derivation follows the path m/44'/60'/0'/0/index:

  • 44' indicates the BIP-44 standard purpose.
  • 60' is the registered coin type for Ethereum.
  • 0' is the default account.
  • 0 is the external chain (for receiving addresses).
  • index is the incremental wallet index (0, 1, 2, ...).

The master seed produces a child private key, from which the uncompressed public key is derived. The Ethereum address is formed by hashing the public key with Keccak-256 and taking the last 20 bytes, formatted with EIP-55 mixed-case capitalization for checksum integrity.

2. The Solana Pipeline (Ed25519 & SLIP-0010): Solana uses the Edwards-curve Digital Signature Algorithm (Ed25519). Unlike secp256k1, Ed25519 does not safely support non-hardened child key derivation because of mathematical differences in curve point additions.

Solana wallets therefore implement the SLIP-0010 derivation standard, requiring all derivation path components to be hardened (m/44'/501'/index'/0'). Using ed25519-hd-key, mehVault traverses this path from the master seed to derive a 32-byte private key seed. That seed is passed into TweetNaCl to generate the full 64-byte secret key and wrapped into @solana/web3.js Keypair to export the base58-encoded public key.

3. Authenticated Client Encryption: To allow users to store their generated wallets without sending them to a database, mehVault implements authenticated encryption via the browser’s native crypto.subtle API. The user’s master password is never stored directly. Instead, a random 16-byte salt is generated and passed to PBKDF2 with 100,000 SHA-256 iterations to derive an AES-256-GCM key. The vault payload is then encrypted with a fresh 12-byte IV, ensuring resistance against both brute-force attacks and tampering.

Core Capabilities

Cryptographic Standards

  • BIP-39 Seed Generation: Generate standard 12-word or 24-word recovery phrases with cryptographically secure entropy.
  • Solana Derivation (Ed25519): SLIP-0010 compliant key derivation using tweetnacl and @solana/web3.js.
  • Ethereum Derivation (Secp256k1): Standard BIP-44 derivation using ethers.js with EIP-55 checksum addresses.

Security & Developer Tools

  • PBKDF2 + AES-256-GCM: Zero-backend authenticated encryption using the browser Web Crypto API.
  • Solana Devnet Faucet: Built-in Next.js Server Action requesting 0.1–2 SOL devnet test funds directly to derived keys.
  • Local-Only Storage: Secret phrases and private keys never leave local browser memory or encrypted storage.

Why Client-Side Key Generation Matters

The fundamental ethos of cryptocurrency is self-custody “not your keys, not your coins.” Yet surprisingly few tools make it easy for developers and everyday users to inspect how keys are created without putting their security at risk. By executing every cryptographic operation inside the browser tab using standard Web APIs, mehVault eliminates the trust requirement entirely. There is no server to be breached, no database containing user keys and no tracking scripts monitoring your activity. Once the page is loaded, you can disconnect your network connection entirely and continue generating, deriving and managing wallets offline.