Hello! My goal is to write a simple function for use in C programs of mine that can encrypt and output strings. This would seem to be an easy task at first, only through attempting it have I realized some difficulties.
My idea was to use the openssl RSA library, build an RSA structure, and use RSA_public_encrypt() to do this. I am currently unable to do this even with just hardcoded RSA variables. The reason is that I cannot initiate a BN with a large value, as it can only start as a word. I cannot find a way to expand the BN, except by using BN_set_bits(), which seems to me an impractical way to do this. How is this generally done? Does anyone have any example code along these lines? Any help would be appreciated. Richard