Re: [openpgp] [PATCH] RFC4880bis: Argon2i

Nils Durner <ndurner@googlemail.com> Tue, 03 November 2015 21:06 UTC

Return-Path: <ndurner@googlemail.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 83D811A01A2 for <openpgp@ietfa.amsl.com>; Tue, 3 Nov 2015 13:06:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 h-v1l-Vf0EZ8 for <openpgp@ietfa.amsl.com>; Tue, 3 Nov 2015 13:06:12 -0800 (PST)
Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (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 F1AA61A871B for <openpgp@ietf.org>; Tue, 3 Nov 2015 13:06:11 -0800 (PST)
Received: by wicfx6 with SMTP id fx6so77532796wic.1 for <openpgp@ietf.org>; Tue, 03 Nov 2015 13:06:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=KHc33mYeaR4aZVKXeZSctTTyYdLpgWozi881Me1EPyA=; b=asrG05WDCCnkRADby/ZAI2OaOw8TX2bVwt+/MIEGsb8Z9jGnILtPd04ekEwyKBWiLP 0QBtgwLLIECoxBYQiUGvQIixHsmgSnuWtkY+9VTet6j4Z3s3QVejKLyc/1h+WnT2YGFW Zwki+IMQku14auEOwUCFU+dC/qPRdc/9cKryEx6vDiNxECLChp/ZQdRtghj9ZajMhKEQ w+Dq8LaIc7dio9zLvHHMLArR/VeRAoz182KB9CwaARLoPz2XD45ac6KaT73aQCie+te3 Hb5h2Abo4ESLp8SsUSWqzDRW/aSW2slFAXeDKV0VlpBoMac1ejHEzbsjJciPa1tUT3Cs N7FA==
X-Received: by 10.194.175.226 with SMTP id cd2mr36068836wjc.30.1446584770322; Tue, 03 Nov 2015 13:06:10 -0800 (PST)
Received: from [192.168.188.46] (x4db00818.dyn.telefonica.de. [77.176.8.24]) by smtp.googlemail.com with ESMTPSA id n17sm25210828wmg.17.2015.11.03.13.06.09 for <openpgp@ietf.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 13:06:09 -0800 (PST)
To: "openpgp@ietf.org" <openpgp@ietf.org>
References: <5623AA95.4060903@googlemail.com> <87k2pzwdku.fsf@vigenere.g10code.de>
From: Nils Durner <ndurner@googlemail.com>
Message-ID: <563921C1.7020800@googlemail.com>
Date: Tue, 3 Nov 2015 22:06:09 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <87k2pzwdku.fsf@vigenere.g10code.de>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/DPWkTqdwia8qL_5LONOC97Jzkho>
Subject: Re: [openpgp] [PATCH] RFC4880bis: Argon2i
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Nov 2015 21:06:13 -0000

Hi Werner,

>> +Implementations MUST generate S2K specifiers that include salts
>> +(either type 2, 3 or 4), as simple S2K specifiers are more vulnerable to
> Type 2 is not defined but reserved, you probably meant type 1.

Right. Fixed in
https://gitlab.com/ndurner/rfc4880bis-s2k/blob/master/misc/id/rfc4880bis/middle.mkd
 
> I also assume you allow type 1 (Salted S2K) to allow the use of an
> entire random passphrase, right?  The salt then acts as IV for the SESK.
> Should we explain this use of type 1?

Absolutely. What do you think about:
> diff --git a/misc/id/rfc4880bis/middle.mkd b/misc/id/rfc4880bis/middle.mkd
> index 2ab0100..6987f6e 100644
> --- a/misc/id/rfc4880bis/middle.mkd
> +++ b/misc/id/rfc4880bis/middle.mkd
> @@ -379,7 +379,9 @@ time independently of the memory size.
>  
>  Implementations MUST generate S2K specifiers that include salts
>  (either type 1, 3 or 4), as simple S2K specifiers are more vulnerable to
> -dictionary attacks. Use of Argon2i is RECOMMENDED as it offers
> +dictionary attacks. Type 1 MAY only be generated if the string is
> +entirely random and the salt is used as an IV.
> +Use of Argon2i is RECOMMENDED as it offers
>  protection against massive-parallel and side-channel attacks. When
>  reading S2K specifiers that do not include salts, implementations SHOULD
>  issue a warning about potentially insecure methods being used. When

?


Regards,

Nils