Changes

34 bytes added ,  08:21, 2 January 2020
Line 17: Line 17:  
| Gamecard
 
| Gamecard
 
| DISA
 
| DISA
| [[#CTR-SAV0|CTR-SAV0]]
+
| [[#CTR-NOR0|CTR-NOR0]]
| 0x19
+
| 0x19 / 0x33
 
|-
 
|-
 
| [[Savegames]]
 
| [[Savegames]]
Line 87: Line 87:  
The data being authenticated by the AES CMAC is a 0x20-byte SHA-256 hash of a data block. The data block has different content formats among CMAC types. All types of data block contain a copy or a hash of the header, which is the start of the the rest of the verification chain, so the AES CMAC effectively authenticates the whole save image. Each type of data block is explained below.
 
The data being authenticated by the AES CMAC is a 0x20-byte SHA-256 hash of a data block. The data block has different content formats among CMAC types. All types of data block contain a copy or a hash of the header, which is the start of the the rest of the verification chain, so the AES CMAC effectively authenticates the whole save image. Each type of data block is explained below.
   −
=== CTR-SAV0 ===
+
=== CTR-NOR0 ===
    
This CMAC type is used for gamecard savegames. It is 0x28-byte long.
 
This CMAC type is used for gamecard savegames. It is 0x28-byte long.
Line 98: Line 98:  
| 0x00
 
| 0x00
 
| 8
 
| 8
| Magic "CTR-SAV0"
+
| Magic "CTR-NOR0"
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x20
 
| 0x20
 
| SHA-256 of the following 0x108-byte block
 
| SHA-256 of the following 0x108-byte block
|-
+
{| class="wikitable" border="1"
|
+
! Offset
 
+
! Length
|
+
! Description
 
  −
|
  −
 
   
|-
 
|-
 
| 0x00
 
| 0x00
 
| 8
 
| 8
| Magic "CTR-NOR0"
+
| Magic "CTR-SAV0"
 
|-
 
|-
 
| 0x08
 
| 0x08
 
| 0x100
 
| 0x100
 
| Copy of the DISA header
 
| Copy of the DISA header
 +
|}
 
|}
 
|}
   Line 140: Line 138:  
| 0x20
 
| 0x20
 
| SHA-256 of the following 0x108-byte block
 
| SHA-256 of the following 0x108-byte block
|-
+
{| class="wikitable" border="1"
|
+
! Offset
 
+
! Length
|
+
! Description
 
  −
|
  −
 
   
|-
 
|-
 
| 0x00
 
| 0x00
Line 155: Line 150:  
| 0x100
 
| 0x100
 
| Copy of the DISA header
 
| Copy of the DISA header
 +
|}
 
|}
 
|}
 +
    
=== CTR-SYS0 ===
 
=== CTR-SYS0 ===
Line 691: Line 688:  
== Summary diagram ==
 
== Summary diagram ==
   −
 
+
[[File:Disa-diff.png]]
external link: https://i.imgur.com/BjwShJZ.png
  −
* Please move this into 3dbrew when file uploading is fixed.
 
242

edits