Lines Matching +full:mac +full:- +full:mode
2 * One-key CBC MAC (OMAC1) hash with AES
4 * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
21 for (i = 0; i < AES_BLOCK_SIZE - 1; i++) in gf_mulx()
23 pad[AES_BLOCK_SIZE - 1] <<= 1; in gf_mulx()
25 pad[AES_BLOCK_SIZE - 1] ^= 0x87; in gf_mulx()
30 * omac1_aes_vector - One-Key CBC MAC (OMAC1) hash with AES
36 * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
37 * Returns: 0 on success, -1 on failure
39 * This is a mode for using block cipher (AES in this case) for authentication.
41 * (SP) 800-38B.
44 const u8 *addr[], const size_t *len, u8 *mac) in omac1_aes_vector() argument
52 return -1; in omac1_aes_vector()
56 return -1; in omac1_aes_vector()
86 left -= AES_BLOCK_SIZE; in omac1_aes_vector()
114 aes_encrypt(ctx, pad, mac); in omac1_aes_vector()
121 * omac1_aes_128_vector - One-Key CBC MAC (OMAC1) hash with AES-128
122 * @key: 128-bit key for the hash operation
126 * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
127 * Returns: 0 on success, -1 on failure
129 * This is a mode for using block cipher (AES in this case) for authentication.
131 * (SP) 800-38B.
134 const u8 *addr[], const size_t *len, u8 *mac) in omac1_aes_128_vector() argument
136 return omac1_aes_vector(key, 16, num_elem, addr, len, mac); in omac1_aes_128_vector()
141 * omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
142 * @key: 128-bit key for the hash operation
143 * @data: Data buffer for which a MAC is determined
145 * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
146 * Returns: 0 on success, -1 on failure
148 * This is a mode for using block cipher (AES in this case) for authentication.
150 * (SP) 800-38B.
152 int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac) in omac1_aes_128() argument
154 return omac1_aes_128_vector(key, 1, &data, &data_len, mac); in omac1_aes_128()
159 * omac1_aes_256 - One-Key CBC MAC (OMAC1) hash with AES-256 (aka AES-CMAC)
160 * @key: 256-bit key for the hash operation
161 * @data: Data buffer for which a MAC is determined
163 * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
164 * Returns: 0 on success, -1 on failure
166 * This is a mode for using block cipher (AES in this case) for authentication.
168 * (SP) 800-38B.
170 int omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac) in omac1_aes_256() argument
172 return omac1_aes_vector(key, 32, 1, &data, &data_len, mac); in omac1_aes_256()