@@ -75,17 +75,20 @@ The 4 bytes of the version field must be interpreted as an unsigned integer enco
...
@@ -75,17 +75,20 @@ The 4 bytes of the version field must be interpreted as an unsigned integer enco
#### Encrypted data
#### Encrypted data
**Symmetric encryption algorithm:**aes256
**Symmetric encryption algorithm:**[XOR cipher]
**AES256 key** = scrypt of user passphrase with the following parameters:
[XOR cipher] is the fastest symmetric encryption algorithm in the world, the only limitation is that the encryption key must be at least as long as the encrypted data.
**XOR key** = scrypt of user passphrase with the following parameters:
The padding is used so that the size of the encrypted data is a multiple of 16 (necessary for aes256).
Language code:
Language code:
...
@@ -145,7 +147,9 @@ Language code:
...
@@ -145,7 +147,9 @@ Language code:
| 6 | Korean |
| 6 | Korean |
| 7 | Spanish |
| 7 | Spanish |
Mnemonic entropy is defined on [BIP39]
Mnemonic entropy is defined on [BIP39].
The entropy is stored in 32 bytes to avoid revealing the size of the stored mnemonic.
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.
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.
...
@@ -164,23 +168,25 @@ To check that the DEWIF base64 string is not corrupted, compute the hash sha256
...
@@ -164,23 +168,25 @@ To check that the DEWIF base64 string is not corrupted, compute the hash sha256