[Eligibility-discuss] On 3797 alternatives

Martin Thomson <mt@lowentropy.net> Tue, 30 May 2023 11:51 UTC

Return-Path: <mt@lowentropy.net>
X-Original-To: eligibility-discuss@ietfa.amsl.com
Delivered-To: eligibility-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 93113C151545 for <eligibility-discuss@ietfa.amsl.com>; Tue, 30 May 2023 04:51:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=lowentropy.net header.b="AQoyLqSg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="S902Azyb"
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 Mr5IcTIy5kd9 for <eligibility-discuss@ietfa.amsl.com>; Tue, 30 May 2023 04:51:15 -0700 (PDT)
Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9F27EC151542 for <eligibility-discuss@ietf.org>; Tue, 30 May 2023 04:51:15 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C0ADA320090B for <eligibility-discuss@ietf.org>; Tue, 30 May 2023 07:51:12 -0400 (EDT)
Received: from imap41 ([10.202.2.91]) by compute6.internal (MEProxy); Tue, 30 May 2023 07:51:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1685447472; x=1685533872; bh=vZ ySaPPkKEyrIoXv+YXeQrvIaOdZGksrJwCS14qxteg=; b=AQoyLqSgQvlnjTWR+t sxaXv52tORKiLjpps8Oyy3kXcxMidBcLfPuM7U+DoXc9NvEgxQ30oLlIrYc+j5t3 8t9DcvVRbylCty00ZYjNkoL4djzYKY1UkyRCJCGZWLgQSA9DGGc88HEPxwm1ioKC T1G9tqZdH14TWpvy4kwIzZUxQrYO0fJWB83t4ah+X50t8mN+linc9Z6l+ophhhUZ N4ipMCSJ0uXLozFsEKq9EAfq7jCAs8oPSvE3iHDzv9edCtZY9iSfu4YsUQc6t+4u k+RhVteKPUmNgEu5sSdCLT+FcvmtpV7IOZepl3SRQNwTmOOU9Blxut3DZivK/YXa 3EeQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685447472; x=1685533872; bh=vZySaPPkKEyrI oXv+YXeQrvIaOdZGksrJwCS14qxteg=; b=S902AzybB81t3DYVVGduB8yG1aaWs SMlUOsgAP2DI/ErdjGEUOSYu31GuXQdba/Zpe4+zDc6mzZYJUAQTVrnTdCAQJxAD mOfN+gf5K3Ngp6X4rj4eUqF2DzvtOjT8QtogjURGNRNG0AdLoYOZzjYTXBFxTk0n ZzjXlxOhbSmmW6v0klEhWEIRqVe4eoD01fdnk7MaaU3Xo5MmfyREXO8qro8O/9ib LqKl4AKrxr6GOOoy9c1IVcwKDOaPViksnnWm9Ho4tS934FCjWxQbnL2hlUWkR9/v gNLwlSOjFqi3UZqd8ujX3AVeMHx227qjRQR9mtVLHG23Opt6q7vxfKb1Q==
X-ME-Sender: <xms:MON1ZHGC2NahVjYXMLBGn6Ar8w57QXlsLBF8GyJgAbKCHeVePEnuyw> <xme:MON1ZEUsg4X6Kd-u8S__pk0GwOh-AJH83E5sLaVcuMqqtLjjRoFdxwcbgkb2z5WoQ DbAkVCRHm-kclzmavk>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekjedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhho figvnhhtrhhophihrdhnvghtqeenucggtffrrghtthgvrhhnpeetveeuvedvueeufffhle fhgfefgeefieekffelgfehieeigefhtdetvddutefhleenucffohhmrghinheprhhftgdq vgguihhtohhrrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepmhhtsehlohifvghnthhrohhphidrnhgvth
X-ME-Proxy: <xmx:MON1ZJIvnE-EYFJpTyMlZoFyeNw3Wn6bV_VrOGOrx9pHJ9-w-BGEww> <xmx:MON1ZFHZuPPABDwwB8QjMmke0BBOEjIESu2PAdkrDJXVylDeOkwHyg> <xmx:MON1ZNUR46ktSjGC6huEmt-WE21FQkvqDvmfcOlPrjy14hcRgT3hCw> <xmx:MON1ZFhqksCcKAN5dx5nTQcmV3GBX21CdjnIwgHTVRZ4p-sIFRoAww>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 19A5A234007E; Tue, 30 May 2023 07:51:12 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.9.0-alpha0-441-ga3ab13cd6d-fm-20230517.001-ga3ab13cd
Mime-Version: 1.0
Message-Id: <2745cf30-098d-4a3a-9e9e-3c3c44179176@app.fastmail.com>
In-Reply-To: <B953359D-72A9-4032-857E-490AEAF60C4A@vpnc.org>
References: <54F373CD-1E97-42BC-9AAB-0451ABD9D448@eggert.org> <1229DD7D-3640-4EFD-8058-D0EC18020038@eggert.org> <18537EEF-4E16-4C48-8456-02A8FB0C8CFC@vpnc.org> <4a8f2bb4-25c3-5514-f13f-8db1804619a6@joelhalpern.com> <0531CD69-AAA4-4657-9B90-B50F76D997B7@vpnc.org> <ffa1d82b-a22b-f68f-5000-6a1ca437d147@joelhalpern.com> <B953359D-72A9-4032-857E-490AEAF60C4A@vpnc.org>
Date: Tue, 30 May 2023 07:50:49 -0400
From: Martin Thomson <mt@lowentropy.net>
To: eligibility-discuss@ietf.org
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/eligibility-discuss/UDhEHhJ4v9ewJscbQRimtf5V3Ak>
Subject: [Eligibility-discuss] On 3797 alternatives
X-BeenThere: eligibility-discuss@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF eligibility procedures <eligibility-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/eligibility-discuss>, <mailto:eligibility-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/eligibility-discuss/>
List-Post: <mailto:eligibility-discuss@ietf.org>
List-Help: <mailto:eligibility-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/eligibility-discuss>, <mailto:eligibility-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 30 May 2023 11:51:20 -0000

Paul's core idea here is neat, but I fear that his implementation has flaws.

Ekr's point about requirements is important.  We want an outcome that is hard to predict.  Our threat model allows an attacker to know the set of candidates and to manipulate it.  Therefore, in addition to being independently verifiable, any selection procedure needs to inject sufficient entropy.  We do this so that it is infeasible to alter the inputs in such a way as to alter the outcome toward an attacker's preferred choice, even with low probability[*].  This means the analysis in 3797 is flawed.  That concentrates on ensuring that the amount of entropy exceeds the number of permutations possible in the outcome, where what is needed is entropy sufficient to make an enumeration of possible outcomes impractical.

An example might help.  Let's say that an attacker's goal is to deny a certain person access to the NomCom, but only that one person will decide on their own to participate.  The attacker needs to start by adding at least 10 people to the slate.  But which set of people is up to them.  (Let's assume affiliation is no issue in this case and that the number of people the attacker can add is bounded.)  If the attacker can run a simulation for all possible - or even plausible -- values of D for each set of people they might consider adding, then they can find out which set of 10 (or more) people ensures that the person they singled out does not get selected with high probability.  Even with a large possible number of values for D, running something like Monte Carlo could increase the odds that the attacker gets the outcome they want.

Of note here is that if the input entropy is stocks, then there isn't a whole lot of entropy.  Low entropy values give the attacker an advantage.  Note that RFC 3797 claims that 40 bits is likely enough.  That's a tiny amount of entropy, making enumeration of outcomes close to attainable.

[*] Note that no outcome exists in this threat model where the attacker's advantage over a purely random process is zero, but we can ensure that it is negligible in a sense we're accustomed to, even if the attacker is willing to expend significant effort.

That's flaw 1 in Paul's draft: insufficient entropy.  Flaw 1b is that D is described as a number, but a byte sequence is better and what it really is anyway.

Flaw 2 is more academic.  This really needs a KDF.  H(D || name) is an approximation of that, but it is not a very good one.  It's a tiny bit more cryptography, but we can do better.  (Ideally, what you have is a KDF to extract entropy from D, then you can run a simpler expansion function.  Conveniently, RFC 5869 exists, is widely implemented, ...)

Flaw 3 is engineering.  The code in the draft is vastly more complex than necessary.  After defining a KDF, this should suffice:

import fileinput
for n in fileinput.input():
    print(f"{hex(kdf(d, n))} {n}")

Followed by a call to `sort`, of course, but you don't need to reimplement that.  That has a certain elegance, I think: `nomcom.py < candidates.txt | sort`

Finally, the controversial part.  I believe that a NomCom chair (whoever that might be) is able to choose any selection process, provided that it meets the stated requirements from Section 4.16 of RFC 8713: https://www.rfc-editor.org/rfc/rfc8713.html#section-4.16

The more controversial part is that - based on the above analysis - it seems like RFC 3797 does not meet the stated requirements in RFC 8713.

On Mon, May 29, 2023, at 20:03, Paul Hoffman wrote:
> My draft is only aimed at making #1 simpler and easier to understand 
> and having essentially the same security. If folks here like that idea, 
> all the parts of the ceremony from #2 can be wrapped around it.