2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * Generic support for ARIA CCM.
12 * This file is included by cipher_ccm_hw.c
15 #if !defined(OPENSSL_NO_ARIA) && !defined(FIPS_MODE)
17 static int ccm_aria_initkey(PROV_CCM_CTX *ctx,
18 const unsigned char *key, size_t keylen)
20 PROV_ARIA_CCM_CTX *actx = (PROV_ARIA_CCM_CTX *)ctx;
22 aria_set_encrypt_key(key, keylen * 8, &actx->ks.ks);
23 CRYPTO_ccm128_init(&ctx->ccm_ctx, ctx->m, ctx->l, &actx->ks.ks,
24 (block128_f)aria_encrypt);
30 static const PROV_CCM_HW ccm_aria = {
34 ccm_generic_auth_encrypt,
35 ccm_generic_auth_decrypt,
38 const PROV_CCM_HW *PROV_ARIA_HW_ccm(size_t keybits)
42 #endif /* OPENSSL_NO_ARIA */