I am trying to use
the openSSL RSA_public_encrypt() function using an RSA key which is externally
loaded from 2 unsigned byte streams (e,n). What is the best way to fill in an
RSA struct with values in this form so that I can begin making calls to the
crypo functions? I could try and build the BN structs that go in the RSA struct,
but there are still several members of the RSA struct which I can't say that I
know their function. This approach also gives rise to the question "How does one
build a BN from byte streams?" I could use BN_set_bit() in a for loop for 2048
iterations per key, but there must be a better way than that.
Any words of
wizdom?
-Vin
Scarlata