<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/crypto/sha1.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-03T02:02:35+00:00</updated>
<entry>
<title>crypto: sha1 - Implement export_core() and import_core()</title>
<updated>2025-09-03T02:02:35+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2025-09-01T16:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=827733acbe4c3a0e117b6ebde5ed269fb7686427'/>
<id>urn:sha1:827733acbe4c3a0e117b6ebde5ed269fb7686427</id>
<content type='text'>
Since commit 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in
API"), the recently-added export_core() and import_core() methods in
struct shash_alg have effectively become mandatory (even though it is
not tested or enforced), since legacy drivers that need a fallback
depend on them.  Make crypto/sha1.c compatible with these legacy drivers
by adding export_core() and import_core() methods to it.

Reported-by: Giovanni Cabiddu &lt;giovanni.cabiddu@intel.com&gt;
Reported-by: Ovidiu Panait &lt;ovidiu.panait.oss@gmail.com&gt;
Closes: https://lore.kernel.org/r/aLSnCc9Ws5L9y+8X@gcabiddu-mobl.ger.corp.intel.com
Fixes: b10a74abcfc5 ("crypto: sha1 - Use same state format as legacy drivers")
Tested-by: Giovanni Cabiddu &lt;giovanni.cabiddu@intel.com&gt;
Tested-by: Ovidiu Panait &lt;ovidiu.panait.oss@gmail.com&gt;
Link: https://lore.kernel.org/r/20250901165013.48649-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: sha1 - Use same state format as legacy drivers</title>
<updated>2025-07-14T15:59:20+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2025-07-12T23:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b10a74abcfc5c61afc63a567c457038be57eeb6e'/>
<id>urn:sha1:b10a74abcfc5c61afc63a567c457038be57eeb6e</id>
<content type='text'>
Same as sha256 and sha512: Use the state format that the generic partial
block handling code produces, as requested by Herbert, even though this
is applicable only to legacy drivers.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20250712232329.818226-7-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: sha1 - Wrap library and add HMAC support</title>
<updated>2025-07-14T15:59:20+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@kernel.org</email>
</author>
<published>2025-07-12T23:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8bc79ab67d78e2991b9d6cf0b63789189212375a'/>
<id>urn:sha1:8bc79ab67d78e2991b9d6cf0b63789189212375a</id>
<content type='text'>
Like I did for crypto/sha512.c, rework crypto/sha1_generic.c (renamed to
crypto/sha1.c) to simply wrap the normal library functions instead of
accessing the low-level block function directly.  Also add support for
HMAC-SHA1, again just wrapping the library functions.

Since the replacement crypto_shash algorithms are implemented using the
(potentially arch-optimized) library functions, give them driver names
ending with "-lib" rather than "-generic".  Update crypto/testmgr.c and
an odd driver to take this change in driver name into account.

Note: to see the diff from crypto/sha1_generic.c to crypto/sha1.c, view
this commit with 'git show -M10'.

Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20250712232329.818226-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] sha: Load the SHA[1|256] module by an alias</title>
<updated>2007-10-10T23:55:50+00:00</updated>
<author>
<name>Sebastian Siewior</name>
<email>sebastian@breakpoint.cc</email>
</author>
<published>2007-10-08T03:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad5d27899fdbe7a66e57fdf1af883dbd7ff88dac'/>
<id>urn:sha1:ad5d27899fdbe7a66e57fdf1af883dbd7ff88dac</id>
<content type='text'>
Loading the crypto algorithm by the alias instead of by module directly
has the advantage that all possible implementations of this algorithm
are loaded automatically and the crypto API can choose the best one
depending on its priority.

Additionally it ensures that the generic implementation as well as the
HW driver (if available) is loaded in case the HW driver needs the
generic version as fallback in corner cases.

Also remove the probe for sha1 in padlock's init code.

Quote from Herbert:
  The probe is actually pointless since we can always probe when
  the algorithm is actually used which does not lead to dead-locks
  like this.

Signed-off-by: Sebastian Siewior &lt;sebastian@breakpoint.cc&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] sha: Add module aliases for sha1 / sha256</title>
<updated>2006-09-21T01:40:20+00:00</updated>
<author>
<name>Michal Ludvig</name>
<email>michal@logix.cz</email>
</author>
<published>2006-07-08T22:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3be9a6d9a78bb820f5242f43b98f38b0ca610a6'/>
<id>urn:sha1:b3be9a6d9a78bb820f5242f43b98f38b0ca610a6</id>
<content type='text'>
Crypto modules should be loadable by their .cra_driver_name, so
we should make MODULE_ALIAS()es with these names. This patch adds
aliases for SHA1 and SHA256 only as that's what we need for
PadLock-SHA driver.

Signed-off-by: Michal Ludvig &lt;michal@logix.cz&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] all: Pass tfm instead of ctx to algorithms</title>
<updated>2006-06-26T07:34:39+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2006-05-16T12:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c2bb98bc33ae33c7a33a133a4cd5a06395fece5'/>
<id>urn:sha1:6c2bb98bc33ae33c7a33a133a4cd5a06395fece5</id>
<content type='text'>
Up until now algorithms have been happy to get a context pointer since
they know everything that's in the tfm already (e.g., alignment, block
size).

However, once we have parameterised algorithms, such information will
be specific to each tfm.  So the algorithm API needs to be changed to
pass the tfm structure instead of the context pointer.

This patch is basically a text substitution.  The only tricky bit is
the assembly routines that need to get the context pointer offset
through asm-offsets.h.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] digest: Add alignment handling</title>
<updated>2006-06-26T07:34:38+00:00</updated>
<author>
<name>Atsushi Nemoto</name>
<email>anemo@mba.ocn.ne.jp</email>
</author>
<published>2006-04-09T22:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1147d8f47eb8fef93f98a30858192145137d2b2'/>
<id>urn:sha1:e1147d8f47eb8fef93f98a30858192145137d2b2</id>
<content type='text'>
Some hash modules load/store data words directly.  The digest layer
should pass properly aligned buffer to update()/final() method.  This
patch also add cra_alignmask to some hash modules.

Signed-off-by: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] sha1: Fixed off-by-64 bug in sha1_update</title>
<updated>2006-01-09T22:15:56+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2005-12-21T11:01:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcb0ad2b34daade529ce1f38eede0ea8b7309535'/>
<id>urn:sha1:bcb0ad2b34daade529ce1f38eede0ea8b7309535</id>
<content type='text'>
After a partial update, the done pointer is off to the right by 64 bytes.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] sha1: Avoid shifting count left and right</title>
<updated>2006-01-09T22:15:46+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2005-11-13T00:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa9b98fdab5b57ecb4dd3d6c2489e262af458c44'/>
<id>urn:sha1:fa9b98fdab5b57ecb4dd3d6c2489e262af458c44</id>
<content type='text'>
This patch avoids shifting the count left and right needlessly for each
call to sha1_update().  It instead can be done only once at the end in
sha1_final().

Keeping the previous test example (sha1_update() successively called with
len=64), a 1.3% performance increase can be observed on i386, or 0.2% on
ARM.  The generated code is also smaller on ARM.

Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] sha1: Rename i/j to done/partial</title>
<updated>2006-01-09T22:15:44+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2005-11-12T23:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d70a6c86cd86e111291bd0d506028ecb9649923'/>
<id>urn:sha1:9d70a6c86cd86e111291bd0d506028ecb9649923</id>
<content type='text'>
This patch gives more descriptive names to the variables i and j.

Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
