Re: [Cfrg] Adoption request: draft-hdevalence-cfrg-ristretto

"Filippo Valsorda" <filippo@ml.filippo.io> Thu, 25 July 2019 02:31 UTC

Return-Path: <filippo@ml.filippo.io>
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 A95D31201A8 for <cfrg@ietfa.amsl.com>; Wed, 24 Jul 2019 19:31:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=filippo.io header.b=j5tyxFuW; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=BMBj76zq
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 TOUEvDJIU1tQ for <cfrg@ietfa.amsl.com>; Wed, 24 Jul 2019 19:31:52 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0563412017C for <cfrg@irtf.org>; Wed, 24 Jul 2019 19:31:52 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3E94821FAE; Wed, 24 Jul 2019 22:31:51 -0400 (EDT)
Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 24 Jul 2019 22:31:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=filippo.io; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=WVXZz23p87zFF8pA+gWCp2EfynbEMTg UZSPluswfX3Q=; b=j5tyxFuWCUQu40FLLIWukyusMaw5JoXDKJeWbq3yjo8GImC IzamhVQWRdONbUrUV2WNF1Zh6g/+gFi8v/qRQxO5CCb3uAshI2a6kxPUdDdr9SRH +7HN3E+0+nL42Gw5M3+/3lMl1z4M74p+pUSjUyDiR6Pl0PimF+kyDCXA9VSJHz5Z F/QtkutJCIMiUTQM1Cb/nU6803E5Z/bIMmUUcyiGLrl1WcoDRwWN5i7uUUThh5TL UF3KVapm2W25fKPeea8c8EW2yCnyhHhDuycgMNeLGe/7I7iYFIoORMot+zTPswBJ 5f39ZOo6IaLWbSZ8fOmRCOweKEM2HzLPmli4w2g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=WVXZz2 3p87zFF8pA+gWCp2EfynbEMTgUZSPluswfX3Q=; b=BMBj76zq9EN5EZiAA7pROi MR95Asxhv4FZyPLn8Yn8vinw0o/mrMIM03ze+SU9piGw1QftiNWk2R1BPUx4qYss d2FbybTP9sX4QEnTzeTz5lcR8hMNNt13Hkd4l11p1TBCFR23gINRVRtJy/3H705A XbmBNjbNlsX6dVJLhYWMrOAT0JKH4kYWKzx7IcGzJmCbLTiIHFOZhrQsPT1BeIZs uviiExS1W8I7krX2L3EcHJ1kz96ycyj0OJXrfWZ806Vf5fXZERigSBZamO31XYfF Y1A9ZfE6+qaJKzjrOCj2UePFFCzqLxF4IG10PW/iLKfxGmIxDdp+TDu39ljUwuZA ==
X-ME-Sender: <xms:lhQ5XX7X2W7UjCQmLuGo6IZG8ryBoRZM6WJDQUVXVMLiteU9dzLQOg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrkedugdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfhfhilhhi phhpohcugggrlhhsohhruggrfdcuoehfihhlihhpphhosehmlhdrfhhilhhiphhpohdrih hoqeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehfihhlihhpphhosehmlhdrfhhilhhiphhpohdrihhonecuvehluhhsthgvrhfuih iivgeptd
X-ME-Proxy: <xmx:lhQ5XfL4UdW4hJkF0UvAdDPjefqeuTO9DGz-cJQTQ5WPJPVXIjsMQA> <xmx:lhQ5XQtH7L_PKKnFszl5QlzI04qYAvi1kzxURTbpcB1ggUeea6bMgw> <xmx:lhQ5XeKPQZaS40SBOU0GHQuMVpbve9T8oyWjV73e6_OEVOWMe4RJIg> <xmx:lxQ5Xe1ODUAo7egS_OEif1Pd3xjo2K5OFGMO3C5cUfmjawcZQ5rwRA>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 86507C200A4; Wed, 24 Jul 2019 22:31:50 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.6-736-gdfb8e44-fmstable-20190718v2
Mime-Version: 1.0
Message-Id: <da7bc0ee-8bf4-4f10-b579-cdf1eede5c6b@www.fastmail.com>
In-Reply-To: <20190725021029.mmw7yt6rcklqwlqz@positron.jfet.org>
References: <a505c99b-32a9-447a-9c69-a8efe3ed1b70@www.fastmail.com> <0370cd6b-adf3-4be2-9ab4-79693b9dc096@www.fastmail.com> <B7F73174-29F0-4B83-8AC0-A7D42D372D4A@inf.ethz.ch> <075d43b1-e123-42a9-ccd9-64fe45306f8b@web3.foundation> <20190724212030.ddcswlg5uxm3muzo@positron.jfet.org> <CAPC=aNVCV2cn62rhQsu+RsJsdjt2Dqqw_rqooLsuc8J5v9s3kQ@mail.gmail.com> <16485892-168c-a7ca-ba8c-94f7ce5c0e8e@web3.foundation> <20190725010945.h2c3pa6k6cqlogqg@positron.jfet.org> <1d2252da-95b1-44fb-b9d5-9dd7f9c5bc54@www.fastmail.com> <20190725021029.mmw7yt6rcklqwlqz@positron.jfet.org>
Date: Thu, 25 Jul 2019 04:31:50 +0200
From: "Filippo Valsorda" <filippo@ml.filippo.io>
To: "Riad S. Wahby" <rsw@jfet.org>
Cc: "Jeff Burdges" <jeff@web3.foundation>, draft-hdevalence-cfrg-ristretto@ietf.org, cfrg@irtf.org
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/ThhLCN56H8bf6QsOHkJDagDu8cE>
Subject: Re: [Cfrg] Adoption request: draft-hdevalence-cfrg-ristretto
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
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: Thu, 25 Jul 2019 02:31:55 -0000

2019-07-25 04:10 GMT+02:00 Riad S. Wahby <rsw@jfet.org>rg>:
> Filippo Valsorda <filippo@ml.filippo.io> wrote:
> >     ENCODE -> map -> (something) -> reverse_map -> DECODE
> > 
> > This, correct me if I'm wrong, is an example of the kind of map Jeff
> > is talking about: something that takes abstract ristretto255 elements
> > (which might be implemented with something else than edwards25519) and
> > maps them to edwards25519 points (NOT internal representatives).
> 
> Sorry, I don't understand this. edwards25519 points *are* valid
> internal representations.

edwards25519 points generated by DECODE or FROM_UNIFORM_BYTES are *one
possible kind* of internal representatives.
 
> >     edwards25519 point -> (something) -> reverse_map -> ENCODE
> > 
> >     DECODE -> map -> edwards25519 point -> (something)
> 
> Wait, what is the type signature of reverse_map? ENCODE takes an
> edwards25519 point (again, per Section 3), so to me this looks like
> a type error, in which case I fully agree this can't return anything
> intelligible.

That was a bad diagram on my part. This should be more accurate.

    (something) -> edwards25519 point -> ENCODE

where (something) is neither DECODE nor FROM_UNIFORM_BYTES from the same
edwards25519-based ristretto255 implementation.

To borrow your type error analogy, internal_representative is a
different type from edwards25519_point, although it might or might not
be an opaque wrapper around edwards25519_point, and ENCODE takes an
internal_representative, not an edwards25519_point.


Looking at the Go implementation might also help (although of course
the spec will need to stand on its own) as it puts this into actual types.

https://github.com/gtank/ristretto255