Re: [Cfrg] [jose] Fwd: Question from JOSE working group

"Richard L. Barnes" <> Mon, 02 July 2012 18:34 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1426911E80D1 for <>; Mon, 2 Jul 2012 11:34:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id U70tIKdM7viM for <>; Mon, 2 Jul 2012 11:34:34 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 4792911E80F1 for <>; Mon, 2 Jul 2012 11:34:34 -0700 (PDT)
Received: from ([]:63231) by with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from <>) id 1SllSI-0006eV-QY; Mon, 02 Jul 2012 14:34:38 -0400
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset="us-ascii"
From: "Richard L. Barnes" <>
In-Reply-To: <>
Date: Mon, 02 Jul 2012 14:34:38 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <>
To: Ben Adida <>
X-Mailer: Apple Mail (2.1278)
Subject: Re: [Cfrg] [jose] Fwd: Question from JOSE working group
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 02 Jul 2012 18:34:35 -0000

[Redirecting this back to CFRG]

I appreciate what you're trying to do, but I'm not sure it's really possible, and in any case, integrity-protecting parameter values doesn't accomplish it.  

Even with parameter integrity protection, the recipient of the object has to use the parameters before he knows whether they're valid.  So an attacker can still cause the recipient to go down an alternate code path, it's just that at the end, the recipient will realize he's gone down the wrong path.  In other words, getting to your "(1) error" case already involves going down the wrong processing path.


On Jul 2, 2012, at 2:21 PM, Ben Adida wrote:

> My take: yes, there is value. The crypto parameters will trigger different processing on the payload, and that *might* be usable, by some crafty cryptanalyst, as an oracle.
> It would be more conservative (and thus safer) to follow one rule: there are only two execution paths that can be triggered by the recipient of a crypto blob. (1) error, or (2) processing of payload according to authenticated sender's specifications.
> -Ben
> On 7/2/12 11:07 AM, Richard L. Barnes wrote:
>> FYI, trying to recruit some additional crypto expertise on this question.
>> --Richard
>> Begin forwarded message:
>>> From: "Richard L. Barnes"<>
>>> Subject: [Cfrg] Question from JOSE working group
>>> Date: July 2, 2012 2:00:11 PM EDT
>>> To:
>>> Dear CFRG,
>>> This is a request for input on a crypto question that has come up in the JOSE working group.
>>> The question is whether there is any benefit to applying integrity protection to cryptographic parameters attached to a signed/authenticated/encrypted object.  By "cryptographic parameters" here, I mean public keys, wrapped symmetric keys, algorithm identifiers, etc.
>>> For historical background:
>>> CMS does not provide parameter protection [RFC5652].  The content that is signed / authenticated / encrypted is precisely the protected content (eContent).  Optionally, an application may add signed attributes.  In the case of SignedData and AuthenticatedData, if signed attributes are present, then they must include the message digest that was signed or authenticated; not a parameter, but an intermediate result.
>>> IKE and TLS does not provide integrity protection for parameters [RFC4306][RFC5246].  Algorithm negotiation is done in parallel with key agreement in the initial phase of IKEv2   Algorithm negotiation in TLS is done in the ClientHello / ServerHello messages, which are sent before the secure channel is established.  When TLS client certificates are used, the client demonstrates its possession of the relevant private key by signing the handshake messages, which provides an integrity check on cryptographic parameters as a side-effect.  However, the parameters for this signature (the public key and signature/hash algorithms) are not protected.
>>> PKIX is an intermediate case.  The signature algorithm used to sign / verify the certificate is included in the certificate body (under the signature) as well as ouside the signature.
>>> Back to today:
>>> The current draft specifications for JOSE [JWS][JWE] require integrity protection for parameters.  The creator of an object constructs a "header" value including the cryptographic parameters used to generate the object.  This header value is prepended to the protected content before the content is signed / authenticated (JWS), or attached as "Associated Data" to the encrypted content (JWE).  (JWE only allows AEAD algorithms.)
>>> So the questions for this group are the following:
>>> -- Does applying integrity protection to cryptographic parameters result in a meaningful increase the security of an secure object format?
>>> -- What are the classes of attack that this integrity protection would address?
>>> -- Does parameter protection create any additional security vulnerabilities?
>>> Any input would be very helpful for the group to decide on a way forward.
>>> Thanks a lot,
>>> --Richard
>>> [RFC5652]<>
>>> [RFC4306]<>
>>> [RFC5246]<>
>>> [RFC5280]<>
>>> [JWS]<>
>>> [JWE]<>
>>> _______________________________________________
>>> Cfrg mailing list
>> _______________________________________________
>> jose mailing list
> _______________________________________________
> jose mailing list