Re: [CFRG] [EXTERNAL] Re: Streamlined NTRU Prime: sntrup761

Mike Ounsworth <Mike.Ounsworth@entrust.com> Sat, 13 May 2023 21:02 UTC

Return-Path: <Mike.Ounsworth@entrust.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 69140C15109F for <cfrg@ietfa.amsl.com>; Sat, 13 May 2023 14:02:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.797
X-Spam-Level:
X-Spam-Status: No, score=-2.797 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 7-J5l_CqaGS5 for <cfrg@ietfa.amsl.com>; Sat, 13 May 2023 14:02:53 -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 30CC5C15155E for <cfrg@ietf.org>; Sat, 13 May 2023 14:02:52 -0700 (PDT)
Received: from pps.filterd (m0242864.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34D8e9jO030626; Sat, 13 May 2023 16:02:51 -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 : content-transfer-encoding : mime-version; s=mail1; bh=ulBgSspm8movNhTS4SOAmXOnk5RPzb6PfQMiIEQJhnY=; b=PbFbzXs+TxolnVzGRTVx0DASULZZK0YBenelIfrU1rXMIMgvnmbNoxD3nDeax3WKEVh3 OsLotaAfz4w7cRwxS0wRoWDd0bXhHn5/x0I+32sA5xVXmTzP7PA62f2U5ANBLIM9j1t0 iD80gk9bdR2yAs1XNC1ZjlCFrA0E3BCBHIfo7JpP9xi77Szk9okSPVHBUmXEwPufQx93 Ft/hUMBoq+6U472PcH4EFnr3XtToYrLRcHN3ZF97VLYU6JJ4N0fpPFxohMgxXu+0DC36 wsVioMxtb54yCZeTe0CPGQ1Lfr7YAX+LUUts7BecfEq4fDsHfIG+Ug+BSFUu0JEsWh4w 9g==
Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 3qj7819hv9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 13 May 2023 16:02:50 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gvbl00M2CiG0ZyCi4hCoJ8aYZFi9uE1yBv/z1QkwEjPa/EOWY7sFhdOS8F3H35/Nk0+aJrcODwRsmC6I1RmH/Tr+ecKUn/4M9kt/i7wjiz1EFBUHBA4eGEZ4mgl9X3MnCdvlQi+g9F/eyD4vPydam3Irgzyc+WESanKwDLN/1PeTYlVkaGUKiAmRVWDN/L+93LtObdaj7f1U1+XcQTy/p43kQ5WY80jUPCjaNcv2q63vZlYuAMKN0p67cnbTT4nnYvbaXBBS5ESnfOnFZwWqWjyhozYHIrVEomyhViHApysCOsXjxQR4tV11Cho1dNKBg5ksp7yO6FlhIi3M0sl84A==
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=ulBgSspm8movNhTS4SOAmXOnk5RPzb6PfQMiIEQJhnY=; b=Qusx+zNorHkBoElHL9vS5cJk045eQ8pQqXJGvZNmGF5hIG5hFqDjvmLz7eREUsHoNH7JDVadNsDZQfrensYPuiyo5gXC5UHIHPRSEVaTw0MlmwvP37gJ1XBvSupdZG21grUq6XVOEbq/GRZL2Fvk8uEg16Upajzowq0rHBARhZQCqij+ASekH86utmwN5NA6/phGgOjYAukspO6RT0UgDeuNWKge3UJex+zfmTRjaNNF+a8pUXagnk3WFJqZ4q8INHCKb+azzvtaZT1MQUmWCXKdEP6XLyIMnGUs4Q79ixHLFKuHc8EMuCUTabzLaof5zZo2WFHGsacc9NaPrDM+4w==
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 DM8PR11MB5736.namprd11.prod.outlook.com (2603:10b6:8:11::11) by CO1PR11MB5010.namprd11.prod.outlook.com (2603:10b6:303:93::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Sat, 13 May 2023 21:02:47 +0000
Received: from DM8PR11MB5736.namprd11.prod.outlook.com ([fe80::abc2:71f2:8905:2118]) by DM8PR11MB5736.namprd11.prod.outlook.com ([fe80::abc2:71f2:8905:2118%3]) with mapi id 15.20.6387.029; Sat, 13 May 2023 21:02:46 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: Peter C <Peter.C@ncsc.gov.uk>
CC: "cfrg@ietf.org" <cfrg@ietf.org>
Thread-Topic: [CFRG] [EXTERNAL] Re: Streamlined NTRU Prime: sntrup761
Thread-Index: AQHZhOQ/VGMxFSRcFUKknz/+YEhE6K9W3/4wgAAinoCAACq3AIABhHeg
Date: Sat, 13 May 2023 21:02:46 +0000
Message-ID: <DM8PR11MB5736FA9C22B6F4830C101CC29F7A9@DM8PR11MB5736.namprd11.prod.outlook.com>
References: <871qjm4ikm.fsf@kaka.sjd.se> <CAN8C-_LmurEBGA-e6YjNd2W0f+1gajqoSAq-F-fHOugbJO0xBg@mail.gmail.com> <CH0PR11MB57396AE5BFC2FA681425A7BC9F759@CH0PR11MB5739.namprd11.prod.outlook.com> <LO2P123MB492793A5C785D17ECDF2C6ABBC759@LO2P123MB4927.GBRP123.PROD.OUTLOOK.COM> <CH0PR11MB57397C6048EF71AC477B268B9F759@CH0PR11MB5739.namprd11.prod.outlook.com> <CH0PR11MB573955922D5A757483440B389F759@CH0PR11MB5739.namprd11.prod.outlook.com> <LO2P123MB4927ABC0807EDA8ECD5B3F1CBC759@LO2P123MB4927.GBRP123.PROD.OUTLOOK.COM>
In-Reply-To: <LO2P123MB4927ABC0807EDA8ECD5B3F1CBC759@LO2P123MB4927.GBRP123.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM8PR11MB5736:EE_|CO1PR11MB5010:EE_
x-ms-office365-filtering-correlation-id: 6bc8fc23-22a7-47d7-bff0-08db53f56739
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: VRtK2Xkh40quTEaiWRTtnA0HCZLtvXqs2rz1CFAiGV8kiBpbttdwGyWeCe+VIP/rjjOHmQ127hIYY2RoAZkigEvd+tTSGuMyNcTCeODrsTB6U74Qu/xwMUxeISlE0yJYdAHe7bH766hYPoiX8b4JLvQTi451ia0Gqz6CG7U0VG3FFbntGyDQtvJYtmIfwLcfRhqCELg+ff4kx27m11zN5a4DO+HwK5teMaCECGhz6xu0LXb9bBvg9A8XevpofxbFiMBUCoEyQWbJ/NfVRXm1Kmh/MQ40VL7ALGLxV99HzEozR1ypLtWcX5Wh0gvo46rAJ0M5cIkWcYvLrsliEpln3yUkn7HR5kbR25NMg+CLiOCZRkgikOEc04BIdiTz/QRtlNsEplS/Ct7M4iViwtsqHZrwqmkMeFNokttwkGiEZKfblEd8kIfWzwzOFntI8heK6AHdheSds2K+kh0N2tNvOsFnOOwulsJpGI2vMDRhEi3lbfzaMzyxaOObze7wyaWQ2Vlfez+M+p3Qdzm11Xp2JEqPS8273zToRiww8cZUY/d3Fo/Ismy8fKDWc9HUWfsy2Og5SZMGS2hYlSyKiCMT08TyHw9D/6il+FO68ag7Lr1MAqlgBWwYczGi3xCLYzpT
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5736.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(396003)(136003)(39850400004)(366004)(451199021)(4326008)(76116006)(66556008)(66476007)(64756008)(6916009)(66946007)(66446008)(478600001)(7696005)(86362001)(316002)(33656002)(83380400001)(26005)(186003)(53546011)(9686003)(6506007)(41300700001)(52536014)(8936002)(8676002)(5660300002)(2906002)(71200400001)(55016003)(38070700005)(122000001)(38100700002); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: Suf2/cpV/Qkkb5JYPJDlch8/TqsMTIMhyzLGV7tDaRhJGwrG7guLba8cxaWLwnAIVCbwWFFCGgAeS+fzgDXXGnlJmxYzKByPCAiqeDBFuklqx5ah7JFWiTrDWjBl9xHwN+L6F21KbZHkiWnC5egNfqe9qXnHaM/MaBnLpDJQu+MgsY2ae1KrLIEYwN9jkNiSNNz4pKv/qyoMms1Gf0iW1OVdMA3QhyOR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dgT/wF3yJuoYhGydhigKJxm10BDon7LFAxu43w23/ANo5o4foPCiLR8yadN7/CIfmMX69xxZKPhuXUb4ecX/RsfASErHNMxtfETsW27FLPlkbaKxoN6WT8HUfEPuFLoSZDcgKwZfctrdaWDEQIe5JAocp2SBADCVKj96EbBlW/NHMnqslAxl4jcVc5gkfbPF2LFJuiIPdAGT/oL1JfqgjjPif47uSdxg3ZvhGI2ccAunpR1QBa/M0KjSkZfcwKnatnfwsBMQta8BYmJDHXx5xrvX/F+fVHokCZ0sD6LhfTiZR+1j6+Cw==
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: entrust.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5736.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6bc8fc23-22a7-47d7-bff0-08db53f56739
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2023 21:02:46.6847 (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: KHcDMip8Vk3hWYgGaQMB3Dwi29nBOT1yKf0Tj94H5tDbd0tCIq/PjbVaTS+QrlzQWpG8fRW06RusUDRlhSrf0vjEAAwBLgQyIASrAJlcN+I=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5010
X-Proofpoint-GUID: AFk1xIiAGZLx3NnThvYML8GFEIKwm5Gb
X-Proofpoint-ORIG-GUID: AFk1xIiAGZLx3NnThvYML8GFEIKwm5Gb
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-13_15,2023-05-05_01,2023-02-09_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 clxscore=1011 spamscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305130198
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/z8V5AI-qEwXsuN78hztqgPMydhQ>
Subject: Re: [CFRG] [EXTERNAL] Re: Streamlined NTRU Prime: sntrup761
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sat, 13 May 2023 21:02:57 -0000

Peter,

Thank you for the discussion; I learned something.

Going back to the top; the discussion was whether the SNTRU hybrid draft aligns with the combiner in draft-ounsworth-cfrg-kem-combiners, which we've established that it does not, and then whether it should -- or whether we should change the combiner in draft-ounsworth-cfrg-kem-combiners. I'm not sure how to interpret this discussion in terms of making progress on that question.

---
Mike Ounsworth

-----Original Message-----
From: Peter C <Peter.C@ncsc.gov.uk>
Sent: Friday, May 12, 2023 4:49 PM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com>
Cc: cfrg@ietf.org
Subject: RE: [CFRG] [EXTERNAL] Re: Streamlined NTRU Prime: sntrup761

Mike,

> Thinking on this a bit more since I sent my last reply.
>
> Streamlined NTRU Prime is IND-CCA2 as per [1] section 7.1.
> X25519 may or may not be IND-CCA2 depending on the implementation
> consideration noted in the security considerations of RFC7748.

Sorry, I don't think I was clear enough.  The part of the RFC 7748 security considerations I meant was:

"Designers using these curves should be aware that for each public key, there are several publicly computable public keys that are equivalent to it, i.e., they produce the same shared secrets.  Thus using a public key as an identifier and knowledge of a shared secret as proof of ownership (without including the public keys in the key derivation) might lead to subtle vulnerabilities."

Clamping in X25519 means that for any private key a we have [a]Q = O when Q is a point of small order.  (This is the non-contributory issue you quoted.)  However, it also means that given any public key B we can easily compute a different public key B' = B + Q that gives

[a]B' = [a](B + Q) = [a]B + [a]Q = [a]B + O = [a]B;

i.e., the same shared secret.  (This is the equivalent public key issue quoted above.)

Equivalent public keys are the consequence of an intentional design choice, not an implementation issue.  Vanilla X25519 viewed as a KEM is not IND-CCA secure, even if you hash the shared secret (without including the ciphertext) and limit it to a single oracle call.  For IND-CCA security, you really need something much closer to DHKEM from RFC 9180.

> The combiner proposed in this draft:
> SHA2-512(K1||K2)
> Is IND-CCA2 if-and-only-if both of the underlying KEM primitives are.
> IE it propagates the weaker of the two properties.

I was only arguing that the specific sntrup761+x25519 hybrid construction is not IND-CCA secure.  I don't think it's necessarily true in general that an IND-CCA attack on one of the component KEMs always leads to an IND-CCA attack on the hybrid KEM.

> Whereas draft-ounsworth-cfrg-kem-combiners-03:
> KDF(counter || k_1 || ... || k_n || fixedInfo, outputBits) k_i =
> H(ss_i || ct_i) Is IND-CCA2 if either underlying KEM primitives are.
> IE it propagates the stronger of the two properties.

Again, I'd be cautious about claiming this in general.  There was a discussion of whether existing IND-CCA security proofs adequately covered this construction.  I'm not sure what the outcome of that was, but I suspect it depends on the specific assumptions you are making.  On the other hand, hashing the shared secrets with the ciphertexts does block IND-CCA attacks that rely on equivalent ciphertexts.

Peter

Peter Campbell
Industry Liaison and International Standards peter.c@ncsc.gov.uk
Any email and files/attachments transmitted with it are confidential and 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.