Amiibo: Difference between revisions

No edit summary
No edit summary
Line 53: Line 53:
| 0x10
| 0x10
| 0x4
| 0x4
| Last 3-bytes here are used with the following HMAC. The first byte is normally 0xA5. The remaining bytes are initially(before the Amiibo is written to) all-zero. Byte[2] here is increased each time the Amiibo is written to.
| Last 3-bytes here are used with the following HMAC where the size is 0x1DF-bytes. The u16 starting at byte1 is used for the first two bytes in the 0x40-byte input buffer for Amiibo [[Process_Services_PXI|crypto]] init. The first byte is normally 0xA5. The remaining bytes are initially(before the Amiibo is written to) all-zero. Byte[2](maybe big-endian u16 starting at byte1?) here is increased each time the Amiibo is written to.
|-
|-
| 0x5
| 0x5
Line 65: Line 65:
| 0x34
| 0x34
| 0x20
| 0x20
| SHA256-HMAC. The first 0x18-bytes of this hash is section3 in the encrypted buffer.
| SHA256-HMAC hash. The first 0x18-bytes of this hash is section3 in the encrypted buffer.
|-
|-
| 0x15
| 0x15
Line 71: Line 71:
| 0x54
| 0x54
| 0x2C
| 0x2C
| Unknown, this is plaintext data.
| This is plaintext data, see below.
|-
|-
| 0x20
| 0x20
Line 77: Line 77:
| 0x80
| 0x80
| 0x20
| 0x20
| SHA256-HMAC over 0x1DF-bytes: first 3-bytes are from the last 3-bytes of page[4], the rest is over the first 0x1DC-bytes of the plaintext data.
| SHA256-HMAC hash over 0x1DF-bytes: first 3-bytes are from the last 3-bytes of page[4], the rest is over the first 0x1DC-bytes of the plaintext data.
|-
|-
| 0x28
| 0x28
Line 90: Line 90:
| 0x54
| 0x54
| This is section2 in the encrypted buffer.
| This is section2 in the encrypted buffer.
|}
==== Structure of the data starting at page 0x15 ====
{| class="wikitable" border="1"
|-
!  Offset
!  Size
!  Description
|-
| 0x0
| 0xC
| ?
|-
| 0xC
| 0x20
| Probably a SHA256-HMAC hash.
|}
|}