Reputation: 1987
I'm trying to know if I can generate RSA keypair from CommonCrypto on iphone. Is there any good guide or doc on commonCrypto somewhere? Does anybody can tell me what is possible to do with CommonCrypto? Does anybody can tell what else I am suppose to use to create RSA keypair and encrypt something on iphone?
Upvotes: 10
Views: 11149
Reputation: 47241
The official Security Overview documentation is a good starting point to get a picture what's possible with iOS SDK.
Have a look at CryptoExercise, an Apple iOS example app:
This sample demonstrates the use of the two main Cryptographic API sets on the iPhone OS SDK. Asymmetric Key Encryption and random nonce generation is handled through the Security framework API set, whereas, Symmetric Key Encryption and Digest generation is handled by the CommonCrypto API set. The CryptoExercise sample brings both of these APIs together through a network service, discoverable via Bonjour, that performs a "dummy" cryptographic protocol between devices found on the same subnet.
Upvotes: 5