Skip to contentSkip to conversation

crypto: Add support for ECDSA signature verification

PATCH Herbert Xu 4 participants 12 messages Jan 29, 2021 – Feb 2, 2021 4 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Herbert Xu

author maintainer
#3 lore raw

Review

Quoted 3 lines · Stefan Berger
(quoted diff) +2 -0
+		.cra_name = "ecdsa-nist-p256",
+		.cra_driver_name = "ecdsa-nist-p256",

The driver name should have a "-generic" suffix in case a driver provides this algorithm too.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#4 lore raw

Re: [PATCH v5 4/4] ima: Support EC keys for signature verification

In reply to a message not in the archive
Quoted 8 lines · Vitaly Chikunov

Review

Quoted 5 lines
(quoted diff) +5 -0
+static inline
+const struct public_key *asymmetric_key_public_key(const struct key *key)
+{
+	return key->payload.data[asym_crypto];
+}

I wonder why use this accessor which does nothing else, because in all other places payload.data[asym_crypto] accessed directly.

We should probably move to using wrappers rather than accessing directly for type safety.

David

maintainer
#5 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 33 lines · Stefan Berger
Quoted 8 lines · David Howells
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case.

Quoted 5 lines
Quoted 3 lines

I presume these cc's are intentionally not on the first patch or the cover (if there is one)?

No, this is not intentional. I guess this is a case of wrong use of cc:
versus mailing lists - my bad. I posted the whole series to linux-crypto, linux-integrity, keyrings and lkml.

V6 is at least visible here now:

- https://lkml.org/lkml/2021/1/31/323

- https://marc.info/?l=linux-crypto-vger&m=161213604618722&w=2

-
https://lore.kernel.org/linux-integrity/[email protected]/T/#mbc9fae5facb4178f64c1145e2654258c0af8fa96

- https://marc.info/?l=linux-keyrings&m=161213608818735&w=2

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

Do you have a branch you want me to pull or did you want me to take just patches 2-4?

Please take it from the mailing list. If there are requests for more changes on the crypto level, I will send another series. I personally am waiting for some sort of verdict on the crypto level...

The entire patch set should be upstreamed as a single patch set, after having each of the maintainer's Ack it. In addition, the v6 version is missing some Reviewed-by tags. (Stefan will re-post a v7 patch set.)

David, I don't have problem with this patch set being upstreamed via the keys subsystem, assuming it's been tested.

thanks,

Mimi

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#7 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 9 lines · Stefan Berger

From: Stefan Berger <[email protected]>

Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case.

I presume these cc's are intentionally not on the first patch or the cover (if there is one)?

Do you have a branch you want me to pull or did you want me to take just patches 2-4?

David

#8 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 8 lines · David Howells
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case.

Quoted 5 lines
Quoted 3 lines

I presume these cc's are intentionally not on the first patch or the cover (if there is one)?

No, this is not intentional. I guess this is a case of wrong use of cc: versus mailing lists - my bad. I posted the whole series to linux-crypto, linux-integrity, keyrings and lkml.

V6 is at least visible here now:

- https://lkml.org/lkml/2021/1/31/323

- https://marc.info/?l=linux-crypto-vger&m=161213604618722&w=2

- https://lore.kernel.org/linux-integrity/[email protected]/T/#mbc9fae5facb4178f64c1145e2654258c0af8fa96

- https://marc.info/?l=linux-keyrings&m=161213608818735&w=2

Quoted 3 lines

Do you have a branch you want me to pull or did you want me to take just patches 2-4?

Please take it from the mailing list. If there are requests for more changes on the crypto level, I will send another series. I personally am waiting for some sort of verdict on the crypto level...

   Stefan

maintainer
#9 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

In reply to Mimi Zohar
Quoted 7 lines · Mimi Zohar
Quoted 6 lines
Quoted 2 lines

Do you have a branch you want me to pull or did you want me to take just patches 2-4?

Please take it from the mailing list. If there are requests for more changes on the crypto level, I will send another series. I personally am waiting for some sort of verdict on the crypto level...

Quoted 6 lines

The entire patch set should be upstreamed as a single patch set, after having each of the maintainer's Ack it. In addition, the v6 version is missing some Reviewed-by tags. (Stefan will re-post a v7 patch set.)

David, I don't have problem with this patch set being upstreamed via the keys subsystem, assuming it's been tested.

Herbert wants the first patch to go through the crypto tree. Maybe all of them should proceed by that route if Herbert is willing?

What do patches 2-4 do if patch 1 isn't applied?

David

author maintainer
#10 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 3 lines · David Howells

Herbert wants the first patch to go through the crypto tree. Maybe all of them should proceed by that route if Herbert is willing?

I'm not actually all that fussed about where it goes through. It's just the first patch happens to touch an area that is still under discussion for the Crypto API. So once that's settled I'm more than happy for it to go through your tree if that's the easiest way to go.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#11 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 7 lines · Herbert Xu
Quoted 2 lines

Herbert wants the first patch to go through the crypto tree. Maybe all of them should proceed by that route if Herbert is willing?

I'm not actually all that fussed about where it goes through. It's just the first patch happens to touch an area that is still under discussion for the Crypto API. So once that's settled I'm more than happy for it to go through your tree if that's the easiest way to go.

Should I defer it till the next merge window?

David

author maintainer
#12 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 2 lines · David Howells

Should I defer it till the next merge window?

Is there any specific reason why this has to be in the current one?

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#13 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 4 lines · Herbert Xu
Quoted 1 line

Should I defer it till the next merge window?

Is there any specific reason why this has to be in the current one?

No idea. It seems straightforward enough, at least on the keyrings side, that I was going to add it.

David

author maintainer
#14 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 3 lines · David Howells

No idea. It seems straightforward enough, at least on the keyrings side, that I was going to add it.

In that case please wait for the discussion on how we handle curves to be finalised.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#15 lore raw

Re: [PATCH v5 2/4] x509: Detect sm2 keys by their parameters OID

Quoted 5 lines · Herbert Xu
Quoted 2 lines

No idea. It seems straightforward enough, at least on the keyrings side, that I was going to add it.

In that case please wait for the discussion on how we handle curves to be finalised.

Sure. Will do.

David