Skip to content
Snippets Groups Projects
Commit c069ef33 authored by Éloïs's avatar Éloïs
Browse files

[DEWIF] fill examples with real data

parent 11691726
No related branches found
No related tags found
1 merge request!5Dewif
......@@ -126,7 +126,7 @@ The public key serves as a checksum. To check that the DEWIF base64 string is no
DEWIF base 64 string (with xor key `"toto titi tata"`):
`???`
`AAAAARAAAAEMALUJm4gAYvodNzw/CPBV4Pckm+pv1taVmMdXpbthi9YyDSu9ioexcFO1YJpKPKATZR5IMBpeOOnZkzhTb3k2SYo=`
##### Algorithm Bip32-Ed25519
......@@ -152,6 +152,7 @@ The entropy is stored in 32 bytes to avoid revealing the size of the stored mnem
If the entropy of the mnemonic is less than 32 bytes, the extra bytes are ignored (they can have any value).
To check that the DEWIF base64 string is not corrupted, compute the hash sha256 of `Language code || Entropy length || Mnemonic entropy`. The first eight bytes of the sha256 hash constitute the checksum.
WARNING: Only the "useful" part of the entropy is used to calculate the checksum, the extra bytes are ignored.
**Example 2:**
......@@ -168,8 +169,9 @@ To check that the DEWIF base64 string is not corrupted, compute the hash sha256
0x01 # Algorithm Bip32-Ed25519
0x00 # Language english
0x10 # Entropy length
0x33E46BB13A746EA41CDDE45C90846A7900000000000000000000000000000000 # Mnemonic entropy
0x???? # checksum
0x33E46BB13A746EA41CDDE45C90846A79 # Mnemonic entropy
0x 00000000000000000000000000000000 # Mnemonic entropy padding
0xa058ad20f43a5aa2 # checksum (SHA256 of 0x001033E46BB13A746EA41CDDE45C90846A79)
```
**XOR key generated from scrypt with the following parameters:**
......@@ -179,11 +181,11 @@ To check that the DEWIF base64 string is not corrupted, compute the hash sha256
| **N** | `2^14 = 16384` |
| **r** | 16 |
| **p** | 1 |
| **dkLen** | 64 |
| **dkLen** | 42 |
DEWIF base 64 string (with xor key `"toto titi tata"`):
`???`
`AAAAARAAAAEOAVdFrhPxVIhaRvWaM7vMCKg3C8Tvpn66v+z/7frzCONBABhrDBygESqnEg==`
[BIP32-Ed25519]: https://drive.google.com/file/d/0ByMtMw2hul0EMFJuNnZORDR2NDA/view
[BIP39]: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#generating-the-mnemonic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment