Changeset View
Changeset View
Standalone View
Standalone View
head/sys/opencrypto/cryptodev.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
#define SHA2_224_HASH_LEN 28 | #define SHA2_224_HASH_LEN 28 | ||||
#define SHA2_256_HASH_LEN 32 | #define SHA2_256_HASH_LEN 32 | ||||
#define SHA2_384_HASH_LEN 48 | #define SHA2_384_HASH_LEN 48 | ||||
#define SHA2_512_HASH_LEN 64 | #define SHA2_512_HASH_LEN 64 | ||||
#define MD5_KPDK_HASH_LEN 16 | #define MD5_KPDK_HASH_LEN 16 | ||||
#define SHA1_KPDK_HASH_LEN 20 | #define SHA1_KPDK_HASH_LEN 20 | ||||
#define AES_GMAC_HASH_LEN 16 | #define AES_GMAC_HASH_LEN 16 | ||||
#define POLY1305_HASH_LEN 16 | #define POLY1305_HASH_LEN 16 | ||||
#define AES_CBC_MAC_HASH_LEN 16 | |||||
/* Maximum hash algorithm result length */ | /* Maximum hash algorithm result length */ | ||||
#define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ | #define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ | ||||
#define MD5_BLOCK_LEN 64 | #define MD5_BLOCK_LEN 64 | ||||
#define SHA1_BLOCK_LEN 64 | #define SHA1_BLOCK_LEN 64 | ||||
#define RIPEMD160_BLOCK_LEN 64 | #define RIPEMD160_BLOCK_LEN 64 | ||||
#define SHA2_224_BLOCK_LEN 64 | #define SHA2_224_BLOCK_LEN 64 | ||||
#define SHA2_256_BLOCK_LEN 64 | #define SHA2_256_BLOCK_LEN 64 | ||||
#define SHA2_384_BLOCK_LEN 128 | #define SHA2_384_BLOCK_LEN 128 | ||||
#define SHA2_512_BLOCK_LEN 128 | #define SHA2_512_BLOCK_LEN 128 | ||||
/* HMAC values */ | /* HMAC values */ | ||||
#define NULL_HMAC_BLOCK_LEN 64 | #define NULL_HMAC_BLOCK_LEN 64 | ||||
/* Maximum HMAC block length */ | /* Maximum HMAC block length */ | ||||
#define HMAC_MAX_BLOCK_LEN SHA2_512_BLOCK_LEN /* Keep this updated */ | #define HMAC_MAX_BLOCK_LEN SHA2_512_BLOCK_LEN /* Keep this updated */ | ||||
#define HMAC_IPAD_VAL 0x36 | #define HMAC_IPAD_VAL 0x36 | ||||
#define HMAC_OPAD_VAL 0x5C | #define HMAC_OPAD_VAL 0x5C | ||||
/* HMAC Key Length */ | /* HMAC Key Length */ | ||||
#define AES_128_GMAC_KEY_LEN 16 | #define AES_128_GMAC_KEY_LEN 16 | ||||
#define AES_192_GMAC_KEY_LEN 24 | #define AES_192_GMAC_KEY_LEN 24 | ||||
#define AES_256_GMAC_KEY_LEN 32 | #define AES_256_GMAC_KEY_LEN 32 | ||||
#define AES_128_CBC_MAC_KEY_LEN 16 | |||||
#define AES_192_CBC_MAC_KEY_LEN 24 | |||||
#define AES_256_CBC_MAC_KEY_LEN 32 | |||||
#define POLY1305_KEY_LEN 32 | #define POLY1305_KEY_LEN 32 | ||||
/* Encryption algorithm block sizes */ | /* Encryption algorithm block sizes */ | ||||
#define NULL_BLOCK_LEN 4 /* IPsec to maintain alignment */ | #define NULL_BLOCK_LEN 4 /* IPsec to maintain alignment */ | ||||
#define DES_BLOCK_LEN 8 | #define DES_BLOCK_LEN 8 | ||||
#define DES3_BLOCK_LEN 8 | #define DES3_BLOCK_LEN 8 | ||||
#define BLOWFISH_BLOCK_LEN 8 | #define BLOWFISH_BLOCK_LEN 8 | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
#define CRYPTO_CHACHA20 31 /* Chacha20 stream cipher */ | #define CRYPTO_CHACHA20 31 /* Chacha20 stream cipher */ | ||||
#define CRYPTO_SHA2_224_HMAC 32 | #define CRYPTO_SHA2_224_HMAC 32 | ||||
#define CRYPTO_RIPEMD160 33 | #define CRYPTO_RIPEMD160 33 | ||||
#define CRYPTO_SHA2_224 34 | #define CRYPTO_SHA2_224 34 | ||||
#define CRYPTO_SHA2_256 35 | #define CRYPTO_SHA2_256 35 | ||||
#define CRYPTO_SHA2_384 36 | #define CRYPTO_SHA2_384 36 | ||||
#define CRYPTO_SHA2_512 37 | #define CRYPTO_SHA2_512 37 | ||||
#define CRYPTO_POLY1305 38 | #define CRYPTO_POLY1305 38 | ||||
#define CRYPTO_ALGORITHM_MAX 38 /* Keep updated - see below */ | #define CRYPTO_AES_CCM_CBC_MAC 39 /* auth side */ | ||||
#define CRYPTO_ALGORITHM_MAX 39 /* Keep updated - see below */ | |||||
#define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ | #define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ | ||||
(x) <= CRYPTO_ALGORITHM_MAX) | (x) <= CRYPTO_ALGORITHM_MAX) | ||||
/* Algorithm flags */ | /* Algorithm flags */ | ||||
#define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */ | #define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */ | ||||
#define CRYPTO_ALG_FLAG_RNG_ENABLE 0x02 /* Has HW RNG for DH/DSA */ | #define CRYPTO_ALG_FLAG_RNG_ENABLE 0x02 /* Has HW RNG for DH/DSA */ | ||||
#define CRYPTO_ALG_FLAG_DSA_SHA 0x04 /* Can do SHA on msg */ | #define CRYPTO_ALG_FLAG_DSA_SHA 0x04 /* Can do SHA on msg */ | ||||
▲ Show 20 Lines • Show All 360 Lines • Show Last 20 Lines |