18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Glue Code for x86_64/AVX/AES-NI assembler optimized version of Camellia 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright © 2012-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <asm/crypto/camellia.h> 98c2ecf20Sopenharmony_ci#include <asm/crypto/glue_helper.h> 108c2ecf20Sopenharmony_ci#include <crypto/algapi.h> 118c2ecf20Sopenharmony_ci#include <crypto/internal/simd.h> 128c2ecf20Sopenharmony_ci#include <crypto/xts.h> 138c2ecf20Sopenharmony_ci#include <linux/crypto.h> 148c2ecf20Sopenharmony_ci#include <linux/err.h> 158c2ecf20Sopenharmony_ci#include <linux/module.h> 168c2ecf20Sopenharmony_ci#include <linux/types.h> 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* 16-way parallel cipher functions (avx/aes-ni) */ 218c2ecf20Sopenharmony_ciasmlinkage void camellia_ecb_enc_16way(const void *ctx, u8 *dst, const u8 *src); 228c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_ecb_enc_16way); 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciasmlinkage void camellia_ecb_dec_16way(const void *ctx, u8 *dst, const u8 *src); 258c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_ecb_dec_16way); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciasmlinkage void camellia_cbc_dec_16way(const void *ctx, u8 *dst, const u8 *src); 288c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_cbc_dec_16way); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciasmlinkage void camellia_ctr_16way(const void *ctx, u8 *dst, const u8 *src, 318c2ecf20Sopenharmony_ci le128 *iv); 328c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_ctr_16way); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciasmlinkage void camellia_xts_enc_16way(const void *ctx, u8 *dst, const u8 *src, 358c2ecf20Sopenharmony_ci le128 *iv); 368c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_xts_enc_16way); 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciasmlinkage void camellia_xts_dec_16way(const void *ctx, u8 *dst, const u8 *src, 398c2ecf20Sopenharmony_ci le128 *iv); 408c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_xts_dec_16way); 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_civoid camellia_xts_enc(const void *ctx, u8 *dst, const u8 *src, le128 *iv) 438c2ecf20Sopenharmony_ci{ 448c2ecf20Sopenharmony_ci glue_xts_crypt_128bit_one(ctx, dst, src, iv, camellia_enc_blk); 458c2ecf20Sopenharmony_ci} 468c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_xts_enc); 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_civoid camellia_xts_dec(const void *ctx, u8 *dst, const u8 *src, le128 *iv) 498c2ecf20Sopenharmony_ci{ 508c2ecf20Sopenharmony_ci glue_xts_crypt_128bit_one(ctx, dst, src, iv, camellia_dec_blk); 518c2ecf20Sopenharmony_ci} 528c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(camellia_xts_dec); 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_enc = { 558c2ecf20Sopenharmony_ci .num_funcs = 3, 568c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci .funcs = { { 598c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 608c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_ecb_enc_16way } 618c2ecf20Sopenharmony_ci }, { 628c2ecf20Sopenharmony_ci .num_blocks = 2, 638c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_enc_blk_2way } 648c2ecf20Sopenharmony_ci }, { 658c2ecf20Sopenharmony_ci .num_blocks = 1, 668c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_enc_blk } 678c2ecf20Sopenharmony_ci } } 688c2ecf20Sopenharmony_ci}; 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_ctr = { 718c2ecf20Sopenharmony_ci .num_funcs = 3, 728c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci .funcs = { { 758c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 768c2ecf20Sopenharmony_ci .fn_u = { .ctr = camellia_ctr_16way } 778c2ecf20Sopenharmony_ci }, { 788c2ecf20Sopenharmony_ci .num_blocks = 2, 798c2ecf20Sopenharmony_ci .fn_u = { .ctr = camellia_crypt_ctr_2way } 808c2ecf20Sopenharmony_ci }, { 818c2ecf20Sopenharmony_ci .num_blocks = 1, 828c2ecf20Sopenharmony_ci .fn_u = { .ctr = camellia_crypt_ctr } 838c2ecf20Sopenharmony_ci } } 848c2ecf20Sopenharmony_ci}; 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_enc_xts = { 878c2ecf20Sopenharmony_ci .num_funcs = 2, 888c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci .funcs = { { 918c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 928c2ecf20Sopenharmony_ci .fn_u = { .xts = camellia_xts_enc_16way } 938c2ecf20Sopenharmony_ci }, { 948c2ecf20Sopenharmony_ci .num_blocks = 1, 958c2ecf20Sopenharmony_ci .fn_u = { .xts = camellia_xts_enc } 968c2ecf20Sopenharmony_ci } } 978c2ecf20Sopenharmony_ci}; 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_dec = { 1008c2ecf20Sopenharmony_ci .num_funcs = 3, 1018c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci .funcs = { { 1048c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1058c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_ecb_dec_16way } 1068c2ecf20Sopenharmony_ci }, { 1078c2ecf20Sopenharmony_ci .num_blocks = 2, 1088c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_dec_blk_2way } 1098c2ecf20Sopenharmony_ci }, { 1108c2ecf20Sopenharmony_ci .num_blocks = 1, 1118c2ecf20Sopenharmony_ci .fn_u = { .ecb = camellia_dec_blk } 1128c2ecf20Sopenharmony_ci } } 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_dec_cbc = { 1168c2ecf20Sopenharmony_ci .num_funcs = 3, 1178c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci .funcs = { { 1208c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1218c2ecf20Sopenharmony_ci .fn_u = { .cbc = camellia_cbc_dec_16way } 1228c2ecf20Sopenharmony_ci }, { 1238c2ecf20Sopenharmony_ci .num_blocks = 2, 1248c2ecf20Sopenharmony_ci .fn_u = { .cbc = camellia_decrypt_cbc_2way } 1258c2ecf20Sopenharmony_ci }, { 1268c2ecf20Sopenharmony_ci .num_blocks = 1, 1278c2ecf20Sopenharmony_ci .fn_u = { .cbc = camellia_dec_blk } 1288c2ecf20Sopenharmony_ci } } 1298c2ecf20Sopenharmony_ci}; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_cistatic const struct common_glue_ctx camellia_dec_xts = { 1328c2ecf20Sopenharmony_ci .num_funcs = 2, 1338c2ecf20Sopenharmony_ci .fpu_blocks_limit = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci .funcs = { { 1368c2ecf20Sopenharmony_ci .num_blocks = CAMELLIA_AESNI_PARALLEL_BLOCKS, 1378c2ecf20Sopenharmony_ci .fn_u = { .xts = camellia_xts_dec_16way } 1388c2ecf20Sopenharmony_ci }, { 1398c2ecf20Sopenharmony_ci .num_blocks = 1, 1408c2ecf20Sopenharmony_ci .fn_u = { .xts = camellia_xts_dec } 1418c2ecf20Sopenharmony_ci } } 1428c2ecf20Sopenharmony_ci}; 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_cistatic int camellia_setkey(struct crypto_skcipher *tfm, const u8 *key, 1458c2ecf20Sopenharmony_ci unsigned int keylen) 1468c2ecf20Sopenharmony_ci{ 1478c2ecf20Sopenharmony_ci return __camellia_setkey(crypto_skcipher_ctx(tfm), key, keylen); 1488c2ecf20Sopenharmony_ci} 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_cistatic int ecb_encrypt(struct skcipher_request *req) 1518c2ecf20Sopenharmony_ci{ 1528c2ecf20Sopenharmony_ci return glue_ecb_req_128bit(&camellia_enc, req); 1538c2ecf20Sopenharmony_ci} 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_cistatic int ecb_decrypt(struct skcipher_request *req) 1568c2ecf20Sopenharmony_ci{ 1578c2ecf20Sopenharmony_ci return glue_ecb_req_128bit(&camellia_dec, req); 1588c2ecf20Sopenharmony_ci} 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_cistatic int cbc_encrypt(struct skcipher_request *req) 1618c2ecf20Sopenharmony_ci{ 1628c2ecf20Sopenharmony_ci return glue_cbc_encrypt_req_128bit(camellia_enc_blk, req); 1638c2ecf20Sopenharmony_ci} 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_cistatic int cbc_decrypt(struct skcipher_request *req) 1668c2ecf20Sopenharmony_ci{ 1678c2ecf20Sopenharmony_ci return glue_cbc_decrypt_req_128bit(&camellia_dec_cbc, req); 1688c2ecf20Sopenharmony_ci} 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_cistatic int ctr_crypt(struct skcipher_request *req) 1718c2ecf20Sopenharmony_ci{ 1728c2ecf20Sopenharmony_ci return glue_ctr_req_128bit(&camellia_ctr, req); 1738c2ecf20Sopenharmony_ci} 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ciint xts_camellia_setkey(struct crypto_skcipher *tfm, const u8 *key, 1768c2ecf20Sopenharmony_ci unsigned int keylen) 1778c2ecf20Sopenharmony_ci{ 1788c2ecf20Sopenharmony_ci struct camellia_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 1798c2ecf20Sopenharmony_ci int err; 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci err = xts_verify_key(tfm, key, keylen); 1828c2ecf20Sopenharmony_ci if (err) 1838c2ecf20Sopenharmony_ci return err; 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci /* first half of xts-key is for crypt */ 1868c2ecf20Sopenharmony_ci err = __camellia_setkey(&ctx->crypt_ctx, key, keylen / 2); 1878c2ecf20Sopenharmony_ci if (err) 1888c2ecf20Sopenharmony_ci return err; 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci /* second half of xts-key is for tweak */ 1918c2ecf20Sopenharmony_ci return __camellia_setkey(&ctx->tweak_ctx, key + keylen / 2, keylen / 2); 1928c2ecf20Sopenharmony_ci} 1938c2ecf20Sopenharmony_ciEXPORT_SYMBOL_GPL(xts_camellia_setkey); 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_cistatic int xts_encrypt(struct skcipher_request *req) 1968c2ecf20Sopenharmony_ci{ 1978c2ecf20Sopenharmony_ci struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); 1988c2ecf20Sopenharmony_ci struct camellia_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci return glue_xts_req_128bit(&camellia_enc_xts, req, camellia_enc_blk, 2018c2ecf20Sopenharmony_ci &ctx->tweak_ctx, &ctx->crypt_ctx, false); 2028c2ecf20Sopenharmony_ci} 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_cistatic int xts_decrypt(struct skcipher_request *req) 2058c2ecf20Sopenharmony_ci{ 2068c2ecf20Sopenharmony_ci struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); 2078c2ecf20Sopenharmony_ci struct camellia_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci return glue_xts_req_128bit(&camellia_dec_xts, req, camellia_enc_blk, 2108c2ecf20Sopenharmony_ci &ctx->tweak_ctx, &ctx->crypt_ctx, true); 2118c2ecf20Sopenharmony_ci} 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_cistatic struct skcipher_alg camellia_algs[] = { 2148c2ecf20Sopenharmony_ci { 2158c2ecf20Sopenharmony_ci .base.cra_name = "__ecb(camellia)", 2168c2ecf20Sopenharmony_ci .base.cra_driver_name = "__ecb-camellia-aesni", 2178c2ecf20Sopenharmony_ci .base.cra_priority = 400, 2188c2ecf20Sopenharmony_ci .base.cra_flags = CRYPTO_ALG_INTERNAL, 2198c2ecf20Sopenharmony_ci .base.cra_blocksize = CAMELLIA_BLOCK_SIZE, 2208c2ecf20Sopenharmony_ci .base.cra_ctxsize = sizeof(struct camellia_ctx), 2218c2ecf20Sopenharmony_ci .base.cra_module = THIS_MODULE, 2228c2ecf20Sopenharmony_ci .min_keysize = CAMELLIA_MIN_KEY_SIZE, 2238c2ecf20Sopenharmony_ci .max_keysize = CAMELLIA_MAX_KEY_SIZE, 2248c2ecf20Sopenharmony_ci .setkey = camellia_setkey, 2258c2ecf20Sopenharmony_ci .encrypt = ecb_encrypt, 2268c2ecf20Sopenharmony_ci .decrypt = ecb_decrypt, 2278c2ecf20Sopenharmony_ci }, { 2288c2ecf20Sopenharmony_ci .base.cra_name = "__cbc(camellia)", 2298c2ecf20Sopenharmony_ci .base.cra_driver_name = "__cbc-camellia-aesni", 2308c2ecf20Sopenharmony_ci .base.cra_priority = 400, 2318c2ecf20Sopenharmony_ci .base.cra_flags = CRYPTO_ALG_INTERNAL, 2328c2ecf20Sopenharmony_ci .base.cra_blocksize = CAMELLIA_BLOCK_SIZE, 2338c2ecf20Sopenharmony_ci .base.cra_ctxsize = sizeof(struct camellia_ctx), 2348c2ecf20Sopenharmony_ci .base.cra_module = THIS_MODULE, 2358c2ecf20Sopenharmony_ci .min_keysize = CAMELLIA_MIN_KEY_SIZE, 2368c2ecf20Sopenharmony_ci .max_keysize = CAMELLIA_MAX_KEY_SIZE, 2378c2ecf20Sopenharmony_ci .ivsize = CAMELLIA_BLOCK_SIZE, 2388c2ecf20Sopenharmony_ci .setkey = camellia_setkey, 2398c2ecf20Sopenharmony_ci .encrypt = cbc_encrypt, 2408c2ecf20Sopenharmony_ci .decrypt = cbc_decrypt, 2418c2ecf20Sopenharmony_ci }, { 2428c2ecf20Sopenharmony_ci .base.cra_name = "__ctr(camellia)", 2438c2ecf20Sopenharmony_ci .base.cra_driver_name = "__ctr-camellia-aesni", 2448c2ecf20Sopenharmony_ci .base.cra_priority = 400, 2458c2ecf20Sopenharmony_ci .base.cra_flags = CRYPTO_ALG_INTERNAL, 2468c2ecf20Sopenharmony_ci .base.cra_blocksize = 1, 2478c2ecf20Sopenharmony_ci .base.cra_ctxsize = sizeof(struct camellia_ctx), 2488c2ecf20Sopenharmony_ci .base.cra_module = THIS_MODULE, 2498c2ecf20Sopenharmony_ci .min_keysize = CAMELLIA_MIN_KEY_SIZE, 2508c2ecf20Sopenharmony_ci .max_keysize = CAMELLIA_MAX_KEY_SIZE, 2518c2ecf20Sopenharmony_ci .ivsize = CAMELLIA_BLOCK_SIZE, 2528c2ecf20Sopenharmony_ci .chunksize = CAMELLIA_BLOCK_SIZE, 2538c2ecf20Sopenharmony_ci .setkey = camellia_setkey, 2548c2ecf20Sopenharmony_ci .encrypt = ctr_crypt, 2558c2ecf20Sopenharmony_ci .decrypt = ctr_crypt, 2568c2ecf20Sopenharmony_ci }, { 2578c2ecf20Sopenharmony_ci .base.cra_name = "__xts(camellia)", 2588c2ecf20Sopenharmony_ci .base.cra_driver_name = "__xts-camellia-aesni", 2598c2ecf20Sopenharmony_ci .base.cra_priority = 400, 2608c2ecf20Sopenharmony_ci .base.cra_flags = CRYPTO_ALG_INTERNAL, 2618c2ecf20Sopenharmony_ci .base.cra_blocksize = CAMELLIA_BLOCK_SIZE, 2628c2ecf20Sopenharmony_ci .base.cra_ctxsize = sizeof(struct camellia_xts_ctx), 2638c2ecf20Sopenharmony_ci .base.cra_module = THIS_MODULE, 2648c2ecf20Sopenharmony_ci .min_keysize = 2 * CAMELLIA_MIN_KEY_SIZE, 2658c2ecf20Sopenharmony_ci .max_keysize = 2 * CAMELLIA_MAX_KEY_SIZE, 2668c2ecf20Sopenharmony_ci .ivsize = CAMELLIA_BLOCK_SIZE, 2678c2ecf20Sopenharmony_ci .setkey = xts_camellia_setkey, 2688c2ecf20Sopenharmony_ci .encrypt = xts_encrypt, 2698c2ecf20Sopenharmony_ci .decrypt = xts_decrypt, 2708c2ecf20Sopenharmony_ci }, 2718c2ecf20Sopenharmony_ci}; 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_cistatic struct simd_skcipher_alg *camellia_simd_algs[ARRAY_SIZE(camellia_algs)]; 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cistatic int __init camellia_aesni_init(void) 2768c2ecf20Sopenharmony_ci{ 2778c2ecf20Sopenharmony_ci const char *feature_name; 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci if (!boot_cpu_has(X86_FEATURE_AVX) || 2808c2ecf20Sopenharmony_ci !boot_cpu_has(X86_FEATURE_AES) || 2818c2ecf20Sopenharmony_ci !boot_cpu_has(X86_FEATURE_OSXSAVE)) { 2828c2ecf20Sopenharmony_ci pr_info("AVX or AES-NI instructions are not detected.\n"); 2838c2ecf20Sopenharmony_ci return -ENODEV; 2848c2ecf20Sopenharmony_ci } 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, 2878c2ecf20Sopenharmony_ci &feature_name)) { 2888c2ecf20Sopenharmony_ci pr_info("CPU feature '%s' is not supported.\n", feature_name); 2898c2ecf20Sopenharmony_ci return -ENODEV; 2908c2ecf20Sopenharmony_ci } 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci return simd_register_skciphers_compat(camellia_algs, 2938c2ecf20Sopenharmony_ci ARRAY_SIZE(camellia_algs), 2948c2ecf20Sopenharmony_ci camellia_simd_algs); 2958c2ecf20Sopenharmony_ci} 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_cistatic void __exit camellia_aesni_fini(void) 2988c2ecf20Sopenharmony_ci{ 2998c2ecf20Sopenharmony_ci simd_unregister_skciphers(camellia_algs, ARRAY_SIZE(camellia_algs), 3008c2ecf20Sopenharmony_ci camellia_simd_algs); 3018c2ecf20Sopenharmony_ci} 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_cimodule_init(camellia_aesni_init); 3048c2ecf20Sopenharmony_cimodule_exit(camellia_aesni_fini); 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 3078c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Camellia Cipher Algorithm, AES-NI/AVX optimized"); 3088c2ecf20Sopenharmony_ciMODULE_ALIAS_CRYPTO("camellia"); 3098c2ecf20Sopenharmony_ciMODULE_ALIAS_CRYPTO("camellia-asm"); 310