Re: [Cfrg] I-D Action: draft-irtf-cfrg-hash-to-curve-07.txt

"Riad S. Wahby" <> Tue, 28 April 2020 16:31 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D64533A08E5 for <>; Tue, 28 Apr 2020 09:31:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.218
X-Spam-Status: No, score=-2.218 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_MSPIKE_H2=-0.82, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Z_luuh1CwtyV for <>; Tue, 28 Apr 2020 09:31:18 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8E2ED3A08E3 for <>; Tue, 28 Apr 2020 09:31:18 -0700 (PDT)
Received: by with SMTP id 18so9699351pfv.8 for <>; Tue, 28 Apr 2020 09:31:18 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=XsYQQXzaVTvaLTYF0K4XQdv/yROvUH6JiPOC4u/qMEQ=; b=CHsaOLjMEcKgcWxzDYObtCntiiGGVLT/z207uPxg6tEJsgewkPQqxpzl+MtcaxT5OT ZqOV4jS52U/fRQdWgUIc/hdmg4mGGzJ0mDHiSYWkGvvWv2UfIrnU7NEM6nY0+FIe4FPa mBv05CgsdH4zoIkhp75qOFFZRAbouh9i0/PTps150hTliOn3fVSllGAkSonnW0supSd7 tNxbjuuHp9TxumPklX/JJo3YncqkLcwwKZqDRx1E5FNhCPt8qUX2hJEXHjl/hAryWGBG LuluxJrVzqUWbt9qyWTn06/V0PCFhJm+YvsXdnywfIlGzcS8G1Ztg6a8Rd0Oia6ZkkVz 1wmQ==
X-Google-Smtp-Source: APiQypIfK6uMU/fTtoSwrty1BQZzvRAKLXGlyBpnH3ZJGUayu+YH2cCxOqSq8h50BDPstimJzRAygw==
X-Received: by 2002:a63:e60a:: with SMTP id g10mr12542404pgh.51.1588091477996; Tue, 28 Apr 2020 09:31:17 -0700 (PDT)
Received: from localhost ( []) by with ESMTPSA id x12sm912282pfo.62.2020. (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Apr 2020 09:31:16 -0700 (PDT)
Date: Tue, 28 Apr 2020 09:31:15 -0700
From: "Riad S. Wahby" <>
To: Björn Haase <>
Message-ID: <20200428163115.gbsmbwul6ykch734@muon>
References: <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <>
Archived-At: <>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-hash-to-curve-07.txt
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 28 Apr 2020 16:31:20 -0000

Hi Björn,

Björn Haase <> wrote:
> Iwould understand a zero-padding that would first insert some
> information that should be maintained confidential and a Z_pad string
> that fills up the remaining rest of the input block of the hash function
> with zeros. However, I did not get the point, why filling the first
> block with zeros should provide any advantage.

Good question! The answer is that this zero block allows one to prove
this construction indifferentiable from a random oracle when the M-D
compression function is modeled as a random oracle (which is effectively
the strongest statement we could hope for in this context).

In particular, prepending a block of zeros instantiates an NMAC
construction, as described in Section 3.5 of the following paper
(the full version linked below gives a security proof).

    Coron, Dodis, Malinaud, and Puniya. "Merkle-Damgaard revisited:
    How to construct a hash function." Proc. CRYPTO 2005.

This is discussed in the "Security Considerations" section of the
document. I will go back and double check that Section 5 makes
a clear forward ref to that discussion.

Thanks for the feedback and take care,