Re: [jose] HTTP Request/Response using JWE with RSAES

Mike Jones <Michael.Jones@microsoft.com> Wed, 20 July 2016 07:03 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B711F12DAA6 for <jose@ietfa.amsl.com>; Wed, 20 Jul 2016 00:03:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.022
X-Spam-Level:
X-Spam-Status: No, score=-2.022 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 bpul3Ju6zNJM for <jose@ietfa.amsl.com>; Wed, 20 Jul 2016 00:03:14 -0700 (PDT)
Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0093.outbound.protection.outlook.com [104.47.40.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1614212D0DE for <jose@ietf.org>; Wed, 20 Jul 2016 00:03:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mzXDGGc3DD7EOXQ3qpskRsha67/dFp/q0/JLCrqzES4=; b=jn+ujO6kmGmdnjG29MEJZbA7UnPFolnZuKWZVth0g/Std3b/+obCrWXRz3h3UnNtV2XpbZE6Cj6D8qXtJJG3NqYZw00BGRqaxW95KpSkRNjIAShUhjznj8ytUJgztFMEdIzRe/TAuQHRZGet2sfkapC7ZNJhD5fMzsFs7JCMfRo=
Received: from SN1PR0301MB1645.namprd03.prod.outlook.com (10.162.130.139) by SN1PR0301MB1648.namprd03.prod.outlook.com (10.162.130.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Wed, 20 Jul 2016 07:03:11 +0000
Received: from SN1PR0301MB1645.namprd03.prod.outlook.com ([10.162.130.139]) by SN1PR0301MB1645.namprd03.prod.outlook.com ([10.162.130.139]) with mapi id 15.01.0544.014; Wed, 20 Jul 2016 07:03:11 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Matt David <matt@netki.com>, "jose@ietf.org" <jose@ietf.org>
Thread-Topic: [jose] HTTP Request/Response using JWE with RSAES
Thread-Index: AQHR4hE0wGBoof3lP0ykCHnOMQhX7aAg5Nqw
Date: Wed, 20 Jul 2016 07:03:11 +0000
Message-ID: <SN1PR0301MB16458D425AECF279D012076AF5080@SN1PR0301MB1645.namprd03.prod.outlook.com>
References: <DAC087D1-B314-4383-9881-0ECED2769DF4@netki.com>
In-Reply-To: <DAC087D1-B314-4383-9881-0ECED2769DF4@netki.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Jones@microsoft.com;
x-originating-ip: [217.110.245.66]
x-ms-office365-filtering-correlation-id: 2691012e-b10e-4d93-370f-08d3b06be95b
x-microsoft-exchange-diagnostics: 1; SN1PR0301MB1648; 6:anbuCgcPCSeMYYh4yRmlzsMh7hLbBIp06HN8f+/KvY2MC8Qo1rQ6C5W0d83Bbs8ycowsvWB9GiFBZmTYYi76vLCamTliAnDd25Ua2k4UlzZo9n6/dOYEHGAybqVur7JwYlFXU8CX+JeE1eWPtrQOjCN29rhC2U4X5ZL8xgOfE5K+awv1KarOQ+c0TC+ChryYv4UY+WoTMKwRgfzR+v+obOdW2Dds2Y3bv/ug9Qy/rmNWrXqkKtKx/lL5cz431O3JqEK82LSq6WxDbBMKzY7uuKGznvOUF4ZTb2Q1vjLZzDwwAHK23WqUzb4mw9+25mMj994Ur417PKMWsU3ChHKX2Q==; 5:bY37GVcEfz8G4iupNI0GlgGk5gLMqGqSgj0en0DsEHblwBeqVRri7ehoMlH0d8AgdzJk4/PMOHnDt08x0ZEnfm9h+N5g9SdGKZAYUEaeRq9JTyg6vbYxMaX2VbZIHgi1lw8QNAnjVuRDikRR89W/Jw==; 24:7XnoJ6BoecnW5b9w8XhsMnZdt8bluy9/HcPEk/15uijXHlgLzUc5Rcb43hzGBoxLAAGeT1w4sTIQEP/zitVZoU0ziu3PIqrKouERw+zOTSM=; 7:BN8oNq+P5Z2gy49x7lpLKIWjV6tsrzzB4QmnUBjMzif1O/pXuteOQWFBhz9fZHzREJ0ZoyvlYxwOep2cKX9KcaJjdhrFK/lRPzE/zvC9VUfruSeA1XgzPIkjrVTYn6TOKP+hulgrm0Z31hstaDarOfT0XaZITlqzMhUpP9CR9SNfIBvTd2tXDQ64ecr50W/e5lx/7rNlasCFWolDxhsqJoJMqBxHKsdZNh3Z8mYYUzOAo5r9l4J01eugbitGia0m
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1648;
x-microsoft-antispam-prvs: <SN1PR0301MB164800FBF57DDBE46401B439F5080@SN1PR0301MB1648.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(61426038)(61427038); SRVR:SN1PR0301MB1648; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0301MB1648;
x-forefront-prvs: 000947967F
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(377454003)(13464003)(53754006)(199003)(189002)(3660700001)(3280700002)(122556002)(86362001)(586003)(3846002)(102836003)(19580395003)(19580405001)(87936001)(92566002)(76576001)(33656002)(86612001)(68736007)(66066001)(105586002)(97736004)(11100500001)(9686002)(7846002)(6116002)(7696003)(5003600100003)(7736002)(81156014)(10290500002)(2501003)(77096005)(101416001)(15975445007)(107886002)(189998001)(74316002)(2900100001)(81166006)(305945005)(50986999)(5005710100001)(10400500002)(8676002)(8990500004)(76176999)(5001770100001)(2950100001)(54356999)(5002640100001)(8936002)(99286002)(106116001)(106356001)(10090500001)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR0301MB1648; H:SN1PR0301MB1645.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2016 07:03:11.0598 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1648
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/Rww88zkmX_m4dqLLfFLrINQndaw>
Subject: Re: [jose] HTTP Request/Response using JWE with RSAES
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jul 2016 07:03:17 -0000

There are many example JWEs both in the appendices of RFC 7516 at https://tools.ietf.org/html/rfc7516#appendix-A and throughout RFC 7520 https://tools.ietf.org/html/rfc7520.  I'd suggest having a look at those.

				-- Mike

-----Original Message-----
From: jose [mailto:jose-bounces@ietf.org] On Behalf Of Matt David
Sent: Wednesday, July 20, 2016 12:59 AM
To: jose@ietf.org
Subject: [jose] HTTP Request/Response using JWE with RSAES

Hey all,

I'm working on a module for Flask that allows it to use JWE as a quick plugin. In my testing, I've run into a situation where I'm using RSAES (RSAES-OAEP, RSAES-1_5) and I want to return a JWS. It seems like there could be 2 ways of going about this, but I don't believe that the RFC addresses it:

1. RSAES one way, CEK-only on the way back 2. RSAES two way, with an EPK included on the originator's JWE sent to the remote end

I like #2 myself because it uses a fresh CEK for each part of the request / response.

It's possible I'm missing something in the RFC, but I'm still unable to find it after reading through it a few times, especially because EPK is specified only for use with ECDH-ES algorithms.

Best,

- Matt
_______________________________________________
jose mailing list
jose@ietf.org
https://www.ietf.org/mailman/listinfo/jose