<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/mlkem, branch master</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=master</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2026-04-20T08:14:29+00:00</updated>
<entry>
<title>mlkem: use &lt;openssl/mlkem.h&gt; instead of "mlkem.h"</title>
<updated>2026-04-20T08:14:29+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-04-20T08:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=052c4cf7f1328bcebfedf3eb9c2c76290dad8e7d'/>
<id>urn:sha1:052c4cf7f1328bcebfedf3eb9c2c76290dad8e7d</id>
<content type='text'>
patch from portable
</content>
</entry>
<entry>
<title>ML-KEM: ensure that key_768 is only dereferenced with 768-bit keys</title>
<updated>2026-03-29T06:31:07+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-03-29T06:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a05eb59f42ce4d1df74a595e48b369757dc58547'/>
<id>urn:sha1:a05eb59f42ce4d1df74a595e48b369757dc58547</id>
<content type='text'>
This looks like a NULL dereference that should crash, but for some reason
it doesn't, even with -O0 with all compilers i tried.  At the very least it
may result in compilers deducing that key_768 != NULL and lead to incorrect
optimizations.

ok claudio jsing kenjiro miod
</content>
</entry>
<entry>
<title>mlkem: use timingsafe_memcmp() in decapsulation</title>
<updated>2026-03-06T09:22:29+00:00</updated>
<author>
<name>kenjiro</name>
<email></email>
</author>
<published>2026-03-06T09:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e6b7b55ad0eccc084f5757d7c3e4380079fc99b8'/>
<id>urn:sha1:e6b7b55ad0eccc084f5757d7c3e4380079fc99b8</id>
<content type='text'>
Replace memcmp() with timingsafe_memcmp() when comparing the
re-encrypted ciphertext.

FIPS 203 Section 6.3 defines this comparison result as a secret piece
of intermediate data that must not be revealed in any form.

ok tb
</content>
</entry>
<entry>
<title>mlkem: fix mklem_{generate_key,encap}_external_entropy() declarations</title>
<updated>2026-01-18T08:58:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-18T08:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8c2e30618ba07e5c076d4f6492f61fe7dea05412'/>
<id>urn:sha1:8c2e30618ba07e5c076d4f6492f61fe7dea05412</id>
<content type='text'>
The prototypes used sized arrays appropriate only for MLKEM768 while the
declarations used pointers. For some reason clang doesn't flag this but
gcc does. In any case it was wrong. The callers of these functions check
that they pass in the correct size. Which is weird but the mlkem directory
has an unbelievable amount of mess and bad code.

found by/ok jsing
</content>
</entry>
<entry>
<title>mlkem: garbage collect the unusd mlkem_{generate_key,encap}()</title>
<updated>2026-01-18T08:49:42+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-18T08:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0b69c4a2b1ef8ad6b85503729d1bd0bc68541697'/>
<id>urn:sha1:0b69c4a2b1ef8ad6b85503729d1bd0bc68541697</id>
<content type='text'>
These are flagged by more recent gcc since declarations and definitions
don't match (sized array vs pointer). Also an array was checked for NULL.

found by/ok jsing
</content>
</entry>
<entry>
<title>mlkem_internal.h: formate -&gt; format</title>
<updated>2026-01-16T18:31:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-16T18:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=72dc54bbad1c240705b7047940026b4472f5dc2e'/>
<id>urn:sha1:72dc54bbad1c240705b7047940026b4472f5dc2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mlkem_internal.h: some very basic copy editing</title>
<updated>2026-01-16T18:29:58+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-16T18:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=dcbd53bcbd78c031d6d012192ac183de96a3082f'/>
<id>urn:sha1:dcbd53bcbd78c031d6d012192ac183de96a3082f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mlkem.h: Thie -&gt; This (2x)</title>
<updated>2026-01-16T18:28:04+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-16T18:28:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=591a62834f9696acafe181bbaa784aae617b260e'/>
<id>urn:sha1:591a62834f9696acafe181bbaa784aae617b260e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mlkem.c: becuase -&gt; because</title>
<updated>2026-01-16T18:27:22+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-16T18:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1288ad53eb2d1af968bfa2ba9cf0ac866955d8c7'/>
<id>urn:sha1:1288ad53eb2d1af968bfa2ba9cf0ac866955d8c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mlkem: clear a few (pointers to) secrets</title>
<updated>2026-01-01T13:36:09+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-01T13:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2f3ff374dcb9558a8165a6b1cf17cc024522a212'/>
<id>urn:sha1:2f3ff374dcb9558a8165a6b1cf17cc024522a212</id>
<content type='text'>
The ML-KEM code is doing a pretty poor job at cleaning up secrets it no
longer needs. This commit clears a few stack-based arrays containing
secrets or not obviously public information and stack-based structs
containing pointers to secrets.

ok jsing kenjiro
</content>
</entry>
</feed>
