diff options
author | pjd <pjd@FreeBSD.org> | 2006-06-04 14:20:47 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-06-04 14:20:47 +0000 |
commit | d6c88e2e507b72c0072306b9c54c33a240238f26 (patch) | |
tree | 7c28199007a0f136877e2fbc033153e34a1f019e /sys/opencrypto/cryptodev.h | |
parent | e17ebb81203ba6d0b6e0ef55a2df5d44e99357be (diff) | |
download | FreeBSD-src-d6c88e2e507b72c0072306b9c54c33a240238f26.zip FreeBSD-src-d6c88e2e507b72c0072306b9c54c33a240238f26.tar.gz |
- Add defines with hash length for each hash algorithm.
- Add defines with block length for each HMAC algorithm.
- Add AES_BLOCK_LEN define which is an alias for RIJNDAEL128_BLOCK_LEN.
- Add NULL_BLOCK_LEN define.
Diffstat (limited to 'sys/opencrypto/cryptodev.h')
-rw-r--r-- | sys/opencrypto/cryptodev.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h index 6408eb4..bacecb3 100644 --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -61,19 +61,39 @@ #define CRYPTO_DRIVERS_INITIAL 4 #define CRYPTO_SW_SESSIONS 32 +/* Hash values */ +#define NULL_HASH_LEN 16 +#define MD5_HASH_LEN 16 +#define SHA1_HASH_LEN 20 +#define RIPEMD160_HASH_LEN 20 +#define SHA2_256_HASH_LEN 32 +#define SHA2_384_HASH_LEN 48 +#define SHA2_512_HASH_LEN 64 +#define MD5_KPDK_HASH_LEN 16 +#define SHA1_KPDK_HASH_LEN 20 + /* HMAC values */ -#define HMAC_BLOCK_LEN 64 -#define HMAC_BLOCK_MAXLEN 128 -#define HMAC_IPAD_VAL 0x36 -#define HMAC_OPAD_VAL 0x5C +#define NULL_HMAC_BLOCK_LEN 64 +#define MD5_HMAC_BLOCK_LEN 64 +#define SHA1_HMAC_BLOCK_LEN 64 +#define RIPEMD160_HMAC_BLOCK_LEN 64 +#define SHA2_256_HMAC_BLOCK_LEN 64 +#define SHA2_384_HMAC_BLOCK_LEN 128 +#define SHA2_512_HMAC_BLOCK_LEN 128 +#define HMAC_BLOCK_LEN 64 +#define HMAC_BLOCK_MAXLEN 128 +#define HMAC_IPAD_VAL 0x36 +#define HMAC_OPAD_VAL 0x5C /* Encryption algorithm block sizes */ +#define NULL_BLOCK_LEN 4 #define DES_BLOCK_LEN 8 #define DES3_BLOCK_LEN 8 #define BLOWFISH_BLOCK_LEN 8 #define SKIPJACK_BLOCK_LEN 8 #define CAST128_BLOCK_LEN 8 #define RIJNDAEL128_BLOCK_LEN 16 +#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN #define EALG_MAX_BLOCK_LEN 16 /* Keep this updated */ /* Maximum hash algorithm result length */ |