I’m running an experiment to test the randomness output of many cryptographic algorithms based on INST test suite to measure the randomness of their outcome.

However I’m searching to a sample data set to perform the experiment. Based on my understanding the data set should be non-random to be able to measure the randomness after applying the cryptographic algorithm.

What plaintext should I use for this?

  • $\begingroup$ I replaced your (off-topic) link request with a question that should be equally helpful. $\endgroup$ – otus Jul 9 '16 at 6:35

If I understand you properly, you are going to test some cryptographical primitives by running them on some plaintext, and then taking the resulting ciphertext and giving it to a randomness test suite; your question is "what plaintext should I use? If I pick a random plaintext, then the test results might reflect the randomness of the plaintext, and no anything the cipher is doing"

In which case, you want to select a maximally nonrandom plaintext. For example, if you're testing CBC-mode encryption, a plaintext that consists of a long string of 0's would work; if you're testing a hash function (and so need a long series of plaintexts), using plaintexts of the form "0", "1", "2", "3", etc (for some simple encoding of those integers, say, in binary form) would work.

That said, unless the cryptographical algorithms you're testing are severely broken, you're not going to find anything. An explicit design goal as that an attacker who can submit plaintexts of his choosing is unable to distinguish the output from randomness; it is quite unlikely that something as mindless as the NIST test suite would manage where a clever cryptanalyst cannot.

  • $\begingroup$ This is right; can can you guide me on such data set $\endgroup$ – user36715 Jul 9 '16 at 10:43
  • $\begingroup$ @galant1: again, to test CBC mode encryption, a plaintext that consist of all 0 blocks (that is, every single bit is a 0) would be appropriate. I assume that you can create such a sequence yourself. $\endgroup$ – poncho Jul 9 '16 at 13:14
  • $\begingroup$ E.g. by using dd and /dev/null together. I could also program it in Java within seconds. $\endgroup$ – Maarten Bodewes Jul 9 '16 at 14:52

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.