Re: rsa-sha2-256/512: handling of incorrect signature encoding
Ron Frederick <ronf@timeheart.net> Tue, 13 September 2016 05:57 UTC
Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
by ietfa.amsl.com (Postfix) with ESMTP id 368A512B1F6
for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>;
Mon, 12 Sep 2016 22:57:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.807
X-Spam-Level:
X-Spam-Status: No, score=-5.807 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-1.508,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key)
header.d=timeheart.net
Received: from mail.ietf.org ([4.31.198.44])
by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 0YTDmNWT67wW
for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>;
Mon, 12 Sep 2016 22:57:28 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 14E5C12B1F1
for <secsh-tyoxbijeg7-archive@lists.ietf.org>;
Mon, 12 Sep 2016 22:57:28 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605)
id EF18485EDF; Tue, 13 Sep 2016 05:57:26 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347)
id 940F285EDF; Tue, 13 Sep 2016 05:57:26 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by mail.netbsd.org (Postfix) with ESMTP id 482C485ED3
for <ietf-ssh@netbsd.org>; Tue, 13 Sep 2016 03:34:06 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new);
dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([127.0.0.1])
by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025)
with ESMTP id gSQN4wDKfRK4 for <ietf-ssh@netbsd.org>;
Tue, 13 Sep 2016 03:34:05 +0000 (UTC)
Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com
[IPv6:2607:f8b0:4003:c06::235])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.netbsd.org (Postfix) with ESMTPS id DD5C085ED1
for <ietf-ssh@netbsd.org>; Tue, 13 Sep 2016 03:34:04 +0000 (UTC)
Received: by mail-oi0-x235.google.com with SMTP id q188so241262206oia.3
for <ietf-ssh@netbsd.org>; Mon, 12 Sep 2016 20:34:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail;
h=mime-version:subject:from:in-reply-to:date:cc:message-id:references
:to; bh=wS3aUnx/MajUsYqbdkL8qfEvcq5/TR6pIVtjQeKm13w=;
b=GVRy1L6kFsUD0hq2B67dc4yWtbyWSpb4tKc1JmRIJJHVN57HgRS9HMulWkr/K+kzbs
TCygRPJpRBk+Cbs5mESk6ZCTZau+CxOx3TDPBBaB+O4oud2jThWYP7CzxcfFFfiBeTrF
HGAR2+maMgPkvdi2Y6Ux5bvH219JqZnVm0AII=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
:message-id:references:to;
bh=wS3aUnx/MajUsYqbdkL8qfEvcq5/TR6pIVtjQeKm13w=;
b=hD/9edx7JKi4yNjGjpUDz0gUc1O+0dVmadXF3ITnoZj0xJdAnHyAUH/NfvzIpD76QY
PIWUvIYTQKiM11S7xLRgETL3RuJibYhPHrHEWL7wqcsumn478ww7/M504h6LDhzfl0Mh
DzM/RQuZpXouUaB5+Vv1AOutSMzR12D7rhymQ1sRJpBPU50TUUK5veGAjW7YIUjYBHWI
jkdc11Bv5odiUxeSQBdFcCBMXpjVCLkveuiDRIafMztzSRVfmT4rMsrknDJCnQvZ5+dd
M8DRflARaL48SgngUZA6GdsAtO/TxSXoqztV6WVQOWfyNJbFSBbIagrlTxmH2RxQPt63
QXgQ==
X-Gm-Message-State: AE9vXwNaafEZ/Rymb3p4Ck6orcjrxhBzxyOLJsDSNVhHLhx/xJYNyp3sSCSTM7ZmcARGwA==
X-Received: by 10.202.87.76 with SMTP id l73mr3813274oib.84.1473737643700;
Mon, 12 Sep 2016 20:34:03 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb?
([2601:647:4282:2200:cfa:5497:d692:7eeb])
by smtp.gmail.com with ESMTPSA id g78sm10645785itb.12.2016.09.12.20.34.02
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Mon, 12 Sep 2016 20:34:02 -0700 (PDT)
Content-Type: multipart/alternative;
boundary="Apple-Mail=_581A0F77-2E96-4537-ABB6-F770CE2B0E53"
Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3225\))
Subject: Re: rsa-sha2-256/512: handling of incorrect signature encoding
From: Ron Frederick <ronf@timeheart.net>
X-Priority: 3
In-Reply-To: <5A3D7904D0C749668769F3F30009C436@Khan>
Date: Mon, 12 Sep 2016 20:34:00 -0700
Cc: ietf-ssh@netbsd.org
Message-Id: <AD30C244-A6BD-47B2-A9C5-C9642DD0CFAD@timeheart.net>
References: <88F8D101-CBAA-4E57-AD25-8F403B6B57BC@timeheart.net>
<5A3D7904D0C749668769F3F30009C436@Khan>
To: "denis bider (Bitvise)" <ietf-ssh3@denisbider.com>
X-Mailer: Apple Mail (2.3225)
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list
On Sep 12, 2016, at 12:14 PM, denis bider (Bitvise) <ietf-ssh3@denisbider.com> wrote: > I’m not familiar with the OpenSSH certificate implementation, but there is an RFC specifying the use of X.509 certificates in SSH that defines its own key type for RSA with SHA-2 based signatures: > > https://tools.ietf.org/html/rfc6187 <https://tools.ietf.org/html/rfc6187> > > I don’t know what your users require, but from our users we are seeing requests to implement X.509 as per this RFC, not the @openssh versions. [Ron] Thanks, Denis. I have looked at that RFC, and have thought about adding support for both those and the OpenSSH variants. For deployments where this is already a good X.509-based public key infrastructure in place, I can definitely see the value in being able to use a common set of certificate authorities for both SSL/TLS and SSH. That said, there are some challenges with supporting RFC 6187: - Parsing X.509 certificates is extremely complex, and validating a certificate chain is even more so. If you want to do it right, you need to bring in a bunch of additional crypto infrastructure, like support for CRLs and OCSP. - The RFC provides a recommendation for how to validate server names when certificates are used for host authentication, but for user authentication it simply says "the mapping between certificates and user names is left as an implementation and configuration issue for implementers and system administrators.” It also really doesn’t provide any guidance about how to specify the list of trusted root CAs for either user or host authentication. - While the RFC does provide a way to indicate if an X.509 certificate can be used for user or host authentication, it doesn’t currently define any way to put restrictions on when a user can use a particular certificate or what they can do when they authenticate with a particular certificate. This would not be difficult to do in X.509, but I haven’t seen a proposed spec for encoding any such restrictions. OpenSSH certificates addresses these points pretty well: - All parsing is done using the same mechanism used for parsing other SSH packets, just like OpenSSH-format keys. There’s no need to pull in an ASN.1 parser or deal with the large number of OID values that need to be understood to properly parse X.509 certificates. - Specifying the list of trusted CAs and revoked certificates is done as a natural extension of the existing authorized_keys and known_hosts file formats. - OpenSSH provides very rich ways of limiting when certificates can be used and what actions can be taken by a user presenting a certificate. This can be done in either the authorized_keys file on the host deciding whether to accept a certificate or in the certificate itself, such that the limitations automatically apply to all hosts the certificate is accepted on. There are some ways in which OpenSSH is behind, though: - There’s no support for certificate chaining. It only supports direct signing of keys by a root CA, with no intermediate CAs. For many organizations, I imagine this would be a show-stopper. - While it can support the equivalent of CRLs for revocation, there’s currently nothing in OpenSSH equivalent to OCSP for real-time revocation checking. If you’re interested, more info on OpenSSH certificates can be found at http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/PROTOCOL.certkeys?rev=1.10&content-type=text/plain <http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/PROTOCOL.certkeys?rev=1.10&content-type=text/plain>. -- Ron Frederick ronf@timeheart.net
- Re: rsa-sha2-256/512: handling of incorrect signa… Matt Johnston
- RE: rsa-sha2-256/512: handling of incorrect signa… Peter Gutmann
- Re: rsa-sha2-256/512: handling of incorrect signa… denis bider (Bitvise)
- RE: rsa-sha2-256/512: handling of incorrect signa… Peter Gutmann
- rsa-sha2-256/512: handling of incorrect signature… denis bider (Bitvise)
- RE: rsa-sha2-256/512: handling of incorrect signa… Peter Gutmann
- RE: rsa-sha2-256/512: handling of incorrect signa… Peter Gutmann
- Re: rsa-sha2-256/512: handling of incorrect signa… denis bider (Bitvise)
- Re: rsa-sha2-256/512: handling of incorrect signa… denis bider (Bitvise)
- Re: rsa-sha2-256/512: handling of incorrect signa… Ron Frederick
- Re: rsa-sha2-256/512: handling of incorrect signa… denis bider (Bitvise)
- Re: rsa-sha2-256/512: handling of incorrect signa… Ron Frederick