7

I've worked with Java cryptography for many years. Now, we have a requirement to write an iOS application that will send encrypted payloads from the mobile device to a Java service. I've begun working with the iOS crypto support (CommonCrypto, etc.) and have found it a bit more difficult. The JCE has a very clean, concise API, so I've clearly gotten spoiled. In contrast, iOS cryptography is a far more difficult API to work with.

Are there any simplified crypto libraries or wrappers around CommonCrypto that provide a more concise API? In particular, we need:

  • Key generation (both symmetric and asymmetric)
  • Encryption/decryption of data
  • Digital signatures (SHA1withRSA, for example)
  • Hashing
  • RSA, 3DES, and AES support

I know I've seen a sample class or two that wraps AES encryption, for example. I'm looking for something a bit richer and more full-featured. Anyone have any suggestions?

Richard Slater
  • 6,313
  • 4
  • 53
  • 81
Shadowman
  • 11,150
  • 19
  • 100
  • 198

1 Answers1

2

You can use openSSL inside your iOS app, for ease of use you can use the SSCrypto library by septicus.

From the septicus site:

SSCrypto.framework provides a simple wrapper around OpenSSL library functions for encryption, decryption (both symmetric and RSA) and checksums. It also encodes and decodes base64 data and can generate both private and public RSA keys. A test tool is included in the project. Click here to see the main.m file that comes with SSCrypto for examples of it's use.

Frank
  • 16,476
  • 7
  • 38
  • 51
  • Does SSCrypto build for iOS? I downloaded the project and took a look at it. It definitely seems like what I need, but there are only build configurations for Macs. No iOS devices. – Shadowman Dec 23 '12 at 03:16
  • We just did add the .h and .m file to our project, the iOS build of our project did the rest... – Frank Dec 23 '12 at 10:53