[Cfrg] draft-irtf-cfrg-argon2 variable-length hash function size

Matthew Endsley <mendsley@gmail.com> Wed, 20 May 2020 21:59 UTC

Return-Path: <mendsley@gmail.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 E2DB03A0765 for <cfrg@ietfa.amsl.com>; Wed, 20 May 2020 14:59:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 S_p4A_SXQqyR for <cfrg@ietfa.amsl.com>; Wed, 20 May 2020 14:59:10 -0700 (PDT)
Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (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 6B8FC3A0762 for <cfrg@irtf.org>; Wed, 20 May 2020 14:59:10 -0700 (PDT)
Received: by mail-lf1-x129.google.com with SMTP id w15so3240110lfe.11 for <cfrg@irtf.org>; Wed, 20 May 2020 14:59:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ZAT+gX4b9vIqgjNPHwAH+ud4evjCnxStH+PIyEuyyqE=; b=Hc3LoHwx5gnOT1oHVlqxTaeVCdMz5pepc2ucDwEa8PzYAd0HJJsqKQdc5n/dBUX2LD tC4THslHbP6ISdC5YVN1tgshXbTWdvnQ+xrCUz5VL11pbQxjcixuqyP9qkb9zPlOGTQI TsjlSdQOccYRzb8d4fd7YJtIeWY8Mm+ZZLeCwJPRrvJuxU/NY90bq7QT0NUhteNqiIfT 3uAe1mOyZbXFbnejJNjzbcytJlXd+nnZd8sGfvAaeC3K4espnjrCKaUj0DrwbOtgiNBu qgvixoxgbOpQ1BCb2LWhm36ktjFb3Wr02rFZ2HD2T2HZsNT4dhktC2nOa1nDZif1GnCj vcWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZAT+gX4b9vIqgjNPHwAH+ud4evjCnxStH+PIyEuyyqE=; b=EHUECrA5B0rpKirmi/Kv4Ae6hw+5PQQIGJCbLFDrq+ApMj3lRk1YXUo08x7CSIfkEv DWreNVPuz21BpSnQY5NhVxtpMbSjsqKye5exJP7LReWB2LjTjVKtmJXJQzRCHSk7Q1k5 wEMX/miIPwvfYcxCbOrnjYAbLXYCFk8IXgR7y2ToYCH2S+p4tVNrQszkMWtTxK/FuV06 qyY/T6s8jzKMvsQPvRtnYWPleeexDLZvjzQjoDJ8adVPuBM+T//HpjDj+h9MOCy3qWmZ FX1GnV9/Uo9ajoMav40cgT0tpyGei8gm76RwZEArzDdT0Az6Oc3CaK0F7caQeAw1NgQX EQag==
X-Gm-Message-State: AOAM530jjuh1pZwTD+69rZIOr3hWyDen1MLCRYj/ow4lovuQgkiWJjsb WzBnZZSbDvOPHGfuDIrZ8pmihRKDGI5Pb4MBkkc3hDrcgiY=
X-Google-Smtp-Source: ABdhPJzGJ0P2wD3whemohzwNWAzWyHw1ZVaBafHWGOVXNTRhX/LNaP07/wy/K4CuOu0yDb8hQl42JYCVGtqLU9OKEck=
X-Received: by 2002:a05:6512:10cd:: with SMTP id k13mr3547223lfg.153.1590011947977; Wed, 20 May 2020 14:59:07 -0700 (PDT)
MIME-Version: 1.0
From: Matthew Endsley <mendsley@gmail.com>
Date: Wed, 20 May 2020 14:58:56 -0700
Message-ID: <CAGgBLUtTES2sig=Y+7X18Vk=MnZ4Kxg023icjGZiTuaTBhvzDw@mail.gmail.com>
To: cfrg@irtf.org
Content-Type: multipart/alternative; boundary="000000000000590e8a05a61b816c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/_GXQDrSOL5wUPpTep5v2-V3Dqm4>
Subject: [Cfrg] draft-irtf-cfrg-argon2 variable-length hash function size
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, 20 May 2020 21:59:12 -0000

While implementing argon2 from draft-10, I either incorrectly interpreted a
section or there is an error describing the variable-length hash function
H'.

Section 3.2 lists the operations to perform the Argon2 hash.

This describes the hash function H^x() having an output size of x bytes.

Steps 3 and 4 calculate the initial blocks B[i][0] and B[i][1] as the
result of the variable length hash H'^(128).

I believe this is supposed to be H'^(1024) as the intent is to fill the
entire 1kib block. Using H'^(128) only fills 128 bytes, and generates the
incorrect values for the test vectors. H'^(1024) fills the entire block and
generates the correct values for the test vectors.

Matt