Subject: Re: [Curdle] Secdir review of draft-ietf-curdle-cms-eddsa-signatures-06

From: Russ Housley <[email-masked]>
Date: Mon, 24 Jul 2017 12:26:20 -0400

Dacheng:

Thanks for taking the time to review the document.

> I have reviewed this document as part of the security directorate's ongoing effort to review all IETF documents being processed by the IESG. These comments were written primarily for the benefit of the security area directors. Document editors and WG chairs should treat these comments just like any other last call comments.
> 
> This document specifies the conventions for using Edwards-curve Digital Signature Algorithm (EdDSA) for curve25519 and curve448 in the Cryptographic Message Syntax (CMS). I think this document can be published after some tiny updates.
> 
> The comments are listed as follows:
> 
> 1. In security considerations, the first and the second paragraphs are about how implementations protect the private keys and how they guarantee the quality of random numbers. Normally, this such considerations are out of scope of protocol specifications. But I am ok if the authors would like to keep them. 

These are implementation considerations that impact security.  I think they should stay in the document.

> 2. In the 4th paragraph of security considerations, ' the same private key SHOULD NOT be used with more than one EdDSA set of parameters.' -> ' the same private key MUST NOT be used with more than one EdDSA set of parameters.' Since we already know that the same private key used for multiple algorithms will cause potential risks, we should use a stronger word here.

I do not think that there is a problem with using the same private key with PureEdDSA and HashEdDSA.  The prudent advice is to avoid mixing the same private key with different parameter, thus the SHOULD NOT.  I point out that RFC 8032 goes even further:

   ... Thus, one can use the same
   key pair for Ed25519, Ed25519ctx, and Ed25519ph and correspondingly
   with Ed448 and Ed448ph.

> 3. In the 5th paragraph of security considerations, ' the same hash function should be used for all operations.' ->' the same hash function SHOULD be used for all operations.'

Yes, I agree.

> 4. In the 1st paragraph, 'When signing with Ed25519, the digestAlgorithm SHOULD include id-sha512' ->' When signing with Ed25519, the digestAlgorithm MUST include id-sha512'. 'When signing with Ed448, the digestAlgorithm SHOULD include id-shake256-len' -> 'When signing with Ed448, the digestAlgorithm MUST include id-shake256-len'.

I assume you are talking about Section 3.1 here.  These should not be changed to MUST.  CMS does not require these to be filled in, but stream-oriented processing works better if they are filled in.  Thus, the SHOULD statement.

Russ

---

From: zhangdacheng <[email-masked]>
Date: Thu, 27 Jul 2017 09:15:49 +0000

Hi, Russ:

See me comments below please.

Dacheng: sure.

Dacheng: Ok, I see your point. Then, I think it will be good to make some clarification here since the first sentence of this paragraph strongly argues that ' Using the same private key for different algorithms has the potential of allowing an attacker to get extra information about the private key.' Maybe we can change the second sentence to something like ' For this reason, the same private key SHOULD NOT be used with more than one EdDSA set of parameters, although people believe that no security issue will be caused when using the same private key with PureEdDSA and HashEdDSA [RFC8032]. '

Yes, I agree.

Dacheng: No problem with that.

Russ

---

From: Russ Housley <[email-masked]>
Date: Thu, 27 Jul 2017 13:13:40 -0400

Dacheng:

Trimming the parts where we have reached agreement...

> Dacheng: Ok, I see your point. Then, I think it will be good to make some clarification here since the first sentence of this paragraph strongly argues that ' Using the same private key for differe…

How about:

Using the same private key with different algorithms has the potential
to leak extra information about the private key to an attacker.  For
this reason, the same private key SHOULD NOT be used with more than one
set of EdDSA parameters, although people believe that there are no
security concerns when using the same private key with PureEdDSA and
HashEdDSA [EDDSA].

Russ

---

From: zhangdacheng <[email-masked]>
Date: Fri, 28 Jul 2017 09:18:19 +0000

Great!

-----邮件原件-----
发件人: Russ Housley [mailto:[email-masked]] 
发送时间: 2017年7月28日 1:14
收件人: zhangdacheng <[email-masked]>
抄送: curdle <[email-masked]>; IESG <[email-masked]>; IETF SecDir <[email-masked]>
主题: Re: [Curdle] 答复: Secdir review of draft-ietf-curdle-cms-eddsa-signatures-06

Dacheng:

How about:

Using the same private key with different algorithms has the potential to leak extra information about the private key to an attacker.  For this reason, the same private key SHOULD NOT be used with more than one set of EdDSA parameters, although people believe that there are no security concerns when using the same private key with PureEdDSA and HashEdDSA [EDDSA].

Russ