Re: [MLS] UPKE for X25519/X448

Karthikeyan Bhargavan <karthik.bhargavan@gmail.com> Tue, 22 October 2019 15:02 UTC

Return-Path: <karthik.bhargavan@gmail.com>
X-Original-To: mls@ietfa.amsl.com
Delivered-To: mls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C4E131200DB for <mls@ietfa.amsl.com>; Tue, 22 Oct 2019 08:02:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 Z0P0IufjFuIl for <mls@ietfa.amsl.com>; Tue, 22 Oct 2019 08:02:22 -0700 (PDT)
Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 A685A120013 for <mls@ietf.org>; Tue, 22 Oct 2019 08:02:21 -0700 (PDT)
Received: by mail-wm1-x334.google.com with SMTP id g24so8510364wmh.5 for <mls@ietf.org>; Tue, 22 Oct 2019 08:02:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ch0zsyLXNNO1wH2OtQ02l9i1KKer2xkrhbIf734qxCI=; b=D73sCD4/USmJJBr96IzZve0hvZH0PLXaiTnoHALBjPGlLLMdh7hhl/hIsyny4LXcRR fuk+cSeMJY5BKjJDruGKfJmHKf7HQK3ovoeem+pnVHNLGwH90hXNMfPhta3UMfkCUn2A W2Bqi6OlLtqSFW3wUIdMVmfltN4IrcwRbuLzRE2XGFfvLldxJ7xlq6788PDhxj00ttuU 7WtgWx9mwd+odT/Kjog/PDT55LN8mHy7LXzxcLoyXKQoQMdGDHCWMKHczo4fXT7hrJpE LHDzg3HInJ/Y4Pcl5k6v6fk5hWDiHb2hw6xilMe3Md1s1WPuo99+80a9dPfx51q5naEI LfSQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ch0zsyLXNNO1wH2OtQ02l9i1KKer2xkrhbIf734qxCI=; b=YN/tpY8zd+VNa0lTYF0lAVEJHzTOzbwRQNuT1eBgaS4hof7yQhsiuOe++heU94sPhY 7NQzuxMraJnh86yIdwWVLc9oGthRbznUhhDuiQNem0ZrL920tJdj5ndxm9climruseqq +QblPHd5vAWy3boxW1YBQKx0wra6ajknFgINDbFICEU3Kx4onoOPtLqtMI7i3S+Co6jC f9OgTnT6t5NXrmry9LJ49xsBcg78TQcavX9xf4FB3/rOopTHWEPkByERkFJCke8jU1Ho XR9HdPpDkKpFQdE0I2nCMgR20iSV1IpPDHVlA8DcCgQT8bmRKSGJwOf45AbNoE7My0qk uddQ==
X-Gm-Message-State: APjAAAWMKyQJbsv02DaTbTNCM33tgphiDqRrT0Bp7XZsPqzu2CaAdXeZ 9BJho/kQ9wO8gkaHRIvrO2APWhJZrmM=
X-Google-Smtp-Source: APXvYqwWLd4ifs1FyGI5WBW+jEHrwJ+KyKMU0+n72X2PBQxDjbWlRjhGAK2f6VEUOkCnG/56DFduzg==
X-Received: by 2002:a7b:c40a:: with SMTP id k10mr3741588wmi.115.1571756539689; Tue, 22 Oct 2019 08:02:19 -0700 (PDT)
Received: from wifi-pro-83-029.paris.inria.fr (wifi-pro-83-029.paris.inria.fr. [128.93.83.29]) by smtp.gmail.com with ESMTPSA id n187sm15623504wmb.47.2019.10.22.08.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2019 08:02:18 -0700 (PDT)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>
In-Reply-To: <71e63449-abba-854d-2962-eac3a64a80d0@wickr.com>
Date: Tue, 22 Oct 2019 17:02:16 +0200
Cc: Messaging Layer Security WG <mls@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <398CD178-3DB6-4D70-B230-3362BE63A3BE@gmail.com>
References: <71e63449-abba-854d-2962-eac3a64a80d0@wickr.com>
To: Joel Alwen <jalwen@wickr.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/NVxHypXc_1-d_NozloYVsOLbuSM>
Subject: Re: [MLS] UPKE for X25519/X448
X-BeenThere: mls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Messaging Layer Security <mls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mls>, <mailto:mls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mls/>
List-Post: <mailto:mls@ietf.org>
List-Help: <mailto:mls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mls>, <mailto:mls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Oct 2019 15:02:24 -0000

Sorry if this is already in the paper, but a question.

> - UPKE-Decrypt(sk, (c1, c2)):
>  epk, context := HPKE.SetupBaseR(c1, sk, "")
>  d' || m := context.Open("", c2)
>  d := HKDF(sksize, d', "", "derive UPKE delta")
>  sk' := Mult(sk, d)
>  return (m, sk’)

I believe it is important for the recipient to do some validation before returning from UPKE-Decrypt.

For example, what if the (malicious) sender set d to “0” (whatever that means in the DH group).
This would mean that the resulting key sk’ becomes “0” too, hence a non-member has been able to force the recipient group’s private key to a particular value, which is not ideal.
What conditions should we add to avoid this kind of key-forcing attack from happening?

-Karthik



> 
> 
> References
> ----------
> [1] http:\\ia.cr\2019\1189.
> 
> _______________________________________________
> MLS mailing list
> MLS@ietf.org
> https://www.ietf.org/mailman/listinfo/mls