Richard Levitte - VMS Whacker wrote:
> 
> From: Dr S N Henson <[EMAIL PROTECTED]>
> 
> drh> Ulf Mller wrote:
> drh> >
> drh> > On Wed, Nov 29, 2000 at 02:33:29AM +0100, [EMAIL PROTECTED] wrote:
> drh> >
> drh> > >   directly between an ASN1 INTEGER and a BIGNUM. CBIGNUM clears the
> drh> > >   BIGNUM when it is freed (for sensitive information).
> drh> >
> drh> > Shouldn't that rather be an attribute of BIGNUM?
> drh>
> drh> Well its just what the thing is called at the new ASN1 level. Its
> drh> referenced by an ASN1_ITEM structure called CBIGNUM_it. It all uses
> drh> BIGNUM structures and just that CBIGNUM_it has a flag set in its
> drh> structure that automatically ends up clearing it out when it is freed.
> drh>
> drh> Or did you mean something else?
> 
> I think Ulf means that the flag in CBIGNUM_it should really be part of
> BIGNUM instead.  I do agree about that, and since there's already a
> flags member in BIGNUM, it's not hard at all to impement...
> 

Well currently sensitive stuff calls BN_clear_free() when the BIGNUM is
freed up (e.g. RSA_free()). Whether you handle the clearing by setting a
flag at creation or doing it explicitly when it is freed doesn't make
much difference at the ASN1 level. At a BIGNUM level I suppose it makes
more sense because then you can't accidentally call BN_free() on
sensitive data.

However whichever way you do it you still need a flag in the ASN1_ITEM
structure which tells its primitive content routines to either set a
flag at creation or clear when freeing.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to