2

I'm working on an iOS app which needs to use certificates in order to to encrypt and decrypt data.

I was able to create the public and private key using the documentation Apple provides but I'm not able to find a way to create a SecIdentityRef from those keys

Is it possible?

Omer
  • 5,470
  • 8
  • 39
  • 64
  • You probably already understand this: If you are encryption data most likely you really need to use a symmetric algorithm such as AES. The issues are that asymmetric encryption is dog-slow and the data length is limited to the key size. Asymmetric key encryption is usually used to encrypt symmetric keys for transport. – zaph Nov 25 '15 at 18:21
  • That's true, but I'm tied to this because I'm also using the Multipeer framework that uses certificate identity in order to provide a secure communication channel... – Omer Nov 25 '15 at 18:23
  • This might be a duplicate of this question: http://stackoverflow.com/questions/26458540/how-to-obtain-secidentityref-from-seccertificateref-and-privatekey/ – wiml Dec 07 '15 at 23:17
  • @wiml mm, no it's not. The question you mention assumes a certificate reference is given, this question is more around creating self signed certificates on the device... – Omer Dec 08 '15 at 15:24

1 Answers1

-1

Is difficulty how to create a certificate (possibly inside a SecIdentity, possibly a SecCertificateRef, possibly as a DER-encoded CFDataRef) given a public and private key?

wiml
  • 708
  • 5
  • 6