Re: [secdir] Secdir review of draft-jivsov-openpgp-ecc-12

Andrey Jivsov <openpgp@brainhub.org> Wed, 11 April 2012 19:25 UTC

Return-Path: <openpgp@brainhub.org>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 290D911E80BF for <secdir@ietfa.amsl.com>; Wed, 11 Apr 2012 12:25:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ouyVZq6TlPbf for <secdir@ietfa.amsl.com>; Wed, 11 Apr 2012 12:25:50 -0700 (PDT)
Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by ietfa.amsl.com (Postfix) with ESMTP id 0217C11E8098 for <secdir@ietf.org>; Wed, 11 Apr 2012 12:25:49 -0700 (PDT)
Received: from omta17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by qmta01.emeryville.ca.mail.comcast.net with comcast id wiUh1i0081afHeLA1jRpKJ; Wed, 11 Apr 2012 19:25:49 +0000
Received: from [127.0.0.1] ([98.234.252.65]) by omta17.emeryville.ca.mail.comcast.net with comcast id wjRn1i0081RRS8a8djRnut; Wed, 11 Apr 2012 19:25:49 +0000
Message-ID: <4F85DAF6.5070807@brainhub.org>
Date: Wed, 11 Apr 2012 12:26:46 -0700
From: Andrey Jivsov <openpgp@brainhub.org>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1
MIME-Version: 1.0
To: Brian Weis <bew@cisco.com>
References: <C0885DDE-7014-4D5C-8B4E-4F2578BB7963@cisco.com>
In-Reply-To: <C0885DDE-7014-4D5C-8B4E-4F2578BB7963@cisco.com>
Content-Type: multipart/alternative; boundary="------------080106010205000604090305"
X-Mailman-Approved-At: Wed, 11 Apr 2012 17:21:18 -0700
Cc: "draft-jivsov-openpgp-ecc.all@tools.ietf.org" <draft-jivsov-openpgp-ecc.all@tools.ietf.org>, The IESG <iesg@ietf.org>, "secdir@ietf.org" <secdir@ietf.org>
Subject: Re: [secdir] Secdir review of draft-jivsov-openpgp-ecc-12
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Apr 2012 19:25:51 -0000

Thank you for your comments, Brian. I integrated some of them into -13, 
posted http://datatracker.ietf.org/doc/draft-jivsov-openpgp-ecc/history/

On 04/10/2012 08:11 PM, Brian Weis wrote:
> 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 adds support for the use of ECC as an authentication method to OpenPGP. Two public key algorithms are supported: ECDSA and ECDH. The document describes the supported ECC curves, how the public key is represented in OpenPGP, and encodings for public and private keys. For ECDH, it also specifies the KDF for creating a KEK from from ECDH shared secret and the method for key wrapping a session key that is used to protect data traffic. This seems to be standard OpenPGP practice for DH public key algorithms. A stated goal is to conform to Suite B; as far as I can tell this is achieved.
>
> I have the following comments/questions.
>
> Section 5: A reference to ECDSA is given for both RFC 6090 and [SEC1]. The definition in RFC 6090 supersedes [SEC1], and it is preferable to reference just the RFC. I suggest removing "and in [SEC1]".

It seems to me that SEC1 provides the most succinct description of the 
algorithm among all the publicly available sources. RFC 6090 refers to 
another external document, which is written in a form of a survey of 
crypto methods, which the reader will need to process to get the 
relevant portion. It's unfortunate that FIPS 186-3 doesn't spell out the 
ECDSA exactly.

>
> Section 6: RFC 6090 uses the notation "(@,@)" for the point at infinity ("point O"), which would be better to use. This seems to be the only term in this section specific to [SEC1], so making this change should enable you to change your reference to RFC 6090 here too.

The main reason for SEC1 reference is to define the format 04 || x || y. 
RFC 6090 is missing any method to serialize an ECC point (no on-the-wire 
format).

>
> Section 6: The reasoning for passing the point at infinity isn't clearly defined. Can you explain when this would be done?

Right beneath of the table there was a sentence that addresses this in 
-12, which I modified to read:

"Note that the point O shall not appear in a public keys, including 
ephemeral public keys used with ECDH, defined in section 8."



>
> Section 7: The use of "P" for parameters is confusing, since P was just used in Section 6 to mean "Point". It would be helpful if it were "Params" or something other name.
Done. P-->Params
>
> Section 7: It would be helpful to the reader to explain that setting ZB to "x" is using the "compact output" of the shared secret (see RFC 6090 Section 4.2).

Done. Added the reference at the bottom.

>
> Section 8: Are the "5 variable-length and fixed-length fields" meant to be OtherInfo as defined in SP800-56A? If so, mentioning this would make it easier on the reader.
This is exactly what the qualifiers intended for, but they are only 
needed for persons validating this draft to be compatible with 
SP800-56A. I wonder if the reference here adds any value for the rest of 
readers?

>
> Section 8: This says "The key wrapping method is based on [RFC3394]". I hope is it actually "conforming to [RFC3394]", which would be a clearer statement. Is that so? If not, why?
Done. It is precisely "conforming"

>
> Section 8: This section gives an example of encoding a 32-octet ASE-256 session key into 40 octets, which seems to be the input to the key wrap. My understanding of the AES key wrap defined in RFC 3394 is that the key input should be just 32 octets, where it is prepended with an 8 octet IV. This doesn't match your example though. Can this be made to match the inputs in the RFC? For example, see the example in Section 4.6 of RFC 3394. (This would also remove the need for padding an AES-256 key, and reduce the padding for the two smaller sizes.)
There are two reasons for the current method:

* In OpenPGP the message encryption algorithm (symmetric algorithm of a 
session key) is encrypted to a public key of a recipient. In RFC 4880 
it's done so that the session key is 1_byte_symm_alg || key || checksum. 
One can argue on the benefit of a checksum, but the ID bumps the payload 
size to the next 8 bytes, which gives space to accomodate the checksum 
and PKCS#5 padding markers for free
* One cannot we cannot say which key size was used to encrypt the 
message by looking at RSA or ElGamal encrypted session key. AESWRAP 
leaks this information when it is tightly encapsulated the session key 
(this may leak how sensitive a protected document is). There is a 
description in the same section 8 on how to avoid this leak by padding 
the payload of AESWRAP to make it always look like an AES-256 session key.

>
> Section 10: The statement "No changes in the format are needed for ECDSA" seems true, but isn't it necessary to describe the Algorithm Specific Fields for ECDSA? Is this actually defined in Section 9?

I intended to say that the format of the (EC)DSA signed message is 
defined in the RFC4880. It's a pair of r,s integers in both cases. 
Changes to public keys are needed for both ECDSA and ECDH, defined in 
section 9.

>
> Section 13: The table of equivalent algorithm strengths seems to match claims in SP800-57-Part1-Rev3-May2011. It would be helpful to reference this document here as a source for the information.

I wanted to convey a statement that ECC==Hash==2*AES (meaning sizes and 
assuming that 521 ~ 512). As with some of the above issues, is it the 
right thing to do to add a reference if it can be avoided, given that a 
presence of a reference suggests that the reader must then study it in 
order to understand a corresponding statements. Isn't the issue of 
relative strength well-understood, so that readers that use the current 
table can look it up?

>
> Thanks,
> Brian

Thank you.