# Do we want to allow questions asking for random test vectors?

I recently stumbled upon a question asking for the calculation of a random test vector:

## An example of CCM - AES Mode

need to test if my AES CCM mode works correctly, but I don't find any example to test that please?

AES-128
Plaintext = 00112233445566778899AABBCCDDEEFF
Key = 000102030405060708090A0B0C0D0E0F
So in this case what is the correct ciphertext?


Note that this initial post/edit meanwhile has been edited to pull the question on-topic.

Nevertheless…

It was initially put on hold as off-topic using our “"Programming questions are off-topic even if you are writing or debugging cryptographic code…” close reason.

Now, there seemed to be a bit of disagreement about the on-hold status.

… we cannot really become a code generation site for random test vectors. This is an implementation issue and therefore off topic.

and on the other hand we had

… we generally accept requests for test-vectors here and this is perfectly answerable.

This raises the question if we should generally welcome such questions too, or not.

Do we want to allow questions asking for random and/or self-provided test vectors?

# Yes, we accept such questions here.

Up until today, we have generally accepted requests for official test-vectors here. As questions like the one quoted in the question are perfectly answerable, we should accept such questions.

The question must ask for test vectors in general with accepting random test vectors as well, so it's up to the answerer to provide random ones or official ones. And if there are no official ones the answer basically becomes an "official" source of test vectors by providing randomly generated ones.

• I'm fine with this, I presume this would exclude questions such as "please run with these test vectors and tell me if my answer is correct" kind of questions (like the original question that was copied to the meta site). That's really testing the implementation and therefore better asked on stackoverflow; and that's the reason why I wanted it closed. Does this answer exclude those kind of questions (just to make it more explicit)? – Maarten Bodewes Feb 27 '17 at 17:31
• @MaartenBodewes yes it does, "the question must ask for test vectors in general". – SEJPM Feb 27 '17 at 17:40
• Okidoki, waiting for more upvotes :) – Maarten Bodewes Feb 27 '17 at 17:41
• How do you know the generated test vectors are correct? Do you enforce it somehow by checking them against multiple implementations? – Filip Haglund Mar 5 '17 at 21:56
• @FilipHaglund It is up to the answerer to ensure that generated test vectors actually provide the correct results. Interoperability tests are indeed strongly encouraged to verify this fact. – SEJPM Mar 6 '17 at 9:47

# Yes, we accept such questions here.

Up until today, we have generally accepted requests for official test-vectors here. As questions like the one quoted in the question are perfectly answerable, we should accept such questions.

# No, we don’t want such question here.

We cannot really become a code generation site for random test vectors. This is an implementation issue and therefore as off topic as other programming questions.