Browse Source

Document entropy

pull/2/head
Luke Childs 6 years ago
parent
commit
8027a40701
  1. 24
      README.md

24
README.md

@ -48,6 +48,30 @@ Must be an integer, divisible by 32, larger than 128, and smaller than 256.
**Note:** This is not the resulting amount of entropy. **Note:** This is not the resulting amount of entropy.
## How Secure Is This?
The mnemonic is seeded by a cryptographically secure random number generator. However there is a slight reduction in entropy due to the introduction of the doge-isms. A doge seed has about 19.415 fewer bits of entropy than a standard BIP39 seed of equivalent length.
Each word in a standard BIP39 mnemonic has 2048 possible values (11 bits of entropy). However a 1 bit checksum is added for every 3 words. These checksum bits reduce the entropy of the last word. That can be expressed as:
<div align="center">
![*S = log2(2048<sup>W</sup>) - (W/3)*](https://latex.codecogs.com/svg.latex?S&space;=&space;log2(2048^{W})&space;-&space;\frac{W}{3})
<sup>Where S is entropy and W is number of words</sup>
</div>
A doge seed is the same apart from two changes. The first word is one of the three words "much", "such", or "very". The third word is one of two words from the previous selection that wasn't chosen for the first word. That can be expressed as:
<div align="center">
![*S = log2(2048<sup>W-2</sup>) + log2(3) + log2(2) - (W/3)*](https://latex.codecogs.com/svg.latex?S&space;=&space;log2(2048^{W-2})&space;+&space;log2(3)&space;+&space;log2(2)&space;-&space;\frac{W}{3})
<sup>Where S is entropy and W is number of words</sup>
</div>
## License ## License
MIT © Luke Childs MIT © Luke Childs

Loading…
Cancel
Save