<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/evp/e_aes.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-07-22T09:31:09+00:00</updated>
<entry>
<title>Remove unused function pointer from struct aead_aes_gcm_ctx.</title>
<updated>2025-07-22T09:31:09+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-22T09:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ccfa2eb65bcf08f9a43232aa86ef9db63b417902'/>
<id>urn:sha1:ccfa2eb65bcf08f9a43232aa86ef9db63b417902</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove remaining block128_f casts from EVP AES.</title>
<updated>2025-07-22T09:29:31+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-22T09:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bac3e025d0e76adcdafc8b26a67bf5a0a4abbed6'/>
<id>urn:sha1:bac3e025d0e76adcdafc8b26a67bf5a0a4abbed6</id>
<content type='text'>
Use aes_encrypt_block128() instead of AES_encrypt(), avoiding risky casts.
</content>
</entry>
<entry>
<title>Move AES-NI for ECB out of EVP.</title>
<updated>2025-07-22T09:13:49+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-22T09:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=da7a63b669ad2a502ae120afede3fd850082e8b6'/>
<id>urn:sha1:da7a63b669ad2a502ae120afede3fd850082e8b6</id>
<content type='text'>
Make aes_ecb_encrypt_internal() replaceable and provide machine dependent
versions for amd64 and i386, which dispatch to AES-NI if appropriate.
Remove the AES-NI specific EVP methods for ECB.

This removes the last of the machine dependent code from EVP AES.

ok bcook@ joshua@ tb@
</content>
</entry>
<entry>
<title>Move AES-NI from EVP to AES for CCM mode.</title>
<updated>2025-07-21T10:24:23+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-21T10:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b73facdeca098be7e538e556c1a293942db3110c'/>
<id>urn:sha1:b73facdeca098be7e538e556c1a293942db3110c</id>
<content type='text'>
The mode implementation for CCM has two variants - one takes the block
function, while the other takes a "ccm64" function. The latter is expected
to handle the lower 64 bits of the IV/counter but only for 16 byte blocks.
The AES-NI implementation for CCM currently uses the second variant.

Provide aes_ccm64_encrypt_internal() as a function that can be replaced on
a machine dependent basis, along with an aes_ccm64_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 EVP's
aes_ccm_cipher() to use CRYPTO_ctr128_{en,de}crypt_ccm64() with
aes_ccm64_encrypt_internal()) and remove the various AES-NI specific
EVP_CIPHER methods for CCM.

ok tb@
</content>
</entry>
<entry>
<title>Simplify AES-XTS implementation and remove AES-NI specific code from EVP.</title>
<updated>2025-07-13T06:01:33+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-13T06:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f0234f5a33ecf3b2784f3e73bdf1e937abe56599'/>
<id>urn:sha1:f0234f5a33ecf3b2784f3e73bdf1e937abe56599</id>
<content type='text'>
Provide aes_xts_encrypt_internal() and call that from aes_xts_cipher().
Have amd64 and i386 provide their own versions that dispatch to
aesni_xts_encrypt()/aesni_xts_decrypt() as appropriate. The
AESNI_CAPABLE code and methods can then be removed.

ok tb@
</content>
</entry>
<entry>
<title>Move aes_ecb_encrypt_internal() prototype to aes_local.h.</title>
<updated>2025-07-06T15:37:33+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-06T15:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1e1239f964a6fb20dc61c74aa0a96f5cca517235'/>
<id>urn:sha1:1e1239f964a6fb20dc61c74aa0a96f5cca517235</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify EVP AES-GCM implementation and remove AES-NI specific code.</title>
<updated>2025-06-27T17:26:57+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-06-27T17:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fd19eff2f98d72aee359ddccbf890bac0361fb66'/>
<id>urn:sha1:fd19eff2f98d72aee359ddccbf890bac0361fb66</id>
<content type='text'>
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@
</content>
</entry>
<entry>
<title>Move AES-NI from EVP to AES for CTR mode.</title>
<updated>2025-06-27T17:10:45+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-06-27T17:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=abb03e21a8d0fc7f97a871f5aee5a8084176540f'/>
<id>urn:sha1:abb03e21a8d0fc7f97a871f5aee5a8084176540f</id>
<content type='text'>
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@
</content>
</entry>
<entry>
<title>Remove AES-NI specific EVP_CIPHER methods for CFB/CFB1/CFB8.</title>
<updated>2025-06-16T14:50:30+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-06-16T14:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bad753f7a00446ace848a9b450c42d5a798d8e13'/>
<id>urn:sha1:bad753f7a00446ace848a9b450c42d5a798d8e13</id>
<content type='text'>
These now end up in aesni_encrypt() via AES_encrypt(), when appropriate.

ok tb@
</content>
</entry>
<entry>
<title>Remove AES-NI specific EVP_CIPHER methods for OFB.</title>
<updated>2025-06-16T14:42:18+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-06-16T14:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=84d57f4f5b4c9b0bc1cff54f7194b002bd0af5e8'/>
<id>urn:sha1:84d57f4f5b4c9b0bc1cff54f7194b002bd0af5e8</id>
<content type='text'>
These now end up in aesni_encrypt() via AES_encrypt(), when appropriate.

ok tb@
</content>
</entry>
</feed>
