summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2021-08-30 14:28:07 +0800
committerTomas Mraz <tomas@openssl.org>2022-08-22 10:14:39 +0200
commite6b1c22b41b5feaffe7fe2bb24996fb6763586af (patch)
tree982eb4d87e52da6b4bbde9250fef11ca7a1d9499 /crypto/evp
parenta9389c0b75e69ebaf74fdc8fee0c983809e45931 (diff)
evp: Simplify ARIA aead cipher definition
Remove fixed macro variables, only keep the cipher mode name and key length. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16465)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_aria.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/evp/e_aria.c b/crypto/evp/e_aria.c
index 4722f54873..5bf7c7d2a6 100644
--- a/crypto/evp/e_aria.c
+++ b/crypto/evp/e_aria.c
@@ -765,10 +765,10 @@ static int aria_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
| EVP_CIPH_CUSTOM_COPY | EVP_CIPH_FLAG_AEAD_CIPHER \
| EVP_CIPH_CUSTOM_IV_LENGTH)
-#define BLOCK_CIPHER_aead(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \
+#define BLOCK_CIPHER_aead(keylen,mode,MODE) \
static const EVP_CIPHER aria_##keylen##_##mode = { \
- nid##_##keylen##_##nmode, \
- blocksize, keylen/8, ivlen, \
+ NID_aria_##keylen##_##mode, \
+ 1, keylen/8, 12, \
ARIA_AUTH_FLAGS|EVP_CIPH_##MODE##_MODE, \
EVP_ORIG_GLOBAL, \
aria_##mode##_init_key, \
@@ -779,12 +779,12 @@ static const EVP_CIPHER aria_##keylen##_##mode = { \
const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
-BLOCK_CIPHER_aead(NID_aria, 128, 1, 12, gcm, gcm, GCM, 0)
-BLOCK_CIPHER_aead(NID_aria, 192, 1, 12, gcm, gcm, GCM, 0)
-BLOCK_CIPHER_aead(NID_aria, 256, 1, 12, gcm, gcm, GCM, 0)
+BLOCK_CIPHER_aead(128, gcm, GCM)
+BLOCK_CIPHER_aead(192, gcm, GCM)
+BLOCK_CIPHER_aead(256, gcm, GCM)
-BLOCK_CIPHER_aead(NID_aria, 128, 1, 12, ccm, ccm, CCM, 0)
-BLOCK_CIPHER_aead(NID_aria, 192, 1, 12, ccm, ccm, CCM, 0)
-BLOCK_CIPHER_aead(NID_aria, 256, 1, 12, ccm, ccm, CCM, 0)
+BLOCK_CIPHER_aead(128, ccm, CCM)
+BLOCK_CIPHER_aead(192, ccm, CCM)
+BLOCK_CIPHER_aead(256, ccm, CCM)
#endif