Re: [Secdispatch] Ciphertext format draft

Russ Housley <housley@vigilsec.com> Sun, 17 January 2021 17:59 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: secdispatch@ietfa.amsl.com
Delivered-To: secdispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F297E3A12C9 for <secdispatch@ietfa.amsl.com>; Sun, 17 Jan 2021 09:59:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] 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 kqdraixA0fHQ for <secdispatch@ietfa.amsl.com>; Sun, 17 Jan 2021 09:59:54 -0800 (PST)
Received: from mail.smeinc.net (mail.smeinc.net [209.135.209.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C972C3A12C7 for <secdispatch@ietf.org>; Sun, 17 Jan 2021 09:59:53 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mail.smeinc.net (Postfix) with ESMTP id 61669300B84 for <secdispatch@ietf.org>; Sun, 17 Jan 2021 12:59:51 -0500 (EST)
X-Virus-Scanned: amavisd-new at mail.smeinc.net
Received: from mail.smeinc.net ([127.0.0.1]) by localhost (mail.smeinc.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VgRwIBtQcMre for <secdispatch@ietf.org>; Sun, 17 Jan 2021 12:59:46 -0500 (EST)
Received: from a860b60074bd.fios-router.home (pool-141-156-161-153.washdc.fios.verizon.net [141.156.161.153]) by mail.smeinc.net (Postfix) with ESMTPSA id BDAC3300AE5; Sun, 17 Jan 2021 12:59:46 -0500 (EST)
From: Russ Housley <housley@vigilsec.com>
Message-Id: <1AB484F5-1900-41E2-97AB-5333C36CE191@vigilsec.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_64CC4AB5-D73A-4EBF-9340-DE2BBF8CED16"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\))
Date: Sun, 17 Jan 2021 12:59:48 -0500
In-Reply-To: <3CFBC5E4-1261-4635-931B-BB090E8AB881@gmail.com>
Cc: "Keselman, Gleb" <Gleb_Keselman@intuit.com>, Yoav Nir <ynir.ietf@gmail.com>, IETF SecDispatch <secdispatch@ietf.org>
To: Yaron Sheffer <yaronf.ietf@gmail.com>
References: <8B46C11A-790A-4E8E-A7A1-8FE97E2DD9A7@contoso.com> <523854C0-3D2B-4565-A6FF-8DF46EBD88A2@vigilsec.com> <3C9F29DF-CDA6-48BA-B94E-5CCE63E4AA57@gmail.com> <77529C17-9D2F-46A0-9F80-44227A71C5A0@vigilsec.com> <F5A7508D-E1B1-4DF5-ABF6-155F864C2F2B@gmail.com> <1721133D-89C3-435D-9B0D-BA362A4B1242@vigilsec.com> <3CFBC5E4-1261-4635-931B-BB090E8AB881@gmail.com>
X-Mailer: Apple Mail (2.3445.104.17)
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdispatch/ijQIMchGjzeL1X6UN-ffAC70luM>
Subject: Re: [Secdispatch] Ciphertext format draft
X-BeenThere: secdispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Dispatch <secdispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdispatch/>
List-Post: <mailto:secdispatch@ietf.org>
List-Help: <mailto:secdispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2021 17:59:57 -0000

Yes, that would allow people to do it the same way.

Russ

> On Jan 17, 2021, at 11:39 AM, Yaron Sheffer <yaronf.ietf@gmail.com> wrote:
> 
> Hi Russ,
>  
> NIST 800-38D speaks of a single AAD input, not multiple. Thus we have a single AAD field in the format. An application can obviously concatenate multiple inputs into this field, and we could add instructions how to do it securely. Would that address your comment?
>  
> Thanks,
>                 Yaron
>  
> From: Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com>>
> Date: Sunday, January 17, 2021 at 18:10
> To: Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>>
> Cc: "Keselman, Gleb" <Gleb_Keselman@intuit.com <mailto:Gleb_Keselman@intuit.com>>, Yoav Nir <ynir.ietf@gmail.com <mailto:ynir.ietf@gmail.com>>, IETF SecDispatch <secdispatch@ietf.org <mailto:secdispatch@ietf.org>>
> Subject: Re: [Secdispatch] Ciphertext format draft
>  
> Yaron:
>  
> Binding the plaintext fields to the ciphertext ones is important, but it requires knowledge such as the ordering that is not expressed in the format.  That would be useful.
>  
> Russ
> 
> 
>> On Jan 16, 2021, at 5:13 PM, Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>> wrote:
>>  
>> Hi Russ,
>>  
>> In the example in the document, the database primary key (e.g. customer’s email address) is included as AAD for all the fields that are encrypted for that customer. This prevent an attacker who can modify the database (but has no access to keys) from moving encrypted fields from one customer to another. Decryption of such moved fields would fail.
>>  
>> Note that in this use case, the AAD does NOT need to be stored explicitly, because it is a duplicate of data in other (plaintext) fields.
>>  
>> Quoting the blog: “EncryptionContext should include all of the information associated with the ciphertext that you will later need to interpret it. A good rule is to always include at least enough information to uniquely identify the location of the ciphertext (for example, a URI, file path, or database table and primary keys).”
>>  
>> Thanks,
>>                 Yaron
>>  
>> From: Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com>>
>> Date: Friday, January 15, 2021 at 23:40
>> To: Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>>
>> Cc: "Keselman, Gleb" <Gleb_Keselman@intuit.com <mailto:Gleb_Keselman@intuit.com>>, IETF SecDispatch <secdispatch@ietf.org <mailto:secdispatch@ietf.org>>, Yoav Nir <ynir.ietf@gmail.com <mailto:ynir.ietf@gmail.com>>
>> Subject: Re: [Secdispatch] Ciphertext format draft
>>  
>> Yaron:
>>  
>> The document does not saqy anything about what might go in the AAD field.  I know what it is, and I know how it is used in packet protocols.  But how is it used in this database context?
>>  
>> Russ
>> 
>> 
>> 
>>> On Jan 15, 2021, at 3:23 PM, Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>> wrote:
>>>  
>>> Hi Russ,
>>>  
>>> I’m not sure what you are asking re: AAD. This is a single octet-string input to AES-GCM (NIST SP 800-38D, Sec. 5.2.1.1, as well as RFC 5116). Or did you mean: what is the use case for AAD when encrypting data at rest? Amazon uses AEAD in their KMS SDK, and published [1] a nice blog showing how it can be used to bind ciphertext to its context in order to prevent cut-and-paste attacks.
>>>  
>>> In our main use case, the data is structured with a well defined schema (a.k.a., SQL database). So “content type” doesn’t make sense. This is early days for the format and people will surely come up with other use cases.
>>>  
>>> Thanks,
>>>                 Yaron
>>>  
>>> [1] https://aws.amazon.com/blogs/security/how-to-protect-the-integrity-of-your-encrypted-data-by-using-aws-key-management-service-and-encryptioncontext/ <https://aws.amazon.com/blogs/security/how-to-protect-the-integrity-of-your-encrypted-data-by-using-aws-key-management-service-and-encryptioncontext/>
>>>  
>>> From: Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com>>
>>> Date: Friday, January 15, 2021 at 18:37
>>> To: Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>>
>>> Cc: IETF SecDispatch <secdispatch@ietf.org <mailto:secdispatch@ietf.org>>, "Keselman, Gleb" <Gleb_Keselman@intuit.com <mailto:Gleb_Keselman@intuit.com>>, Yoav Nir <ynir.ietf@gmail.com <mailto:ynir.ietf@gmail.com>>
>>> Subject: Re: [Secdispatch] Ciphertext format draft
>>>  
>>> Yaron:
>>>  
>>> How do you see AAD being used? 
>>>  
>>> Also, CMS carries a field that tells how to parse the plaintext (the content type) after it obtained by decryption.  I cannot tell whether that is useful or in you use case, but I can imagine places where it would be very helpful.
>>>  
>>> Russ
>>> 
>>> 
>>> 
>>> 
>>>> On Jan 15, 2021, at 9:53 AM, Yaron Sheffer <yaronf.ietf@gmail.com <mailto:yaronf.ietf@gmail.com>> wrote:
>>>>  
>>>> Hi, we just submitted draft-sheffer-ietf-ciphertext-format-01 [1]. This is a CBOR-based set of headers for encrypted data, with the goal of enabling automation of large datasets that contain encrypted data, typically interspersed with plain data. Specifically we want to facilitate discovery of encrypted data (e.g., this database column contains ciphertext) and attributing this data back to the service that created the data and the key that was used to encrypt it.
>>>>  
>>>> We received good feedback on the SAAG list to change from generic TLV to CBOR, which we implemented in -01.
>>>>  
>>>> The authors would appreciate this list’s feedback regarding next steps.
>>>>  
>>>> Thanks,
>>>>                 Yaron
>>>>  
>>>> [1] https://tools.ietf.org/id/draft-sheffer-ietf-ciphertext-format-01.xml <https://tools.ietf.org/id/draft-sheffer-ietf-ciphertext-format-01.xml>
>>>>  
>>>> _______________________________________________
>>>> Secdispatch mailing list
>>>> Secdispatch@ietf.org <mailto:Secdispatch@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/secdispatch <https://www.ietf.org/mailman/listinfo/secdispatch>
>>>  
>>> _______________________________________________
>>> Secdispatch mailing list
>>> Secdispatch@ietf.org <mailto:Secdispatch@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/secdispatch <https://www.ietf.org/mailman/listinfo/secdispatch>
>>  
>> _______________________________________________
>> Secdispatch mailing list
>> Secdispatch@ietf.org <mailto:Secdispatch@ietf.org>
>> https://www.ietf.org/mailman/listinfo/secdispatch <https://www.ietf.org/mailman/listinfo/secdispatch>