linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ecdsa KEYCTL_PKEY_QUERY fixes
@ 2025-02-02 19:00 Lukas Wunner
  2025-02-02 19:00 ` [PATCH v2 1/4] crypto: sig - Prepare for algorithms with variable signature size Lukas Wunner
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Lukas Wunner @ 2025-02-02 19:00 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Stefan Berger, Vitaly Chikunov
  Cc: David Howells, Ignat Korchagin, linux-crypto, keyrings

For ecdsa, KEYCTL_PKEY_QUERY reports nonsensical values for
enc/dec size and (for P521 keys) also the key size.
Second attempt at fixing them.

Changes v1 -> v2:

* New patch [2/4] to introduce DIV_ROUND_UP_POW2(), which avoids
  integer overflows that may occur with DIV_ROUND_UP() (Herbert)

* Amend patch [4/4] to use DIV_ROUND_UP_POW2() (Herbert)

* Amend patch [4/4] to use BITS_PER_BYTE for clarity

Link to v1:

  https://lore.kernel.org/r/cover.1735236227.git.lukas@wunner.de

Lukas Wunner (4):
  crypto: sig - Prepare for algorithms with variable signature size
  crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()
  crypto: ecdsa - Fix enc/dec size reported by KEYCTL_PKEY_QUERY
  crypto: ecdsa - Fix NIST P521 key size reported by KEYCTL_PKEY_QUERY

 crypto/asymmetric_keys/public_key.c | 22 +++++++++++-----------
 crypto/ecc.c                        |  2 +-
 crypto/ecdsa-p1363.c                |  8 +++++---
 crypto/ecdsa-x962.c                 |  7 ++++---
 crypto/ecdsa.c                      |  2 +-
 crypto/ecrdsa.c                     |  2 +-
 crypto/rsassa-pkcs1.c               |  4 ++--
 crypto/sig.c                        |  9 +++++++--
 crypto/testmgr.c                    |  7 ++++---
 include/crypto/sig.h                |  7 ++++---
 include/linux/math.h                | 12 ++++++++++++
 11 files changed, 52 insertions(+), 30 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-03-17  9:40 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 19:00 [PATCH v2 0/4] ecdsa KEYCTL_PKEY_QUERY fixes Lukas Wunner
2025-02-02 19:00 ` [PATCH v2 1/4] crypto: sig - Prepare for algorithms with variable signature size Lukas Wunner
2025-02-02 19:00 ` [PATCH v2 2/4] crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() Lukas Wunner
2025-02-03  5:11   ` Lukas Wunner
2025-02-02 19:00 ` [PATCH v2 3/4] crypto: ecdsa - Fix enc/dec size reported by KEYCTL_PKEY_QUERY Lukas Wunner
2025-02-09  9:58   ` Herbert Xu
2025-02-09 11:29     ` Lukas Wunner
2025-02-09 13:16       ` Ignat Korchagin
2025-02-10  7:54       ` Herbert Xu
2025-02-10 18:53         ` Lukas Wunner
2025-02-10 20:29           ` Lukas Wunner
2025-02-11  9:16           ` Herbert Xu
2025-02-16  4:19           ` Herbert Xu
2025-02-16 10:45             ` Lukas Wunner
2025-03-02  7:47               ` Herbert Xu
2025-03-02  9:25                 ` Lukas Wunner
2025-03-02 10:11                   ` Herbert Xu
2025-03-15 14:37   ` Lukas Wunner
2025-03-17  9:37     ` Herbert Xu
2025-03-17  9:40       ` Herbert Xu
2025-02-02 19:00 ` [PATCH v2 4/4] crypto: ecdsa - Fix NIST P521 key " Lukas Wunner
2025-02-09 10:25 ` [PATCH v2 0/4] ecdsa KEYCTL_PKEY_QUERY fixes Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).