paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.63k stars 572 forks source link

Substrate BIP-39 generate different seeds between Polkadot-API and Subkey #3609

Open Lohann opened 11 months ago

Lohann commented 11 months ago

I'm linking here a issue I posted on substrate repo, I created the issue there because I wasn't sure if junction derivation is part of substrate's bip39 standard, it should in my opinion.

https://github.com/paritytech/substrate/issues/14631

burdges commented 4 months ago

Yeah, we should keep the derivation simple an accessible, subject to being obligated to support the old derivation types in subkey. I've no idea if https://github.com/paritytech/polkadot-sdk/pull/3579 is an improvement.

Also, it's sensible for hard derivations to work uniformly across key types, but we kinda screwed up by permitting soft derivations to be treated uniformly. It should've been hard derivations first and then the crypto crates handle soft derivations internally. bip32 doesn't work this way, but it's fucked up too. Oh well what's done is done.