Line 67:
Line 67:
| 0x04020082
| 0x04020082
| [[8.1.0-0_New3DS]]
| [[8.1.0-0_New3DS]]
−
| [[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.
+
| [[New_3DS]]-only. cmd[1] = insize, cmd[2] = u8 flag, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr.
|-
|-
| 0x04030044
| 0x04030044
| [[8.1.0-0_New3DS]]
| [[8.1.0-0_New3DS]]
−
| [[New_3DS]]-only. This is used for the actual [[Amiibo]] AES crypto, max input buffer size is same as command 0x04010084. The AES mode used for this is the same as for Amiibo key generation.
+
| [[New_3DS]]-only.
|-
|-
| 0x04040044
| 0x04040044
| [[8.1.0-0_New3DS]]
| [[8.1.0-0_New3DS]]
−
| [[New_3DS]]-only. Similar to 0x04030044, except this is devunit-only with dev-only keys.
+
| [[New_3DS]]-only.
|}
|}
Line 83:
Line 83:
=Command 0x04010084=
=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.
+
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(generated_amiibodata+0x20), the output hash is then written to the out buffer.
+
+
=Command 0x04020082=
+
This is used for [[Amiibo]] key generation. 0x30-bytes are generated.
+
+
=Command 0x04030044=
+
This is used for the actual [[Amiibo]] AES crypto, max input buffer size is same as command 0x04010084. The AES mode used for this is the same as for Amiibo key generation. Normal-key = generated_amiibodata+0x0, IV/whatever = generated_amiibodata+0x10(see command 0x04010084 regarding generated_amiibodata).
+
+
=Command 0x04040044=
+
Similar to 0x04030044, except this is devunit-only with dev-only keys.