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:

Plaintext = 00112233445566778899AABBCCDDEEFF 
Key = 000102030405060708090A0B0C0D0E0F 
  • 3
    $\begingroup$ NIST SP800-38C (PDF) has a couple of tests vectors. $\endgroup$
    – SEJPM
    Commented Feb 24, 2017 at 10:53
  • 1
    $\begingroup$ I've voting to close this as we cannot really become a code generation site for random test vectors. This is an implementation issue and therefore off topic. $\endgroup$
    – Maarten Bodewes
    Commented Feb 24, 2017 at 14:36
  • 1
    $\begingroup$ I've voted to re-open this question because we generally accept requests for test-vectors here and this is perfectly answerable. $\endgroup$
    – SEJPM
    Commented Feb 27, 2017 at 16:10
  • 2
    $\begingroup$ @MaartenBodewes Meanwhile, SEJPM edited the Q and pulled in on-topic. Nevertheless, I‘ve created a meta Q to allow the community to decide if we want to go there or not in case we get alike questions in the future. $\endgroup$
    – e-sushi
    Commented Feb 27, 2017 at 16:53

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.