public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* FIPS requirements in lib/crypto/ APIs
@ 2025-09-18 16:00 Joachim Vandersmissen
  2025-09-18 16:33 ` Eric Biggers
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Vandersmissen @ 2025-09-18 16:00 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-crypto, simo

Hi Eric,

I'm starting a new thread since I don't want to push the SHAKE256 thread 
off-topic too much.

One simple example of a FIPS requirement that I currently don't see in 
lib/crypto/ is that HMAC keys must be at least 112 bits in length. If 
the lib/crypto/ HMAC API wants to be FIPS compliant, it must enforce 
that (i.e., disallow HMAC computations using those small keys). It's 
trivial to add a check to __hmac_sha1_preparekey or hmac_sha1_preparekey 
or hmac_sha1_init_usingrawkey, but the API functions don't return an 
error code. How would the caller know anything is wrong? Maybe there 
needs to be a mechanism in place first to let callers know about these 
kinds of checks?

It would be great to have your guidance since you've done so much work 
on the lib/crypto/ APIs, you obviously know the design very well.

Kind regards,
Joachim


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-22 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 16:00 FIPS requirements in lib/crypto/ APIs Joachim Vandersmissen
2025-09-18 16:33 ` Eric Biggers
2025-09-18 17:48   ` Joachim Vandersmissen
2025-09-18 18:06     ` Eric Biggers
2025-09-19 15:22       ` Theodore Ts'o
2025-09-22 13:41         ` Jeff Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox