Changes

Jump to navigation Jump to search
600 bytes added ,  11:30, 28 July 2020
no edit summary
Line 12: Line 12:  
| 4
 
| 4
 
| RW
 
| RW
 +
|-
 +
| style="background: green" | Yes
 +
| [[#AES_MACEXTRABLKCNT|AES_MACBLKCNT]]
 +
| 0x10009004
 +
| 2
 +
| W
 
|-
 
|-
 
| style="background: green" | Yes
 
| style="background: green" | Yes
 
| [[#AES_BLKCNT|AES_BLKCNT]]
 
| [[#AES_BLKCNT|AES_BLKCNT]]
| 0x10009004
+
| 0x10009006
| 4
+
| 2
 
| W
 
| W
 
|-
 
|-
Line 165: Line 171:     
Changing the input word order triggers the key/keyX/keyY FIFOs to be flushed.
 
Changing the input word order triggers the key/keyX/keyY FIFOs to be flushed.
 +
 +
== AES_MACEXTRABLKCNT ==
 +
(CCM-MAC extra data length)>>4, i.e. the number of block of CCM-MAC extra data.
    
== AES_BLKCNT ==
 
== AES_BLKCNT ==
 
+
(Data length)>>4, i.e. the number of blocks to process
{| class="wikitable" border="1"
  −
!  Bit
  −
!  Description
  −
|-
  −
| 31-16
  −
| (Data length)>>4 (i.e. the number of blocks to process)
  −
|}
      
== AES_WRFIFO/AES_RDFIFO ==
 
== AES_WRFIFO/AES_RDFIFO ==
Line 230: Line 232:     
== Endianness and word order ==
 
== Endianness and word order ==
When writing to the AES_CTR, AES_MAC or AES_KEY0/1/2/3 register, the hardware will process the written data according to the current input endianness specified in AES_CNT. However, the current specified input word order will not be honored for this register, and always defaults to reversed word order. Therefore, for normal word order, the reversal must be carried out manually if required.
+
 
 +
=== AES_CNT.input_endianness ===
 +
 
 +
Swaps the bytes of 32-bit writes to AES_CTR, AES_WRFIFO, AES_KEY*FIFO according to specified endianness. AES_MAC?
 +
 
 +
=== AES_CNT.output_endianness ===
 +
 
 +
Swaps the bytes of 32-bit reads from AES_RDFIFO.
 +
 
 +
=== AES_CNT.input_word_order ===
 +
 
 +
If reversed, writes to AES_KEY*FIFO and AES_WRFIFO fill the FIFO backwards. For AES_WRFIFO, this means that every 16-byte block will have its words in the reverse order, but the order of these blocks remains the same. AES_CTR is unaffected by this field. AES_MAC?
 +
 
 +
=== AES_CNT.output_word_order ===
 +
 
 +
If reversed, reads from AES_RDFIFO will drain the FIFO backwards. This means that every 16-byte output block will have its words in the reverse order, but the order of these blocks remains the same.
    
== CCM mode pitfall ==
 
== CCM mode pitfall ==
Line 558: Line 575:  
| Movable.sed key.
 
| Movable.sed key.
   −
This is the keyslot used for movable.sed encryption + AES-CBC MAC with the import/export [[FSPXI:ImportIntegrityVerificationSeed|commands]].
+
This is the keyslot used for movable.sed encryption + AES-CBC MAC with the import/export [[FSPXI:ImportIntegrityVerificationSeed|commands]]. The keyYs used for crypto/CMAC are different, but both can be found in process9 rodata.
| Bootrom.
   
| Bootrom.
 
| Bootrom.
 +
| NATIVE_FIRM.
 
| -
 
| -
 
| Yes
 
| Yes
38

edits

Navigation menu