4 #include <opencrypto/cbc_mac.h>
5 #include <opencrypto/xform_auth.h>
7 /* Authentication instances */
8 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 = (void (*)(void *)) AES_CBC_MAC_Init,
17 (void (*)(void *, const u_int8_t *, u_int16_t))AES_CBC_MAC_Setkey,
19 (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit,
21 (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update,
22 .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final,
24 struct auth_hash auth_hash_ccm_cbc_mac_192 = {
25 .type = CRYPTO_AES_CCM_CBC_MAC,
26 .name = "CBC-CCM-AES-192",
27 .keysize = AES_192_CBC_MAC_KEY_LEN,
28 .hashsize = AES_CBC_MAC_HASH_LEN,
29 .ctxsize = sizeof(struct aes_cbc_mac_ctx),
30 .blocksize = CCM_CBC_BLOCK_LEN,
31 .Init = (void (*)(void *)) AES_CBC_MAC_Init,
33 (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Setkey,
35 (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit,
37 (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update,
38 .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final,
40 struct auth_hash auth_hash_ccm_cbc_mac_256 = {
41 .type = CRYPTO_AES_CCM_CBC_MAC,
42 .name = "CBC-CCM-AES-256",
43 .keysize = AES_256_CBC_MAC_KEY_LEN,
44 .hashsize = AES_CBC_MAC_HASH_LEN,
45 .ctxsize = sizeof(struct aes_cbc_mac_ctx),
46 .blocksize = CCM_CBC_BLOCK_LEN,
47 .Init = (void (*)(void *)) AES_CBC_MAC_Init,
49 (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Setkey,
51 (void (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Reinit,
53 (int (*)(void *, const u_int8_t *, u_int16_t)) AES_CBC_MAC_Update,
54 .Final = (void (*)(u_int8_t *, void *)) AES_CBC_MAC_Final,