Re: [COSE] Using RSA Algorithms with COSE Messages

Ilari Liusvaara <ilariliusvaara@welho.com> Sun, 08 January 2017 10:29 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B625A126D73 for <cose@ietfa.amsl.com>; Sun, 8 Jan 2017 02:29:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.099
X-Spam-Level:
X-Spam-Status: No, score=-5.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-3.199] autolearn=ham autolearn_force=no
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 AXYghJxzDY2Z for <cose@ietfa.amsl.com>; Sun, 8 Jan 2017 02:29:31 -0800 (PST)
Received: from welho-filter4.welho.com (welho-filter4.welho.com [83.102.41.26]) by ietfa.amsl.com (Postfix) with ESMTP id 574741293E3 for <cose@ietf.org>; Sun, 8 Jan 2017 02:29:30 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id 7C0D8180F4; Sun, 8 Jan 2017 12:29:29 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new, port 10024) with ESMTP id 0SF9-RiD_ElC; Sun, 8 Jan 2017 12:29:28 +0200 (EET)
Received: from LK-Perkele-V2 (87-92-51-204.bb.dnainternet.fi [87.92.51.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp2.welho.com (Postfix) with ESMTPSA id A0729283; Sun, 8 Jan 2017 12:29:28 +0200 (EET)
Date: Sun, 08 Jan 2017 12:29:17 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Message-ID: <20170108102917.GA9896@LK-Perkele-V2.elisa-laajakaista.fi>
References: <BN3PR03MB23552CD0BEDEAA35E0705791F56D0@BN3PR03MB2355.namprd03.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <BN3PR03MB23552CD0BEDEAA35E0705791F56D0@BN3PR03MB2355.namprd03.prod.outlook.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/gjFPy0JCwpZTepbFcWwZ_qrbkgs>
Cc: "cose@ietf.org" <cose@ietf.org>
Subject: Re: [COSE] Using RSA Algorithms with COSE Messages
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Jan 2017 10:29:34 -0000

On Sat, Dec 31, 2016 at 09:27:36PM +0000, Mike Jones wrote:
> The specification Using RSA Algorithms with COSE Messages<https://tools.ietf.org/html/draft-jones-cose-rsa-01> defines encodings for using RSA algorithms with CBOR Object Signing and Encryption (COSE)<https://tools.ietf.org/html/draft-ietf-cose-msg-24> messages.  This supports use cases for the FIDO Alliance and others that need this functionality.  Security Area Director Kathleen Moriarty has agreed to AD sponsorship of this specification.  This specification incorporates text from draft-ietf-cose-msg-05 - the last COSE specification version before the RSA algorithms were removed.
> 
> The specification is available at:
> 
>   *   https://tools.ietf.org/html/draft-jones-cose-rsa-01
> 
> An HTML-formatted version is also available at:
> 
>   *   http://self-issued.info/docs/draft-jones-cose-rsa-01.html
> 
> Review feedback is welcomed!

Just as a note, I impilemented the key storage format (for a test
of one feature[1] in TLS lib I'm working on).

Supported fields: 1 (value must be 3), 2 (ignored), 3 (-37, -38
and -39 only if present), 4 (must cotain 1 if present), -1 to -8
(all required), all others trigger an error (and also unexpected
types for known fields)..

~450 lines of Rust code[2], including CBOR/key parsing, public key
export and lowering signing requests to Ring (a BoringSSL fork
with Rust API).


[1] Extensible support for keypair formats.

[2] The binary (.so) size is quite big (~1.4MB) due to static
linkage of Rust standard library and RSA signing code from Ring.


-Ilari