aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto/xform_cbc_mac.c
blob: 755dd51d9517c34ae7a7ffb998696f00799fd6b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

#include <opencrypto/cbc_mac.h>
#include <opencrypto/xform_auth.h>

/* Authentication instances */
struct auth_hash auth_hash_ccm_cbc_mac_128 = {
	.type = CRYPTO_AES_CCM_CBC_MAC,
	.name = "CBC-CCM-AES-128",
	.keysize = AES_128_CBC_MAC_KEY_LEN,
	.hashsize = AES_CBC_MAC_HASH_LEN,
	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
	.blocksize = CCM_CBC_BLOCK_LEN,
	.Init = AES_CBC_MAC_Init,
	.Setkey = AES_CBC_MAC_Setkey,
	.Reinit = AES_CBC_MAC_Reinit,
	.Update = AES_CBC_MAC_Update,
	.Final = AES_CBC_MAC_Final,
};
struct auth_hash auth_hash_ccm_cbc_mac_192 = {
	.type = CRYPTO_AES_CCM_CBC_MAC,
	.name = "CBC-CCM-AES-192",
	.keysize = AES_192_CBC_MAC_KEY_LEN,
	.hashsize = AES_CBC_MAC_HASH_LEN,
	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
	.blocksize = CCM_CBC_BLOCK_LEN,
	.Init = AES_CBC_MAC_Init,
	.Setkey = AES_CBC_MAC_Setkey,
	.Reinit = AES_CBC_MAC_Reinit,
	.Update = AES_CBC_MAC_Update,
	.Final = AES_CBC_MAC_Final,
};
struct auth_hash auth_hash_ccm_cbc_mac_256 = {
	.type = CRYPTO_AES_CCM_CBC_MAC,
	.name = "CBC-CCM-AES-256",
	.keysize = AES_256_CBC_MAC_KEY_LEN,
	.hashsize = AES_CBC_MAC_HASH_LEN,
	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
	.blocksize = CCM_CBC_BLOCK_LEN,
	.Init = AES_CBC_MAC_Init,
	.Setkey = AES_CBC_MAC_Setkey,
	.Reinit = AES_CBC_MAC_Reinit,
	.Update = AES_CBC_MAC_Update,
	.Final = AES_CBC_MAC_Final,
};