Re: draft-igoe-secsh-x509v3-00

Douglas Stebila <douglas@stebila.ca> Tue, 15 December 2009 02:11 UTC

Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 150313A6945 for <ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com>; Mon, 14 Dec 2009 18:11:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IoUQl87C0Rzr for <ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com>; Mon, 14 Dec 2009 18:10:58 -0800 (PST)
Received: from mail.netbsd.org (mail.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe52:9ab6]) by core3.amsl.com (Postfix) with ESMTP id BDFED3A6949 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Mon, 14 Dec 2009 18:10:54 -0800 (PST)
Received: by mail.netbsd.org (Postfix, from userid 0) id 8994863B219; Tue, 15 Dec 2009 02:10:32 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: from mail-yw0-f199.google.com (mail-yw0-f199.google.com [209.85.211.199]) by mail.netbsd.org (Postfix) with ESMTP id 07F9B63B125 for <ietf-ssh@netbsd.org>; Tue, 15 Dec 2009 02:10:29 +0000 (UTC)
Received: by ywh37 with SMTP id 37so3562730ywh.13 for <ietf-ssh@netbsd.org>; Mon, 14 Dec 2009 18:10:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=5NSx5yWlaAoh0UAeToKLGer/n1w5zBIsyxJP0WA6lXg=; b=TiN7PC6w8OrOPT2GzHRLc8BiWit3tX5fBP09iY2ekvxXgKcJvUyxBjVZW+TtaflCOT MKYbQdc8oTUDyGZBzFkcvGBgWQJw4uqp812IC+fA5nwciwE38oycEvOX0TEdKJYeWTwd xd+k12iO1c2PCLQoPI9kCzJYRJ0SjRJ99E2Ro=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=E3xZcAelh/wYcq0uTEp0wIQG77xQaKKUUV1v9C8fUJfg+95EI5l4UxdmU31iZmerl4 GKcS3gykOFbsppjWA/9oqm/lEAbKnXSGonWaaLA7woO6ZioAGbQIMw8L9y6Rj+1/OBsl upsiUcytP0HzvI0i5QzKhu+xDQWU6hfMOAahM=
Received: by 10.91.181.18 with SMTP id i18mr415686agp.38.1260843027509; Mon, 14 Dec 2009 18:10:27 -0800 (PST)
Received: from ?131.181.100.237? ([131.181.100.237]) by mx.google.com with ESMTPS id 4sm2131532yxd.70.2009.12.14.18.10.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Dec 2009 18:10:26 -0800 (PST)
Subject: Re: draft-igoe-secsh-x509v3-00
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset="us-ascii"
From: Douglas Stebila <douglas@stebila.ca>
In-Reply-To: <4B048844.4040405@vandyke.com>
Date: Tue, 15 Dec 2009 12:10:19 +1000
Cc: "Igoe, Kevin M." <kmigoe@nsa.gov>, ietf-ssh@NetBSD.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <6A5532F8-3FD1-45A4-A6CC-5A56B0A02823@stebila.ca>
References: <80F9AC969A517A4DA0DE3E7CF74CC1BB0349B5@MSIS-GH1-UEA06.corp.nsa.gov> <4B048844.4040405@vandyke.com>
To: Joseph Galbraith <galb-list@vandyke.com>, Jeffrey Hutzelman <jhutz@cmu.edu>
X-Mailer: Apple Mail (2.1077)
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list

Thanks for the feedback, Joseph and Jeff.

Let me try to summarize the various points from your chain of emails.


First off, points that we will address as requested (although a new draft probably won't appear until the new year):

1) Include more specifics (key encodings, signature formats) and examples in the document.  We will do this in the next draft.

2) Add discussion on keyUsage extensions (digitalSignature for most uses in SSH, and keyAgreement for the ECMQV cipher suite).  We will do this in the next draft.

3) Require the first cert in the chain to use the correct type of key.  We will do this in the next draft.

4) Suggest/require the cert chain to only use signatures that are acceptable to the peer according to the SSH public key algorithm negotiation.  I like Jeff's suggestion that this would mean we actually negotiate certs that are useful for the entire process.  I will add this in the next draft.  Recognizing, however, that servers may have a single cert chain that they can't change on the fly, I will include a note suggesting that implementations SHOULD be prepared to receive a non-compliant (in terms of algorithms used) chain and MAY still choose to verify it if they wish.


And some points for further discussion:

5) Encode certificate chains as a native SSH data structure, not in ASN.1.  Kevin and I had discussed this originally and went with ASN.1 for the following reasons: (a) since certificates themselves are in ASN.1, implementations will need to have an ASN.1 tool around anyway; (b) I think most existing tools using certificates keep them in ASN.1, so someone supplying a certificate chain to an SSH implementation is likely using ASN.1 elsewhere for that; (c) the certificate chain only needs to be kept as a single blob in the filesystem as opposed to multiple files, making configuration easier.  But if the consensus is that an SSH data structure is more appropriate, we can change the draft.

6) Extended key usage key purpose IDs.  I must confess to being a bit confused about this one.  In the original X.509 in SSH draft, you say that SSH implementations SHOULD NOT use extended key usage extensions, but then go on to provide some anyway.  Can you help me understand what appears to be a contradiction?  Would we need to get new OIDs or could we reuse the ones from the previous document?

7) Certificate revocation list / OCSP responses.  You've suggested including CRL or OCSP data alongside the certificate chain for efficiency purposes.  I'm not a PKI expert either, so I'd like to hear more feedback, especially from implementers, on whether this would be of interest to them.  I know that SunSSH's support for X.509 has some consideration of CRL/OCSP, so maybe Jan can comment on what he thinks of including that data with the cert chain or handling it outside of the protocol.

Thanks,

Douglas



On 2009-Nov-19, at 9:50 AM, Joseph Galbraith wrote:

> Igoe, Kevin M. wrote:
>> Colleagues:
>>   I'd like to call your attention to the following draft submission for X.509 certificates in Secure Shell:
>>  http://www.ietf.org/id/draft-igoe-secsh-x509v3-00.txt
>>  Your comments, suggestions and insights are appreciated!
> 
> Thanks for picking this work up.  I'm definitely interested
> in seeing this move forward, and I know I've had a number of
> people express interest in this work as well.
> 
> I think this draft needs to spell out, explicitly, various formats.
> 
> For example,
> 
> > The key format has the following specific encoding:
> >
> >      string    "x509v3-ssh-dss" / "x509v3-ssh-rsa" /
> >                "x509v3-ecdsa-sha2-*" / "x509v3-ecmqv-sha2"
> >      string    certificate-chain
> >
> > A certificate-chain is a DER-encoded ASN.1 SEQUENCE of certificates.
> 
> I suppose you might omit the second string and embed the ASN.1 sequence
> directly, but usually SSH wraps that kind of data in a string.
> 
> Notice the algorithm name is encoded into the publickey.  This is
> the way ssh-dss and ssh-rsa work, but not the way the (undocumented)
> de-facto x509 implementation that is currently floating around works.
> (And in case it isn't obvious, I think it should work like the existing
> algorithms and encode the algorithm name in the publickey.)
> 
> It might be more SSH friendly to encode the chain using SSH rather
> than ASN.1:
> 
> > The "x509v3-ssh-dss" key format has the following specific encoding:
> >
> >      string    "x509v3-ssh-dss" / "x509v3-ssh-rsa" /
> >                "x509v3-ecdsa-sha2-*" / "x509v3-ecmqv-sha2"
> >      uint32    certificate-count
> >      string    certificate[1..certificate-count]
> 
> I'd also include an example, just because we've had a number of
> implementation problems in this area (the string nesting can be a
> little confusing.)
> 
> >  byte      SSH_MSG_KEXDH_REPLY
> >  string    0x00 0x00 0xXX 0xXX
> >      0x00 0x00 0x00 0x0D "x509v3-ssh-dss"
> >      0x00 0x00 0x00 0x02
> >      0x00 0x00 0xXX 0xXX DER-encoded senders certificate
> >      0x00 0x00 0xXX 0xXX DER-encoded issuer certificate
> >  mpint     f
> >  string    signature of H
> 
> I think we also need to document signature algorithms.
> 
> > Signing and verifying using the "x509v3-ssh-dss" key format
> > is done according to the Digital Signature Standard [FIPS-186-2]
> > using the SHA-1 hash [FIPS-180-2].
> >
> > The resulting signature is encoded as follows:
> >
> >      string    "ssh-dss"
> >      string    dss_signature_blob
> >
> > The value for 'dss_signature_blob' is encoded as a string containing
> > r, followed by s (which are 160-bit integers, without lengths or
> > padding, unsigned, and in network byte order).
> >
> > Signing and verifying using the "x509v3-ssh-rsa" key format
> > is performed according to the RSASSA-PKCS1-v1_5 scheme in
> > [RFC3447] using the SHA-1 hash.
> >
> > The resulting signature is encoded as follows:
> >
> >     string    "ssh-rsa"
> >     string    rsa_signature_blob
> >
> >  The value for 'rsa_signature_blob' is encoded as a string containing
> >  s (which is an integer, without lengths or padding, unsigned, and in
> >  network byte order).
> >
> >  These formats are that same as "ssh-rsa" and "ssh-dss", see RFC 4253,
> >  6.6. Public Key Algorithms
> 
> You'll probably also need details for "x509v3-ecdsa-sha2-*"
> and "x509v3-ecmqv-sha2" signature encodings.
> 
> (And I assumed you wanted to use the existing encodings for signatures--
> if not, you'll need to spell something different out.)
> 
> In addition, in your "IANA Considerations", you specified that there
> were new entries in the key exchange algorithms, but I don't think
> you actually introduced any new key exchange algorithms did you? These
> are just new public key types that can be used in combination with any
> of the existing key exchange algorithms.
> 
> Other miscellaneous thoughts:
> 
> o Do we want to require processing of (or give guidance with regards to)
>  any extensions, such as BasicConstraints, KeyUsage, and
>  SubjectAltName?
> 
> o Do we need language about respecting critical extensions or rejecting
>  the certificate?
> 
> o Do we want to define any extended key usage key purpose ids?
> 
> o When we were working on x509v3 before, people seemed to want to
>  include revocation data as well as chain data; I was never quite
>  sure whether this was really needed or if it was gold plating, so
>  to speak.
> 
> I'm more than happy to see any of these discarded as unneeded fluff...
> to be honest, I know a lot about SSH, but not so much about x509, so
> these thoughts mostly reflect feedback I was given when working on
> the (now abandoned) x509v3 draft
> (http://tools.ietf.org/html/draft-ietf-secsh-x509-03)
> 
> o We should require the first certificate in a chain to use the correct
>  type of key (i.e., it must have a rsa key if it is a
>  "x509v3-ssh-rsa".)
> 
> Thanks,
> 
> Joseph
>