<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/aes/aes.c, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-09-15T07:36:12+00:00</updated>
<entry>
<title>aes: move explicit_bzero() after NULL check</title>
<updated>2025-09-15T07:36:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-09-15T07:36:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1f8d0b443d28c5e431333f56e1a6384d8123e15c'/>
<id>urn:sha1:1f8d0b443d28c5e431333f56e1a6384d8123e15c</id>
<content type='text'>
CID 621601 621602

ok djm jsg jsing miod
</content>
</entry>
<entry>
<title>Zero the round keys on AES_set_{en,de}crypt_key() function entry.</title>
<updated>2025-09-08T12:50:02+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-08T12:50:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0b23e36dfa750e5a98824fc469f69a27c5f25d3b'/>
<id>urn:sha1:0b23e36dfa750e5a98824fc469f69a27c5f25d3b</id>
<content type='text'>
This avoids leaving previous round keys around on failure, or leaving parts
of previous round keys behind if reused with a smaller key size.

ok tb@
</content>
</entry>
<entry>
<title>Validate AES_set_{encrypt,decrypt}_key() inputs at API boundary.</title>
<updated>2025-09-08T12:46:38+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-08T12:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=27935bc83495bf29902f88b49a448b5fba6cb8ac'/>
<id>urn:sha1:27935bc83495bf29902f88b49a448b5fba6cb8ac</id>
<content type='text'>
Every aes_set_{encrypt,decrypt}_key_internal() implementation is currently
required to check the inputs and return appropriate error codes. Pull the
input validation up to the API boundary, setting key-&gt;rounds at the same
time. Additionally, call aes_set_encrypt_key_internal() directly from
aes_set_decrypt_key_internal(), rather than going back through the public
API.

ok tb@
</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>Zero stack based IV and buffer when aes_ctr32_encrypt_generic() completes.</title>
<updated>2025-07-20T08:55:49+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-07-20T08:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=32c75086555dc2a71cc1500a21b0d024fe48ceaf'/>
<id>urn:sha1:32c75086555dc2a71cc1500a21b0d024fe48ceaf</id>
<content type='text'>
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-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>Use timingsafe_memcmp when comparing authenticators</title>
<updated>2025-06-03T08:42:15+00:00</updated>
<author>
<name>kenjiro</name>
<email></email>
</author>
<published>2025-06-03T08:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0fc5b6d312fea35d788e92ffc5a6dc32638d32bc'/>
<id>urn:sha1:0fc5b6d312fea35d788e92ffc5a6dc32638d32bc</id>
<content type='text'>
Replace memcmp() with timingsafe_memcmp() for authentication tag
comparison in AES-CCM, GCM, PKCS12 and AES key unwrap code paths
to ensure constant-time behavior and avoid potential timing side
channels.

This aligns with OpenSSL 1e4a355.

ok tb@
</content>
</entry>
<entry>
<title>Merge AES-IGE into aes.c.</title>
<updated>2025-05-25T06:27:02+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-05-25T06:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=769c7e849616a0f0f3423a25a2195cb36fd4885e'/>
<id>urn:sha1:769c7e849616a0f0f3423a25a2195cb36fd4885e</id>
<content type='text'>
</content>
</entry>
</feed>
