About Common Crypto
2013-03-21 17:47
309 查看
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.
在OS X v10.5 and later and iOS 5.0 and later 的系统中,Common Crypto成为用于加解密的被推荐的API。而之前的CDSA/CSSM则不被推荐使用。Apple的官方文档对Common Crypto介绍不多,只有manpage。现在我要从结构的角度介绍一下Common Crypto。
简单说Common Crypto就是一组API提供symmetric加解密相关的APIs。更具体而言,Common Crypto提供的API按照功能类别被声明在5个header file中,分别是:
CommonCryptor.h: 由CCCryptoRef对象提供使用AES128,DES,3DES,CAST,RC4,RC2算法的block cipher或者stream cipher;
CommonDigest.h:支持MD2、MD4、MD5、SHA1、SHA224、SHA256、SHA384和SHA512等hash算法;
CommonHMAC.h:HMAC是Hash-based message authentication code,
CommonKeyDerivation.h:提供derive key的API;
CommonSymmetricKeywrap.h: 提供wrap/unwrap a symmetric key with a Key Encription Key(KEK is key used to protect other keys);
应该来说,Common Crypto提供的功能还是很丰富的,类似于一个CSP提供的功能。
在OS X v10.5 and later and iOS 5.0 and later 的系统中,Common Crypto成为用于加解密的被推荐的API。而之前的CDSA/CSSM则不被推荐使用。Apple的官方文档对Common Crypto介绍不多,只有manpage。现在我要从结构的角度介绍一下Common Crypto。
简单说Common Crypto就是一组API提供symmetric加解密相关的APIs。更具体而言,Common Crypto提供的API按照功能类别被声明在5个header file中,分别是:
CommonCryptor.h: 由CCCryptoRef对象提供使用AES128,DES,3DES,CAST,RC4,RC2算法的block cipher或者stream cipher;
CommonDigest.h:支持MD2、MD4、MD5、SHA1、SHA224、SHA256、SHA384和SHA512等hash算法;
CommonHMAC.h:HMAC是Hash-based message authentication code,
CommonKeyDerivation.h:提供derive key的API;
CommonSymmetricKeywrap.h: 提供wrap/unwrap a symmetric key with a Key Encription Key(KEK is key used to protect other keys);
应该来说,Common Crypto提供的功能还是很丰富的,类似于一个CSP提供的功能。
相关文章推荐
- iOS开发-加密与解密之CommonCrypto与Security.framework
- 用CommonCrypto计算MD5和SHA
- Let me talk about InitCommonControlsex(让我谈谈InitCommonControlsex的用法吧!)
- iOS CommonCrypto 对称加密 AES ecb,cbc
- iOS开发-加密与解密之CommonCrypto与Security.framework
- about commonjs module
- MFC Initilization of General Service Control about InitCommonControls和InitCommonControlsEx(MFC 通用控件的初始化InitCommonControls和InitCo
- common concepts about Django
- Answers to some common problems and questions about Xen
- Properly encrypting with AES with CommonCrypto
- 如何在 Swift 中使用 CommonCrypto 类进行加密(I)
- iOS CommonCrypto 对称加密 AES ecb,cbc
- What are all the common undefined behaviour that a C++ programmer should know about?
- A common misunderstanding about list.append() for newbies-----> like me
- common method for developing
- 【RMQ&LCA】Nearest Common Ancest…
- CAFFE源码学习笔记之三-common
- java.lang.ClassCastException: antlr.CommonToken异常[weblogic]
- Something about String,substring
- crypto-js加解密