Comments (2)
Thanks for this.
I reproduced the original discrepancy with electrum.
However bip32.org and rust crate bip32 both match this tool.
Testing further, bip32.org derivation matches this tool. So maybe electrum is not generating correctly? To reproduce:
Load http://bip32.org/
Enter Root Bip32 extended key
xprv9s21ZrQH143K2RNTXyvRSpYo18F2u9zxag3PwCqZgZbyEATwSERJQixPzL5cXHrV7EiVPTWp1u5UTZ1gdYqcRVqf2bf4iapyxsLDYM7Vd68
Set Derivation Path to custom
Set Custom Path to m/44'/0'/0'/0/20
See the address is
1DCcxvVrj6tFrPfg4YZWYme4BYNS1d34D6
which matches this tool but does not match electrum
Testing further, rust crate bip32 also matches this tool. Minimal example:
use bip32::{Mnemonic, PublicKey, Prefix, XPrv};
fn main() {
// Generate Mnemonic using the default language (English)
let m = "mystery sorry truck rural express wait method winner enforce logic gospel silent alone fantasy ride pilot price pool token chair dress mansion canvas current";
let mnemonic = Mnemonic::new(m, Default::default()).unwrap();
// Derive a BIP39 seed value using the given password
let seed = mnemonic.to_seed("");
// Derive the root `XPrv` from the `seed` value
let root_xprv = XPrv::new(&seed).unwrap();
println!("Root xprv {:?}", root_xprv.to_string(Prefix::XPRV));
// Derive a child `XPrv` using the provided BIP32 derivation path
let child_path = "m/44'/0'/0'/0/20";
let child_xprv = XPrv::derive_from_path(&seed, &child_path.parse().unwrap()).unwrap();
// Get the `XPub` associated with `child_xprv`.
let child_xpub = child_xprv.public_key();
// Get the ECDSA/secp256k1 signing and verification keys for the xprv and xpub
let verification_key = child_xpub.public_key();
println!("Public Key Hex: {:x?}", verification_key.to_bytes());
}
Open to ideas about why this difference exists. I can't work out how to generate the electrum key at index 20.
from bip39.
Sorry I'm not familiar enough with the matter to give any idea about why this difference exist.
But thank you very much for the detailed problem analysis, which I can use to drop an issue at electrum.
Maybe they can explain us what is happening at index 20.
from bip39.
Related Issues (20)
- Mixed casing in address hex text HOT 1
- Add balance option HOT 3
- why changing Derivation Path changes BIP32 Root Key HOT 2
- Generate button doesnโt work on safari for iOS and iPadOS HOT 8
- Can you add The Open Network(TON)?
- Needed: help extracting the js from the html for more general usage.
- bip38 ethereum encryption
- Ian Coleman can you help? Reward offered HOT 2
- looks like the `BIP39 Seed` part displays a 128 bytes-long string, whereas it should be only 64-long
- Can't find public key or eth address from coinomi HOT 1
- CopyCat Scam Website - What to do? HOT 2
- Electrum mnemonic HOT 1
- Double use of "your" in red warning section
- Ethereum pulbic keys HOT 3
- Request wallet fingerprint HOT 1
- Offline problem - responsive HOT 3
- Merge
- TON Coin not listed HOT 1
- wrong word indexes HOT 1
- UPDATE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bip39.