Re: [lamps] [EXTERNAL] Re: AD review of draft-ietf-lamps-cms-kemri-05

Mike Ounsworth <Mike.Ounsworth@entrust.com> Fri, 27 October 2023 18:32 UTC

Return-Path: <Mike.Ounsworth@entrust.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0324BC14CE30 for <spasm@ietfa.amsl.com>; Fri, 27 Oct 2023 11:32:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.104
X-Spam-Level:
X-Spam-Status: No, score=-7.104 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=entrust.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nH9-GEv6w4Qb for <spasm@ietfa.amsl.com>; Fri, 27 Oct 2023 11:32:47 -0700 (PDT)
Received: from mx07-0015a003.pphosted.com (mx07-0015a003.pphosted.com [185.132.183.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8CB7DC14CF1B for <spasm@ietf.org>; Fri, 27 Oct 2023 11:32:46 -0700 (PDT)
Received: from pps.filterd (m0242864.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39RDMba0002253; Fri, 27 Oct 2023 13:32:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=entrust.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=mail1; bh=XVyaJFEBO3FMCBMNXO1fEdCl ptKocUtK1Xfh003RlQU=; b=OsJ76U5nLZQ1rZNbZlYt3PNT4NY54jaHs2IxnOoF 3g+UKp8jQZSaQYyFXxLJha7A93PA8Dba+FytujWtIZJ4ua7Ky3+rl3hqElRfYbti Wp/5tF2IXC/KmC0aGzK8lGZuQqrKLDpH2LvQ73Fk7kC9hTbWeHXFNgmrjOGuZvFq niAN29RoPd73Mfe5kGcAVRo/WhAi8uTrPmmjTezKdK5Am9m+Ft3+zMYhrnY9O36O B81p+WvYlBfn97e9POPccbgu4jXQg96MeAijyAAe9yf4RWnMTcDAtvfDPcCSjPYR 980N2mMzc8P1ffh1wvx7sgAGF0IAKoUyH+iXDLpQNVTn6A==
Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 3tywsrvdm3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Oct 2023 13:32:37 -0500 (CDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m7dgz+pyz4pSzwhfvPgU8T6B0nv3s7lKe5qhoOoFa8H7VUAljicR7qcBiW6/TYXNkD6xjQxC0m9ejDEa+4zFeJLaVJB6zOHOtXgxPQBC/MFvV0pUP5S+S8xCCrFIhhBvrYPoH+ISXsBTi2L1pcCtE4mIZckY5Xcb+5aihpPYybD4j2VB1/y6NW309mW9qJSZvc8SQFf96Jwl/DkAMqWYj0m0cHzHJ5Ylnc1pl0blLyVfSBiVucmWUwickCgH3I86J2UCWVlUhdvK6ADl9RFXLFGs/nP34U+uNyuuqGG3RxUPWsFKd8NYR91Sq4o4mnBgU3ARLGaMpSkSJ1yKRxVsTA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XVyaJFEBO3FMCBMNXO1fEdClptKocUtK1Xfh003RlQU=; b=h8oOiyb6qGNIvNwCtpbSa3eImkJE640jd+pSaG6hG7elkA9/ITVpr/P0/0j7kTmuB0uEWKeSVlJkJHMmXBtkYlO4WmIAQysuFKRmoqime5eL1g5H9jlWXEZe1WDHrAIZxze8isvT/Sb87TiO5Imi9z2pugrdISFLrW4/86BdjbSOypu1LcqegJpzWkUIla82zoc471F7A6QKClsqkJkvPc/1UTKUJFaYdRqkFz/ieECILV9zFEgFTEySlQkLpPvN7r4mX+KRJ+WW6rw5QsN42r8exk4jiXV5A80RaWSJMxxuOZG+XRf1VZUhm7oy1GoegLcUlkVBfuZxkaGc2ZDM+w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=entrust.com; dmarc=pass action=none header.from=entrust.com; dkim=pass header.d=entrust.com; arc=none
Received: from CH0PR11MB5739.namprd11.prod.outlook.com (2603:10b6:610:100::20) by DS7PR11MB7905.namprd11.prod.outlook.com (2603:10b6:8:ed::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.24; Fri, 27 Oct 2023 18:32:32 +0000
Received: from CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::9154:8630:8db3:6f4d]) by CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::9154:8630:8db3:6f4d%6]) with mapi id 15.20.6933.024; Fri, 27 Oct 2023 18:32:32 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: Russ Housley <housley@vigilsec.com>, Falko Strenzke <falko.strenzke@mtg.de>
CC: "Roman D. Danyliw" <rdd@cert.org>, LAMPS <spasm@ietf.org>, Johannes Roth <Johannes.roth@mtg.de>
Thread-Topic: [EXTERNAL] Re: [lamps] AD review of draft-ietf-lamps-cms-kemri-05
Thread-Index: Adn8fCQLn4c/qGUNRIaFuEF380WXZQJ+cAiAAI8zPoAADLOVAAAHVX7w
Date: Fri, 27 Oct 2023 18:32:32 +0000
Message-ID: <CH0PR11MB573936514CAAA751823C37A99FDCA@CH0PR11MB5739.namprd11.prod.outlook.com>
References: <PH1P110MB1116F6A57FF36BF7A2D8991ADCCCA@PH1P110MB1116.NAMP110.PROD.OUTLOOK.COM> <6b815a8d-7ff9-49fd-8339-418b2d7d62c1@mtg.de> <7d796f7e-3743-4691-a5bd-5d2cbb90741c@mtg.de> <EB0F6E23-0D11-4AEC-9CFC-7025E3AF8B86@vigilsec.com>
In-Reply-To: <EB0F6E23-0D11-4AEC-9CFC-7025E3AF8B86@vigilsec.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH0PR11MB5739:EE_|DS7PR11MB7905:EE_
x-ms-office365-filtering-correlation-id: 9a599515-eef6-4b93-aa69-08dbd71b1517
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: iovkTGP5AouLCxVPnYdXOJw9acDG1tYLkydOeFRnZ88uCvXt3rmi7y9uqvVUpRRKqhbX8EdGNJ8Km06JLcrhOma8rHpbZzS948FS0nmo1bvYdoFiBEILSoMgGg1c0yGlQC98SgWRiLRSWzLcDUMvTQXKywtB2xgtlSTzx2aC08/NhZrGJ5tRvXOXweo9czPcR+DJpOh7tr+FmHyOPItfdKk/NPbFzESIMM6kfQ0VYrOkfIfWwLJZwDboIE/q4oJxgsecazRojpHRBBKkWo9q7DpvmvtW1hohhMbJS+kDgSq1n/unbX3BDCb9PQdyk3/iEXkKcD9ZBbmcRVtQYfwZ6Fj5DiHK+vBssBGZQOqwc2geWXLcrDblUcZLYiXPYargkRMYG3ZxZrH3GJblTrU0iACeBu1fK+R63N0fVv/p9mGXCVi4PygI3No7/3a/6wSMAwFfgQJQMi8oFlNqgL/VlMhUy1qQtk/MZuYWsk82QqoTVKq8p9OayH1zxOb3jvuzZWPsu9QIygeFin6Tdui9ZtPNAOONfQa6JCS03P4OuZ/B1zok99qkEL9K69YOQeyn3gYoIuY41YN1sYK4h9hzJ2ULZgA3RAERcK3+9cI5B0cN+phh756adwaX2K6w/QZcO+vQotx2EmNEI57S3wo9HcV/sk0eb9d3yNxwV/ZIJ/wkwW7KTyEDTOoXUM+2sWhp
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR11MB5739.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(136003)(346002)(39850400004)(396003)(366004)(230173577357003)(230273577357003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(55016003)(9686003)(26005)(53546011)(6506007)(7696005)(71200400001)(478600001)(66574015)(83380400001)(30864003)(2906002)(41300700001)(110136005)(5660300002)(66476007)(66556008)(76116006)(66946007)(4326008)(52536014)(8676002)(8936002)(966005)(66446008)(316002)(64756008)(54906003)(38100700002)(166002)(122000001)(86362001)(33656002)(38070700009)(66899024); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: U3ujlFX9JUYFT7VQbGTH0yov/RgxfzrS5S+RvRRtuf56PCT5HDtm8WHLHBRZsTtE7X6FVS+rWBPuXUcEKL3It06rYaaaepDgjZSa3HloxF+GzGxkLePVgppaiZEde65tNQNr589cMR295gHgtz6qR3V3XWtGgcMoDdZw1d6rCAJ1I9789Phg4PUbLQNiACdaxFPl4jovEMZY/UXrmqkI9hX607DqelDoykEdjizbMFH6RCsnwp4+Uakv8IZcMT/gdc6y1zXSY7vKOkeE7A2RH0e/uGbzKJA4tIS33K6U9OOzWO0VEriMCA+3I0Iekxv5tUdeHklVCB1iQYJed0SVmBugDYPzGhVI8kUFj70ud/pWOFLDcpfyGuwLh/tCiJ4greluiZNTVNxKHS8GILFB8MdGIUFubQ0qW4ptzo87J/+wfHqTe5zLsZlv/h8r/EMO6GQYSgJFN8xcdYKgR00P/FFjIMC7pslsx7VkAxbI3jdNDJzpb7Wny99WYPU1CMliWBRNLC5rd7HIB54jMo+mruHn3qIz4OAqGmvGfyXy+XdJcg7JroEiNjr++SInnpsztLKfpQ2Su/GfzOqVyoK84zkrt8mxAS4qAtJvuMGrqM2sAqaMbGdk10Sgp8si06jVcgZo8RkNCz3sD0mp/y3UGgb6VeboOTryTWZlR1tg3SL3G97f5O1LJfjujhiPT/yelTw4mc/Rc5srJkZU20TjZNpkVBx6rjgbWcAnsnwbipnJOOKxNILKZGiuBqcWJ3zrFCLPn/rLsJn1F427qAz6zHJPi48l5/7OnzERpka0t1uW5thsJ1Cfp9tjo9oPVTBWqI+7hqZPvB4SdZ2A4gayDjefTUsTyy7eaFVfGknIuxnbOzpar9pgzTp5B8QuBQHoIw/DlOqJhYQMEgDd8iyo9hZLr2Ypz0c1DRGGT6IpH/LE7okI8xKZT8JfUOThsruOnIAuxz/B+4y83EWxcNBl/PqZJKS5lNpO4w4qnbzOk2j9izqY1fMaJ6xTgW76v/1m0rUOXh9rX+H03ab5FdVVdxc1qKeh3ModD5wWE/xm4ZTQh2L4mukbjZ1EjHSKcfgKck9VTlUhAYsBgILkS+cL2mIbsjfz8xMGfCfBF8EWDBFCJ1o2q3yExO5yTGRcSJ3Eu7/ZQtVQEXz2nfMTHw/bnDjcGOK47/lLWYyGYfrKkrcoplY1auE/2GPvU4gCug/DxVRRjJSk87EpWKG+zhXcqSmPWpmXmkOEYq/omISm9bEMfJuBcHeWoC7hsSh/bMVJxZFqNiFvBqPn3ESqAexAV/HkVpT14Iq8c4GmzAPhn6/eJvjlp3y3+uTwvm8GTkg3ohmnFyhHHk75uNWrYd3YeS4hY9OKiIgiqHh27pmJ+wbEmNeYhtK53++GYckzvk4TYU5xJrVC6v+y8UyO5aiQyOG8w4ASvqBKEbtTrhj1yRUl65xblg2Wmx2K7XIJQXiPz/CyF2FbVxU8DZqMyljV9N2KhsbjlLiL8/5BtpFXPSEz14xHOrWs0q9/i2vSsqBoIRUbgzVsvT22awtwL0V78FIlYpPZVmNRwvB2+uEBVypiCrMVuVc1k/a8lhaueKGD/ux3c6suT2Fhfx+vbBCmYA==
Content-Type: multipart/alternative; boundary="_000_CH0PR11MB573936514CAAA751823C37A99FDCACH0PR11MB5739namp_"
MIME-Version: 1.0
X-OriginatorOrg: entrust.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH0PR11MB5739.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9a599515-eef6-4b93-aa69-08dbd71b1517
X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2023 18:32:32.0490 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f46cf439-27ef-4acf-a800-15072bb7ddc1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: w8ilSWbvgyt2Z/QGQiTmsfdSdaKzlqPRKa2fuk7xmkrQlcwL2uRRJPtZaP3PHNHWiGuszYy0e32B3toe67wKkaduUaT27ronjvczcWBocII=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7905
X-Proofpoint-ORIG-GUID: VPDbg9Dv2z9uABxfvsLlDSkth017_STZ
X-Proofpoint-GUID: VPDbg9Dv2z9uABxfvsLlDSkth017_STZ
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-27_18,2023-10-27_01,2023-05-22_02
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 impostorscore=0 clxscore=1011 bulkscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2310240000 definitions=main-2310270161
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/vMLjYa4nysJThbl_PttEtZjsrD4>
Subject: Re: [lamps] [EXTERNAL] Re: AD review of draft-ietf-lamps-cms-kemri-05
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2023 18:32:52 -0000

Pausing WGLC to study this seems prudent.

If I’m reading the draft correctly, currently the KEK is derived from an HKDF which includes in its input the DER-encoded value of:

      CMSORIforKEMOtherInfo ::= SEQUENCE {
        wrap KeyEncryptionAlgorithmIdentifier,
        kekLength INTEGER (1..65535),
        ukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }

Falko and Johannes are proposing to also include contentEncryptionAlgorithm.

My understanding is that this would be a pretty big abstraction layer violation in CMS since the *RecipientInfo’s job is to transport the CEK material, not to dictate its use. For example, the KEMRecipientInfo structure does not carry the contentEncryptionAlgorithm identifier. In fact, you have to recurse all the way up to EncryptedContentInfo in RFC 5652 to find it, and passing it all the way down into the *RecipientInfo KEK derivation would be a major API overhaul.

Worth thinking about though.

---
Mike Ounsworth

From: Spasm <spasm-bounces@ietf.org> On Behalf Of Russ Housley
Sent: Friday, October 27, 2023 9:55 AM
To: Falko Strenzke <falko.strenzke@mtg.de>
Cc: Roman D. Danyliw <rdd@cert.org>; LAMPS <spasm@ietf.org>; Johannes Roth <Johannes.roth@mtg.de>
Subject: [EXTERNAL] Re: [lamps] AD review of draft-ietf-lamps-cms-kemri-05

Falko and Johannes:

If I understand this attack correctly, the attacker intercepts a CMS Authenticated-Enveloped-Data content that uses either AES-CCM or AES-GCM as specified in RFC 5084.  Then, the attackers turns it into a "garbage" CMS Enveloped-Data content that uses AES-CBC that is composed of the guess blocks.  This gets sent to the victim, and the victim shares the result of the decryption with the attacker.  If any of the plaintext blocks match Ht, then the attacker learns the plaintext for that block. Please let me know if anything is incorrect.

The draft-ietf-lamps-cms-kemri draft cannot offer any defense here.  The key under attack is the content-encryption key (CEK).  The KEMRecipientInfo (like all other flavors of RecipientInfo) is about transferring the CEK to one or more recipient.  You are seeking a way to integrity protect the CEK algorithm identifier.  Historically, that is done by signing the ciphertext.  RFC 2634 talks about the reasons that an originator might want to use a sign-encrypt-sign triple wrapper.

I will give some thought to ways  to integrity protect the CEK algorithm identifier without an additional layer of signature.

Are you able to make a presentation about this attack at the LAMPS session at IETF 118?  Remote presenters can be accommodated.

Russ



On Oct 27, 2023, at 4:50 AM, Falko Strenzke <falko.strenzke@mtg.de<mailto:falko.strenzke@mtg.de>> wrote:


Johannes and I hereby disclose a novel AEAD-to-CBC downgrade attack against state-of-the-art CMS. This is a summary of what we are planning to publish in an upcoming research paper. We disclose it now as we think it is likely that knowledge of this attack will help the WG to understand the relevance of key separation between legacy block cipher modes and AEAD modes and thus hopefully decides to incorporate this measure in the KEM-RI draft.

Inverse CBC Decryption Oracle Attack on Low Entropy AEAD Blocks in CMS

The described attack applies to the modes CCM and GCM that both use CTR encryption. The attack allows to the attacker to determine the content of a low entropy plaintext block in a CMS GCM or CCM (AEAD) encrypted message. The preconditions for the attack are:

  *   The victim supports also CMS CBC decryption and reveals CBC decrypted messages to the attacker. The plaintext messages that victim reveals in the attack are meaningless “garbage”. This assumption underlies attacks described in literature [1], [2].
  *   The attacker has sufficiently much information about one plaintext block of the target AEAD ciphertext, so that the number of necessary guesses (each having the size of the block cipher block size) fits into such a CBC message that the victim decrypts for him.

The attacks is referred to as an inverse oracle attack because it uses the block decryption operation of the victim to attack the block encryption operation of the original message. This implies that the attack is limited to verifying guesses for low entropy blocks in the target plaintext. Such attacks have, to the best of our knowledge, not been described previously in the literature. Formally, this means that CMS AEAD does not achieve CCA2 security in the presence of a CBC decryption oracle.

The attack could for instance realistically be used to reveal the value of a secret code with a few digits within an otherwise known message.

Description of the Attack

In the following, let Eₖ(X) and Dₖ(X) denote the AES block encryption and decryption under the key k and Dₖ-CBC(Xᵢ) the AES-CBC decryption under key k of the plaintext block Xᵢ.

  *   Generate the set of n guesses {Tᵢ} for i ∈ {1 … n} for the target plaintext block at position t in the original AEAD ciphertext. The corresponding ciphertext block in the target CTR ciphertext is labelled Cₜ.
  *   Compute the corresponding set of guessed key stream blocks {Gᵢ | Gᵢ = Tᵢ⊕ Cₜ for all i = 1 … n}
  *   Creation of the CBC ciphertext as the oracle input:

     *   choose CBC-IV as G₀ arbitrarily
     *   Form the CBC ciphertext as the sequence of the guess blocks {Gᵢ | for all i = 1 … n}

  *   Then the CBC decryption oracle will compute the sequence of plaintext blocks:

     *   {Pᵢ | Pᵢ = Dₖ-CBC(Gᵢ) = Dₖ (Gᵢ) ⊕ Gᵢ₋₁ for all i = 1 … n}

  *   The attacker receives the plaintext {Pᵢ} and computes

     *   {Xᵢ | Xᵢ = Pᵢ ⊕ Gᵢ₋₁ for all i = 1 … n}

  *   Let Hₜ be the counter block at position t in the AEAD ciphertext, i.e., for the correct guess of the target key stream block Gᵥ at index v we have Gᵥ = Eₖ(Hₜ)

     *   the counter blocks are publicly known, since GCM and CCM both directly use the public nonces in the counter block

  *   Note that for the correct guess we have Xᵥ = Dₖ (Gᵥ) ⊕ Gᵥ₋₁ ⊕ Gᵥ₋₁ = Dₖ(Gᵥ) = Hₜ
  *   Thus, if the attacker finds for any of the {Xᵢ} that Xᵥ = Hₜ then

     *   the guess Gᵥ = Tᵥ ⊕ Cᵥ for the key stream block is correct
     *   and thus the corresponding guess Tᵥ for the plaintext block is correct

Effect of CBC Padding Check

CBC is used in CMS together with PKCS#7 padding. Thus an application that enforces correct padding will make the attack more difficult. The attacker has no way to enforce a correct padding or to influence the length of the padding. But a correct padding of length 1 appears with probability 1/256. Multi-user attacks would be one way to compensate the resulting low success property of the attack.

________________________________

[1] Katz, J., Schneier, B.: A Chosen Ciphertext Attack Against Several E-Mail En- cryption Protocols. In: 9th USENIX Security Symposium (USENIX Security 00), Denver, CO, USENIX Association (August 2000)

[2] Jallad, K., Katz, J., Schneier, B.: Implementation of Chosen-Ciphertext Attacks against PGP and GnuPG. In Chan, A.H., Gligor, V., eds.: Information Security, Berlin, Heidelberg, Springer Berlin Heidelberg (2002) 90–101

Am 24.10.23 um 14:30 schrieb Falko Strenzke:

We are aware that the document draft-ietf-lamps-cms-kemri<https://datatracker.ietf.org/doc/draft-ietf-lamps-cms-kemri/> is already in the AD review and thus far progressed in its process of finalisation. We have a good reason to propose a modification to this document still at this late stage. Both the suggested change and the reason for it are explained in the following.

Proposed change

We propose to include the algorithm identifier of the symmetric scheme used for the payload encryption, i.e., the contentEncryptionAlgorithm, in CMSORIforKEMOtherInfo.

Reason for the proposed change

The reason is, besides it generally being best practice to include such contextual information into the key deriviation, that there is the threat of AEAD-to-CBC cross-mode / downgrade attacks against state-of-the-art CMS. The KEM-RI draft has the opportunity to remove this potential weakness at least for KEMs and thus we strongly suggest to make this change. Including the contentEncryptionAlgorithm in the key derivation ensures that one arrives at different content encryption keys if the contentEncryptionAlgorithm is changed (for instance) from AEAD to CBC.

Please note that also the OpenPGP crypto-refresh<https://datatracker.ietf.org/doc/draft-ietf-openpgp-crypto-refresh/> incorporates a key derivation – that deviates in its parameters from what we propose here and is only used in the case of AEAD – that ensures key separation for the newly introduced AEAD and the legacy CFB encrypted data packets.

- Falko Strenzke and Johannes Roth
Am 11.10.23 um 21:58 schrieb Roman Danyliw:

Hi!



I performed an AD review of draft-ietf-lamps-cms-kemri-05.  Thanks for this very important update to CMS.  This document is in good shape.  As the below are minor, I'll advance this to IETF LC and ask that this feedback be resolved concurrently.



** Section 2.  Editorial. Should the distribution of the recipient’s public key be made explicit?

OLD

   In advance, each recipient uses KeyGen() to create a key pair, and

   then obtains a certificate [RFC5280] that includes the public key.



NEW



In advance, each recipient uses the KEM KeyGen() function to create a key pair, and then may obtains a certificate [RFC5280] that includes this newly generated public key.  This public key or associated certificate is them made available.



** Section 2.  Editorial.  Recommendation for several sections.  When a KEM function, KeyGen()/Encapsulate()/Decapsulate() is mentioned, referred to is as a “KEM <insert function name>”.  For example, s/Encapsulate() function/KEM Encapsulate() function/



** Section 3.

      The

      RecipientIdentifier provides two alternatives for specifying the

      recipient's certificate [RFC5280]



Isn’t the correct reference for the two mechanisms in RecipientIdentifier (i.e., issuerAndSerialNumber and subjectKeyIdentifier) provided by RFC5652?



** Section 3.  Editorial

    The issuerAndSerialNumber alternative identifies the

      recipient's certificate by the issuer's distinguished name and the

      certificate serial number; the subjectKeyIdentifier identifies the

      recipient's certificate by a key identifier.



Is there a missing “or” between these two options?  Both don’t need to be present in the RecipientIdentifier structure.



** Section 3.  Process question.

      Note that this requirement expands the original purpose of the ukm

      described in Section 10.2.6 of [RFC5652]; it is not limited to

      being used with key agreement algorithms.



Does this imply that this RFC should formally “update” RFC5652?



** Section 6.1.  Since SMIME-CAPS is being used in the formal definition of the KEY-ALGORITHM class, RFC 5912 needs to be a normative reference.  RFC5912 is informational, but it already in the DOWNREF registry.



** Section 6.1. As an aside, what is the SMIME link to KEMs?



** Section 7.

   The choice of the KDF SHOULD be made based on the security level

   provided by the KEM.  The KDF SHOULD at least have the security level

   of the KEM.



What is the nuance being conveyed between these two sentences?  What additional considerations exist beyond what is spelled out in the second sentence?  This construct is repeated in the next paragraphs for key-encryption algorithms too.



** Section 7.  Typo. s/used to by the/used by the/



Regards,

Roman

_______________________________________________

Spasm mailing list

Spasm@ietf.org<mailto:Spasm@ietf.org>

https://www.ietf.org/mailman/listinfo/spasm
--

MTG AG
Dr. Falko Strenzke
Executive System Architect

Phone: +49 6151 8000 24
E-Mail: falko.strenzke@mtg.de<mailto:falko.strenzke@mtg.de>
Web: mtg.de<https://www.mtg.de/>


________________________________

MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
Commercial register: HRB 8901
Register Court: Amtsgericht Darmstadt
Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
Chairman of the Supervisory Board: Dr. Thomas Milde

This email may contain confidential and/or privileged information. If you are not the correct recipient or have received this email in error,
please inform the sender immediately and delete this email. Unauthorised copying or distribution of this email is not permitted.

Data protection information: Privacy policy<https://www.mtg.de/en/privacy-policy>



_______________________________________________

Spasm mailing list

Spasm@ietf.org<mailto:Spasm@ietf.org>

https://www.ietf.org/mailman/listinfo/spasm
--


MTG AG
Dr. Falko Strenzke
Executive System Architect


Phone: +49 6151 8000 24
E-Mail: falko.strenzke@mtg.de<mailto:falko.strenzke@mtg.de>
Web: mtg.de<https://www.mtg.de/>


________________________________

MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
Commercial register: HRB 8901
Register Court: Amtsgericht Darmstadt
Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
Chairman of the Supervisory Board: Dr. Thomas Milde

This email may contain confidential and/or privileged information. If you are not the correct recipient or have received this email in error,
please inform the sender immediately and delete this email. Unauthorised copying or distribution of this email is not permitted.

Data protection information: Privacy policy<https://www.mtg.de/en/privacy-policy>
_______________________________________________
Spasm mailing list
Spasm@ietf.org<mailto:Spasm@ietf.org>
https://www.ietf.org/mailman/listinfo/spasm

Any email and files/attachments transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If this message has been sent to you in error, you must not copy, distribute or disclose of the information it contains. Please notify Entrust immediately and delete the message from your system.