Thanks for the sample code Jakub! I was able to get this up and running with no issues. I was also able to get good results with a 2048 key length as well (with slight modifications to your code). So just to confirm, based on the following code block: /* copy the data to public and private keys */ memcpy(rsa_public_key, pub_exponent, 4); memcpy(rsa_public_key + 1, modulus, 128); memcpy(rsa_private_key, priv_exponent, 128); memcpy(rsa_private_key + 32, modulus, 128); it looks like the public key format is a concatenation of the public exponent and the modulus. Similarly, the private key format concatenates the private exponent and the modulus. Thanks again! -Earvin
↧