Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
aes_cmac.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015-2018 Yubico AB
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#include "
aes.h
"
18
19
typedef
struct
{
20
aes_context
aes_ctx
;
21
uint8_t
k1[
AES_BLOCK_SIZE
];
22
uint8_t
k2[
AES_BLOCK_SIZE
];
23
uint8_t
mac[
AES_BLOCK_SIZE
];
24
}
aes_cmac_context_t
;
25
26
#ifndef __WIN32
27
#define YH_INTERNAL __attribute__((visibility("hidden")))
28
#else
29
#define YH_INTERNAL
30
#endif
31
32
uint8_t
YH_INTERNAL
aes_cmac_init
(
uint8_t
*key,
uint16_t
key_len
,
33
aes_cmac_context_t
*ctx);
34
void
YH_INTERNAL
aes_cmac_encrypt
(
const
aes_cmac_context_t
*ctx,
35
const
uint8_t
*message,
36
const
uint16_t
message_len,
uint8_t
*mac);
37
void
YH_INTERNAL
aes_cmac_destroy
(
aes_cmac_context_t
*ctx);
aes.h
AES_BLOCK_SIZE
#define AES_BLOCK_SIZE
Definition
aes.h:35
aes_cmac_encrypt
void YH_INTERNAL aes_cmac_encrypt(const aes_cmac_context_t *ctx, const uint8_t *message, const uint16_t message_len, uint8_t *mac)
Definition
aes_cmac.c:85
aes_cmac_init
uint8_t YH_INTERNAL aes_cmac_init(uint8_t *key, uint16_t key_len, aes_cmac_context_t *ctx)
Definition
aes_cmac.c:130
YH_INTERNAL
#define YH_INTERNAL
Definition
aes_cmac.h:27
aes_cmac_destroy
void YH_INTERNAL aes_cmac_destroy(aes_cmac_context_t *ctx)
Definition
aes_cmac.c:147
uint16_t
unsigned short uint16_t
Definition
stdint.h:125
uint8_t
unsigned char uint8_t
Definition
stdint.h:124
aes_cmac_context_t
Definition
aes_cmac.h:19
aes_cmac_context_t::aes_ctx
aes_context aes_ctx
Definition
aes_cmac.h:20
aes_context
Definition
aes.h:42
key_len
session operation op sign key_len
Definition
yubihsm_pkcs11.c:3475
libraries
yubihsm
aes_cmac
aes_cmac.h
Generated by
1.12.0