Go to the documentation of this file.
58 #include "../internal.h"
98 size_t scratch_out_len;
134 out->block_used =
in->block_used;
146 for (
i = 0;
i < 15;
i++) {
152 out[
i] = (
in[
i] << 1) ^ ((0 - carry) & 0x87);
163 for (
i = 0;
i < 7;
i++) {
169 out[
i] = (
in[
i] << 1) ^ ((0 - carry) & 0x1b);
210 if (
ctx->block_used > 0) {
211 size_t todo = block_size -
ctx->block_used;
230 assert(
ctx->block_used == block_size);
238 while (in_len > block_size) {
243 in_len -= block_size;
247 ctx->block_used = in_len;
256 *out_len = block_size;
263 if (
ctx->block_used != block_size) {
266 ctx->block[
ctx->block_used] = 0x80;
268 block_size - (
ctx->block_used + 1));
273 for (
unsigned i = 0;
i < block_size;
i++) {
#define EVP_CIPHER_CTX_copy
#define EVP_CIPHER_CTX_init
EVP_CIPHER_CTX cipher_ctx
uint8_t k2[AES_BLOCK_SIZE]
uint8_t k1[AES_BLOCK_SIZE]
const OPENSSL_EXPORT EVP_CIPHER * EVP_aes_256_cbc(void)
void CMAC_CTX_free(CMAC_CTX *ctx)
static struct test_ctx ctx
int AES_CMAC(uint8_t out[16], const uint8_t *key, size_t key_len, const uint8_t *in, size_t in_len)
static void * OPENSSL_memset(void *dst, int c, size_t n)
int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t key_len, const EVP_CIPHER *cipher, ENGINE *engine)
int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in)
#define EVP_CIPHER_CTX_block_size
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
static void CMAC_CTX_init(CMAC_CTX *ctx)
static void CMAC_CTX_cleanup(CMAC_CTX *ctx)
int CMAC_Final(CMAC_CTX *ctx, uint8_t *out, size_t *out_len)
#define EVP_EncryptInit_ex
static void binary_field_mul_x_64(uint8_t out[8], const uint8_t in[8])
static const uint8_t kZeroIV[AES_BLOCK_SIZE]
#define EVP_CIPHER_CTX_cleanup
uint8_t block[AES_BLOCK_SIZE]
#define EVP_CIPHER_key_length
int CMAC_Update(CMAC_CTX *ctx, const uint8_t *in, size_t in_len)
CMAC_CTX * CMAC_CTX_new(void)
#define EVP_CIPHER_block_size
const OPENSSL_EXPORT EVP_CIPHER * EVP_aes_128_cbc(void)
static void binary_field_mul_x_128(uint8_t out[16], const uint8_t in[16])
int CMAC_Reset(CMAC_CTX *ctx)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:56