<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/aes/aes_local.h, 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:29:31+00:00</updated>
<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 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>Remove unused defines from aes_local.h.</title>
<updated>2025-06-27T16:43:54+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-06-27T16:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c5c4895f860c5e071b09ef5f94bcfae0a51b148e'/>
<id>urn:sha1:c5c4895f860c5e071b09ef5f94bcfae0a51b148e</id>
<content type='text'>
MAXKB was added in OpenSSL commit deb2c1a1 and appears to have never been
used, while MAXKC (originally RIJNDAEL_MAXKC) stopped being used in that
same commit. MAXNR is also unused - AES_MAXNR exists in the public
header.

ok tb@
</content>
</entry>
<entry>
<title>Use standard integer types rather than custom typedefs.</title>
<updated>2025-04-21T12:23:09+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-04-21T12:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c4b237a7061adb567097e71a27ee688e6486be76'/>
<id>urn:sha1:c4b237a7061adb567097e71a27ee688e6486be76</id>
<content type='text'>
Replace u32 with uint32_t, remove unused u16 and replace u8 with uint8_t.

ok tb@
</content>
</entry>
<entry>
<title>Remove #error if OPENSSL_NO_FOO is defined</title>
<updated>2025-01-25T17:59:44+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-25T17:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5d52abc236226c5a47c36b07e2256e77141e373a'/>
<id>urn:sha1:5d52abc236226c5a47c36b07e2256e77141e373a</id>
<content type='text'>
discussed with jsing
</content>
</entry>
<entry>
<title>Replace GETU32 and PUTU32.</title>
<updated>2024-03-27T11:15:44+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-03-27T11:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c039c00612690f4b062f7f72725247b9f2574398'/>
<id>urn:sha1:c039c00612690f4b062f7f72725247b9f2574398</id>
<content type='text'>
Replace GETU32 with crypto_load_be32toh() and PUTU32 with
crypto_store_htobe32(). Make the offset handling cleaner at the
same time.

ok beck@ joshua@ tb@
</content>
</entry>
<entry>
<title>Make header guards of internal headers consistent</title>
<updated>2022-11-26T17:23:18+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-26T17:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3a1908508efa61f3f77ac8036694af2f920df947'/>
<id>urn:sha1:3a1908508efa61f3f77ac8036694af2f920df947</id>
<content type='text'>
Not all of them, only those that didn't leak into a public header...
Yes.
</content>
</entry>
</feed>
