aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-21crypto: lib - add missing MODULE_DESCRIPTION() macrosJeff Johnson1-0/+1
With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libsha256.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes sha1.c and utils.c which, although they did not produce a warning with the arm allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-03-31crypto: lib/utils - Move utilities into new headerHerbert Xu1-1/+1
The utilities have historically resided in algapi.h as they were first used internally before being exported. Move them into a new header file so external users don't see internal API details. Signed-off-by: Herbert Xu <[email protected]>
2022-08-19crypto: lib - move __crypto_xor into utilsEric Biggers1-0/+88
CRYPTO_LIB_CHACHA depends on CRYPTO for __crypto_xor, defined in crypto/algapi.c. This is a layering violation because the dependencies should only go in the other direction (crypto/ => lib/crypto/). Also the correct dependency would be CRYPTO_ALGAPI, not CRYPTO. Fix this by moving __crypto_xor into the utils module in lib/crypto/. Note that CRYPTO_LIB_CHACHA_GENERIC selected XOR_BLOCKS, which is unrelated and unnecessary. It was perhaps thought that XOR_BLOCKS was needed for __crypto_xor, but that's not the case. Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Jason A. Donenfeld <[email protected]> Signed-off-by: Herbert Xu <[email protected]>