Re: [netconf] crypto-types fallback strategy

Schönwälder, Jürgen <J.Schoenwaelder@jacobs-university.de> Wed, 18 September 2019 20:29 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E6F53120046 for <netconf@ietfa.amsl.com>; Wed, 18 Sep 2019 13:29:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FROM_EXCESS_BASE64=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.onmicrosoft.com
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 ilo0dwcYHvQR for <netconf@ietfa.amsl.com>; Wed, 18 Sep 2019 13:29:33 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70044.outbound.protection.outlook.com [40.107.7.44]) (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 5D598120086 for <netconf@ietf.org>; Wed, 18 Sep 2019 13:29:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U6VFVd+VaOT1RFEkLesH28DbBqlAOxAgIfc8bq6wUohVUR9slgI5uS+GXESFYEDlYt8rpGDLjU6T6ZULOacDzNjmdOz+1NlcHVpUF5VHFdMmF2e5M1tRCHrp+3jl5v7Dhrthg0tFa49ddzLLxNp+G62vUAV6x6tUNp+TKwtL2FA7seDGKLeXDVZRdHhUpNGyij1yfW+QjjEunscU6XBoFgoBPSlgvHsnJzh3v3uy0WUPjcv1U453YedHFGvBcnQb0EJnIOaX28vya1od2lU6h10WNCeMRG9zw+yHb2S0VJZwURoCmlklwZvgTjF2jYC/TFZQ65jWg74NUjth1pY1Rg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/SqD8w1nZyOSMfFRHptFAcBNsZLecVPndgKy7AOrik=; b=VvG9A7pQ+RfMUBDDnA+PBk2Hyh/PMEh4oGDToGF2HmH4gI5w02yMxAuYLZBDXHLqTuwHYvn3WIKLJthIkP7A0jp76RInqGyM5S9fcKemvMLPyY7JFOM1ivs+VVzeRHOZUGlNGtVf0aHQKrAGGV/5HT5cGDo2KbRLNor6nnfMe4xw5vRKjAob2/jNqAisGYNtXcWBOG3qke35NXuS8R/9jENgAWOI16XlZ0p+jdRVL+n20HIoWj863G5cc8ImmKHgDJG++UIeylv4gI13bvzc49ufMb99Z4cjL1njgwjxGXcCSGNzIug/b5mLmluufAfX/XBBdGOVeWeBItx0bnnS5Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/SqD8w1nZyOSMfFRHptFAcBNsZLecVPndgKy7AOrik=; b=fmGE9dCxQkZu6DflLj8ib7aWm9wTFbGjbTXZHKjjCIXoDR8kohc5p6vqT1kvBdiyRBfZczRzb8lQ7s7jLq/DmJ/zC14DcnKtNyl7SKHRSdUMKjZVTTC1f9zxNV4UptcRzZsx41MzkNj3T9kBRb+NetknrFZapp6mSpdIoq5bAwQ=
Received: from VI1P190MB0686.EURP190.PROD.OUTLOOK.COM (10.186.159.71) by VI1P190MB0496.EURP190.PROD.OUTLOOK.COM (10.165.198.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.26; Wed, 18 Sep 2019 20:29:30 +0000
Received: from VI1P190MB0686.EURP190.PROD.OUTLOOK.COM ([fe80::d48a:ffa3:4fff:141e]) by VI1P190MB0686.EURP190.PROD.OUTLOOK.COM ([fe80::d48a:ffa3:4fff:141e%2]) with mapi id 15.20.2263.023; Wed, 18 Sep 2019 20:29:30 +0000
From: "Schönwälder, Jürgen" <J.Schoenwaelder@jacobs-university.de>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "kent+ietf@watsen.net" <kent+ietf@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>, "rifaat.ietf@gmail.com" <rifaat.ietf@gmail.com>
Thread-Topic: [netconf] crypto-types fallback strategy
Thread-Index: AQHVblyUVhFlbERW30moo9Q8WhnpJqcx4tAA
Date: Wed, 18 Sep 2019 20:29:30 +0000
Message-ID: <20190918202928.mqxdsuh3by3c4usl@anna.jacobs.jacobs-university.de>
References: <0100016d44bda220-51590a9a-0a15-4b63-a49d-47efe712e82e-000000@email.amazonses.com> <MN2PR11MB436617082A8308A7A8928DDFB58E0@MN2PR11MB4366.namprd11.prod.outlook.com> <0100016d4553e645-9c5796b8-15da-4a51-b820-5ecef6575eff-000000@email.amazonses.com> <20190918.220638.1382892184185166890.mbj@tail-f.com>
In-Reply-To: <20190918.220638.1382892184185166890.mbj@tail-f.com>
Reply-To: "Schönwälder, Jürgen" <J.Schoenwaelder@jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-clientproxiedby: PR0P264CA0206.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1f::26) To VI1P190MB0686.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:12e::7)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=J.Schoenwaelder@jacobs-university.de;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [2001:638:709:5::7]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 03559881-1ed6-4127-3c20-08d73c76e882
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1P190MB0496;
x-ms-traffictypediagnostic: VI1P190MB0496:
x-ms-exchange-purlcount: 1
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <VI1P190MB0496F29F7485E411D4600AC9DE8E0@VI1P190MB0496.EURP190.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 01644DCF4A
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39850400004)(376002)(136003)(396003)(366004)(189003)(199004)(316002)(6506007)(102836004)(6916009)(8676002)(486006)(14454004)(7736002)(86362001)(6512007)(81156014)(66946007)(66556008)(54906003)(6306002)(4326008)(81166006)(8936002)(786003)(6116002)(256004)(6246003)(66476007)(66446008)(2906002)(85182001)(85202003)(64756008)(46003)(43066004)(446003)(478600001)(476003)(99286004)(52116002)(71190400001)(3450700001)(76176011)(5660300002)(11346002)(71200400001)(25786009)(229853002)(305945005)(6436002)(386003)(6486002)(186003)(1076003)(777600001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1P190MB0496; H:VI1P190MB0686.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: jacobs-university.de does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: NT3LtDDag7Hc+IK331BLWgJ1LfNDbLe40Z3mecApMmHjEt/EcmAfjZ3sz0n4iZPGDpB8gF+Am+AQ3h0HRHwvL51dn13yL3Wfk8LNsAfn0AgeTlfkpXs3v4QurBqNKlPV/mWFt1b/EKlKoDHr5qI5dM2Sz9kSTz3QZcq0s9t+N+HX7HJic65UH6KQ8AeS2KH4Wif833ZEK6AVEbo/aCps2cdjJcFSKysZymA3jiYiwP3X1JNyo5xnw04OQQgaiJIlNZkt/5oh3K1GvUjF3HpNNS+e5wY5x9watdLpnamJo/TU9jwEBUrCYW9atB+qpU3kKrPzB8dEkF0lQ+Cc5cVe7weZn+YYp9kv2VMRyJ1+Ur5HNKvswS0lMbmYj4nPglqkarcvApa9X50jcu+x8mi4dNaRlwhCDTp95efnnT7RoSg=
Content-Type: text/plain; charset="utf-8"
Content-ID: <2FA6F8B5A136E04A9C37AE00BCEBB891@EURP190.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 03559881-1ed6-4127-3c20-08d73c76e882
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2019 20:29:30.2792 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: bggfJbWsQJcqrhgaMY6o+jruC4bHCtJ9zmC66HaHW5Ro1SBm1Jm1/vv2NQCOpdHYaN/M9NLayRitgp6rXFbd+Ade+DnFIZMwm7oquIn9gRg=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1P190MB0496
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/YCumyJHPsi1CmwMImc84wBXq1Ok>
Subject: Re: [netconf] crypto-types fallback strategy
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Sep 2019 20:29:36 -0000

On Wed, Sep 18, 2019 at 10:06:38PM +0200, Martin Bjorklund wrote:
> Kent Watsen <kent+ietf@watsen.net> wrote:
> > [moving Russ and Sean to BCC, per Rich's action]
> > 
> > 
> > 
> > > Minor: Does the “string” in the description above mean “ASCII string”
> > > or “binary string”, RFC 4251 seemingly uses both definitions?
> > 
> > I don't know, but this is the language found for the "key-data" leaf
> > in RFC 7317 (i.e., we've been living with this definition for awhile)
> 
> So the definition is:
> 
>              leaf key-data {
>                type binary;
>                mandatory true;
>                description
>                  "The binary public key data for this SSH key, as
>                   specified by RFC 4253, Section 6.6, i.e.:
> 
>                     string    certificate or public key format
>                               identifier
>                     byte[n]   key/certificate data.";
> 
> The textual representation of a binary in YANG is base64 encoded.  As
> it happens, this is exactly the same as OpenSSH uses for its keys.  So
> the open ssh key can be copy/pasted into the NC/RC XML/JSON.
>

My public ssh keys usually start like this:

  ssh-rsa AAAA...

Looking at RFC 4251, it seems to me that 'string' is encoded with a
length prefix, followed by n bytes of key data. This means the start
in hex would be something like this:

  00 00 00 07 73 73 68 2d 72 73 61

If I base64 encode this, I won't get what I quoted above.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>