<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/lib/crypto, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>lib/crypto: aes-cmac: Use __cleanup() instead of memzero_explicit()</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2026-08-07T12:58:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=561131a27f5533e6e63520b4bc43d9c832a27c09'/>
<id>561131a27f5533e6e63520b4bc43d9c832a27c09</id>
<content type='text'>
By using __cleanup(aes_cmac_zeroize_key) for clearing the key data, we
can save one line of code here.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Link: https://patch.msgid.link/20260807125845.1477067-6-thuth@redhat.com
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By using __cleanup(aes_cmac_zeroize_key) for clearing the key data, we
can save one line of code here.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Link: https://patch.msgid.link/20260807125845.1477067-6-thuth@redhat.com
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: tests: Add KUnit test suite for AES-GCM</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T23:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b09bd2d92ee1bbbf6db4533d5d9d2a7b39ae48c4'/>
<id>b09bd2d92ee1bbbf6db4533d5d9d2a7b39ae48c4</id>
<content type='text'>
Add a KUnit test suite for the AES-GCM library API.

It consists of:

- All the shared test cases from aead-test-template.h.  These include
  extensive consistency tests, a "Monte-Carlo test", and a benchmark.

- Tests against hardcoded AES-GCM test vectors from external sources.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a KUnit test suite for the AES-GCM library API.

It consists of:

- All the shared test cases from aead-test-template.h.  These include
  extensive consistency tests, a "Monte-Carlo test", and a benchmark.

- Tests against hardcoded AES-GCM test vectors from external sources.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: tests: Add KUnit test suite for AES-CCM</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T23:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2aeef50ecadca2fea0c96abed49452ff9b582b48'/>
<id>2aeef50ecadca2fea0c96abed49452ff9b582b48</id>
<content type='text'>
Add a KUnit test suite for the AES-CCM library API.

It consists of:

- All the shared test cases from aead-test-template.h.  These include
  extensive consistency tests, a "Monte-Carlo test", and a benchmark.

- Tests against hardcoded AES-CCM test vectors from external sources.

- Tests for CCM-specific message length validation.

To generate the expected aes_ccm_monte_carlo_checksum[] value, add a
script gen-aead-testvecs.py which computes it using python-cryptography.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a KUnit test suite for the AES-CCM library API.

It consists of:

- All the shared test cases from aead-test-template.h.  These include
  extensive consistency tests, a "Monte-Carlo test", and a benchmark.

- Tests against hardcoded AES-CCM test vectors from external sources.

- Tests for CCM-specific message length validation.

To generate the expected aes_ccm_monte_carlo_checksum[] value, add a
script gen-aead-testvecs.py which computes it using python-cryptography.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: tests: Add aead-test-template.h</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T23:30:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9396dc9495387a415d24a1adbd2d2ea12abacc96'/>
<id>9396dc9495387a415d24a1adbd2d2ea12abacc96</id>
<content type='text'>
Add aead-test-template.h which contains shared test logic for AEAD
algorithms.  It's similar to the existing hash-test-template.h, which
contains shared test logic for hash algorithms.

The initial use cases for this will be AES-CCM and AES-GCM.

It may be used by the existing ChaCha20Poly1305 test suite in the future
as well, though the ChaCha20Poly1305 API currently lacks some of the
functionality that the "template" expects to be present.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add aead-test-template.h which contains shared test logic for AEAD
algorithms.  It's similar to the existing hash-test-template.h, which
contains shared test logic for hash algorithms.

The initial use cases for this will be AES-CCM and AES-GCM.

It may be used by the existing ChaCha20Poly1305 test suite in the future
as well, though the ChaCha20Poly1305 API currently lacks some of the
functionality that the "template" expects to be present.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: tests: Use per-test-case buffers in hash tests</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T23:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81dbcc3e0424982b4639f96149620e97cf0cddbf'/>
<id>81dbcc3e0424982b4639f96149620e97cf0cddbf</id>
<content type='text'>
Make the test cases more self-contained by replacing the test suite
scoped guarded buffer ('test_buf') with buffers allocated by each test
case using the helper functions in test-utils.h.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the test cases more self-contained by replacing the test suite
scoped guarded buffer ('test_buf') with buffers allocated by each test
case using the helper functions in test-utils.h.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: tests: Create test-utils.h</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T23:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=baf9e7f8019391a4ef8d734ff69e97333a54b09c'/>
<id>baf9e7f8019391a4ef8d734ff69e97333a54b09c</id>
<content type='text'>
Move hash-test-template's test RNG code and the buffer allocation code
from various test suites into a header test-utils.h.  This allows them
to be shared by other test suites.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move hash-test-template's test RNG code and the buffer allocation code
from various test suites into a header test-utils.h.  This allows them
to be shared by other test suites.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802233005.161467-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: aes: Add FIPS self-tests for GCM and CCM</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T22:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fbdb43c0007b37e574fa0ca76afd13bed96db8f6'/>
<id>fbdb43c0007b37e574fa0ca76afd13bed96db8f6</id>
<content type='text'>
Upcoming changes will wire up architecture-optimized implementations of
GCM and CCM.  FIPS labs can consider such designs to meet the threshold
for separate self-tests to be needed.

Therefore, add FIPS self-tests for encryption and decryption in these
modes.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upcoming changes will wire up architecture-optimized implementations of
GCM and CCM.  FIPS labs can consider such designs to meet the threshold
for separate self-tests to be needed.

Therefore, add FIPS self-tests for encryption and decryption in these
modes.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: aes: Add FIPS self-tests for unauthenticated modes</title>
<updated>2026-08-11T03:17:56+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T22:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e967fa98f7618e98b50b3d49a1768deba8981a98'/>
<id>e967fa98f7618e98b50b3d49a1768deba8981a98</id>
<content type='text'>
Upcoming changes will wire up architecture-optimized implementations of
ECB, CBC, CBC-CTS, CTR, and XTS.  FIPS labs can consider such designs to
meet the threshold for separate self-tests to be needed.

The inverse direction of the block cipher also needs to be exercised,
which the existing CMAC self-test doesn't do.

Therefore, add FIPS self-tests for encryption and decryption in these
modes as well as the "bare" AES.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upcoming changes will wire up architecture-optimized implementations of
ECB, CBC, CBC-CTS, CTR, and XTS.  FIPS labs can consider such designs to
meet the threshold for separate self-tests to be needed.

The inverse direction of the block cipher also needs to be exercised,
which the existing CMAC self-test doesn't do.

Therefore, add FIPS self-tests for encryption and decryption in these
modes as well as the "bare" AES.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: fips: Split fips.h into fips-aes.h and fips-sha.h</title>
<updated>2026-08-11T03:17:55+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-08-02T22:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60e9a0f5bec2e93c6e8fd462850676f488aa51c8'/>
<id>60e9a0f5bec2e93c6e8fd462850676f488aa51c8</id>
<content type='text'>
In preparation for adding FIPS self-tests for AES encryption modes,
split fips.h into separate files for the AES and SHA test vectors.

They are still generated by the same script, but this keeps things a bit
more organized.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for adding FIPS self-tests for AES encryption modes,
split fips.h into separate files for the AES and SHA test vectors.

They are still generated by the same script, but this keeps things a bit
more organized.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260802222408.91757-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: aesgcm: Remove old AES-GCM library</title>
<updated>2026-07-23T16:30:30+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2026-07-22T02:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d22ec26295c1412d765e3d687e46224fc332928'/>
<id>6d22ec26295c1412d765e3d687e46224fc332928</id>
<content type='text'>
The old AES-GCM library code is no longer used, so remove it.

Tested-by: Nikunj A Dadhania &lt;nikunj@amd.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260722025338.33354-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old AES-GCM library code is no longer used, so remove it.

Tested-by: Nikunj A Dadhania &lt;nikunj@amd.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://patch.msgid.link/20260722025338.33354-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
