On Wed, Nov 29, 2000 at 03:01:51PM +0100, Richard Levitte - VMS Whacker wrote: > From: [EMAIL PROTECTED] > bodo> Add comment in bn_lib.c (why zero data between top and max?) > > bodo> /* Now need to zero any data between b->top and b->max */ > bodo> + /* XXX Why? */ > Because most functions that do expansions also use the expanded array > in operations like bn_add_words() that expects the two input arrays to > be of the same size. I know that some functions, like BN_mul(), do a > (needless) zeroing of their own, but there are others who simply trust > BN_wexpand() and others to do the right thing for them. Of those > words didn't get zeroed, you'd get very surprising (and may I say it: > unsafe!) result. So should we delete the superfluous zeroing from those functions that currently do it theirselves, or should we remove zeroing from the expand function and move it to those functions that need it and don't do it? It's not just wasted cycles, also it's confusing to those who try to read the source code. -- Bodo M�ller <[EMAIL PROTECTED]> PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html * TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt * Tel. +49-6151-16-6628, Fax +49-6151-16-6036 ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
