[openssl-dev] [openssl.org #4518] OpenSSL-1.1.0-pre5 RSA_set0_key and related RSA_get0_*, RSA_set0_*, DSA_set0_* and DSA_get0_* problems
Richard Levitte
levitte at openssl.org
Mon Apr 25 17:21:56 UTC 2016
In message <20160425141410.GX26423 at mournblade.imrryr.org> on Mon, 25 Apr 2016 14:14:10 +0000, Viktor Dukhovni <openssl-users at dukhovni.org> said:
openssl-users> Perhaps the documentation can be made more clear. If users really
openssl-users> need an interface for modifying a subset of the components of an
openssl-users> already initialized key, then (if we don't already) we should
openssl-users> support NULL values as "do not change", provided these are already
openssl-users> set.
Doesn't this turn them into individual parameter calls, in practice?
I.e. the exact thing we chose not to make?
There isn't much difference between this:
RSA_set0_key(rsa, n, NULL, NULL);
RSA_set0_key(rsa, NULL, e, NULL);
RSA_set0_key(rsa, NULL, NULL, d);
and something like this:
RSA_set0_n(rsa, n);
RSA_set0_e(rsa, e);
RSA_set0_d(rsa, d);
The only difference is that with the former, you get two-in-one, as it
also works as a function to set all three numbers in one go.
Cheers,
Richard
--
Richard Levitte levitte at openssl.org
OpenSSL Project http://www.openssl.org/~levitte/
More information about the openssl-dev
mailing list