Subject: [Cfrg] Suggestions for draft-hao-schnorr

From: Robert Ransom <[email-masked]>
Date: Tue, 3 Dec 2013 15:35:42 -0800

draft-hao-schnorr-00 is incorrectly labeled as describing the ‘Schnorr
signature’.  The protocol it describes is a non-interactive proof of
knowledge of a discrete logarithm, as required by J-PAKE (and other
protocols); the Schnorr signature IS NOT a proof of knowledge.

In the notation used in the draft, the original Schnorr signature (as
described by Wikipedia, ‘Applied Cryptography’, and a PDF file from
somewhere on the Internet claiming to be a 1991 paper by Schnorr) uses
h = H(Message || g^v).  With that choice of h, an attacker can choose
V with unknown discrete logarithm, choose r and Message arbitrarily,
and compute the X for which the signature is valid; the attacker (and
anyone else who sees the signature) will know the discrete logarithm
of X with respect to V, but not with respect to g.

I suggest replacing “Schnorr signature” with “Schnorr proof of
knowledge” in the titles of Section 4 and the draft itself, and adding
text in the draft warning about the difference between the PoK and the
original signature scheme, to try to reduce the risk that someone will
break a protocol by substituting the original (non-PoK) Schnorr
signature for the PoK you are describing.

(I don't believe that using the original Schnorr signature in J-PAKE
would break J-PAKE's security, but it's certainly not a good thing to
do.)

The draft must specify that implementations MUST choose v *uniformly*
at random from Z/qZ, and MUST NOT use the same v for more than one
signature.  (See section 2, subsection ‘Pseudorandom generation of r’
(on pages 8 and 9) of <http://ed25519.cr.yp.to/ed25519-20110926.pdf>
for reasons and references.)  The draft should specify that
implementations which use long-term signing keys SHOULD arrange to
generate v in a secretly deterministic manner, and protocols in which
long-term signing keys may need to be interoperable between
implementations MUST specify the details of deterministic generation
of v and storage and transport of any extra key material required for
that purpose.

Robert Ransom

---

From: Feng Hao <[email-masked]>
Date: Thu, 5 Dec 2013 01:38:13 +0000

Hi Robert,

Thanks for the suggestions. My response is interleaved below.

On 03/12/2013 23:35, "Robert Ransom" <[email-masked]<mailto:[email-masked]>> wrote:

Yes, I understand your concern. The term schnorr signature is often used
in the literature to mean two different things: the digital signature obtained from the schnorr signing algorithm and the non-interactive ZKP.

I had wanted to make it clear and explicit in the title that it refers to the latter, but I understand your point that it can still cause confusion. I've changed "Schnorr signature" to "Schnorr NIZK Proof", and have made other changes in both the Schnorr and J-PAKE I-Ds to make everything consistent, including changing SignerID to UserID.

http://homepages.cs.ncl.ac.uk/feng.hao/files/draft-hao-schnorr-01-temp.html

http://homepages.cs.ncl.ac.uk/feng.hao/files/draft-hao-jpake-01-temp.html

I haven't uploaded them to IETF yet. I'm waiting to see if you (and others) have more comments, so that I can make changes in one go.

(Hope you don't mind - I added your name in the acknowledgement.)

I've replaced "Schnorr signature" with "Schnorr NIZK Proof" and added text to warn the difference between the PoK and the original Schnorr signature scheme. The difference is actually subtle, but worth mentioning, as you suggested.

Yes, it shouldn't. Alternatively, you could use DSA for the proof of knowledge of the discrete logarithm. Think about the self-signed Certificate Signing Request that you can generate from OpenSSL using DSA. Checking the CSR is equivalent to verifying the proof-of-possession of the private key.

So there are more than one way to verify the knowledge (or possession) of a private key. The Schnorr NIZK is just one of them. I prefer it only because it has easy-to-understand and widely accepted security proofs.

at random from Z/qZ,

OK. I changed "at random" to "uniformly at random". There is not much difference in the meaning, but being more explicit is good.

and MUST NOT use the same v for more than one
signature.  (See section 2, subsection ‘Pseudorandom generation of r’
(on pages 8 and 9) of <http://ed25519.cr.yp.to/ed25519-20110926.pdf>
for reasons and references.)

Using a fixed v rather than at random is one of the native mistakes (one that was seen in the sony PS). But there are many other ways to make native implementation errors. We cannot enumerate all such in the I-D. I think stating that v must be chosen uniformly at random should be sufficiently clear.

The draft should specify that

Thanks for the suggestion. However, I feel these are outside the scope for this I-D. The secure implementation of a random number generator, and the key management of the long-term private key (which will probably need a HSM) are important, but do not seem very relevant to the discussion of the how to prove the knowledge of a discrete logarithm. These should not affect the interoperability.

I hope I have addressed all your concerns. But if not, please feel free to let me know. Thanks for your constructive comments.

Robert Ransom