Skip to content

crypto: disallow non-approved algs in fips mode

Jarod Wilson linux-crypto lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2crypto: add infra to skip disallowed algs in fips modecrypto/testmgr.c+9 -02 replies
1/2crypto: mark algs allowed in fips modecrypto/testmgr.c+23 -01 reply
2/2crypto: mark algs allowed in fips modecrypto/testmgr.c+22 -00 replies
2/2crypto: skip algs not flagged fips_allowed in fips modecrypto/testmgr.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] crypto: disallow non-approved algs in fips mode

At present, nothing is preventing the use of non-approved algorithms in fips mode. I was initially working on a patch to make it easier for all fips-approved algs to be tested using tcrypt, and realized the changes I was making could also be used to prevent non-approved algs in fips mode. Any approved alg *must* have self-tests, and thus have an entry in testmgr.c's alg_test_descs[]. By adding a fips flag to these entries, we can simply reject all algs that don't have this flag when in fips mode by skipping their self-tests and returning an -EINVAL to prevent them from being loaded. So with this change, I can

1) 'modprobe tcrypt' and have all fips approved algs self-tested, and *only* fips approved algs tested

2) 'modprobe md4' for example, and in fips mode, have the module load rejected as invalid

Patch 1/2 adds the basic infra
Patch 2/2 marks the allowed algs

Signature · 2 lines
Jarod Wilson
[email protected]