Changes

911 bytes added ,  23 April
m
→‎User Agent: The unknown number represents the CTRSDK version that the BOSS sysmodule was built with
Line 21: Line 21:  
The default user-agent used for SpotPass HTTPS requests (including the policylist) has the following format:
 
The default user-agent used for SpotPass HTTPS requests (including the policylist) has the following format:
   −
<tt><user agent codename>-<user agent version>/<printed hex u64 [[CfgS:GetLocalFriendCodeSeed|LocalFriendCodeSeed]]>-<printed hex u64 [[FRDU:GetMyFriendKey|Friend]] [[FRDU:PrincipalIdToFriendCode|Code]]>/<text [[CVer|system]] [[NVer|version]]>/<unknown decimal value>/<[[Cfg:GetSystemModel|system model number]]></tt>
+
<tt><user agent codename>-<user agent version>/<printed hex u64 [[CfgS:GetLocalFriendCodeSeed|LocalFriendCodeSeed]]>-<printed hex u64 [[FRDU:GetMyFriendKey|Friend]] [[FRDU:PrincipalIdToFriendCode|Code]]>/<text [[CVer|system]] [[NVer|version]]>/<CTRSDK version of sysmodule>/<[[Cfg:GetSystemModel|system model number]]></tt>
   −
The codename can be set to either <tt>PBOS</tt> (Production BOSS?) or <tt>DBOS</tt> (Development BOSS?) depending if the console is a [[Configuration_Memory#UNITINFO|retail]] unit. As of system version 11.17, the user agent version is hardcoded to 8.0 and the decimal value is set to 62452 (0xF3F4).
+
The codename can be set to either <tt>PBOS</tt> (Production BOSS?) or <tt>DBOS</tt> (Development BOSS?) depending if the console is a [[Configuration_Memory#UNITINFO|retail]] unit. As of system version 11.17, the user agent version is hardcoded to 8.0 and the CTRSDK version is set to 62452 (0xF3F4).
    
No user-agent is used for plaintext HTTP requests with SpotPass.
 
No user-agent is used for plaintext HTTP requests with SpotPass.
Line 45: Line 45:  
== Automatic System Update Download ==
 
== Automatic System Update Download ==
 
See [[Automatic System Update Download]].
 
See [[Automatic System Update Download]].
 +
 +
== BOSS Sysmodule Savegame==
 +
See [[BOSS Savegame]]
    
== Content Container ==
 
== Content Container ==
Line 71: Line 74:  
| 0xC
 
| 0xC
 
| 0x8
 
| 0x8
| u64 release date (UNIX timestamp)
+
| u64 serial number (?)
 
|-
 
|-
 
| 0x14
 
| 0x14
Line 95: Line 98:     
Data following the BOSS header is encrypted with AES-CTR. The AES key that is used is stored in [[AES_Registers#Keyslots|keyslot 0x38]]. The first 12 bytes of the IV are from offset 0x1C of the header, while the last 32-bit integer of the IV in big-endian is 0x1. The IV from the header is random per file, and an unique random IV is used each time the content is updated. The cleartext data begins with the content header.
 
Data following the BOSS header is encrypted with AES-CTR. The AES key that is used is stored in [[AES_Registers#Keyslots|keyslot 0x38]]. The first 12 bytes of the IV are from offset 0x1C of the header, while the last 32-bit integer of the IV in big-endian is 0x1. The IV from the header is random per file, and an unique random IV is used each time the content is updated. The cleartext data begins with the content header.
 +
 +
The 64-bit number at 0xC may be a serial number which is increased every time someone requested to sign and create a boss container for a file. The 3DS sees the downloaded file as new if this number is different from the previous download (Doesn't matter if the number is bigger or smaller).
 +
 +
The boss system module v13314 begins at address 0x0010eb98 with the function for parsing the BOSS header.
    
=== Content Header ===
 
=== Content Header ===
Line 109: Line 116:  
| 0x10
 
| 0x10
 
| 0x2
 
| 0x2
| Used for generating the extdata filepath.
+
| Number of payload contents (Payload Content Header + Payload)
 
|-
 
|-
 
| 0x12
 
| 0x12
Line 122: Line 129:  
The first 0x10-bytes are all-zero except the first byte which is usually 0x80. It's unknown what the first 0x10-bytes are used for.
 
The first 0x10-bytes are all-zero except the first byte which is usually 0x80. It's unknown what the first 0x10-bytes are used for.
   −
The hash at offset 0x12 hashes the 0x12-byte data at offset 0x0 followed by a zero u16. The RSA signature is signed by Nintendo. Following this header is the actual content payload, which is written to a cleartext file under the [[extdata]] /boss directory.  
+
The 16-bit value at 0x10 tells how many payload contents follow after this the content header. For example there can be a downloaded file for a game followed by a message for the news system module.
 +
 
 +
The hash at offset 0x12 hashes the 0x12-byte data at offset 0x0 followed by a zero u16. The RSA signature is signed by Nintendo. Following this header is the actual content payload, which is written to a cleartext file under the [[extdata]] /boss directory.
    
=== Payload Content Header ===
 
=== Payload Content Header ===
Line 198: Line 207:  
|}
 
|}
 
Followed by the Payload Content Header without the hash and signature (first 0x1C bytes) and the actual payload.
 
Followed by the Payload Content Header without the hash and signature (first 0x1C bytes) and the actual payload.
 +
 +
==Tools==
 +
* [http://wiiucodes.ddnss.eu/tools/BossDecryptor3DS.zip BossDecryptor3DS] Decrypts an encrypted boss container
 +
* [http://wiiucodes.ddnss.eu/tools/BossEncryptor3DS.zip BossEncryptor3DS] Builds and encrypts a file into a boss container
    
[[Category:Nintendo Software]]
 
[[Category:Nintendo Software]]
106

edits