- Timestamp:
- Jun 22, 2021, 9:00:19 PM (3 years ago)
- Location:
- azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfssl/wolfcrypt/wc_encrypt.h
r457 r464 29 29 30 30 #include <wolfssl/wolfcrypt/types.h> 31 #include <wolfssl/wolfcrypt/aes.h> 32 #include <wolfssl/wolfcrypt/chacha.h> 33 #include <wolfssl/wolfcrypt/des3.h> 34 #include <wolfssl/wolfcrypt/arc4.h> 31 #ifndef NO_AES 32 #include <wolfssl/wolfcrypt/aes.h> 33 #endif 34 #ifdef HAVE_CHACHA 35 #include <wolfssl/wolfcrypt/chacha.h> 36 #endif 37 #ifndef NO_DES3 38 #include <wolfssl/wolfcrypt/des3.h> 39 #endif 40 #ifndef NO_RC4 41 #include <wolfssl/wolfcrypt/arc4.h> 42 #endif 35 43 36 44 #ifdef __cplusplus … … 38 46 #endif 39 47 40 /* determine max cipher key size */ 48 /* determine max cipher key size - cannot use enum values here, must be define, 49 * since WC_MAX_SYM_KEY_SIZE is used in if macro logic. */ 41 50 #ifndef NO_AES 42 51 #define WC_MAX_SYM_KEY_SIZE (AES_MAX_KEY_SIZE/8) 43 52 #elif defined(HAVE_CHACHA) 44 #define WC_MAX_SYM_KEY_SIZE CHACHA_MAX_KEY_SZ53 #define WC_MAX_SYM_KEY_SIZE 32 /* CHACHA_MAX_KEY_SZ */ 45 54 #elif !defined(NO_DES3) 46 #define WC_MAX_SYM_KEY_SIZE DES3_KEY_SIZE55 #define WC_MAX_SYM_KEY_SIZE 24 /* DES3_KEY_SIZE */ 47 56 #elif !defined(NO_RC4) 48 #define WC_MAX_SYM_KEY_SIZE RC4_KEY_SIZE57 #define WC_MAX_SYM_KEY_SIZE 16 /* RC4_KEY_SIZE */ 49 58 #else 50 59 #define WC_MAX_SYM_KEY_SIZE 32 60 #endif 61 62 63 #if (defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \ 64 (HAVE_FIPS_VERSION <= 2)) || (defined(HAVE_SELFTEST) && \ 65 (!defined(HAVE_SELFTEST_VERSION) || (HAVE_SELFTEST_VERSION < 2))) 66 /* In FIPS cert 3389 and CAVP selftest v1 build, these enums are 67 * not in aes.h. Define them here outside the fips boundary. 68 */ 69 #ifndef GCM_NONCE_MID_SZ 70 /* The usual default nonce size for AES-GCM. */ 71 #define GCM_NONCE_MID_SZ 12 72 #endif 73 #ifndef CCM_NONCE_MIN_SZ 74 #define CCM_NONCE_MIN_SZ 7 75 #endif 51 76 #endif 52 77
Note:
See TracChangeset
for help on using the changeset viewer.