3

I need to test if my AES-CCM implementation works correctly, but I don't find any example to test that.

Could you please help me and provide test vectors / other value-inserted examples?

In case there are none, I'd like to ask for the ciphertext of the following test vector for verification purposes:

AES-128 
Plaintext = 00112233445566778899AABBCCDDEEFF 
Key = 000102030405060708090A0B0C0D0E0F 
SEJPM
  • 46,697
  • 9
  • 103
  • 214
user6652926
  • 183
  • 1
  • 7

1 Answers1

3

NIST SP800-38C (PDF) has four examples in Appendix C.

I'll copy the first example here:

In the following example, Klen = 128, Tlen=32, Nlen = 56, Alen = 64, and Plen = 32.

K:          40414243 44454647 48494a4b 4c4d4e4f
N:          10111213 141516
A:          00010203 04050607
P:          20212223 
B:          4f101112 13141516 00000000 00000004  
            00080001 02030405 06070000 00000000  
            20212223 00000000 00000000 00000000
T:          6084341b
Ctr0:       07101112 13141516 00000000 00000000
S0:         2d281146 10676c26 32bad748 559a679a
Ctr1:       07101112 13141516 00000000 00000001
S1:         51432378 e474b339 71318484 103cddfb
C:          7162015b 4dac255d 

where K is the key, N is the nonce, A is the associated data, P is the plaintext, B is the input to the MAC, T is the authentication tag, Ctr0 is the first counter value, Ctr1 is the second, C is the ciphertext and S0 and S1 are the encryptions of Ctr0 and Ctr1 respectively.

SEJPM
  • 46,697
  • 9
  • 103
  • 214