Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIP-0003 clarify Trezor deviation at 24-word mnemonics #76

Conversation

refi93
Copy link
Contributor

@refi93 refi93 commented Mar 19, 2021

Motivation: Document the reason why Trezor's keys/addresses deviate for 24-word mnemonics

@@ -74,6 +74,6 @@ function tweakBits(data) {

When used < 24 words, the algorithm is the same as **Icarus**

When using 24 words, **TODO**
When using 24 words, due to incorrect removal of the [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#generating-the-mnemonic) entropy checksum bits (via integer division by 8, incorrectly assuming the entropy checksum is always less than 8 bits), the entropy bytes are passed into the `generateMasterKey()` function together with the checksum which for 24-word mnemonics happens to be 8 bits = 1 byte. This bug has been identified and documented in the following Trezor firmware pull request: https://github.com/trezor/trezor-firmware/pull/1388
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 Fantastic @refi93

@crptmppt crptmppt merged commit a36e1eb into cardano-foundation:master Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants