summaryrefslogtreecommitdiffstats
path: root/sys/opencrypto/cryptodev.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/opencrypto/cryptodev.h')
-rw-r--r--sys/opencrypto/cryptodev.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h
index b1999d7..919a717 100644
--- a/sys/opencrypto/cryptodev.h
+++ b/sys/opencrypto/cryptodev.h
@@ -63,6 +63,7 @@
/* HMAC values */
#define HMAC_BLOCK_LEN 64
+#define HMAC_BLOCK_MAXLEN 128
#define HMAC_IPAD_VAL 0x36
#define HMAC_OPAD_VAL 0x5C
@@ -94,11 +95,13 @@
#define CRYPTO_ARC4 12
#define CRYPTO_MD5 13
#define CRYPTO_SHA1 14
-#define CRYPTO_SHA2_HMAC 15
-#define CRYPTO_NULL_HMAC 16
-#define CRYPTO_NULL_CBC 17
-#define CRYPTO_DEFLATE_COMP 18 /* Deflate compression algorithm */
-#define CRYPTO_ALGORITHM_MAX 18 /* Keep updated - see below */
+#define CRYPTO_NULL_HMAC 15
+#define CRYPTO_NULL_CBC 16
+#define CRYPTO_DEFLATE_COMP 17 /* Deflate compression algorithm */
+#define CRYPTO_SHA2_256_HMAC 18
+#define CRYPTO_SHA2_384_HMAC 19
+#define CRYPTO_SHA2_512_HMAC 20
+#define CRYPTO_ALGORITHM_MAX 20 /* Keep updated - see below */
/* Algorithm flags */
#define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */
@@ -209,6 +212,8 @@ struct cryptostats {
struct cryptoini {
int cri_alg; /* Algorithm to use */
int cri_klen; /* Key length, in bits */
+ int cri_mlen; /* Number of bytes we want from the
+ entire hash. 0 means all. */
caddr_t cri_key; /* key to use */
u_int8_t cri_iv[EALG_MAX_BLOCK_LEN]; /* IV to use */
struct cryptoini *cri_next;
@@ -384,6 +389,6 @@ extern void cuio_copydata(struct uio* uio, int off, int len, caddr_t cp);
extern void cuio_copyback(struct uio* uio, int off, int len, caddr_t cp);
extern struct iovec *cuio_getptr(struct uio *uio, int loc, int *off);
extern int cuio_apply(struct uio *uio, int off, int len,
- int (*f)(void *, void *, u_int), void *arg);
+ int (*f)(void *, void *, u_int), void *arg);
#endif /* _KERNEL */
#endif /* _CRYPTO_CRYPTO_H_ */
OpenPOWER on IntegriCloud