Difference between revisions of "Ticket"

From WiiBrew
Jump to navigation Jump to search
m (Undo revision 5527 by Pepsiman (Talk))
(Added links of the encryption algorithms)
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 AES key, the Title ID of the data and are followed by a [[certificate chain]].
+
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] key, the Title ID of the data and are followed by a [[certificate chain]].
So far I have only seen tickets with RSA-2048 signatures. (Discs will only work with those signatures because the size of partition ticket is always 0x2a4)
+
So far I have only seen tickets with [http://en.wikipedia.org/wiki/RSA_numbers#RSA-2048 RSA-2048] signatures. (Discs will only work with those signatures because the size of partition ticket is always 0x2a4)
  
 
=== File structure ===  
 
=== File structure ===  
Line 27: Line 27:
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x1dc
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x1dc
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 8
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 8
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Title ID / IV used for AES-CBC encryption
+
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | 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
 
|- style="background-color: #ddd;"
 
|- style="background-color: #ddd;"
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x222
 
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x222

Revision as of 10:42, 15 May 2008

Tickets are found in many encrypted files used by the Wii (e.g. WAD Files or Wiidiscs). They contain the encrypted AES key, the Title ID of the data and are followed by a certificate chain. So far I have only seen tickets with RSA-2048 signatures. (Discs will only work with those signatures because the size of partition ticket is always 0x2a4)

File structure

Start Length Description
0x000 4 Signature type (always 0x10001 for RSA-2048 (to be confirmed))
0x005 256 Signature by a certificate's key (everything after this field is covered by this signature)
0x140 64 Signature issuer
0x1bf 16 Encrypted Title key
0x1dc 8 Title ID / Initialization Vector (IV) used for AES-CBC encryption
0x222 32 Always 0xFF (?)

To get the title key decrypt the 16 bytes at offset 0x1dc using the master key and the Title ID as IV.