<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/crypto, branch v6.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-12-10T05:34:05Z</updated>
<entry>
<title>crypto: rsassa-pkcs1 - Copy source data for SG list</title>
<updated>2024-12-10T05:34:05Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2024-11-29T09:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8552cb04e0831df3ff265c75ad33f705a45bc731'/>
<id>urn:sha1:8552cb04e0831df3ff265c75ad33f705a45bc731</id>
<content type='text'>
As virtual addresses in general may not be suitable for DMA, always
perform a copy before using them in an SG list.

Fixes: 1e562deacecc ("crypto: rsassa-pkcs1 - Migrate to sig_alg backend")
Reported-by: Zorro Lang &lt;zlang@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>module: Convert symbol namespace to string literal</title>
<updated>2024-12-02T19:34:44Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T14:59:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a'/>
<id>urn:sha1:cdd30ebb1b9f36159d66f088b61aee264e649d7a</id>
<content type='text'>
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &amp;&amp;
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &amp;&amp;
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'random-6.13-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random</title>
<updated>2024-11-19T18:43:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-19T18:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a7fa81137fabb5d86be5825e03d28c371d178d6'/>
<id>urn:sha1:8a7fa81137fabb5d86be5825e03d28c371d178d6</id>
<content type='text'>
Pull random number generator updates from Jason Donenfeld:
 "This contains a single series from Uros to replace uses of
  &lt;linux/random.h&gt; with prandom.h or other more specific headers
  as needed, in order to avoid a circular header issue.

  Uros' goal is to be able to use percpu.h from prandom.h, which
  will then allow him to define __percpu in percpu.h rather than
  in compiler_types.h"

* tag 'random-6.13-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
  prandom: Include &lt;linux/percpu.h&gt; in &lt;linux/prandom.h&gt;
  random: Do not include &lt;linux/prandom.h&gt; in &lt;linux/random.h&gt;
  netem: Include &lt;linux/prandom.h&gt; in sch_netem.c
  lib/test_scanf: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  lib/test_parman: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  bpf/tests: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  lib/rbtree-test: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  random32: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  kunit: string-stream-test: Include &lt;linux/prandom.h&gt;
  lib/interval_tree_test.c: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  bpf: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  scsi: libfcoe: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  fscrypt: Include &lt;linux/once.h&gt; in fs/crypto/keyring.c
  mtd: tests: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  media: vivid: Include &lt;linux/prandom.h&gt; in vivid-vid-cap.c
  drm/lib: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  drm/i915/selftests: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  crypto: testmgr: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
  x86/kaslr: Include &lt;linux/prandom.h&gt; instead of &lt;linux/random.h&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.13-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2024-11-19T18:28:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-19T18:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02b2f1a7b8ef340e57cae640a52ec7199b0b887d'/>
<id>urn:sha1:02b2f1a7b8ef340e57cae640a52ec7199b0b887d</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "API:
   - Add sig driver API
   - Remove signing/verification from akcipher API
   - Move crypto_simd_disabled_for_test to lib/crypto
   - Add WARN_ON for return values from driver that indicates memory
     corruption

  Algorithms:
   - Provide crc32-arch and crc32c-arch through Crypto API
   - Optimise crc32c code size on x86
   - Optimise crct10dif on arm/arm64
   - Optimise p10-aes-gcm on powerpc
   - Optimise aegis128 on x86
   - Output full sample from test interface in jitter RNG
   - Retry without padata when it fails in pcrypt

  Drivers:
   - Add support for Airoha EN7581 TRNG
   - Add support for STM32MP25x platforms in stm32
   - Enable iproc-r200 RNG driver on BCMBCA
   - Add Broadcom BCM74110 RNG driver"

* tag 'v6.13-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (112 commits)
  crypto: marvell/cesa - fix uninit value for struct mv_cesa_op_ctx
  crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
  crypto: aesni - Move back to module_init
  crypto: lib/mpi - Export mpi_set_bit
  crypto: aes-gcm-p10 - Use the correct bit to test for P10
  hwrng: amd - remove reference to removed PPC_MAPLE config
  crypto: arm/crct10dif - Implement plain NEON variant
  crypto: arm/crct10dif - Macroify PMULL asm code
  crypto: arm/crct10dif - Use existing mov_l macro instead of __adrl
  crypto: arm64/crct10dif - Remove remaining 64x64 PMULL fallback code
  crypto: arm64/crct10dif - Use faster 16x64 bit polynomial multiply
  crypto: arm64/crct10dif - Remove obsolete chunking logic
  crypto: bcm - add error check in the ahash_hmac_init function
  crypto: caam - add error check to caam_rsa_set_priv_key_form
  hwrng: bcm74110 - Add Broadcom BCM74110 RNG driver
  dt-bindings: rng: add binding for BCM74110 RNG
  padata: Clean up in padata_do_multithreaded()
  crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()
  crypto: qat - Fix missing destroy_workqueue in adf_init_aer()
  crypto: rsassa-pkcs1 - Reinstate support for legacy protocols
  ...
</content>
</entry>
<entry>
<title>crypto: rsassa-pkcs1 - Reinstate support for legacy protocols</title>
<updated>2024-11-10T03:50:54Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2024-10-29T10:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a03a728e377aff530abd039542123964b165e5e9'/>
<id>urn:sha1:a03a728e377aff530abd039542123964b165e5e9</id>
<content type='text'>
Commit 1e562deacecc ("crypto: rsassa-pkcs1 - Migrate to sig_alg backend")
enforced that rsassa-pkcs1 sign/verify operations specify a hash
algorithm.  That is necessary because per RFC 8017 sec 8.2, a hash
algorithm identifier must be prepended to the hash before generating or
verifying the signature ("Full Hash Prefix").

However the commit went too far in that it changed user space behavior:
KEYCTL_PKEY_QUERY system calls now return -EINVAL unless they specify a
hash algorithm.  Intel Wireless Daemon (iwd) is one application issuing
such system calls (for EAP-TLS).

Closer analysis of the Embedded Linux Library (ell) used by iwd reveals
that the problem runs even deeper:  When iwd uses TLS 1.1 or earlier, it
not only queries for keys, but performs sign/verify operations without
specifying a hash algorithm.  These legacy TLS versions concatenate an
MD5 to a SHA-1 hash and omit the Full Hash Prefix:

https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/tls-suites.c#n97

TLS 1.1 was deprecated in 2021 by RFC 8996, but removal of support was
inadvertent in this case.  It probably should be coordinated with iwd
maintainers first.

So reinstate support for such legacy protocols by defaulting to hash
algorithm "none" which uses an empty Full Hash Prefix.

If it is later on decided to remove TLS 1.1 support but still allow
KEYCTL_PKEY_QUERY without a hash algorithm, that can be achieved by
reverting the present commit and replacing it with the following patch:

https://lore.kernel.org/r/ZxalYZwH5UiGX5uj@wunner.de/

It's worth noting that Python's cryptography library gained support for
such legacy use cases very recently, so they do seem to still be a thing.
The Python developers identified IKE version 1 as another protocol
omitting the Full Hash Prefix:

https://github.com/pyca/cryptography/issues/10226
https://github.com/pyca/cryptography/issues/5495

The author of those issues, Zoltan Kelemen, spent considerable effort
searching for test vectors but only found one in a 2019 blog post by
Kevin Jones.  Add it to testmgr.h to verify correctness of this feature.

Examination of wpa_supplicant as well as various IKE daemons (libreswan,
strongswan, isakmpd, raccoon) has determined that none of them seems to
use the kernel's Key Retention Service, so iwd is the only affected user
space application known so far.

Fixes: 1e562deacecc ("crypto: rsassa-pkcs1 - Migrate to sig_alg backend")
Reported-by: Klara Modin &lt;klarasmodin@gmail.com&gt;
Tested-by: Klara Modin &lt;klarasmodin@gmail.com&gt;
Closes: https://lore.kernel.org/r/2ed09a22-86c0-4cf0-8bda-ef804ccb3413@gmail.com/
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: asymmetric_keys - Remove unused functions</title>
<updated>2024-11-02T10:23:24Z</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2024-10-22T00:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=acb0ed843290f3b19ede1bd9328eb41dee58ce40'/>
<id>urn:sha1:acb0ed843290f3b19ede1bd9328eb41dee58ce40</id>
<content type='text'>
encrypt_blob(), decrypt_blob() and create_signature() were some of the
functions added in 2018 by
commit 5a30771832aa ("KEYS: Provide missing asymmetric key subops for new
key type ops [ver #2]")
however, they've not been used.

Remove them.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: api - move crypto_simd_disabled_for_test to lib</title>
<updated>2024-10-28T10:33:11Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2024-10-18T23:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4964a1d91cd186b423666aac6d4ad3a61cf88b54'/>
<id>urn:sha1:4964a1d91cd186b423666aac6d4ad3a61cf88b54</id>
<content type='text'>
Move crypto_simd_disabled_for_test to lib/ so that crypto_simd_usable()
can be used by library code.

This was discussed previously
(https://lore.kernel.org/linux-crypto/20220716062920.210381-4-ebiggers@kernel.org/)
but was not done because there was no use case yet.  However, this is
now needed for the arm64 CRC32 library code.

Tested with:
    export ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
    echo CONFIG_CRC32=y &gt; .config
    echo CONFIG_MODULES=y &gt;&gt; .config
    echo CONFIG_CRYPTO=m &gt;&gt; .config
    echo CONFIG_DEBUG_KERNEL=y &gt;&gt; .config
    echo CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n &gt;&gt; .config
    echo CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y &gt;&gt; .config
    make olddefconfig
    make -j$(nproc)

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: crc32c - Provide crc32c-arch driver for accelerated library code</title>
<updated>2024-10-28T10:33:10Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2024-10-16T18:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16739efac6e1ea40df5ec7a263e664481840e73a'/>
<id>urn:sha1:16739efac6e1ea40df5ec7a263e664481840e73a</id>
<content type='text'>
crc32c-generic is currently backed by the architecture's CRC-32c library
code, which may offer a variety of implementations depending on the
capabilities of the platform. These are not covered by the crypto
subsystem's fuzz testing capabilities because crc32c-generic is the
reference driver that the fuzzing logic uses as a source of truth.

Fix this by providing a crc32c-arch implementation which is based on the
arch library code if available, and modify crc32c-generic so it is
always based on the generic C implementation. If the arch has no CRC-32c
library code, this change does nothing.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: crc32 - Provide crc32-arch driver for accelerated library code</title>
<updated>2024-10-28T10:33:10Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2024-10-16T18:57:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a37e55791f204bd65da07d281d95629df15ccf81'/>
<id>urn:sha1:a37e55791f204bd65da07d281d95629df15ccf81</id>
<content type='text'>
crc32-generic is currently backed by the architecture's CRC-32 library
code, which may offer a variety of implementations depending on the
capabilities of the platform. These are not covered by the crypto
subsystem's fuzz testing capabilities because crc32-generic is the
reference driver that the fuzzing logic uses as a source of truth.

Fix this by providing a crc32-arch implementation which is based on the
arch library code if available, and modify crc32-generic so it is
always based on the generic C implementation. If the arch has no CRC-32
library code, this change does nothing.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - Use str_true_false() and str_enabled_disabled() helpers</title>
<updated>2024-10-28T10:33:10Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2024-10-16T13:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1ba22921e7186f2b3b8b056a607191e603104db'/>
<id>urn:sha1:a1ba22921e7186f2b3b8b056a607191e603104db</id>
<content type='text'>
Remove hard-coded strings by using the helper functions str_true_false()
and str_enabled_disabled().

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
