Re: [openpgp] Disadvantages of Salted Signatures

Nickolay Olshevsky <o.nickolay@gmail.com> Wed, 13 December 2023 12:36 UTC

Return-Path: <o.nickolay@gmail.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 61CACC14F602 for <openpgp@ietfa.amsl.com>; Wed, 13 Dec 2023 04:36:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.104
X-Spam-Level:
X-Spam-Status: No, score=-7.104 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cneTdLF6Su7 for <openpgp@ietfa.amsl.com>; Wed, 13 Dec 2023 04:36:26 -0800 (PST)
Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 399A1C14F5F4 for <openpgp@ietf.org>; Wed, 13 Dec 2023 04:36:26 -0800 (PST)
Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-54f4f7d082cso7538254a12.0 for <openpgp@ietf.org>; Wed, 13 Dec 2023 04:36:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702470984; x=1703075784; darn=ietf.org; h=in-reply-to:autocrypt:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=IT3P98V2uUSAfH2BelqF6OgvfSao5pcuIqerwFQ0y9U=; b=hC3uSzUA50KPahx4s0StZNbYtYUQayEIjdRtzV8VlyONtQmEuer8DonGWJL9/yeyB0 tCVwdBO/s7Kbe1zBuVP0PHEVnujXaQ9fqH3D5htHBSjXhd2ynOJqJ+4X5FOWLLMvvpfk FuXUeAT8hyZ9Slp+rFWSlzk5FMDiJjlyPq4oLcBXifOhfyme2C5q0nymJxgrdlaygGrw wyaZ/WSuFTnWqhWRyghNxbOFaHIdFjxtjfxab6Ax1sTe9F1Ls9qUztd//BUr15ekTaPn Mb2wVaCg95DuMXaWj5PrQaQkyuJMBgKTpogaKyjVfb7DTGwpo1k94nRZN+JRfbJxcoK+ O34Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702470984; x=1703075784; h=in-reply-to:autocrypt:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=IT3P98V2uUSAfH2BelqF6OgvfSao5pcuIqerwFQ0y9U=; b=eroyU8w8XG0JXCxHM6Vfbpv2JzOrYtpnlbuwI0gGsM7scID0YesPWMTPaAi8ZsGMRI /u6DOND7U/J/GOq9cLrJp6QOlcBG2Kprunlwi89ZIK8Hb7Nlg/6acpawRRaMNuwCfQrB rSTNxeumwBGjhPfVSA3zWPGgmg5S+BbeNGVbdAt+qPexV4aRDix+T3Fb2Y0rHmk8k8Y7 Jc5w2qJPNWlZJAQPemGsLQikQeJ1wi/W6PKqvmxEO0+im9/h+yGeafQr5NdXRglGVFwe JnfPRBDu8VEGKUV947cwRFy5t/FWnt5n17xGdTU4vfIOMS7CkwQkY74SC+Fcnx69ifIB fTzg==
X-Gm-Message-State: AOJu0Yz1lzVWy0HliMIhwzakS7rxkY+/k/usjCcuzoUGI4YjjXlbm2I0 gVKmwGXu09gBlT/aKHD2oKBGLlKdH7s=
X-Google-Smtp-Source: AGHT+IEKVR8wsIf2M51wCtRCaIy1oJmouYPnj/bKlE+a2ymmURLvy25EfzNtQ5KWKQfT2IUzMTTGjA==
X-Received: by 2002:a17:906:74d2:b0:a22:fb55:16b4 with SMTP id z18-20020a17090674d200b00a22fb5516b4mr478973ejl.133.1702470984194; Wed, 13 Dec 2023 04:36:24 -0800 (PST)
Received: from [192.168.88.164] ([46.229.60.139]) by smtp.gmail.com with ESMTPSA id rl19-20020a1709076c1300b00a1f8bae93d3sm5657431ejc.215.2023.12.13.04.36.23 for <openpgp@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Dec 2023 04:36:23 -0800 (PST)
Content-Type: multipart/alternative; boundary="------------cb1ZZwHctZp4ycyvvN0ABQxH"
Message-ID: <0cf9a740-d783-45c0-aa90-1d6868134021@gmail.com>
Date: Wed, 13 Dec 2023 14:36:22 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
To: openpgp@ietf.org
References: <077dd27cef0c7d3968967fc4c3a880081b8bd9dd.camel@posteo.de> <87jzplrtfy.wl-neal@walfield.org> <87bd4895386b3a0cd0c62429b0b85df6f1860da2.camel@posteo.de> <db25c5b9-0d08-4b45-85c9-49b8277d80ec@gmail.com> <875y13sooh.wl-neal@walfield.org> <ba75b1b3-2b57-440e-ba6e-e9629bc9cf6b@gmail.com> <FF2CBF7A-8228-4483-9B43-B750ACBCE22F@riseup.net>
From: Nickolay Olshevsky <o.nickolay@gmail.com>
Autocrypt: addr=o.nickolay@gmail.com; keydata= xm8EXrEsexMFK4EEACIDAwQqzVDrNPoyfcq4glxNmTEa0OCh1pmY/CcnrJb/bd9Cqi5eCOjF rTHjdY7SMXH5KQlrcQJwjiuyecr8S+GzUnKbE7fYjrg0YjhXr9SzA0xQ7rN1EanYl0lK6m21 zCjitOjNKU5pY2tvbGF5IE9sc2hldnNreSA8by5uaWNrb2xheUBnbWFpbC5jb20+wrkEExMJ AEECGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4ACGQEWIQRGfUTJeA+FOnu7NUq4LmkIQ+XE IwUCYrGmagUJB8Lg7wAKCRC4LmkIQ+XEI0iYAX0Ys7QcBnSCRI4OXE3AIBXafwO7oV+0NDxL eokgj1Ij2A9AbAVS4fo1eH0AMhg7ZioBgJDBYDIFljrGDWnmPZ8QSqfr79BPwInndqPbrrxH 0NiqzttaxqxXQkhoGfRUIhQcM85zBF6xLHsSBSuBBAAiAwMEHRW8a30kMl2MaIulUJfAM1wM AmmUnSRIcbR2dbjzqz4FNl6kLlvy0zXdtW6fiiWtX9LKUuazQPV9q4tSkkSlPOzKVsx3eE4X 3HjUD6ZDN13dd3Gd72km/4gV7LolU7g5AwEJCMKeBBgTCQAmAhsMFiEERn1EyXgPhTp7uzVK uC5pCEPlxCMFAmKxposFCQfC4RAACgkQuC5pCEPlxCOonQGAzzZukeMuAgLmkP9lUvH0JAfQ ENuwDmGF5kHAhAsYYMeQarg1CtOsosCjYusjLZZYAYDUOpI5VGATb3JTm38FdjUWb8QwlEym r1YeKy3FePmtNF2jXmIcIwqwhj1p39xdFGc=
In-Reply-To: <FF2CBF7A-8228-4483-9B43-B750ACBCE22F@riseup.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/kI61dBvYF4P7eJ9ip4wKeHDYw-A>
Subject: Re: [openpgp] Disadvantages of Salted Signatures
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 13 Dec 2023 12:36:28 -0000

If subpacket is no-go (actually, don't get how that technically differs 
from adding separate signature field), another way to relax MUSTness of 
salted signatures is to allow zero-size salt.

P.S. Isn't chaos is what we already have :-)

On 13.12.2023 14:21, Paul Schaub wrote:
> I disagree. The way I see it, signature subpackets are intended to be 
> processed in a unified way by simply hashing them as part of the 
> signature.
> Having custom behavior for some subpackets would probably cause chaos.
> This would require the subpacket to be marked as critical anyways, so 
> why not just go with the dedicated format instead?
>
> Paul
>
> Am 13. Dezember 2023 13:17:02 MEZ schrieb Nickolay Olshevsky 
> <o.nickolay@gmail.com>:
>
>     This may be overriden with some wording like 'If 'salt' subpacket
>     is present in signature, it's contents must be fed to the hash
>     context before starting to hash all other signature's fields'. On
>     12.12.2023 12:25, Neal H. Walfield wrote:
>
>             As far as I remember there were proposal of adding some
>             'salt' signature subpacket, which would serve exactly same
>             purpose. This would work in both cases: if implementation
>             needs salt, it would add it as subpacket, or do not add
>             otherwise. 
>
>         There's an important, but subtle difference between using the
>         salt as specified in the crypto-refresh, and putting the salt
>         in a subpacket. In the crypto refresh, the salt is placed at
>         the very start: When creating or verifying a v6 signature, the
>         salt is fed into the hash context before any other data.
>         https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#section-5.2.4-2
>         Putting the salt in a subpacket means that there is still some
>         data that an attacker can predict and potentially control,
>         which means it doesn't preclude a chosen prefix attack. 
>
-- 
   Best regards,
   Nickolay Olshevsky
   o.nickolay@gmail.com