Incorrect NIP06 derivation #745

Open
opened 2024-05-24 18:08:25 +00:00 by vitorpamplona · 0 comments

Folks, the NIP06's private key derivation is taking the raw entropy of the wordlist as input as opposed to the Master Seed on line:
bc2169a186/packages/app/src/Utils/nip6.ts (L29)

I think that is incorrect. Those are two different byte arrays. You can switch

entropyToMnemonic -> mnemonicToSeedSync

and then use the resulting byte array on that fromMasterSeed function.

This means that all Snort/Iris users who saved their words are using a key that is not supposed to be derived from those words and will fail to load in any other system.

Folks, the NIP06's private key derivation is taking the raw entropy of the wordlist as input as opposed to the Master Seed on line: https://git.v0l.io/Kieran/snort/src/commit/bc2169a186205247589e9e9d08eb2539c2de247d/packages/app/src/Utils/nip6.ts#L29 I think that is incorrect. Those are two different byte arrays. You can switch `entropyToMnemonic` -> `mnemonicToSeedSync` and then use the resulting byte array on that `fromMasterSeed` function. This means that all Snort/Iris users who saved their words are using a key that is not supposed to be derived from those words and will fail to load in any other system.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#745
No description provided.