Reference
TCC-0002 Wallet file
The 103-byte TRAISEED1 file that holds a wallet's seed entropy. Layout, Argon2id and XChaCha20-Poly1305 encryption, and a test vector.
On this page
| Number | TCC-0002 |
|---|---|
| Status | Final |
| Category | Wallet |
| Identifier | Magic TRAISEED1, version 1 |
The command-line wallet keeps its seed in this file, and the web wallet stores and exports the same bytes, so a file moves between them unchanged. It holds the 32 bytes of seed entropy behind the 24-word recovery phrase. The recovery passphrase is never stored; keys follow TCC-0001.
Layout
| Offset | Bytes | Field |
|---|---|---|
| 0 | 9 | Magic, ASCII TRAISEED1 |
| 9 | 2 | Version, little-endian, 1 |
| 11 | 16 | Argon2id salt |
| 27 | 24 | XChaCha20-Poly1305 nonce |
| 51 | 4 | Ciphertext length, little-endian, 48 |
| 55 | 48 | Encrypted entropy and the 16-byte tag |
A file is exactly 103 bytes. .vault is the usual extension.
Encryption
key = Argon2id(password, salt) version 0x13, 65536 KiB, 3 iterations, parallelism 1, 32 bytes
ciphertext = XChaCha20-Poly1305(key, nonce, plaintext = entropy, aad = bytes 0..55)The password is UTF-8 and at least 12 bytes when a file is written. Salt and nonce are fresh for every write. A wrong password and any changed byte fail the same authentication check.
Only symmetric cryptography with 256-bit keys is involved. Grover's algorithm leaves 128-bit security, and there is no public-key step for Shor's algorithm; the keys derived from the seed are ML-DSA-65.
Test vector
| Field | Value |
|---|---|
| Password | correct horse battery staple |
| Recovery phrase | abandon 23 times, then art (32 zero bytes) |
| Recovery passphrase | none |
| Fingerprint | TRAI-5442-0D83 |
| First development address | dtrai1qyquxvhgj27zx2993t9hkefl4vv0y3nc4je2hrkgq7s2zz26vd78kkugum8p4r6hv46sn3wzyd |
5452414953454544310100467c2384c383e6ff553a1fa91e1aa5dea7fcf9d76b6cf21187c3ebd057471b7a
488f22d3145c0f65300000008bf94514ae6ce2b29b99336ae8ac3eebb879804b7d126c1a57729164d40eeb
bd292761afb0eed97144f9f55e19b4a376