O'Reilly logo

Hacking and Securing iOS Applications by Jonathan Zdziarski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to Common Crypto

The Common Crypto library, also known as CCCrypt and 3CC, provide access to a number of types and flavors of encryption algorithms. The Common Crypto library of functions supports AES, DES, 3DES, and other encryption standards. Depending on the encryption algorithm used, block and/or stream ciphers are available.

Block ciphers are ciphers that break data into equal-sized blocks and encrypt each block, reassembling the blocks at the end. This type of cipher is used for most private key encryption, and is very efficient at operating on data whose input size is already known. Stream ciphers, in contrast, tend to be used with large or streaming data sets when it’s unfeasible to do the encryption all at once. Steam ciphers often operate faster than block ciphers, but are also susceptible to certain types of attacks such as bit-flipping and key replay attacks. Stream ciphers require a form of synchronization, as data is streamed into an encryption engine.

Another feature provided by the Common Crypto library is the ability to perform cipher block chaining. When using this mode, each block of data is XOR’ed with the encrypted cipher text from the previous block, and then encrypted itself. This ensures that each encrypted block is dependent on all prior blocks of clear text. This can help improve the security of the encryption by ensuring that a man-in-the-middle attacker cannot alter any data in the stream without effectively breaking the entire chain of encryption ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required