Version 4 stores an HD wallet according to the [BIP32-Ed25519] specifications.
v4 data :
| `log N` | Encrypted data |
|:-------:|:--------------:|
| 1 byte | 64 bytes |
Encrypted data :
| seed(32 bytes) | public key(32bytes) |
|:--------------:|:-------------------:|
| seed bytes | public key bytes |
The public key serves as a checksum. To check that the DEWIF base64 string is not corrupted, generate a [BIP32-Ed25519] keypair with the seed and check that the obtained public key matches.
Symmetric encryption algorithm : aes256
aes256 key: scrypt of user passphrase with the following parameters: