xref: /freebsd/sys/opencrypto/xform_cbc_mac.c (revision 77013d11e6483b970af25e13c9b892075742f7e5)
1 #include <sys/cdefs.h>
2 __FBSDID("$FreeBSD$");
3 
4 #include <opencrypto/cbc_mac.h>
5 #include <opencrypto/xform_auth.h>
6 
7 /* Authentication instances */
8 const struct auth_hash auth_hash_ccm_cbc_mac_128 = {
9 	.type = CRYPTO_AES_CCM_CBC_MAC,
10 	.name = "CBC-CCM-AES-128",
11 	.keysize = AES_128_CBC_MAC_KEY_LEN,
12 	.hashsize = AES_CBC_MAC_HASH_LEN,
13 	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
14 	.blocksize = CCM_CBC_BLOCK_LEN,
15 	.Init = AES_CBC_MAC_Init,
16 	.Setkey = AES_CBC_MAC_Setkey,
17 	.Reinit = AES_CBC_MAC_Reinit,
18 	.Update = AES_CBC_MAC_Update,
19 	.Final = AES_CBC_MAC_Final,
20 };
21 const struct auth_hash auth_hash_ccm_cbc_mac_192 = {
22 	.type = CRYPTO_AES_CCM_CBC_MAC,
23 	.name = "CBC-CCM-AES-192",
24 	.keysize = AES_192_CBC_MAC_KEY_LEN,
25 	.hashsize = AES_CBC_MAC_HASH_LEN,
26 	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
27 	.blocksize = CCM_CBC_BLOCK_LEN,
28 	.Init = AES_CBC_MAC_Init,
29 	.Setkey = AES_CBC_MAC_Setkey,
30 	.Reinit = AES_CBC_MAC_Reinit,
31 	.Update = AES_CBC_MAC_Update,
32 	.Final = AES_CBC_MAC_Final,
33 };
34 const struct auth_hash auth_hash_ccm_cbc_mac_256 = {
35 	.type = CRYPTO_AES_CCM_CBC_MAC,
36 	.name = "CBC-CCM-AES-256",
37 	.keysize = AES_256_CBC_MAC_KEY_LEN,
38 	.hashsize = AES_CBC_MAC_HASH_LEN,
39 	.ctxsize = sizeof(struct aes_cbc_mac_ctx),
40 	.blocksize = CCM_CBC_BLOCK_LEN,
41 	.Init = AES_CBC_MAC_Init,
42 	.Setkey = AES_CBC_MAC_Setkey,
43 	.Reinit = AES_CBC_MAC_Reinit,
44 	.Update = AES_CBC_MAC_Update,
45 	.Final = AES_CBC_MAC_Final,
46 };
47