I've Modulus
MjAxNzY5NTQ0ODc1ODUxMzcyOTQ3ODM5MjI1NzQ2MzQ1MTUzNjQxMjMxODE4NTE1NzQwODUwODI0NjYxMTA4NTA0MTc2ODU4MDUzMzE2ODIwMzI2NDcyMDI2NTkyMjc0MjgwMjE1NDg3MDEwNzU2NzA3OTU4NzQ2MTYxNzI5NDc5OTUzMzAwOTM0OTA4MTc4NDI2MTM5NDc3MDMxNzkxMzg0MDAyOTE5NjMyMTAyMDA5MjEwNDQ4MzU1MzYwOTY0ODkxODAxNjY5MTM4MTQ4NjU0Njg3OTA0NjUxNTUxOTIzMDU4MjQ0Njg2MTQ5NzkzMTQwNzYzODM2MjY1MjA2NjcyMjY4MjQzMDE2MjA4MTQ3NjAwMzIwNzI2MTIzNzQ4MjA5MzIwODIwODc2ODMxNzgzNzA4NTYyMzg5MzI2OTc2NTM2NjgyNzY0MDgwMTM3ODY1MjIyNjc5OTQ3NDMwMzIwMDE0NTAzMDE2ODQyMTQyNjgxNjMwNTA4OTQ1MDU3OTgzMDEzNDMwNDYxMDY5OTA3NjI0MzU3Mjc5MjU0MTQ5NDUzMzMyODUxNjkyOTc3OTIxMTUzNjIzOTg1Nzk0NzkyMzY2NDY2NDQwNTczMTQxMjc2ODAwOTU1MTU4NTQxOTk4ODM1MDIyMjk2NTE1ODU3ODI5Mjk2NzMzNjM1MjE3Mjk4ODYxNDYwODg3NjY4NDU4MjAzMzc3NjM5ODc2MTMyMTQ1MjczODAzOTAzMzU0ODA5MTYzNjEwNDE3ODgwNTAyNzA1NTM2NzMwNzQ1OTc1MzgwMjM2NjI5MjY3NjkzOTU2NTcyMDE=
and Exponent
65537
Please help me on generating public key using modulus and exponent using objective-C.
As written by zaph in this answer, the following code should do what you want :
To do this make sure you have the OpenSSL library linked (instructions here http://code.google.com/p/ios-static-libraries/)
Once linked you'll have access to several BIGNUM converters. I turned the modulus into hex using the BN_hex2bn method saving the hex string into 'exponent'
Then create the BIGNUM struct and encrypt using RSA_public_encrypt