]> git.saurik.com Git - apple/xnu.git/blobdiff - EXTERNAL_HEADERS/corecrypto/ccaes.h
xnu-4903.241.1.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / corecrypto / ccaes.h
index 9dca39bd616bb9687d6872f5bc39f6607a94932a..281c99d22aa277b22592c8dedd93ada57f75316c 100644 (file)
@@ -2,8 +2,9 @@
  *  ccaes.h
  *  corecrypto
  *
- *  Created by Michael Brouwer on 12/10/10.
- *  Copyright 2010,2011 Apple Inc. All rights reserved.
+ *  Created on 12/10/2010
+ *
+ *  Copyright (c) 2010,2011,2012,2013,2015 Apple Inc. All rights reserved.
  *
  */
 
 #define CCAES_KEY_SIZE_192 24
 #define CCAES_KEY_SIZE_256 32
 
+#define CCAES_CTR_MAX_PARALLEL_NBLOCKS 8
+
 extern const struct ccmode_ecb ccaes_ltc_ecb_decrypt_mode;
 extern const struct ccmode_ecb ccaes_ltc_ecb_encrypt_mode;
 
 extern const struct ccmode_cbc ccaes_gladman_cbc_encrypt_mode;
 extern const struct ccmode_cbc ccaes_gladman_cbc_decrypt_mode;
 
-#if CCAES_ARM
+#if  CCAES_ARM_ASM
 extern const struct ccmode_ecb ccaes_arm_ecb_encrypt_mode;
 extern const struct ccmode_ecb ccaes_arm_ecb_decrypt_mode;
 
 extern const struct ccmode_cbc ccaes_arm_cbc_encrypt_mode;
 extern const struct ccmode_cbc ccaes_arm_cbc_decrypt_mode;
+
+extern const struct ccmode_xts ccaes_arm_xts_encrypt_mode;
+extern const struct ccmode_xts ccaes_arm_xts_decrypt_mode;
+
+extern const struct ccmode_cfb ccaes_arm_cfb_encrypt_mode;
+extern const struct ccmode_cfb ccaes_arm_cfb_decrypt_mode;
+
+extern const struct ccmode_ofb ccaes_arm_ofb_crypt_mode;
+
 #endif
 
-#if CCAES_INTEL
+#if CCAES_MUX
+/* Runtime check to see if hardware should be used */
+int ccaes_ios_hardware_enabled(int operation);
+
+extern const struct ccmode_cbc ccaes_ios_hardware_cbc_encrypt_mode;
+extern const struct ccmode_cbc ccaes_ios_hardware_cbc_decrypt_mode;
+
+extern const struct ccmode_ctr ccaes_ios_hardware_ctr_crypt_mode;
+
+extern const struct ccmode_cbc *ccaes_ios_mux_cbc_encrypt_mode(void);
+extern const struct ccmode_cbc *ccaes_ios_mux_cbc_decrypt_mode(void);
+
+extern const struct ccmode_ctr *ccaes_ios_mux_ctr_crypt_mode(void);
+
+#endif
+
+#if  CCAES_INTEL_ASM
 //extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_mode;
 //extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_mode;
 
@@ -61,6 +89,15 @@ extern const struct ccmode_xts ccaes_intel_xts_decrypt_opt_mode;
 extern const struct ccmode_xts ccaes_intel_xts_decrypt_aesni_mode;
 #endif
 
+#if CC_USE_L4
+extern const struct ccmode_cbc ccaes_skg_cbc_encrypt_mode;
+extern const struct ccmode_cbc ccaes_skg_cbc_decrypt_mode;
+
+extern const struct ccmode_ecb ccaes_skg_ecb_encrypt_mode;
+extern const struct ccmode_ecb ccaes_skg_ecb_decrypt_mode;
+
+extern const struct ccmode_ecb ccaes_trng_ecb_encrypt_mode;
+#endif
 
 /* Implementation Selectors: */
 const struct ccmode_ecb *ccaes_ecb_encrypt_mode(void);
@@ -69,6 +106,7 @@ const struct ccmode_cfb *ccaes_cfb_encrypt_mode(void);
 const struct ccmode_cfb8 *ccaes_cfb8_encrypt_mode(void);
 const struct ccmode_xts *ccaes_xts_encrypt_mode(void);
 const struct ccmode_gcm *ccaes_gcm_encrypt_mode(void);
+const struct ccmode_ccm *ccaes_ccm_encrypt_mode(void);
 
 const struct ccmode_ecb *ccaes_ecb_decrypt_mode(void);
 const struct ccmode_cbc *ccaes_cbc_decrypt_mode(void);
@@ -76,8 +114,12 @@ const struct ccmode_cfb *ccaes_cfb_decrypt_mode(void);
 const struct ccmode_cfb8 *ccaes_cfb8_decrypt_mode(void);
 const struct ccmode_xts *ccaes_xts_decrypt_mode(void);
 const struct ccmode_gcm *ccaes_gcm_decrypt_mode(void);
+const struct ccmode_ccm *ccaes_ccm_decrypt_mode(void);
 
 const struct ccmode_ctr *ccaes_ctr_crypt_mode(void);
 const struct ccmode_ofb *ccaes_ofb_crypt_mode(void);
 
+const struct ccmode_siv *ccaes_siv_encrypt_mode(void);
+const struct ccmode_siv *ccaes_siv_decrypt_mode(void);
+
 #endif /* _CORECRYPTO_CCAES_H_ */