[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALrw=nG0Pj1W-bZ6qQax0WnxSayCtYx97ivRuQMsVZHbsQZong@mail.gmail.com>
Date: Sun, 1 Feb 2026 11:55:26 +0100
From: Ignat Korchagin <ignat@...udflare.com>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Daniel Hodges <hodgesd@...a.com>, David Howells <dhowells@...hat.com>,
Lukas Wunner <lukas@...ner.de>, Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>, keyrings@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: pkcs7 - use constant-time digest comparison
On Sun, Feb 1, 2026 at 5:41 AM Eric Biggers <ebiggers@...nel.org> wrote:
>
> On Sat, Jan 31, 2026 at 07:55:03PM -0800, Daniel Hodges wrote:
> > This creates a timing side-channel that could allow an
> > attacker to forge valid signatures by measuring verification time
> > and recovering the expected digest value byte-by-byte.
>
> Good luck with that. The memcmp just checks that the CMS object
> includes the hash of the data as a signed attribute. It's a consistency
> check of two attacker-controlled values, which happens before the real
> signature check. You may be confusing it with a MAC comparison.
On top of that the CMS object and the hash inside is "public", so even
if you have state-of-the-art quantum computer thing you can just take
the object and forge the signature "offline"
> - Eric
Powered by blists - more mailing lists