Re: [Secdispatch] Ciphertext format draft

Yaron Sheffer <yaronf.ietf@gmail.com> Sat, 16 January 2021 22:13 UTC

Return-Path: <yaronf.ietf@gmail.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 A4EAF3A19F1 for <secdispatch@ietfa.amsl.com>; Sat, 16 Jan 2021 14:13:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.527
X-Spam-Level:
X-Spam-Status: No, score=-0.527 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MALFORMED_FREEMAIL=1.569, MIME_QP_LONG_LINE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 3Z59y91DAuhI for <secdispatch@ietfa.amsl.com>; Sat, 16 Jan 2021 14:13:52 -0800 (PST)
Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6610E3A11DB for <secdispatch@ietf.org>; Sat, 16 Jan 2021 14:13:52 -0800 (PST)
Received: by mail-wr1-x430.google.com with SMTP id d26so12837951wrb.12 for <secdispatch@ietf.org>; Sat, 16 Jan 2021 14:13:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :references:in-reply-to:mime-version; bh=BYXdSvctGhv2OzqjG0q3voLzCP5vodI4p5Q4/WMsAUU=; b=s/bKsyEfQhwOtpbmmoHjx8wEK4HT/PJgfifaQ0mn0o3At4ee7vhXqVDkfncpda/hoH jUMdlrZTfO7Q7ll+BldK3yaTm9t/O85q2MIiN8zKzLFoVB9OEcBYWqk1+OtEeVfaiNay QH1SOTDa3CPFTVkfonIwh9S1b7RRZHLpLFND/dtsQ5lpL/DiKZM+oOjTMFKJN7o/VHZF vz2KgFlORwx1zJmy0pBvrBhlnPoC4DYp1treRuym7uj+bc9KQGU70RG6CYIWhF753Thi k36Nd2elNIVf/OpkDovK3kfG6cnRgQjlupvlUoxvx7P8UtNlJoaLjZyucfpXLCFGDoOw tJdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:date:subject:from:to:cc:message-id :thread-topic:references:in-reply-to:mime-version; bh=BYXdSvctGhv2OzqjG0q3voLzCP5vodI4p5Q4/WMsAUU=; b=LMwocWDx9v/leWs5W4l04flFuZ45fP+oM43UZtKmFJdEWXV0tD9IIFw2P2K+SQpHCX O0M5DDE0maoCTFqeaBBdORKriQqzlmfzCC6EajtOZ/yJ2Hz7FurCJWaNS/pRNM9wFAnP tkYqV0bDvVQq0qgjMvlBApmlH4/pi+68o/5+Pm1KFMDz2xpkPRLWNe8d6b6hceBskrg5 jFgcEfdYWJGtKYEKtmiXGMu8e8UxLmisLE1WchtgpxwC2AOciUXfl3IIjeSu1pKESnVr 5Qa+JpbSUcnJ9ZM6TDrSzSM39J5ZtVkMC6Psrc97snBO/NCcS8iID6hIj1m1SCGqSRY0 j6eg==
X-Gm-Message-State: AOAM5315snFeq3z0aHpzVOmd2LfKHGrnPOgnXIoRUZFsVhUfGZTTXw0X SpvIOChlAmmxNzmMctFd7V0=
X-Google-Smtp-Source: ABdhPJzJeN7HxdHtjs1qLiw0KledYiT7+A4BTWIRNRy/fcorWIm7f2XCGbGnYslZG6oPBQTblnRHQw==
X-Received: by 2002:a5d:4e86:: with SMTP id e6mr19832336wru.33.1610835230965; Sat, 16 Jan 2021 14:13:50 -0800 (PST)
Received: from [192.168.68.105] (bzq-79-183-113-247.red.bezeqint.net. [79.183.113.247]) by smtp.gmail.com with ESMTPSA id h13sm19950115wrm.28.2021.01.16.14.13.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Jan 2021 14:13:50 -0800 (PST)
User-Agent: Microsoft-MacOutlook/16.45.21011103
Date: Sun, 17 Jan 2021 00:13:48 +0200
From: Yaron Sheffer <yaronf.ietf@gmail.com>
To: Russ Housley <housley@vigilsec.com>
CC: "Keselman, Gleb" <Gleb_Keselman@intuit.com>, IETF SecDispatch <secdispatch@ietf.org>, Yoav Nir <ynir.ietf@gmail.com>
Message-ID: <F5A7508D-E1B1-4DF5-ABF6-155F864C2F2B@gmail.com>
Thread-Topic: [Secdispatch] Ciphertext format draft
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>
In-Reply-To: <77529C17-9D2F-46A0-9F80-44227A71C5A0@vigilsec.com>
Mime-version: 1.0
Content-type: multipart/alternative; boundary="B_3693687229_1616701968"
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdispatch/m2jJLpCBzaCHOvN-s__P8l71pm0>
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: Sat, 16 Jan 2021 22:13:55 -0000

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>
Date: Friday, January 15, 2021 at 23:40
To: Yaron Sheffer <yaronf.ietf@gmail.com>
Cc: "Keselman, Gleb" <Gleb_Keselman@intuit.com>, IETF SecDispatch <secdispatch@ietf.org>, Yoav Nir <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> 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/

 

From: Russ Housley <housley@vigilsec.com>
Date: Friday, January 15, 2021 at 18:37
To: Yaron Sheffer <yaronf.ietf@gmail.com>
Cc: IETF SecDispatch <secdispatch@ietf.org>, "Keselman, Gleb" <Gleb_Keselman@intuit.com>, Yoav Nir <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> 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

 

_______________________________________________
Secdispatch mailing list
Secdispatch@ietf.org
https://www.ietf.org/mailman/listinfo/secdispatch

 

_______________________________________________
Secdispatch mailing list
Secdispatch@ietf.org
https://www.ietf.org/mailman/listinfo/secdispatch