From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:XCI" |
|---|
| claim | "The XCI card header is 0x200 bytes: a 0x100-byte signature, magic 'HEAD' at 0x100, secure area offset, cartridge type at 0x10D, cartridge size, a reversed IV, the root HFS0 offset and header size with its SHA-256, a crypto-header hash, and a 0x70-byte encrypted block at 0x190." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:XCI" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "xci_header_t" |
|---|
| size | "0x200" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 256 |
|---|
| type | "uint8_t[0x100]" |
|---|
| name | "header_sig" |
|---|
|
| offset | "0x100" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic ('HEAD' 0x44414548)" |
|---|
|
| offset | "0x104" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "secure_offset" |
|---|
|
| offset | "0x10D" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "cart_type" |
|---|
|
| offset | "0x118" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "cart_size" |
|---|
|
| offset | "0x120" |
|---|
| size | 16 |
|---|
| type | "uint8_t[0x10]" |
|---|
| name | "reversed_iv" |
|---|
|
| offset | "0x130" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "hfs0_offset" |
|---|
|
| offset | "0x138" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "hfs0_header_size" |
|---|
|
| offset | "0x140" |
|---|
| size | 32 |
|---|
| type | "uint8_t[0x20]" |
|---|
| name | "hfs0_header_hash" |
|---|
|
| offset | "0x160" |
|---|
| size | 32 |
|---|
| type | "uint8_t[0x20]" |
|---|
| name | "crypto_header_hash" |
|---|
|
| offset | "0x190" |
|---|
| size | 112 |
|---|
| type | "uint8_t[0x70]" |
|---|
| name | "encrypted_data" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "xci_header_t as declared; offsets computed from the declared field sizes (0x100 + 4+4+4+1+1+1+1, u64 at 0x110, cart_size at 0x118, ...). xci.c line 35 rejects files whose magic is not MAGIC_HEAD; line 96 sets the root HFS0 offset from header.hfs0_offset." |
|---|
| repo | "SciresM/hactool" |
|---|
| commit | "1d64a83450e025622f3468c28fc4164dad2c5ef6" |
|---|
| path | "xci.h" |
|---|
| lines | "10, 54-75" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Card header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:17:49.602Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:05:30.247Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read xci_header_t in hactool xci.h at the cited commit and summed the member sizes including the _0x.. padding: magic 0x100, secure_offset 0x104, cart_type 0x10D, cart_size 0x118, reversed_iv 0x120, hfs0_offset 0x130, hfs0_header_size 0x138, hashes 0x140 and 0x160, encrypted_data 0x190 (0x70), ending at 0x200." |
|---|
|
|
|---|