2
$\begingroup$

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 
$\endgroup$
  • 2
    $\begingroup$ NIST SP800-38C (PDF) has a couple of tests vectors. $\endgroup$ – SEJPM Feb 24 '17 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 Feb 24 '17 at 14:36
  • $\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 Feb 27 '17 at 16:10
  • 1
    $\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 Feb 27 '17 at 16:53
2
$\begingroup$

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.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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