Changes

106 bytes added ,  21:25, 31 October 2022
m
Line 4: Line 4:     
== Structure ==
 
== Structure ==
βˆ’
=== Header ===
+
=== Signed blob header ===
 
{| class="wikitable"
 
{| class="wikitable"
 
|- style="background-color: #ddd;"
 
|- style="background-color: #ddd;"
βˆ’
! Start
+
! Absolute offset
 
! Length
 
! Length
 
! Description
 
! Description
Line 13: Line 13:  
| 0x000
 
| 0x000
 
| 4
 
| 4
βˆ’
| Signature type
+
| Signature type (always 0x10001 for RSA-2048 w/ SHA-1)
 
|-
 
|-
 
| 0x004
 
| 0x004
 
| 256
 
| 256
βˆ’
| Signature
+
| Signature covering the main header as well as all CMDs
 
|-
 
|-
 
| 0x104
 
| 0x104
 
| 60
 
| 60
 
| Padding for 64-byte alignment
 
| Padding for 64-byte alignment
 +
|}
 +
 +
=== Main header ===
 +
{| class="wikitable"
 +
|- style="background-color: #ddd;"
 +
! Absolute offset
 +
! Length
 +
! Description
 
|-
 
|-
 
| 0x140
 
| 0x140
 
| 64
 
| 64
βˆ’
| Issuer
+
| Certificate issuer
 
|-
 
|-
 
| 0x180
 
| 0x180
Line 45: Line 53:  
| 0x184
 
| 0x184
 
| 8
 
| 8
βˆ’
| System Version - if this is set to something other than "title" 0-0, then when launching this title, if [[:/sys/launch.sys]] does not exist, the parameters to ES_LaunchTitle are written to that file, then the title ID in this field is launched. This is typically used to force titles to run under a certain IOS, but it can theoretically be any title, and this can be chained. For [[boot2]], this is set to the Boot2 version (for example, 0-4 for [[boot2v4]])
+
| System Version (the IOS that the title needs, Set to 0 for IOS itself. For the boot2, this is identical to the boot2 version.)
 
|-
 
|-
 
| 0x18C
 
| 0x18C
Line 101: Line 109:  
| 0x1E2
 
| 0x1E2
 
| 2
 
| 2
βˆ’
| Unused
+
| Minor version (unused - the term typically refers to the lower half of the main version instead)
βˆ’
|-
  βˆ’
| 0x1E4
  βˆ’
| 36*nbr_cont
  βˆ’
| Contents
   
|}
 
|}
   βˆ’
=== Content ===
+
=== Content metadata (CMD) ===
 +
Following the main header (starting at offset 0x1E4) is a list of CMDs (one per content).
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
βˆ’
! Start
+
! Offset
 
! Length
 
! Length
 
! Description
 
! Description
Line 139: Line 145:  
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
βˆ’
! Start
+
! Offset
 
! Length
 
! Length
 
! Description
 
! Description
Line 157: Line 163:  
| 0x124
 
| 0x124
 
| 4
 
| 4
βˆ’
| Tag
+
| Public Key Type
 
|-
 
|-
 
| 0x128
 
| 0x128
Line 163: Line 169:  
| Name
 
| Name
 
|-
 
|-
βˆ’
| 0x168
+
| 0x12C
 +
| 4
 +
| Date
 +
|-
 +
| 0x16C
 
|  
 
|  
βˆ’
| Key
+
| Public Key
 
|}
 
|}
   Line 243: Line 253:  
   u8 sig[256];  // 256 for RSA_2048, 512 for RSA_4096
 
   u8 sig[256];  // 256 for RSA_2048, 512 for RSA_4096
 
   u8 issuer[32];
 
   u8 issuer[32];
βˆ’
   u32 tag;  // identifies what is being signed
+
   u32 key_type;  // the type of public key
 
   u8 name[64]; // name of thing being signed
 
   u8 name[64]; // name of thing being signed
 
   u8 key[...];
 
   u8 key[...];