Simon
Simon

Reputation: 509

running ECDH with CommonCrypto for iOS

I am looking for the methods in CommonCrypto to generate the shared secret based on ECDH. I can find proprietary implementations but nothing standard. This method is called sometimes Key Exchange and includes the calculation of the shared secret. Can someone send a link to the right documentation or to an example that uses CommonCrypto for generating the shared secret based on Elliptic curve Diffie–Hellman?

Upvotes: 2

Views: 1747

Answers (1)

Bob Whiteman
Bob Whiteman

Reputation: 2541

CommonCrypto implements ECDH. Apple Open Source includes the source code for the implementation. The problem is that the implementation is not exposed in the iOS SDK header files. I just checked iOS SDK versions 6.1 and 8.0, and the functions are not declared. This means that any app that somehow calls the routines will violate Apple's App Store Review Guidelines: Section 2.5 says "Apps that use non-public APIs will be rejected".

I suggest using OpenSSL, which includes ECDH.

Upvotes: 3

Related Questions