Draft
Add externally verifiable test vectors for Electrum v1/v2 mnemonic derivation#3
Conversation
… and key_tests Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Validate Electrum mnemonic to key and address generation changes
Add Electrum v1/v2 mnemonic test vectors with references
Feb 5, 2026
…ernal references Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Add Electrum v1/v2 mnemonic test vectors with references
Add externally verifiable test vectors for Electrum v1/v2 mnemonics
Feb 5, 2026
edtubbs
force-pushed
the
0.1.5-dev-electrum-seed
branch
from
February 5, 2026 22:17
faf608c to
1979133
Compare
…ix expected value Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Add externally verifiable test vectors for Electrum v1/v2 mnemonics
Register test_electrum_v1_mnemonic_to_master_key and fix expected seed value
Feb 5, 2026
edtubbs
force-pushed
the
0.1.5-dev-electrum-seed
branch
2 times, most recently
from
February 5, 2026 22:29
1cdd749 to
2fa6243
Compare
…tion Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Register test_electrum_v1_mnemonic_to_master_key and fix expected seed value
Validate Electrum test vectors against reference implementations and fix test registration
Feb 5, 2026
edtubbs
force-pushed
the
0.1.5-dev-electrum-seed
branch
from
February 5, 2026 23:46
2fa6243 to
bc8b234
Compare
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Validate Electrum test vectors against reference implementations and fix test registration
Squash 7 commits into single commit for Electrum test vectors
Feb 5, 2026
Copilot
AI
changed the title
Replace strtok with strtok_r to fix aarch64 linker error
Add Electrum mnemonic test vectors and fix strtok linker errors
Feb 9, 2026
Copilot
AI
changed the title
Add Electrum mnemonic test vectors and fix strtok linker errors
Add externally verifiable Electrum v1/v2 test vectors and fix strtok linker errors
Feb 12, 2026
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Add externally verifiable Electrum v1/v2 test vectors and fix strtok linker errors
Add Electrum v1/v2 mnemonic test vectors with external verification
Feb 12, 2026
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Add Electrum v1/v2 mnemonic test vectors with external verification
Add externally-verifiable Electrum v1/v2 test vectors and fix v1 derivation
Feb 12, 2026
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Add externally-verifiable Electrum v1/v2 test vectors and fix v1 derivation
Add validated test vectors for Electrum v1/v2 mnemonic derivation
Feb 12, 2026
Copilot
AI
changed the title
Add validated test vectors for Electrum v1/v2 mnemonic derivation
Add externally-verifiable Electrum v1/v2 mnemonic test vectors and fix v1 derivation path
Feb 12, 2026
Copilot
AI
changed the title
Add externally-verifiable Electrum v1/v2 mnemonic test vectors and fix v1 derivation path
Add independently verified Electrum v1/v2 mnemonic test vectors and fix v1 derivation
Feb 12, 2026
Copilot
AI
changed the title
Add independently verified Electrum v1/v2 mnemonic test vectors and fix v1 derivation
Add externally verifiable test vectors for Electrum v1/v2 mnemonic derivation
Feb 12, 2026
edtubbs
force-pushed
the
0.1.5-dev-electrum-seed
branch
3 times, most recently
from
February 17, 2026 19:43
9f23b1c to
bcd590a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds comprehensive test vectors with independent verification for Electrum v1 and v2 mnemonic-to-key derivation. Previous implementation lacked external validation.
Test Vectors Added
bip39_tests.c:
key_tests.c:
electrum_v1_derive_privkey32()Independent Verification
Python script (test/verify_electrum_v1_vectors.py):
Uses ecdsa library (official Electrum dependency) to independently verify all test vectors.
Key Fixes
dogecoin_hdnode_from_seed()(BIP32) toelectrum_v1_derive_privkey32()(custom derivation)electrum_v1:n/for_changeformat correctly (was reversed)strtokwithstrtok_rin bip39.c, spv.c, utils.c (fixes aarch64 linker errors)test_electrum_v1_mnemonic_to_master_key()to unittester.cDocumentation
doc/electrum_v1_keypath.md: Keypath format reference (electrum_v1:n/for_change)doc/electrum_v1_vs_bip32.md: Clarifies Electrum v1 uses custom derivation, not BIP32/BIP84 pathsVerification Methods
All test vectors can be independently verified:
python3 -c "import hashlib; print(hashlib.pbkdf2_hmac('sha512', b'mnemonic', b'electrum', 2048).hex())"python3 test/verify_electrum_v1_vectors.py./such -c mnemonic_to_key -n "alpha bravo" -lmatches test expectationsTest vectors reference NIST standards (PBKDF2: RFC 2898, SHA-256: FIPS 180-4) and official Electrum implementation.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.