AnsweredAssumed Answered

Initialization vector in AES-CBC does not work.

Question asked by ericg on Jun 2, 2016
Latest reply on Jun 3, 2016 by Yuri Muhin

How to load initialization vector properly in CAAM when using AES-CBC? The following code always produce same cipher text with random IV.

 

append_load(desc, iv_dma, 16, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB); // 0x12200010

 

Below is my full command sequence. Am I missing something here? Thanks.

 

EncryptDecrypt

0 -> 0xb080000b

1 -> 0x12200010

2 -> 0x7f0a6808

3 -> 0x02400020

4 -> 0x8941fdb0

5 -> 0x8210010d

6 -> 0x22120100

7 -> 0x892ef000

8 -> 0x60700000

9 -> 0x892ef100

10 -> 0x00000100

     0 -> 0xb080000b

     1 -> 0x12200010

     2 -> 0x7f0a6818

     3 -> 0x02400020

     4 -> 0x8941fdd0

     5 -> 0x8210010c

     6 -> 0x22120100

     7 -> 0x892ef100

     8 -> 0x60700000

     9 -> 0x892ef200

     10 -> 0x00000100

Outcomes