Skip to contentSkip to conversation

tpm: Disable TCG_TPM2_HMAC by default

PATCH In review Jarkko Sakkinen 2 participants 3 messages May 18, 2024 – May 20, 2024

Subsystems (3)
lore
Share & tools
lore

Jarkko Sakkinen

author maintainer
#0 lore raw

PATCH 1/1 tpm: Disable TCG_TPM2_HMAC by default

Causes performance drop in initialization so needs to be opt-in. Distributors are capable of opt-in enabling this. Could be also handled by kernel-command line in the future.

---
 drivers/char/tpm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/Kconfig +1 -1
index e63a6a17793c..db41301e63f2 100644
@@ -29,7 +29,7 @@ if TCG_TPM
 
 config TCG_TPM2_HMAC
 	bool "Use HMAC and encrypted transactions on the TPM bus"
-	default y
+	default n
 	select CRYPTO_ECDH
 	select CRYPTO_LIB_AESCFB
 	select CRYPTO_LIB_SHA256
Signature · 1 line
2.45.0
maintainer
#1 lore raw
Quoted 7 lines · Jarkko Sakkinen

Causes performance drop in initialization so needs to be opt-in. Distributors are capable of opt-in enabling this. Could be also handled by kernel-command line in the future.

Closes:
https://lore.kernel.org/linux-integrity/[email protected]/#t

Hey, there's no response on that thread verifying the primary generation is the culprit. Could we at least wait for a reply before taking such drastic action based on surmise?

I'd be really surprised if it is primary generation. If I used an RSA primary it would be a problem (My oldest TPM takes a couple of minutes to generate one) but the longest I've seen an EC primary take to generate is still less than a second.

James

author maintainer
#2 lore raw
Quoted 13 lines · James Bottomley
Quoted 7 lines · Jarkko Sakkinen

Causes performance drop in initialization so needs to be opt-in. Distributors are capable of opt-in enabling this. Could be also handled by kernel-command line in the future.

Closes:
https://lore.kernel.org/linux-integrity/[email protected]/#t

Hey, there's no response on that thread verifying the primary generation is the culprit. Could we at least wait for a reply before taking such drastic action based on surmise?

Quoted 6 lines

I'd be really surprised if it is primary generation. If I used an RSA primary it would be a problem (My oldest TPM takes a couple of minutes to generate one) but the longest I've seen an EC primary take to generate is still less than a second.

James

Nothing is going to happen before rc1 is out, it would be earliest rc2.

ECDSA should be always faster than RSA so you're right that it does not necessarily make much sense, unless there are TPM2 chips with only RSA.

It might make sense to have at least a command-line option to disable hmac.

BR, Jarkko