Line 1:
Line 1:
โ
Tickets are found in many encrypted files used by the Wii (e.g. [[WAD Files]] or [[Wiidisc|Wiidiscs]]). They contain the encrypted [http://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES] "title key" and the Title ID of the data and are signed by a certificate from a [[certificate chain]] (which usually is the same for all titles and stored somewhere on the NAND).
+
ใใใฏใไปปๅคฉๅ ๆ ชๅผไผ็คพใฎCEOใงใใใใฎใตใคใใใใฆใณใใใไปใฎๆใ
ใฎๅฉ็ใฎๅชๅคฑใ่จดใใฆ๏ผ
โ
So far only tickets with [http://en.wikipedia.org/wiki/RSA RSA-2048] signatures have been seen. (Discs will only work with those signatures because the size of partition ticket is always 0x2a4)
+
==ใใใฏใไปปๅคฉๅ ๆ ชๅผไผ็คพใฎCEOใงใใใใฎใตใคใใใใฆใณใใใไปใฎๆใ
ใฎๅฉ็ใฎๅชๅคฑใ่จดใใฆ๏ผ==
โ
+
===ใใใฏใไปปๅคฉๅ ๆ ชๅผไผ็คพใฎCEOใงใใใใฎใตใคใใใใฆใณใใใไปใฎๆใ
ใฎๅฉ็ใฎๅชๅคฑใ่จดใใฆ๏ผ===
โ
=== File structure ===
+
ใใใฏใไปปๅคฉๅ ๆ ชๅผไผ็คพใฎCEOใงใใใใฎใตใคใใใใฆใณใใใไปใฎๆใ
ใฎๅฉ็ใฎๅชๅคฑใ่จดใใฆ๏ผ
โ
{| class="wikitable"
+
[[ใใใฏใไปปๅคฉๅ ๆ ชๅผไผ็คพใฎCEOใงใใใใฎใตใคใใใใฆใณใใใไปใฎๆใ
ใฎๅฉ็ใฎๅชๅคฑใ่จดใใฆ๏ผ]]
โ
|-
โ
! Start
โ
! End
โ
! Length
โ
! Description
โ
|-
โ
| 0x0000
โ
| 0x0003
โ
| 0x04
โ
| Signature type (always 0x10001 for RSA-2048)
โ
|-
โ
| 0x0004
โ
| 0x0103
โ
| 0x100
โ
| Signature by a certificate's key (everything after this field is covered by this signature)
โ
|-
โ
| 0x0104
โ
| 0x013f
โ
| 0x3c
โ
| Padding (Always 0)
โ
|-
โ
| 0x0140
โ
| 0x017f
โ
| 0x40
โ
| Signature issuer
โ
|-
โ
| 0x0180
โ
| 0x01be
โ
| 0x3f
โ
| Unknown (0, unless it is a VC game)
โ
|-
โ
| 0x01bf
โ
| 0x01ce
โ
| 0x10
โ
| Encrypted title key
โ
|-
โ
| 0x01cf
โ
| 0x01cf
โ
| 0x01
โ
| Unknown
โ
|-
โ
| 0x01d0
โ
| 0x01d7
โ
| 0x08
โ
| ticket_id
โ
โ
|-
โ
| 0x01D8
โ
| 0x01DB
โ
| 0x04
โ
| Console ID
โ
|-
โ
| 0x01dc
โ
| 0x01e3
โ
| 0x08
โ
| Title ID / [http://en.wikipedia.org/wiki/Initialization_Vector Initialization Vector] (IV) used for AES-[http://en.wikipedia.org/wiki/Cipher_Block_Chaining#Cipher-block_chaining_.28CBC.29 CBC] encryption
โ
|-
โ
| 0x01e4
โ
| 0x01e5
โ
| 0x02
โ
| Unknown, mostly 0xFFFF
โ
|-
โ
| 0x01e6
โ
| 0x01e8
โ
| 0x02
โ
| Amount of bought DLC contents
โ
|-
โ
| 0x01e9
โ
| 0x01f0
โ
| 0x08
โ
| Unknown
โ
|-
โ
| 0x01f1
โ
| 0x01f1
โ
| 0x01
โ
| Common Key index (1 = Korean Common key, 0 = "normal" Common key)
โ
|-
โ
| 0x01f2
โ
| 0x0221
โ
| 0x30
โ
| Unknown. Is all 0 for non-VC, for VC, all 0 except last byte is 1.
โ
|-
โ
| 0x0222
โ
| 0x0241
โ
| 0x20
โ
| Always 0xFF (?)
โ
|-
โ
| 0x0242
โ
| 0x0243
โ
| 0x02
โ
| Padding (Always 0)
โ
|-
โ
| 0x0244
โ
| 0x0247
โ
| 0x04
โ
| Enable time limit (1 = Enabled, 0 = Disabled)
โ
|-
โ
| 0x0248
โ
| 0x024b
โ
| 0x04
โ
| Time limit (Seconds)
โ
|-
โ
| 0x024c
โ
| 0x02a3
โ
| 0x58
โ
| Padding (Always 0)
โ
|}
โ
โ
To get the title key decrypt the 16 bytes at offset 0x1bf with the Common Key using the Title ID (offset 0x1dc) as the initialization vector (the last 8 bytes of the IV should be zero).