41. Wallet Standards
Kortana implements industry-standard cryptographic wallet formats, seed phrase generation algorithms, and hierarchical deterministic key derivation paths. This guarantees seamless interoperability with MetaMask, hardware wallets (Ledger, Trezor), mobile wallets, and custom custody software.
41.1 BIP-39 Mnemonic Words
Kortana adheres strictly to the BIP-39 (Bitcoin Improvement Proposal 39) specification for mnemonic recovery seed phrase generation. The generation process starts by sampling 128 bits (for 12 words) or 256 bits (for 24 words) of cryptographically secure pseudo-random entropy from the underlying operating system kernel CSPRNG (/dev/urandom or Windows CryptGenRandom).
A cryptographic checksum is computed by taking the initial Entropy Length / 32 bits of the SHA-256 hash of the raw entropy and appending them to the entropy bytes. The resulting bit sequence is split into 11-bit chunks, each indexing directly into the standardized BIP-39 English word list (2,048 unique words). The mnemonic phrase is converted into a 512-bit binary seed using PBKDF2-HMAC-SHA512 with 2,048 iterations and an optional user-supplied passphrase, providing quantum-resistant key stretching and brute-force protection.
41.2 BIP-32 & BIP-44 HD Derivation
Hierarchical Deterministic (HD) key derivation in Kortana strictly implements the BIP-32 tree structure and BIP-44 multi-account hierarchy. The master seed generated from the BIP-39 mnemonic is used to derive a master extended private key (xprv) and master chain code using HMAC-SHA512.
Child private keys are derived along standardized derivation paths:
- Ethereum-Compatible EVM Path:
m/44'/60'/0'/0/index(Coin Type60for standard Web3 wallets such as MetaMask and Frame). - Native Kortana Protocol Path:
m/44'/9002'/0'/0/index(Coin Type9002matching the Kortana Mainnet Chain ID for native CLI wallets, Ed25519 addresses, and validator identities).
Hardened key derivation is enforced at the purpose, coin type, and account levels (') to ensure that the compromise of an extended public key (xpub) at a lower level cannot compromise the parent private key.
41.3 Keystore V3 Format
For secure storage of private keys on disk, kortana-cli and kortanad export and import standard Ethereum Keystore V3 JSON files. The private key is encrypted using the symmetric AES-128-CTR cipher, with encryption keys derived from a user-supplied password via the memory-hard scrypt Key Derivation Function (KDF).
The default scrypt parameters configured in Kortana (n = 262144, r = 8, p = 1, dklen = 32) require approximately 256 MB of RAM per hash attempt, providing powerful defense against high-speed GPU/ASIC parallel dictionary cracking attacks. The keystore includes a SHA-256 MAC validation digest that verifies password correctness prior to initiating decryption, preventing partial plaintext corruption.