|
From: | Raif S. Naffah |
Subject: | Re: [Classpathx-crypto] on testing (long) |
Date: | Tue, 25 Jun 2002 19:03:40 +1000 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 |
Casey Marshall wrote:
On Mon, 24 Jun 2002, Raif S. Naffah wrote:For the known-answer tests I would recommend using texts/keys where a bit is set somewhere in each byte/nybble/word, to try to cover a range, not just the first few. Other than that I would simply use a Comfortable Round Number.let's say 5 values for each test, which makes a total of 30 --including the KAT ones. the position of the bits for the latter, should be selected at random.I think for the KA tests the number of tests should depend on the length of the key/text, by (say) using the word 0x80000000 at all the possible word (dynner, 32 bit) aligned offsets, e.g. 8000000000000000000000000000000000000000 0000000080000000000000000000000000000000 ...etc. just because it is seems less arbitrary and spans the space of keys/texts.
i'm not sure. if the cipher is not correctly implemented, it's highly unlikely to pass some KATs and fails others.
even if this is the case, a cipher implementation should be deemed correct iff it passes *all* the tests!
[...] how do you want to split the work?I could do the TestOfXxxx classes, maybe make a general superclass that does the work, and subclasses that simply fill in the test vectors.
excellent; a base test-case for the TestOfxxx ciphers would be great! i'll do the selfTest() implementations. ps. checkout the latest TestOfSerpent and Util before you start. cheers; rsn
[Prev in Thread] | Current Thread | [Next in Thread] |