Subject: [Curdle] AD Review: draft-ietf-curdle-pkix-05

From: Eric Rescorla <[email-masked]>
Date: Sun, 3 Sep 2017 14:26:23 -0700

Hi folks,

As the chairs and I discussed, we're experimenting with AD reviews
with Phabricator.  I've stood up an instance at
https://mozphab-ietf.devsvcdev.mozaws.net/ and reviewed this draft. As
you can see, comments appear here in HTML, but you can see in context
by clicking on the various links in the e-mail.

We're still hashing out the workflow, but....

1. If you make an account and login, you can respond to the comments
and we can try to resolve them before you produce a new draft.

2. When you're ready to produce a new draft, you can either upload
it to the draft repo or send me the pre-draft and either way I'll
take care of getting it uploaded here, so we can see diffs, etc.

Let me know if you run into problems. There are definitely a few rough
edges here (partly because Phabricator is for code review) but I've
used this type of tool very extensively and it's much easier to work
with than email comments once you get used to it.

Thanks,
-Ekr

ekr requested changes to this revision.
ekr added inline comments.
This revision now requires changes to proceed. View Revision
<https://mozphab-ietf.devsvcdev.mozaws.net/D28>
*INLINE COMMENTS*
View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-115>
draft-ietf-curdle-pkix.txt:281
...,
[[2: publicKey [1] IMPLICIT PublicKey OPTIONAL ]],
...

This actually doesn't replicate 5958, which doesn't have the IMPLICIT, and
I don't see an erratum for this (though maybe I missed it?). So probably
some revised text is needed.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-116>
draft-ietf-curdle-pkix.txt:287
PublicKey ::= BIT STRING

Nice catch.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-117>
draft-ietf-curdle-pkix.txt:320
Z9w7lshQhqowtrbLDFw4rXAxZuE=
-----END PRIVATE KEY------
NOTE: There exist some private key import functions that have not

You're going to want some whitespace here, I think.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-118>
draft-ietf-curdle-pkix.txt:325
structure which contains the public key field. This means a
balancing act needs to be done between being able to do a consitency
check on the key pair and widest ability to import the key.

Nit: consistency.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-119>
draft-ietf-curdle-pkix.txt:601
Z9w7lshQhqowtrbLDFw4rXAxZuE=
-----END PRIVATE KEY-----
The same item dumped as asn1 yields:

Add whitespace.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-120>
draft-ietf-curdle-pkix.txt:650
The procedures for going from a private key to a public key is
different for when used with Diffie-Hellman and when used with

Nit: are different

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-121>
draft-ietf-curdle-pkix.txt:740
The following is not an invalid encoding, but it may not be accepted
by many systems as it is BER encoded.

Probably not great to have the sentence above say that this is a sampling
of incorrect keys and then have a valid one.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-122>
draft-ietf-curdle-pkix.txt:748
In the following example, the private key does not match the masking
requirements for X25519. For this example the top top bits are set
to zero and the low three bits are set to 001.

top top. also, I would say top/bottom or high/low.

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-123>
draft-ietf-curdle-pkix.txt:757
In the following examples, the key is the wrong length because an all
zero byte has been removed.

I assume a leading all zero byte?

View Inline <https://mozphab-ietf.devsvcdev.mozaws.net/D28#inline-124>
draft-ietf-curdle-pkix.txt:767
IDIACdQhJwzi/MCGcsQeQnIUh2JFybDxSrZxuLudJmpJLk
-----END PRIVATE KEY-----

What is the difference between these two?

*REPOSITORY*
rIETFREVIEW ietf-review

*REVISION DETAIL*
https://mozphab-ietf.devsvcdev.mozaws.net/D28

*EMAIL PREFERENCES*
https://mozphab-ietf.devsvcdev.mozaws.net/settings/panel/emailpreferences/

*To: *ekr-moz, ekr
*Cc: *ekr, ekr-webrtc

---

From: Ilari Liusvaara <[email-masked]>
Date: Tue, 5 Sep 2017 19:13:45 +0300

> What is the difference between these two?

I Took a look at this:

Both seem to be missing one octet from public key, the first one looks
to be missing the first (least significant!) octet, and the second one
seems to be missing the last (most significant) octet.

Computing the public keys from the private keys, I get (C); with
encoded public keys (E):

C: 00c17e4d8bbff27c1fb618c23fce988703c7efa3cd590aacac12d3f1e3c90c8c
E:   C17E4D8BBFF27C1FB618C23FCE988703C7EFA3CD590AACAC12D3F1E3C90C8C

And:

C: 9d421270ce2fcc08672c41e427214876245c9b0f14ab671b8bb9d266a492e400
E: 9D421270CE2FCC08672C41E427214876245C9B0F14AB671B8BB9D266A492E4

-Ilari