diff options
author | jsing <> | 2025-06-27 17:10:45 +0000 |
---|---|---|
committer | jsing <> | 2025-06-27 17:10:45 +0000 |
commit | 5cdc980054fcaa7078e29884d57b6a7e9e3e6731 (patch) | |
tree | 8acdb3ab7caf1e6f49b7bf3d7e6a066ca52920a2 /src/lib/libc | |
parent | b056e8cf614fa516bdb0e53896cad019b9d462d9 (diff) | |
download | openbsd-5cdc980054fcaa7078e29884d57b6a7e9e3e6731.tar.gz openbsd-5cdc980054fcaa7078e29884d57b6a7e9e3e6731.tar.bz2 openbsd-5cdc980054fcaa7078e29884d57b6a7e9e3e6731.zip |
Move AES-NI from EVP to AES for CTR mode.
The mode implementation for CTR has two variants - one takes the block
function, while the other takes a "ctr32" function. The latter is expected
to handle the lower 32 bits of the IV/counter, but is not expected to
handle overflow. The AES-NI implementation for CTR currently uses the
second variant.
Provide aes_ctr32_encrypt_internal() as a function that can be replaced on
a machine dependent basis, along with an aes_ctr32_encrypt_generic()
function that provides the default implementation and can be used as a
fallback. Wire up the AES-NI version for amd64 and i386, change
AES_ctr128_encrypt() to use CRYPTO_ctr128_encrypt_ctr32() (which calls
aes_ctr32_encrypt_internal()) and remove the various AES-NI specific
EVP_CIPHER methods for CTR.
Callers of AES_ctr128_encrypt() will now use AES-NI, if available.
ok tb@
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions