From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Eric Biggers <ebiggers@kernel.org>,
Peter Huewe <peterhuewe@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
linux-integrity@vger.kernel.org
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] tpm: Compare HMAC values in constant time
Date: Thu, 31 Jul 2025 22:28:49 -0400 [thread overview]
Message-ID: <3ed1ae7e7f52afe53ce2ff00f362ed153b3eec20.camel@HansenPartnership.com> (raw)
In-Reply-To: <20250731215255.113897-2-ebiggers@kernel.org>
On Thu, 2025-07-31 at 14:52 -0700, Eric Biggers wrote:
> To prevent timing attacks, HMAC value comparison needs to be constant
> time. Replace the memcmp() with the correct function,
> crypto_memneq().
Um, OK, I'm all for more security but how could there possibly be a
timing attack in the hmac final comparison code? All it's doing is
seeing if the HMAC the TPM returns matches the calculated one. Beyond
this calculation, there's nothing secret about the HMAC key.
Regards,
James
next prev parent reply other threads:[~2025-08-01 2:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250731215255.113897-1-ebiggers@kernel.org>
2025-07-31 21:52 ` [PATCH 1/2] tpm: Compare HMAC values in constant time Eric Biggers
2025-08-01 2:28 ` James Bottomley [this message]
2025-08-01 3:02 ` Eric Biggers
2025-08-01 11:36 ` James Bottomley
2025-08-01 17:11 ` Eric Biggers
2025-08-01 18:03 ` James Bottomley
2025-08-01 18:40 ` Eric Biggers
2025-08-01 18:53 ` James Bottomley
2025-08-01 19:03 ` Eric Biggers
2025-08-01 19:20 ` James Bottomley
2025-08-01 20:14 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ed1ae7e7f52afe53ce2ff00f362ed153b3eec20.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=ebiggers@kernel.org \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox