diff options
author | Sam Leffler <sam@FreeBSD.org> | 2003-10-08 20:25:47 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2003-10-08 20:25:47 +0000 |
commit | 17b667019e77e20f0f05f8cbb8c90083e83eeffd (patch) | |
tree | 389e53e6bdf62a8671139c6fdcd0a0a2e17dcefb /sys/dev/hifn/hifn7751var.h | |
parent | f3e533d270c39b1683e76874ef5ceec75b0734fb (diff) | |
download | src-17b667019e77e20f0f05f8cbb8c90083e83eeffd.tar.gz src-17b667019e77e20f0f05f8cbb8c90083e83eeffd.zip |
Add symmetric crypto support for the 7955 and 7956.
Note performance is currently suboptimal.
Submitted by: Rajesh Vaidyanath <RVaidyanath@hifn.com>
Notes
Notes:
svn path=/head/; revision=120915
Diffstat (limited to 'sys/dev/hifn/hifn7751var.h')
-rw-r--r-- | sys/dev/hifn/hifn7751var.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/hifn/hifn7751var.h b/sys/dev/hifn/hifn7751var.h index a92275774e67..b40b819a2f4e 100644 --- a/sys/dev/hifn/hifn7751var.h +++ b/sys/dev/hifn/hifn7751var.h @@ -67,6 +67,8 @@ #define HIFN_3DES_KEY_LENGTH 24 #define HIFN_MAX_CRYPT_KEY_LENGTH HIFN_3DES_KEY_LENGTH #define HIFN_IV_LENGTH 8 +#define HIFN_AES_IV_LENGTH 16 +#define HIFN_MAX_IV_LENGTH HIFN_AES_IV_LENGTH /* * Length values for authentication @@ -111,7 +113,7 @@ struct hifn_dma { struct hifn_session { int hs_state; int hs_prev_op; /* XXX collapse into hs_flags? */ - u_int8_t hs_iv[HIFN_IV_LENGTH]; + u_int8_t hs_iv[HIFN_MAX_IV_LENGTH]; }; #define HIFN_RING_SYNC(sc, r, i, f) \ @@ -166,7 +168,9 @@ struct hifn_softc { int sc_flags; #define HIFN_HAS_RNG 0x1 /* includes random number generator */ #define HIFN_HAS_PUBLIC 0x2 /* includes public key support */ -#define HIFN_IS_7811 0x4 /* Hifn 7811 part */ +#define HIFN_HAS_AES 0x4 /* includes AES support */ +#define HIFN_IS_7811 0x8 /* Hifn 7811 part */ +#define HIFN_IS_7956 0x10 /* Hifn 7956/7955 don't have SDRAM */ struct callout sc_rngto; /* for polling RNG */ struct callout sc_tickto; /* for managing DMA */ int sc_rngfirst; @@ -266,7 +270,7 @@ struct hifn_operand { struct hifn_command { u_int16_t session_num; u_int16_t base_masks, cry_masks, mac_masks; - u_int8_t iv[HIFN_IV_LENGTH], *ck, mac[HIFN_MAC_KEY_LENGTH]; + u_int8_t iv[HIFN_MAX_IV_LENGTH], *ck, mac[HIFN_MAC_KEY_LENGTH]; int cklen; int sloplen, slopidx; |