Difference between revisions of "Ticket"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | + | A '''ticket''' is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited. | |
+ | |||
+ | == Format == | ||
+ | |||
+ | A ticket consists of two parts: the [[CMD|content metadata]] for the app, and a ticket head. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 10: | Line 14: | ||
|- | |- | ||
| 0x00 | | 0x00 | ||
+ | | 0x29AC | ||
+ | | - | ||
+ | | [[CMD]] | ||
+ | | Content metadata for the associated app | ||
+ | |- | ||
+ | | 0x29AC | ||
| 0x04 | | 0x04 | ||
− | | | + | | uint32 |
− | | | + | | bbId |
− | | console | + | | ID of the console this ticket is for |
|- | |- | ||
− | | | + | | 0x29B0 |
| 0x02 | | 0x02 | ||
− | | | + | | uint16 |
− | | | + | | tid |
− | | if bit 15 set then | + | | ticket ID; if bit 15 is set, then it is a trial ticket |
|- | |- | ||
− | | | + | | 0x29B2 |
| 0x02 | | 0x02 | ||
| uint16 | | uint16 | ||
− | | | + | | code |
− | | 0 or 2 = time, 1 = number of launches | + | | What type of trial limitation: 0 or 2 = time, 1 = number of launches |
|- | |- | ||
− | | | + | | 0x29B4 |
| 0x02 | | 0x02 | ||
− | | | + | | uint16 |
− | | | + | | limit |
− | | number of minutes, or number of launches | + | | number of minutes, or number of launches, before limit is reached |
|- | |- | ||
− | | | + | | 0x29B6 |
| 0x02 | | 0x02 | ||
− | | | + | | uint16 |
− | | | + | | reserved |
− | | | + | | padding |
|- | |- | ||
− | | | + | | 0x29B8 |
| 0x04 | | 0x04 | ||
− | | | + | | uint32 |
+ | | tsCrlVersion | ||
| ticket_crl_version | | ticket_crl_version | ||
− | |||
|- | |- | ||
+ | | 0x29BC | ||
| 0x10 | | 0x10 | ||
− | | | + | | uint8[16] |
− | | | + | | cmdIv |
− | | titlekey_iv | + | | titlekey_iv; IV used to re-encrypt title key (with ECDH key) |
− | |||
|- | |- | ||
− | | | + | | 0x29CC |
| 0x40 | | 0x40 | ||
− | | | + | | uint8[64] |
− | | | + | | serverKey |
− | | used with console's ECC | + | | ecc_pubkey; used with console's ECC private key to derive unique title key encryption key via ECDH |
|- | |- | ||
− | | | + | | 0x2A0C |
| 0x40 | | 0x40 | ||
− | | | + | | uint8[64] |
− | | | + | | issuer |
− | | certificate used to sign the ticket | + | | signer; certificate used to sign the ticket |
|- | |- | ||
− | | | + | | 0x2A4C |
| 0x100 | | 0x100 | ||
− | | | + | | uint8[256] |
− | | | + | | ticketSign |
− | | RSA-2048 | + | | RSA-2048 signature over all of the above ''and'' the CMD |
Revision as of 09:53, 15 June 2018
A ticket is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited.
Format
A ticket consists of two parts: the content metadata for the app, and a ticket head.
Offset | Length | Type | Description | Information |
---|---|---|---|---|
0x00 | 0x29AC | - | CMD | Content metadata for the associated app |
0x29AC | 0x04 | uint32 | bbId | ID of the console this ticket is for |
0x29B0 | 0x02 | uint16 | tid | ticket ID; if bit 15 is set, then it is a trial ticket |
0x29B2 | 0x02 | uint16 | code | What type of trial limitation: 0 or 2 = time, 1 = number of launches |
0x29B4 | 0x02 | uint16 | limit | number of minutes, or number of launches, before limit is reached |
0x29B6 | 0x02 | uint16 | reserved | padding |
0x29B8 | 0x04 | uint32 | tsCrlVersion | ticket_crl_version |
0x29BC | 0x10 | uint8[16] | cmdIv | titlekey_iv; IV used to re-encrypt title key (with ECDH key) |
0x29CC | 0x40 | uint8[64] | serverKey | ecc_pubkey; used with console's ECC private key to derive unique title key encryption key via ECDH |
0x2A0C | 0x40 | uint8[64] | issuer | signer; certificate used to sign the ticket |
0x2A4C | 0x100 | uint8[256] | ticketSign | RSA-2048 signature over all of the above and the CMD |