views:

680

answers:

2

Hello,

I have been google-ing and researching for an answer on how to do a simple RSA encryption using objective-c on an iphone. The main problem i have is that i have been supplied the Exponent and Modulus as an NSData object and i need to then convert them to a SecKeyRef object in order to perform the RSA encryption.

Does anyone have any idea how to do that or have any useful hints?

Many thanks!

A: 

See here, that should get you on the right track

Matt S.
Thanks for the reply. I have seen this page before. Maybe i am missing something but i cant seem to find and answer there to my question regarding RSA. My initial idea after reading it would be to change this, CCHmacContext, to something like this, CCRSAContext. But that does not exist.
Paul
+1  A: 

I ended up using OpenSSL in my project. and import the keys and encrypt using that library instead of the iPhone ones.

Paul