Re: [Cfrg] I-D Action: draft-irtf-cfrg-argon2-02.txt

Dmitry Khovratovich <> Mon, 27 March 2017 10:51 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3CD121294CF for <>; Mon, 27 Mar 2017 03:51:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.667
X-Spam-Status: No, score=-1.667 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id z9Jr_Ziz8zXX for <>; Mon, 27 Mar 2017 03:51:33 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A531C12947B for <>; Mon, 27 Mar 2017 03:51:33 -0700 (PDT)
Received: by with SMTP id i203so28112480ywc.3 for <>; Mon, 27 Mar 2017 03:51:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=NwuXKerL/S7v5bXrqf16nGtfg7dLgJ9+XU2wKps3NNc=; b=SI9dM/WQOcdy5GzEr+IJW83QGw2CIJeYHXI7DOxEboYUkOIvzOrFP+oTRyE9JWcJgV 7OKMJmj4mgDGC9pXaNKAqOYx6T1V20XqILp7p+01xLwCESRUaxVbs1ceuNKXMYEkBnyT y5wFSmEvTsfWnxIiD9jLZN8ap8oZJCWYRxWo87RnQojhcBkpyF8PewspbeIITdYIPEns 9i1jdKqfUWXlsBFAV3s+GjSNDVUX42UzUZmDS6XUrPth1ihuLboTFSQmMih1aug/ALk/ C2r2QtZsvwoI3Jsg4gbhcihEPh4U8g0A7X3nGzLbm6/POVguNAeHdsPSrQjO/EjE94ex dq5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=NwuXKerL/S7v5bXrqf16nGtfg7dLgJ9+XU2wKps3NNc=; b=ixhNnvI4STqie5MFbpppaN5Fx9PZ8sAAZeuwmCFpw2/T67eIVKcVsz0CqT6jRbbEAI iNXYQsgLnr/rAfr7izU/BqVWjiGXO++hks0pLc662+mOseNyjjOKsnyCxxaUQNEmntu0 H/VopY3dYDcmvp849n6xefvogk6nZNJeQ5M0/DI8Utef2bzjulxPXlBB/UB8h7e4X7Tf 2/JA0YF+z1CraJ4+vLk74HAN3DAcZl+Qck5nvd+jpp+7OhGZnIfs4PC/LfXeX2hZ84Mq lJuVl+CHcKK3AjDLBh3QlxZGiVhC+VaOCHnaKSH/9UE/aEYU6hdTPKFARiPQUAgwQOyH GU6A==
X-Gm-Message-State: AFeK/H367hS0A3khXqnuBWM1uxiXy+lpE7JnwH9KUVTEPPzA5NZXCOtkTH81aYCUNZ5bAhQxFFGOvxoyS3f7mA==
X-Received: by with SMTP id e199mr15323015ybb.165.1490611892717; Mon, 27 Mar 2017 03:51:32 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Mon, 27 Mar 2017 03:51:17 -0700 (PDT)
In-Reply-To: <>
References: <>
From: Dmitry Khovratovich <>
Date: Mon, 27 Mar 2017 12:51:17 +0200
Message-ID: <>
Content-Type: multipart/alternative; boundary="001a113ea1465d10b2054bb4201b"
Archived-At: <>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-argon2-02.txt
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 27 Mar 2017 10:51:36 -0000

Some comments on a new draft:Variants

Argon2 fills M bytes of memory in T iterations over it, with M and T being
the parameters supplied to Argon2 and determining its performance. Speed on
a typical server is linear in the MT product.

The Argon2 family has three variants: I, D, and ID, which differ in the way
of reusing memory that has been filled. The I variant makes queries with
predictable addresses, whereas D determines the addresses on the fly
depending on the current state (and thus the password). The ID variant
follows I for the first half of the memory used and D for the rest and
while overwriting.

The side-channel attacks, which are of still rising concern in the security
community, are applicable to the D variant as the memory addresses and thus
information about the password or other secret inputs can be determined
from the timing leaks. The I variant is completely invulnerable to this
attack, and the ID variant provides only a constant factor improvement for
the attacker.
Hardware and tradeoffs

The M and T parameters determine the cost of bruteforcing passwords on
custom hardware, which is proportional to M2T if we follow the traditional
time-area product metric. The time-memory tradeoff analysis [2] shows that
the bruteforce cost for the I variant can be changed to M2T/Q(M,T) for some
quality function Q. For instance, Q(230,1)=5, Q(230,4)=2.5.

The D variant is invulnerable to the approach [2], and the savings factor
in the ID variant is upper bounded by factor 2 for all parameters.
Defender tradeoff and ultimate recommendations

In public and private conversations with security architects in the
industry we learned that the bottleneck in a system employing the
password-hashing function is the function latency rather than memory costs.
We then assume that a rational defender would like to maximize the
bruteforce costs for the attacker equipped with a list of hashes, salts,
and timing information, for fixed computing time on the defender’s machine.
In this assumption the defender keeps the MT product constant and maximizes
the losses M/Q(M,T). The authors of [2] provides us with attack cost
estimates for constant MT = 228,230,232 (measured in iteration-bytes)

We ultimately recommend the ID variant with T=1 and maximum M as a default
setting for all environments, which is secure against side-channel attacks
and prohibit adversarial advantage on dedicated bruteforce hardware.


[1] “Efficiently Computing Data-Independent Memory-Hard Functions”

[2] “Towards Practical Attacks on Argon2i and Balloon Hashing”

On Mon, Mar 27, 2017 at 12:46 PM, <> wrote:

> A New Internet-Draft is available from the on-line Internet-Drafts
> directories.
> This draft is a work item of the Crypto Forum of the IETF.
>         Title           : The memory-hard Argon2 password hash and
> proof-of-work function
>         Authors         : Alex Biryukov
>                           Daniel Dinu
>                           Dmitry Khovratovich
>                           Simon Josefsson
>         Filename        : draft-irtf-cfrg-argon2-02.txt
>         Pages           : 26
>         Date            : 2017-03-27
> Abstract:
>    This document describes the Argon2 memory-hard function for password
>    hashing and proof-of-work applications.  We provide an implementer
>    oriented description together with sample code and test vectors.  The
>    purpose is to simplify adoption of Argon2 for Internet protocols.
> The IETF datatracker status page for this draft is:
> There are also htmlized versions available at:
> A diff from the previous version is available at:
> Please note that it may take a couple of minutes from the time of
> submission
> until the htmlized version and diff are available at
> Internet-Drafts are also available by anonymous FTP at:
> _______________________________________________
> Cfrg mailing list

Best regards,
Dmitry Khovratovich