[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-crypto] [patch] Serpent cipher
From: |
Casey Marshall |
Subject: |
Re: [Classpathx-crypto] [patch] Serpent cipher |
Date: |
Thu, 6 Jun 2002 15:45:55 -0700 (PDT) |
On Thu, 6 Jun 2002, Raif S. Naffah wrote:
> btw, do you have (access to) the test vectors for Serpent? we should have a
> junit test case to exercise and produce/compare some of the test vectors for
> every algorithm so as to certify correctness (e.g.
> source/test/cipher/TestOfSquare).
>
Earlier today I generated some KAT and Monte-Carlo test vectors and
compared them to those included in the Serpent team's AES submission.
The implementation appears correct (at least, my faith in it is a bit
stronger). I'll see about putting together a test case for it, however.
Also, a question: it appears as though the library is working with the
assumption that all of its ciphers are not stateful, ie something like:
cipher.encryptBlock(pt, 0, ct, 0);
cipher.decryptBlock(ct, 0, cpt, 0);
will result in pt==cpt (and this is the case, I think, with all the
current cipher algorithms, as well as most others that I'm familiar with).
This isn't strictly true, for example, for ARCFOUR, whose s-boxes evolve
over time. So would stateful ciphers need to be careful about this (e.g.
keeping s-boxes for encryption and decryption), or could one assume that
this is not, in practice, the case?
(Bonus: yes, ARCFOUR is a stream cipher, so would a seperate interface
(IStreamCipher) be a solution?)
Cheers,
--
Casey Marshall < address@hidden > http://metastatic.org/