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

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

Re: [GNU Crypto] how to deal with weak keys. was: Documentation


From: Casey Marshall
Subject: Re: [GNU Crypto] how to deal with weak keys. was: Documentation
Date: Wed, 28 May 2003 12:00:47 -0700
User-agent: Mutt/1.4i

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, May 29, 2003 at 04:17:36AM +1000, Raif S. Naffah wrote:

> On Thu, 29 May 2003 02:47 am, Casey Marshall wrote:
> > On Wed, May 28, 2003 at 08:29:15PM +1000, Raif S. Naffah wrote:
> > > ok.  i see the benefit of allowing even weak keys to go through the
> > > implementation.  i double checked all the FIPS publications
> > > relevant to DES, and couldnt find even a warning about weak keys!
> > >
> > > here is what i propose; it's similar to what we already do in the
> > > PRNG class: use of conditional compilation.
> > >
> > > * add in each cipher implementation which is known to exhibit weak,
> > > or semi-weak keys, a private static final boolean CHECK_WEAK_KEYS
> > > with a default value.  in the makeKey() method we add the code to
> > > check for weak keys conditioned by the value of CHECK_WEAK_KEYS.
> > >
> > > * in the code, distinguish the case of weak keys with a new
> > > exception that is a subclass of InvalidKeyException.  this way the
> > > code will remain backward compatible.
> > >
> > > * add a warning in the documentation, incl. the README about the
> > > set default for CHECK_WEAK_KEYS, and how the user can change it to
> > > get the desired effect if it is not set to the appropriate value.
> > >
> > > how does this sound?
> >
> > I like the idea of making the check optional, but how about making
> > this a property? Perhaps in a global, static property set, somewhat
> > akin to the properties contained in java.security.Security?
> 
> excellent!  we should probably move all similar flags to there too.  
> would the Registry be an appropriate place for this?
> 

It would probably be more appropriate to have a class in gnu.crypto
that contains static methods such as set/getProperty, so we can use a
PropertyPermission check before querying/setting these (sometimes
sensitive) properties.

IMHO, of course.

- -- 
Casey Marshall || address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+1QdSgAuWMgRGsWsRAj1yAJ0bxCsqKxVepgDTuIP8jFjye4pw3ACfSW4q
BUhqwbNMGN9C7hDN8aBSDX8=
=NK5U
-----END PGP SIGNATURE-----




reply via email to

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