diff options
| author | jsing <> | 2025-06-27 17:26:57 +0000 |
|---|---|---|
| committer | jsing <> | 2025-06-27 17:26:57 +0000 |
| commit | fd19eff2f98d72aee359ddccbf890bac0361fb66 (patch) | |
| tree | 955af8de7f98e615430e58fe8d5bea70401f7892 /src/lib/libcrypto/aes | |
| parent | abb03e21a8d0fc7f97a871f5aee5a8084176540f (diff) | |
| download | openbsd-fd19eff2f98d72aee359ddccbf890bac0361fb66.tar.gz openbsd-fd19eff2f98d72aee359ddccbf890bac0361fb66.tar.bz2 openbsd-fd19eff2f98d72aee359ddccbf890bac0361fb66.zip | |
Simplify EVP AES-GCM implementation and remove AES-NI specific code.
Like CTR, the mode implementation for GCM has two variants - rather than
using multiple variants (one for AES-NI, another for non-AES-NI),
consistently use CRYPTO_gcm128_{en,de}crypt_ctr32() with the
aes_ctr32_encrypt_internal() function added for CTR mode.
This lets us remove the AES-NI specific code, AES-NI specific EVP_CIPHER
methods and the ctr function pointer from EVP_AES_GCM_CTX.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/aes')
| -rw-r--r-- | src/lib/libcrypto/aes/aes_local.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/aes/aes_local.h b/src/lib/libcrypto/aes/aes_local.h index dab12ed3f9..f9bd363802 100644 --- a/src/lib/libcrypto/aes/aes_local.h +++ b/src/lib/libcrypto/aes/aes_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: aes_local.h,v 1.6 2025/06/27 16:43:54 jsing Exp $ */ | 1 | /* $OpenBSD: aes_local.h,v 1.7 2025/06/27 17:26:57 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -63,6 +63,9 @@ __BEGIN_HIDDEN_DECLS | |||
| 63 | /* This controls loop-unrolling in aes_core.c */ | 63 | /* This controls loop-unrolling in aes_core.c */ |
| 64 | #undef FULL_UNROLL | 64 | #undef FULL_UNROLL |
| 65 | 65 | ||
| 66 | void aes_ctr32_encrypt_ctr128f(const unsigned char *in, unsigned char *out, | ||
| 67 | size_t blocks, const void *key, const unsigned char ivec[AES_BLOCK_SIZE]); | ||
| 68 | |||
| 66 | __END_HIDDEN_DECLS | 69 | __END_HIDDEN_DECLS |
| 67 | 70 | ||
| 68 | #endif /* !HEADER_AES_LOCAL_H */ | 71 | #endif /* !HEADER_AES_LOCAL_H */ |
