RESEND: dlls/rsaenh/rsaenh.c: moved functionality from new_key to CPGenKey and CPDeriveKey

Michael Jung mjung at
Thu Nov 25 12:09:17 CST 2004

Any comments on this one (or on the LibTomCrypt patch)?

Original Message:

The new_key helper function in rsaenh.c tries to do too much: Besides
allocating the memory resources needed by the key object, it generates the
actual binary key value (either derived from a hash, from a byte array or
from the random number generator). This is a waste of cpu time if the key
object will be used to import a key from a BLOB, and is especially wastefull
for RSA keys.

The attached patch moves functionality, which is specific to either CPGenKey,
CPDeriveKey or CPImportKey, from new_key into those functions.

This patch was generated against the current OpenSSL implementation of
rsaenh. If you are planing to apply the LibTomCrypt patch, which I've sent a
few days ago, then please don't apply thist patch. I'll be happy to
regenerate it.


 Moved code specific to CPGenKey, CPDeriveKey or CPImportKey from new_key
 into the respective function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsaenh.diff
Type: text/x-diff
Size: 17871 bytes
Desc: not available
Url :

More information about the wine-patches mailing list