gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Crypto] towards a (new) high-level symmetric block cipher API (


From: Raif S. Naffah
Subject: Re: [GNU Crypto] towards a (new) high-level symmetric block cipher API (long)
Date: Sat, 15 Mar 2003 14:34:47 +1100
User-agent: KMail/1.4.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Saturday 15 March 2003 13:23, Raif S. Naffah wrote:
> ...
> Cipher ::=   IBlockCipher | IMode
> Cascade ::=  (Cipher | Cascade)+
> Assembly ::= Cascade Padding
>...
> public class Cascade implements ICascade {
>    ...
>    public static ICascade getInstance(IBlockCipher e1, IBlockCipher
> e2) throws IllegalArgumentException {...}
>    ...
> }

the above will not allow constructing a Cascade of one IBlockCipher only 
(case of a cipher + padding, or mode + padding), unless one of the 
arguments is allowed to be null.  i dont think allowing null is a bad 
idea, hence the Factory method should be re-written as, or the 
following should be added to the API:

   public static ICascade getInstance(IBlockCipher e)
      throws IllegalArgumentException {...}


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+cp9X+e1AKnsTRiERA6zhAKD3L9gK6jkIPrsYgpHXeCbcEvTvIQCdEOO2
bdy54amltQp3r7ozFr9ZEfE=
=9k8A
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]