2
$\begingroup$

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.

On one hand, we had

… 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?

I’ll provide two default answers to make voting easy, but please feel welcome to share your own opinion by providing your own answer.

$\endgroup$

3 Answers 3

9
$\begingroup$

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.

With the following additional constraint:
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.

$\endgroup$
5
  • $\begingroup$ 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)? $\endgroup$
    – Maarten Bodewes Mod
    Commented Feb 27, 2017 at 17:31
  • $\begingroup$ @MaartenBodewes yes it does, "the question must ask for test vectors in general". $\endgroup$
    – SEJPM
    Commented Feb 27, 2017 at 17:40
  • $\begingroup$ Okidoki, waiting for more upvotes :) $\endgroup$
    – Maarten Bodewes Mod
    Commented Feb 27, 2017 at 17:41
  • $\begingroup$ How do you know the generated test vectors are correct? Do you enforce it somehow by checking them against multiple implementations? $\endgroup$
    – Drathier
    Commented Mar 5, 2017 at 21:56
  • $\begingroup$ @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. $\endgroup$
    – SEJPM
    Commented Mar 6, 2017 at 9:47
0
$\begingroup$

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.

$\endgroup$
-2
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .