Changes

800 bytes added ,  01:24, 6 April 2015
no edit summary
Line 63: Line 63:  
| 0x04010084
 
| 0x04010084
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only
+
| [[New_3DS]]-only. cmd[1] = insize, cmd[2] = outsize, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr, cmd[5] = (outsize<<8) <nowiki>|</nowiki> 0x14, and cmd[6] = outbufptr.
 
|-
 
|-
 
| 0x04020082
 
| 0x04020082
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only
+
| [[New_3DS]]-only. cmd[1] = insize, cmd[2] = u8 flag, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr. This is used for [[Amiibo]] key generation.
 
|-
 
|-
 
| 0x04030044
 
| 0x04030044
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only
+
| [[New_3DS]]-only. This is used for the actual [[Amiibo]] AES crypto, max input buffer size is same as command 0x04010084.
 
|-
 
|-
 
| 0x04040044
 
| 0x04040044
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only
+
| [[New_3DS]]-only. Similar to 0x04030044, except this is devunit-only with dev-only keys.
 
|}
 
|}
    
These RSA commands are an interface for using the [[RSA]] engine. The system will hang when it attempts to use a >RSA-2048 RSA bit-size with the RSA engine, since the [[RSA]] engine does not support >RSA-2048. These RSA commands have an input field specifying what RSA bit-size to use, but the RSA padding code is hard-coded to use RSA-2048.
 
These RSA commands are an interface for using the [[RSA]] engine. The system will hang when it attempts to use a >RSA-2048 RSA bit-size with the RSA engine, since the [[RSA]] engine does not support >RSA-2048. These RSA commands have an input field specifying what RSA bit-size to use, but the RSA padding code is hard-coded to use RSA-2048.
   −
The New3DS 0x040X commands were removed with [[9.3.0-21]], the code for that was moved into [[NFC_Services|NFC]]-module.
+
The New3DS 0x040X commands(used for [[Amiibo]] crypto) were removed with [[9.3.0-21]], the code for that was moved into [[NFC_Services|NFC]]-module.
 +
 
 +
=Command 0x04010084=
 +
The input buffer size must be <=0x1E0-bytes, and the out buffer size must be >0 and <=0x20-bytes. This calculates a SHA256-HMAC over the input buffer using the current already-generated [[Amiibo]] HMAC key, the output hash is then written to the out buffer.