Guides ·

Solana Wallet Generation: ed25519 Keys और Addresses


Solana DeFi और consumer applications दोनों के लिए सबसे widely used blockchains में से एक है, लेकिन इसकी wallet generation process Bitcoin और Ethereum से meaningfully differ करती है। Different elliptic curve, different derivation paths, different address encoding और key management के बारे में different assumptions।

यह गाइड पूरी Solana wallet generation process cover करती है: ed25519 elliptic curve, Solana-specific derivation paths, Base58 address encoding और Solana ecosystem unique security considerations।

Solana Bitcoin और Ethereum से कैसे Different है

Property Bitcoin / Ethereum Solana
Elliptic curve secp256k1 ed25519
Signature scheme ECDSA EdDSA (Ed25519)
Private key size 32 bytes 64 bytes (expanded)
Public key size 33 bytes (compressed) 32 bytes
Address encoding Bech32 / Hex Base58
Derivation path m/44'/0'/0' या m/44'/60'/0'/0 m/44'/501'/0'/0'

Solana की design choices उसकी priorities reflect करती हैं: high throughput और fast signature verification। Ed25519 signatures roughly twice as fast verify होती हैं ECDSA की तुलना में। Curves की deeper technical comparison के लिए secp256k1 vs ed25519 देखें।

ed25519 Curve

Ed25519 Edwards-curve Digital Signature Algorithm (EdDSA) का specific instance है, Curve25519 पर operate करता है। Prime field 2^255 - 19 पर defined है। Security level approximately 128 bits --- secp256k1 के comparable।

Key Generation

Solana private key 32-byte random scalar से शुरू होती है। SHA-512 से hash होकर 64-byte expanded key produce करती है। Lower 32 bytes (bit clamping के बाद) signing scalar बनते हैं।

Public key clamped scalar को curve के base point B से multiply करके derive होती है। 32-byte public key ही Solana address है --- Ethereum के Keccak-256 जैसा additional hashing step नहीं।

Random 32 bytes  SHA-512  64-byte expanded key
     Lower 32 bytes (clamped) × Base point B  32-byte public key = Solana address

Deterministic Signatures

Ed25519 की एक advantage: signatures deterministic हैं। ECDSA को हर signature के लिए random nonce चाहिए, और faulty random number generator catastrophically private key leak कर सकता है। Ed25519 nonce message और private key से derive करता है।

Performance

Ed25519 signature verification fast --- roughly 70,000 verifications per second on single modern CPU core। ECDSA verification से approximately twice speed।

Solana Derivation Paths

Standard Path: m/44'/501'/0'/0'

Canonical Solana derivation path:

m/44'/501'/0'/0'

BIP44 के अनुसार breakdown:

  • 44' --- Purpose: BIP44 multi-account hierarchy
  • 501' --- Coin type: Solana का SLIP44 registered index
  • 0' --- Account: first account
  • 0' --- Address index (Solana convention में)

Notice करें कि चारों levels hardened derivation उपयोग करते हैं। यह Ethereum के m/44'/60'/0'/0/0 से different है जो last two levels के लिए non-hardened derivation उपयोग करता है। Solana की all-hardened paths stronger isolation provide करती हैं।

Multiple Accounts

  • First account: m/44'/501'/0'/0'
  • Second account: m/44'/501'/1'/0'
  • Third account: m/44'/501'/2'/0'

Compatibility Considerations

सभी Solana wallets exactly same derivation path उपयोग नहीं करते। Solana CLI m/44'/501' (दो levels) उपयोग करती थी, जबकि अधिकांश GUI wallets m/44'/501'/0'/0' उपयोग करते हैं। Wallet recover करते समय confirm करें कि कौन सा derivation path expected है।

SafeSeed का Solana Seed Phrase Generator exact derivation path display करता है।

Step-by-Step Wallet Generation

Step 1: Entropy Generate करें

128 bits (12-word phrase) या 256 bits (24-word phrase) entropy produce करें। SafeSeed browser के Web Crypto API उपयोग करता है।

Step 2: Mnemonic बनाएं

SHA-256 checksum bits append करें, 11-bit segments में split करें, BIP39 word list पर map करें। Process Bitcoin और Ethereum से identical --- BIP39 blockchain-agnostic है। BIP39 Explained देखें।

Step 3: Master Seed Derive करें

PBKDF2-HMAC-SHA512 2,048 iterations के साथ apply करें, 512-bit master seed produce करें।

Step 4: Solana Key Derive करें

Derivation path m/44'/501'/0'/0' walk करें। Solana ed25519 उपयोग करता है, इसलिए child key derivation SLIP-0010 standard उपयोग करती है (BIP32 directly नहीं)।

Output 32-byte ed25519 seed है।

Step 5: Keypair Generate करें

32-byte seed को ed25519 key generation में feed करें:

  1. Seed का SHA-512 compute करें --- 64 bytes
  2. Lower 32 bytes पर bit clamping apply करें
  3. Clamped scalar को base point B से multiply करें --- 32-byte public key

Step 6: Address Encode करें

32-byte public key Base58 में encode करें। कोई additional hashing नहीं, कोई prefix byte नहीं।

SafeSeed के Solana Private Key Generator से पूरा flow generate और inspect करें।

Base58 Address Format

Solana addresses Base58 encoding उपयोग करते हैं --- Bitcoin legacy addresses जैसा same Base58 alphabet जो visually confusing characters exclude करता है।

Typical Solana address:

7EcDhSYGxXyscszYEp35KHN8vvw3svAuLKTzXwCFLtV

Properties

  • Length: 32--44 characters (most commonly 43--44)
  • Character set: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
  • कोई prefix नहीं: Bitcoin (1, 3, bc1) या Ethereum (0x) के विपरीत
  • कोई embedded checksum नहीं: Base58Check (Bitcoin legacy addresses) के विपरीत

Checksum नहीं होने से careful handling essential है। Copy-paste उपयोग करें manual transcription के बजाय। Solana Address Validator से validate करें। Address formats की broader comparison के लिए Crypto Address Formats Explained देखें।

Solana के लिए Security Considerations

Offline Generation Critical है

Solana addresses में embedded checksum नहीं है, generation के दौरान mistakes detect करना harder है। Offline generate करें। SafeSeed tools इसके लिए designed हैं। General offline generation principles के लिए Online Seed Generator Safety देखें।

Keypair Files

Solana CLI private keys को 64 bytes के JSON arrays (ed25519 keypair) के रूप में store करती है। Keypair files को seed phrases जैसी rigor से protect करें।

Token Accounts

Ethereum के विपरीत जहां ERC-20 tokens same address पर held होते हैं, Solana associated token accounts (ATAs) उपयोग करता है। सभी ATAs same private key से controlled हैं, इसलिए seed phrase backup sufficient है।

Program Derived Addresses (PDAs)

Solana PDAs --- program ID और seeds से deterministically generated addresses जिनमें corresponding private key नहीं --- smart contracts (programs) on-chain state manage करने के लिए उपयोग करते हैं। User-controlled wallets नहीं हैं।

Private Key Security Best Practices

Fundamentals same रहते हैं chain कोई भी हो: seed phrase कभी share न करें, networked device पर digitally store न करें, significant holdings के लिए cold storage उपयोग करें। Private Key Security Best Practices देखें।

Solana की wallet generation process conceptually Bitcoin और Ethereum से similar है --- entropy seed phrase बनती है, seed phrase master key बनती है, derivation paths individual accounts produce करते हैं। लेकिन underlying curve (ed25519), derivation standard (SLIP-0010) और address format (raw Base58 बिना checksum) distinct implementation details create करते हैं। इन differences को समझना आपकी Solana holdings protect करने की foundation है।