twofish

Brad Anderson brad at dsource.dot.org
Thu Mar 23 12:45:34 PST 2006


Georg Wrede wrote:
> I wonder if the Unittest for encryption and decryption libraries should,
> as test cases, contain a piece of nontrivial text (and possibly a tough
> binary file) that is originally [en/de]crypted with a _known_good_
> implementation.
> 
> And a good explanation of how to acquire such a Known Good reference, so
> that anybody interested could try to repeat the test. (This is standard
> procedure in science, and cryptology is about the only thing where such
> (over ambitious) diligence makes sense in programming.)
> 
> How else would one know whether the code has only been debugged with its
> own counterpart, or with a universally accepted "base"? (Of course I'm
> talking corner cases, exceptional input, and the like, which usually
> slips past the original coder, IMHO, including myself.)
> 
> I think this goes for _any_ crypto SW submitted to the D community.
> 
> (This is not to say I have doubts on this particular implementation,
> this is a suggestion for a Best Practice.)

Eric Young has some for Blowfish:

Rough version: http://www.schneier.com/code/vectors.txt

Ready for coding: http://www.schneier.com/code/vectors2.txt

BA



More information about the Digitalmars-d-announce mailing list