diff options
author | jsing <> | 2025-06-27 17:10:45 +0000 |
---|---|---|
committer | jsing <> | 2025-06-27 17:10:45 +0000 |
commit | abb03e21a8d0fc7f97a871f5aee5a8084176540f (patch) | |
tree | 8acdb3ab7caf1e6f49b7bf3d7e6a066ca52920a2 /src/lib/libc/net/ethers.c | |
parent | c5c4895f860c5e071b09ef5f94bcfae0a51b148e (diff) | |
download | openbsd-abb03e21a8d0fc7f97a871f5aee5a8084176540f.tar.gz openbsd-abb03e21a8d0fc7f97a871f5aee5a8084176540f.tar.bz2 openbsd-abb03e21a8d0fc7f97a871f5aee5a8084176540f.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/net/ethers.c')
0 files changed, 0 insertions, 0 deletions