diff options
| author | Madan mohan Manokar <[email protected]> | 2026-08-31 05:09:24 +0200 |
|---|---|---|
| committer | Tomas Mraz <[email protected]> | 2026-09-17 18:25:23 +0200 |
| commit | 138bea88eb25e88da2e2fbadc62d7a221ed31acf (patch) | |
| tree | 9947f8c105d23244ed2384297efdb90ec10a639a /include | |
| parent | apps/server.c: Do not declare use_sendfile and use_zc_sendfile without ktls (diff) | |
| download | openssl-138bea88eb25e88da2e2fbadc62d7a221ed31acf.tar.gz openssl-138bea88eb25e88da2e2fbadc62d7a221ed31acf.zip | |
aes: factor out shared VAES-512 primitives
The VAES-512 AES implementation file will host more than one mode. Rename
it to a mode-neutral name ahead of adding the AES-CTR implementation and
factoring out the shared VAES-512 primitives. This commit is a pure rename
with no content change.
Refactor the VAES-512 CBC decryption code to sit on top of a small set of
shared 512-bit primitives so that additional AES modes can reuse them:
- portable compiler abstractions for ISA targeting and inlining,
- OSSL_VAES512_DEFINE_ROUNDS, a macro emitting the 1x/2x/4x parallel
512-bit AES round functions for any round count and direction,
- OSSL_VAES512_LOAD_ROUNDKEYS / OSSL_VAES512_CLEAR_ROUNDKEYS helpers,
- ossl_vaes512_cpu_capable(), a shared runtime capability check.
The generated machine code for CBC decryption is byte-identical to the
previous version. aes_platform.h grows a VAES512_ELIGIBLE base guard with
VAES_CBC_ELIGIBLE kept as an alias.
Rename the assembly cleanup helper and perlasm module from CBC-specific
names to shared aes-vaes symbols so additional modes can reuse the same
stack scrub routine.
Reviewed-by: Simo Sorce <[email protected]>
Reviewed-by: Nikola Pajkovsky <[email protected]>
Merge-date: Thu Sep 17 16:25:59 2026
Merged-from: https://github.com/openssl/openssl/pull/30755
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/aes_platform.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h index 6c0d0258e4b..b0273e9c7d8 100644 --- a/include/crypto/aes_platform.h +++ b/include/crypto/aes_platform.h @@ -189,11 +189,13 @@ void gcm_ghash_v8(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp, siz && ((defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 8)) \ || (defined(__clang__) && (__clang_major__ >= 7)) \ || (defined(_MSC_VER) && (_MSC_VER >= 1927))) -#define VAES_CBC_ELIGIBLE 1 +#define VAES512_ELIGIBLE 1 #else -#define VAES_CBC_ELIGIBLE 0 +#define VAES512_ELIGIBLE 0 #endif +#define VAES_CBC_ELIGIBLE VAES512_ELIGIBLE + #if VAES_CBC_ELIGIBLE void ossl_aes_cbc_vaes_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], int enc); |
