spl: cypto: Bring back SPL_ versions of SHA

Unfortunately these were removed by mistake. This means that adding hash
support to SPL brings in all software algorithms, with a substantial
increase in code size.

The origin of the problem was renaming them to SPL_FIT_xxx and then these
were removed altogether in a later commit.

Add them back. This aligns with CONFIG_MD5, for example, which has an SPL
variant.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: f5bc9c25f3 ("image: Rename SPL_SHAxxx_SUPPORT to SPL_FIT_SHAxxx")
Fixes: eb5171ddec ("common: Remove unused CONFIG_FIT_SHAxxx selectors")
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Simon Glass 2021-09-25 19:43:17 -06:00 committed by Tom Rini
parent e02b3fd4b9
commit 603d15a572

View File

@ -373,7 +373,6 @@ config SHA256
The SHA256 algorithm produces a 256-bit (32-byte) hash value
(digest).
config SHA512
bool "Enable SHA512 support"
help
@ -399,6 +398,48 @@ config SHA_HW_ACCEL
hashing algorithms. This affects the 'hash' command and also the
hash_lookup_algo() function.
if SPL
config SPL_SHA1
bool "Enable SHA1 support in SPL"
default y if SHA1
help
This option enables support of hashing using SHA1 algorithm.
The hash is calculated in software.
The SHA1 algorithm produces a 160-bit (20-byte) hash value
(digest).
config SPL_SHA256
bool "Enable SHA256 support in SPL"
default y if SHA256
help
This option enables support of hashing using SHA256 algorithm.
The hash is calculated in software.
The SHA256 algorithm produces a 256-bit (32-byte) hash value
(digest).
config SPL_SHA512
bool "Enable SHA512 support in SPL"
default y if SHA512
help
This option enables support of hashing using SHA512 algorithm.
The hash is calculated in software.
The SHA512 algorithm produces a 512-bit (64-byte) hash value
(digest).
config SPL_SHA384
bool "Enable SHA384 support in SPL"
default y if SHA384
select SPL_SHA512
help
This option enables support of hashing using SHA384 algorithm.
The hash is calculated in software. This is also selects SHA512,
because these implementations share the bulk of the code..
The SHA384 algorithm produces a 384-bit (48-byte) hash value
(digest).
endif
if SHA_HW_ACCEL
config SHA512_HW_ACCEL