All of lore.kernel.org
 help / color / mirror / Atom feed
* calc_keyid_v2 producing different keyid for non-sha1 SKIDs
@ 2021-04-26 19:37 Vitaly Chikunov
  2021-04-26 20:21 ` Stefan Berger
  0 siblings, 1 reply; 7+ messages in thread
From: Vitaly Chikunov @ 2021-04-26 19:37 UTC (permalink / raw)
  To: Mimi Zohar, linux-integrity

Hi,

I am reported that IMA signatures where SKID is not just sha1 of the
public key (but something different, for example different hash algo,
such as Streebog) have "wrong" keyid in the signature. This is because
a) kernel extracting keyid from the cert's subjectKeyIdentifier (SKID)
x509 extension, (or if this fails it takes just serial, perhaps, we can
disregard this corner case), it never does sha1 over the public key).
But, b) evmctl, when signing, uses just private key (not even knowing
certificate where SKID should be) and calculating sha1 of public key.
Thus, keyids could mismatch each other, and it's even not easy to fix
evmctl, because there is no cert at the time of signing.

Perhaps, we should fix this somehow. For example, when signing,
introduce new option --cert, where SKID should be extracted. Does it
looks reasonable?

Vitaly,


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

end of thread, other threads:[~2021-05-03 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-26 19:37 calc_keyid_v2 producing different keyid for non-sha1 SKIDs Vitaly Chikunov
2021-04-26 20:21 ` Stefan Berger
2021-04-26 22:01   ` Vitaly Chikunov
2021-04-26 22:14     ` Vitaly Chikunov
2021-04-30 17:19       ` Stefan Berger
2021-04-30 18:33         ` Vitaly Chikunov
2021-05-03 14:44           ` Stefan Berger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.