Changes

255 bytes added ,  22:18, 30 December 2016
→‎Mii QR Code format: clarify the use of nonce and match the fields with Mii format
Line 11: Line 11:  
3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with 'Mii' logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code.
 
3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with 'Mii' logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code.
   −
The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses blocksize=12, noncesize=10, and inputbuffer-size=0x60. The first 8-bytes(cleartext MiiID+MAC address) in the below Mii data is the nonce used with the NS Unwrap/Wrap commands, the rest of the data at 0x8-0x5F is encrypted.
+
The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses nonceoffset=12, noncesize=10, and inputbuffer-size=0x60. Note that the actual nonce size is 8 bytes due to Wrap/Unwrap implementation, and the nonce data should be moved 12 bytes afterwards after decryption. The rest of the data at 0x8-0x5F is encrypted, and should be split into two parts after decryption, with the nonce data in the middle. (See [[APT:Wrap|Wrap]] and [[APT:Unwrap|Unwrap]] for more information)
    
{| class="wikitable"
 
{| class="wikitable"
Line 28: Line 28:  
|-
 
|-
 
| 0x8
 
| 0x8
| 0x1
+
| 0x4
| Unknown, the encrypted data begins here.
+
| [[Mii#Mii_ID|Mii ID]], the encrypted data begins here.
 +
|-
 +
| 0xC
 +
| 0x8
 +
| System ID
 
|-
 
|-
| 0x9
+
| 0x14
| 0x1
+
| 0x2
| Allow Copying
+
| Low 2 octets of MAC address
 
|-
 
|-
| 0xA
+
| 0x16
| 0xE
+
| 0x2
| unknown
+
| padding (0000)
 
|-
 
|-
 
| 0x18
 
| 0x18
242

edits