Re: [CFRG] (Re: EdDSA square roots (RFC 8032))

John Mattsson <john.mattsson@ericsson.com> Wed, 16 February 2022 11:05 UTC

Return-Path: <john.mattsson@ericsson.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 2D5E43A0FD1 for <cfrg@ietfa.amsl.com>; Wed, 16 Feb 2022 03:05:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.575
X-Spam-Level:
X-Spam-Status: No, score=-7.575 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.576, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 CbHbEk06fXe0 for <cfrg@ietfa.amsl.com>; Wed, 16 Feb 2022 03:05:15 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::60b]) (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 240ED3A0A52 for <cfrg@irtf.org>; Wed, 16 Feb 2022 03:05:14 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QsFmEFHIr8XepYegQdVwUK5CjrDGAojbSHbeT2CfmDFkVu0h2qoYGT8VdQXuYgQf0ZD30+ISIITyrOI960vsTN3s413+d21xDlDv3DdJNbQvCKMyerhcefjATVpeawGmlluSynDmlmE0CByTUaENIsuZEHQfOc+8CL0nn548opJKsOyxBYkzj1awM8XBhmFypdAq0WKWbmp7GSPon/ncP7t1gEdzRqp6Y888RZ4znSmXNAN5OzFZZW7F3sD6/+o+TqaCa8kvrIJxT734eKh6XXti7dTWB4L0dMqgyuHKCwMleN+BE8wh7QmEjOGFHcNYRCTbBMxlOsdOUKwvLYdHDw==
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=vG8gslqwYcJmGF3mYBw7mFx/1jjuSjvVQ4c8nF2LpBw=; b=GuSz7FL8QM8Sa8gk1lcB8tIO/xMIDq6/EABUVNSdkkgcJbnXXOeqnSDg0UJR/g4WBy+2ukdivoS7eWuzo4OTkIRTOMo6waVojT0HKE3L35op9ecB4UanUTubF8YWTfXgbMSIbNj6nKwat+IOYAdENO7jdnuPhi4xKEXB9W1vcMkUKy72M6CPOZUnqaCn0H+UMzmJ7KnPzsoKkD1XFuBtM379keEKCnTp9MaMP/kyeuZQ/N7+DdnGSznOpvNU5VnH9EZTXt5JxkFx1RXw6eCTnNtm33RjwRYVPxO1LFRbrjmS4t+R0Cn6FqeG6jlBSgdh+Kw/+5DqDIch8PfsyYil4g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vG8gslqwYcJmGF3mYBw7mFx/1jjuSjvVQ4c8nF2LpBw=; b=rv6MSgSKiiFE4nNyelDgcTrIbcH+sF/X7GQ/jsHyKjwCN5jQyWad6EC6ekvkOChGIA87ba1OSq4pSOpy5PCyn5PjnrzoSWYBaWFPwiq2ynMGdhU1wpHwX6EyPwWlfULl7gLlKF/AwIkNdUB372tXt+jdIhdbjV2xjhya/3S0bXU=
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com (2603:10a6:3:4b::8) by AM0PR07MB3891.eurprd07.prod.outlook.com (2603:10a6:208:44::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.7; Wed, 16 Feb 2022 11:05:08 +0000
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::b462:480e:b937:c62c]) by HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::b462:480e:b937:c62c%7]) with mapi id 15.20.4975.011; Wed, 16 Feb 2022 11:05:08 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: "Blumenthal, Uri - 0553 - MITLL" <uri@ll.mit.edu>, "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: [CFRG] (Re: EdDSA square roots (RFC 8032))
Thread-Index: AQHYIn4PYcIb4v3Op0edXXLg+JaSYayWAZFw
Date: Wed, 16 Feb 2022 11:05:08 +0000
Message-ID: <HE1PR0701MB3050AC2917533363E9CD23F089359@HE1PR0701MB3050.eurprd07.prod.outlook.com>
References: <b9c6c307-849b-c9ae-104d-53ab72bb98fe@gmail.com> <YcRrOf79lUxxNWjF@LK-Perkele-VII2.locald> <a58c69c8-195a-0bed-c272-1dc1e45381dd@gmail.com> <YcSiV08Ielip1nVZ@LK-Perkele-VII2.locald> <766CE918-B2F0-476C-8CE9-6A57F1938A40@vpnc.org> <HE1PR0701MB3050400B0EEA3F5505FB07E389249@HE1PR0701MB3050.eurprd07.prod.outlook.com> <YgoQhbwv/UFLbXxF@LK-Perkele-VII2.locald> <HE1PR0701MB305089C44BCA616D3A616E5B89339@HE1PR0701MB3050.eurprd07.prod.outlook.com> <cfffeb4d-2146-03b3-f962-a6235480e0e6@gmail.com> <EC273DEF-0F12-47B1-BA26-D8E9FC7EEF98@ll.mit.edu>
In-Reply-To: <EC273DEF-0F12-47B1-BA26-D8E9FC7EEF98@ll.mit.edu>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 690fa0a5-a604-4c8d-790c-08d9f13c31bc
x-ms-traffictypediagnostic: AM0PR07MB3891:EE_
x-microsoft-antispam-prvs: <AM0PR07MB38911F4864C54A068E13F1D889359@AM0PR07MB3891.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: +pxAVu4a84OBRKThr/fbBMycrKxlXOskNMOg3HlTWC/hygyHH+0kp/JX7h1udq575o1JgfDcTDpO3pZXJPdNFyXa6YP4JQ/pcScgrmiyBfTCDBdhrlDoGeDzagbV51i3QX+7JLR9isRgvpWwoo3NwFDn4UzlDzNUHfirJQg4sXotZCMrKvbdTUDNkUhNVeVlH8hZM2Kyf9KXDdGM+xwNY01UiNKRHAeGA84EsTWzircLp32LKXafQfrBxRMnQfPAXnfXHJz0qDMR12uI6dfdieJQ7X3JWtQ60IE8Ac6wizmjnmVAwUMRU9u7hjdCA+O9kF/CM+BqhhaY3VPIrxKAQSNU8nyTMQDC7dLmIL/Fc6zJMiNDuvEtdG4A70aPFnMkjjfEa5iQO63O1qwWBFhtgzvr8rnMgkJiqfSfwWmCk75Zej0U/fUfCX5B5+aC8XFF+OcDBhzMdLEGywmHmn61ffORs274qHiQUn6dvaYzHqaDk1//dd/w8dSPYP300zKYBwMFGmqueu/o4U4aGIXWGn3AtifdCvwNHzmLFP9pPH3MWq6KWSYCK2gwzsNqTtzbBZ9uyOg4jq3sIUoTEmMNTqmuzHdXqSxn8v5icJDu4Cc/DJTPJTaPHcPIncZ1JlJDK94XoRJVGjeGmax/tlGFx5cEBpG5Tt1yttATBRiwYzL6ZVnEDH8Q3HPXhqxlE4nu8ETvlh3E9ej/qCRzYkasg7VbQqDifouR05jd7Jj4cqN8BMJsUGa/XcS1UQXbUbqdnqV0zETbrNcNaUVuvwRV0cAUyX1cDwn11gXK3wXoV7XObDKhtLLVxzBuLRrej8FvIrL81fYqTw7chlOmZnwNqQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0701MB3050.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(91956017)(2906002)(86362001)(33656002)(40140700001)(52536014)(83380400001)(8936002)(64756008)(66446008)(53546011)(44832011)(7696005)(66556008)(76116006)(9686003)(8676002)(5660300002)(6506007)(26005)(186003)(66946007)(66476007)(71200400001)(55016003)(38070700005)(38100700002)(166002)(82960400001)(316002)(122000001)(966005)(508600001)(110136005); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 2NzjIiczZBxc/jzapdk+2tgFTt9Q0sfjzqAfz2GXGWBPx6XelU3gEdUQp2ZJVhfT+MmT43migW3+TM0zs9t46iRAHsteTmEWXhC9+8/nY6s7J9ka6JrsLXC6gmqynT8CBlOkn2ADRW+dMy1Q50pivFbXHTJQR+3QBI7/wQOcHhIU4xYVuyoGzEhhqwYxD36FaFQIn9tm3ulSNKqRIg06b4zvaExxux4FuBH9AFAT1ZxQIa2FUag+hXbSabftjVtCsYPvE0BpkVrXPZ3OucOZG0sxM7svILucBgD2WXMLrrXR72OiRgTZWJNcVCOaPbnOsp8Lkdx82xEp9j/38MNPpiISazr7oUeZkpKcKNqK6h0KEMjN9WLQFKfjBZrzEipRDJkNNj/2FYJ5ibyMkZjUlLNzXyCgSuZu8XPYtomau/rkRnwXlrkELMnwzQcRstzkCZJYfFmzGoZvPK2SC8ecFnFwYOuPR5c7DBK4Y5RVqf5Fjzshlnc2Q53y+vMiScVR/Jq/PXhe6nwN/agyTHj7j5F5wxMrlk6gI44uBL6Gns1z93xuRBuVrmUnb9/hhZ110b1P3n48lZRMbd1num1Dq4iC8Jkp396RzTuGF9OVr8LJM+PflXLb9rOI4zsfT/OAvnJqvgvruNmWzceV3E1SN/hu0Q/2e24dbEguVwFtnfHNM+6iAaLodcPXX/wHJfEXZR/ni5jD/XmHSwoQdwrCtg+dCVB8NjvEdaR1XCf37EulsereJ60ja8nx023Jvhj08IFuxMr6iqUTEExRX3pZe2OVJglUf8KaejPDaX8RaaxoqgsYZkX++YdmNCDl0hSGn0HSk2mChMvB3BiaGg+wdmwaP5UV6UnhvYrsSwZp4FhZyIg+38J2mWNuSqPY1c28uhS4qcF00IPkdUSE56nmfHiy7fHIGdT/j92/xeAA8rUU2id5GyWjDG9hSX+l4GFSBGCvp8etOlg0sH8I8UEG4Eifq56WaK1y0KK1XVtR31C9mXd0NSJ4XUUjc7ROwRWzmxe4dIErb5pCYJU/aoU4ZQ/UqWa7cAl9bnJI6pVnPX2CPEIsFQKOSPOJdVWFqAiHZYYMoGFLuAwgAxvzvNheOgoEIQn0VCwXHgTkH0S1LLPDqsjmS96IASRd4GgRokTJsMY2R14/tfxhuimUQ6XSQiG12X7tl1k0XDjMsrciYIZr0HBHalVDjfOveOxhF3peITgG6i1PeWOAuOuxrOV1a9izHKEawegJdqfHM+/MOfQW8KAuquGHhmddM9qgso3lnlPC0z48Qp9socaHR0vXblF8hHoKDtg1mqAXha+WbI3agI+XWIX6jLI42HlJAUS/acLW1O8h/vhMRKB6HxWz/p0uXmRMrY2tOuSF2JrW2P/PBCuXlQmgbv0GGSUC1Aw5vggrXGbISOBKpXetZPxY7GYojGhpKHhPDcW4emxik5Wzn750Lr+BwMN8Jj31qrzrrRXYK1jEqhyivwGHMySs/LZBNvhDdwndMKCXcWR5sCWWJAQl+0EYFKcNbN0J6a7GbyNo/xpcZWwq1zGYS4hO4FDUb5mBBnTH9N13dqIUZ/7fQLLsqEaSvi4eYA3GDr84SANwhDzkD3GrDoZpljDqHLqZ5Mn/f/QtGqaGc4NxU1MCnFVIp0QiUOyT0hjY/GGL4md3+pi1htKuscj/URHHOjK+S3ix9h6KmUoC9m7fkY8=
Content-Type: multipart/alternative; boundary="_000_HE1PR0701MB3050AC2917533363E9CD23F089359HE1PR0701MB3050_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0701MB3050.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 690fa0a5-a604-4c8d-790c-08d9f13c31bc
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2022 11:05:08.2840 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: IUnmENZ+uRdYo9YYx94sqfO9qi0Ue/nuRJA+z5EVDgJ0zjxahPjDAAMznAlpXwRFXmJeYWTosXJ/gaLp4MiTF3p8Uc29/G1Gd3QuXGNzVVE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB3891
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/CHy-5vdALT-CEEF5DAd0FarlnNE>
Subject: Re: [CFRG] (Re: EdDSA square roots (RFC 8032))
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: Wed, 16 Feb 2022 11:05:34 -0000

Uri Blumethal wrote:

> I second the concern here. What are the advantages of qDSA over ECDSA and EdDSA?

If the numbers in the qDSA paper hold up it seems significantly more efficient when it comes to memory footprint, code size, speed, and energy consumption. I think it makes a lot of sense for a research group like CFRG to evaluate new designs like qDSA. IF the numbers hold up and IF there are no big disadvantages, I think a signature scheme with the performance numbers presented in the qDSA paper could be a welcome addition to COSE, HPKE, and other protocols used in constrained IoT.


>How many “pre-Quantum” signature algorithms to we want to standardize, and why?

So far I think CFRG has published one ECC based (EdDSA) and two hash-based (XMSS and LMS) signature schemes. The EdDSA work did not focus on IoT. It was agreed that CFRG might come back to signatures focusing on IoT. I think more CFRG work considering IoT would be very welcome.

Right now we don't know if CRQCs will ever exist or how many decades it could take. In 20 years, we might have CRQCs or we might have a situation where funding to quantum computing development perished (due to lack of use cases or technical difficulties) and we are thankful that we continued work on Elliptic Curve Cryptography.

For profiles like US CNSA used in non-constrained systems to protect TOP SECRET information that need to stay secret for a long, long time (75 years?) it makes a lot of sense to switch to PQC as soon as possible. The situation in constrained IoT is very different. Many constrained IoT systems today do not use any cryptography or rely on symmetric group keys. The current size of PQC signatures and keys are unusable for some use cases in constrained IoT systems (both devices and radio might be constrained). The struggle right now is to get these systems to use ECC instead of “no security” or symmetric group keys. Any system using ECC needs to be aware of the development of quantum computers, but many systems will likely continue to use ECC and switch algorithms if/when the CRQC threat is more tangible. For some constrained use cases, the switch would unfortunately likely be back to symmetric group keys (with very weak security properties) instead of asymmetric PQC. For some use cases like using Non-Interactive Key Exchange (NIKE) in groups, there is not even any PQC standardization ongoing.

Cheers,
John

From: CFRG <cfrg-bounces@irtf.org> on behalf of Blumenthal, Uri - 0553 - MITLL <uri@ll.mit.edu>
Date: Tuesday, 15 February 2022 at 16:09
To: cfrg@irtf.org <cfrg@irtf.org>
Subject: Re: [CFRG] (Re: EdDSA square roots (RFC 8032))
I second the concern here. What are the advantages of qDSA over ECDSA and EdDSA?
How many “pre-Quantum” signature algorithms to we want to standardize, and why?

Also, shouldn’t we specify the algorithms in a way conducive to validation testing? E.g., recall the discussion about implementer “forgetting” to add PH(M).
--
Regards,
Uri

There are two ways to design a system. One is to make it so simple there are obviously no deficiencies.
The other is to make it so complex there are no obvious deficiencies.
                                                                                                                                     -  C. A. R. Hoare


From: CFRG <cfrg-bounces@irtf.org> on behalf of Rene Struik <rstruik.ext@gmail.com>
Date: Tuesday, February 15, 2022 at 09:21
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>, Ilari Liusvaara <ilariliusvaara@welho.com>, CFRG <cfrg@irtf.org>
Subject: [CFRG] (Re: EdDSA square roots (RFC 8032))

Hi John:

You wrote: "Only one type of key (and code) for DH and signatures".

Doesn't co-factor ECDH and ECDSA with NIST's P-256 curve (or with short-Weierstrass curve Wei25519 [1]) already do this? Or, doesn't this count, since not sexy enough, or not coming from the right stable? BTW - it would be trivial to define Schnorr signatures (if that is the only thing that counts) with short-Weierstrass curves, without introducing yet more zoos of variants, roll-yet-something-new encoding formats, confusion, etc.

BTW - qDSA is again deterministic (to fit with the dogma of the day). There is nothing to preclude implementation of Ed25519 with Montgomery ladders (where only verification speed suffers compared to "Shamir's trick"), so I do not see the competitive advantage (but am happy to be educated here).

What would the benefit be of taking on yet another shiny object now? Shouldn't one first try and fix the current half-baked (pardon le mot) mess?

Rene

Ref: [1] https://datatracker.ietf.org/doc/draft-ietf-lwig-curve-representations/
(see also https://www.ietf.org/archive/id/draft-struik-lwig-curve-representations-00.txt of Nov 17, 2017)


On 2022-02-15 1:42 a.m., John Mattsson wrote:
>Then if one really wants to optimize code size, there is qDSA,
>which can share vast majority of code with montgomery-ladder key
>exchange code, like unclamped curve25519.

Yes, I agree. I strongly think CFRG should look more at all aspects of signatures for IoT. It would then make more sense to look at new designs such as qDSA. I re-read the qDSA paper. It seems very promising with:

- Small memory footprint.
- Small code size.
- Only one type of key (and code) for DH and signatures.
- Fast (lower latency is good. Not sure power consumption is a practical problem).

I think it could make a lot of sense to standardize qDSA with a variable-length hash function like SHAKE128. SHA-256 is the old standard, I don't think we need to drag that into the future.

Cheers,
John

From: CFRG <cfrg-bounces@irtf.org><mailto:cfrg-bounces@irtf.org> on behalf of Ilari Liusvaara <ilariliusvaara@welho.com><mailto:ilariliusvaara@welho.com>
Date: Monday, 14 February 2022 at 09:20
To: cfrg@irtf.org<mailto:cfrg@irtf.org> <cfrg@irtf.org><mailto:cfrg@irtf.org>
Subject: Re: [CFRG] EdDSA square roots (RFC 8032)
On Sun, Jan 30, 2022 at 09:45:36PM +0000, John Mattsson wrote:
> I agree with Paul that RFC8032bis would make a lot of sense. In
> addition to the issues discussed in this thread:
>
> - Purely deterministic per-message nonces are highly problematic both
>   in IoT devices and in multi-signer settings. The issues are so
>   significant that the only choices are to not use EdDSA or to
>   implement the signing in a non-compliant way.
>
> - Current constrained IoT devices use SHA-256 (in the future maybe
>   SHAKE256, KangarooTwelve, or NIST LWC). Implementing SHA-512 just
>   for EdDSA is not likely to happen. If EdDSA do not support the
>   _hash_ function supported on the device, they will likely use ECDSA
>   instead.

(Have fun with bit order if using ECDSA with SHAKE256 or
KangarooTwelve... I do not think the latter is even defined).

And I do not think it is possible to make EdDSA use SHA-256. What one
could do is define a new signature algorithm that is similar to what
EdDSA would be with arbitrary signature algorithm.


One example construction (closely modelled after Ed25519):


Parameters:

 * A group.
   + Assumed to be dlog-hard.
   + Generator G, of order l.
   + has constant-length octet-string encoding.
 * Hash function H
   + Assumed to be preimage-resistant.
   + Assumed to be from octets to octets.


Keygen:

1) Generate a random number a in range [1,l).
2) Let A=a*G (scalar multiplication)
3) Public key is encode(A), private key is a.


Signing:

1) Let r be random/noisy/deterministic per-message nonce in range
   [0,256^roctets), where roctets is big enough (what is big enough
   depends on l).
2) Let R = r*G (scalar multiplication)
3) Let h = le_decode(H(encode(R)|encode(A)|M))
4) Let s = (r+h*a)%l
5) Signature is encode(R)|le_encode(s). Where s is encoded using minimal
   constant-length encoding.

Note: If G is chosen so that l is the same as in Ed25519, then roctets
is at least 32. For l equal to one in Ed448, roctets is at least 56. One
way of determining roctets is to pick least value that gives entropy
loss of less than 1/sqrt(l).

Note: If G is chosen to be the same group as in Ed25519, and H is chosen
to be SHA-512, then the signatures will with overwhelming probability
pass Ed25519 signature verification. On the other hand, no natural
choice of G and H gives something compatible with Ed448.


Verifying:

1) Decode R, A and s. If decoding fails, reject.
2) Let h = le_decode(H(encode(R)|encode(A)|M))
3) Check s*G =? R + h*A holds  (*'s are scalar multiplications).

Note: For some beyond-standard-signature-security properties, check that
the encodings are canonical, and R and A have high order. Any legimate
signature is extremely unlikely to fail these checks.



For prehashing, I think it is better to do that at higher layer, which
can apply things like salting hashes in order to counter some attacks
against hash function used.


Then if one really wants to optimize code size, there is qDSA,
which can share vast majority of code with montgomery-ladder key
exchange code, like unclamped curve25519.



-Ilari

_______________________________________________
CFRG mailing list
CFRG@irtf.org<mailto:CFRG@irtf.org>
https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-40f7d10cf9eb7c69&q=1&e=bc1044a0-1981-4657-818f-5ae3dd11e71d&u=https%3A%2F%2Fwww.irtf.org%2Fmailman%2Flistinfo%2Fcfrg




_______________________________________________

CFRG mailing list

CFRG@irtf.org<mailto:CFRG@irtf.org>

https://www.irtf.org/mailman/listinfo/cfrg<https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-40f7d10cf9eb7c69&q=1&e=ef97e2ee-4fe3-4885-bfcc-5729330ffe91&u=https%3A%2F%2Fwww.irtf.org%2Fmailman%2Flistinfo%2Fcfrg>



--

email: rstruik.ext@gmail.com<mailto:rstruik.ext@gmail.com> | Skype: rstruik

cell: +1 (647) 867-5658 | US: +1 (415) 287-3867