-
Notifications
You must be signed in to change notification settings - Fork 60
Rusk Wallet Data File
Matteo Ferretti edited this page Jul 10, 2023
·
1 revision
This document describes the binary encoding of the Rusk Wallet data file.
- Total size:
108
bytes - File Format Type:
0x02
Offset | Value | Description |
---|---|---|
0000000 |
Header | The common header to all rusk binary files |
0000012 |
Encrypted content | 96 bytes encrypted using AES-256-CBC
|
- Parse and validate the 12 bytes of the header.
- If there aren't exactly
96
bytes left to read, throw an error. - Read the next
96
bytes. - Of those
96
bytes, take the fist16
bytes asiv
and the rest asencrypted_data
- Use
AES-256-CBC
to decryptencrypted_data
passingiv
and apassword
hashed viaSHA-256
- If the decryption fails, throw an error.
- The result are
65
bytes. - Of those
65
bytes, take the first64
as Seed. - Take the 65th byte as the number of addresses generated by the wallet.