Re: [Cfrg] Elliptic Curves - signature scheme: friendliness to low memory implementations (ends on June 3rd)

Rene Struik <rstruik.ext@gmail.com> Thu, 04 June 2015 01:08 UTC

Return-Path: <rstruik.ext@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 458D81B3111 for <cfrg@ietfa.amsl.com>; Wed, 3 Jun 2015 18:08:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.4
X-Spam-Level:
X-Spam-Status: No, score=-1.4 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, J_CHICKENPOX_47=0.6, SPF_PASS=-0.001] autolearn=no
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 tdz4bJRx0FyL for <cfrg@ietfa.amsl.com>; Wed, 3 Jun 2015 18:08:19 -0700 (PDT)
Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (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 D0F501B3117 for <cfrg@irtf.org>; Wed, 3 Jun 2015 18:08:07 -0700 (PDT)
Received: by igbpi8 with SMTP id pi8so126293893igb.1 for <cfrg@irtf.org>; Wed, 03 Jun 2015 18:08:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ckiSKcsMx8xik3GFbMJ3v00yzsb3GwDODFfYJIpIyCY=; b=AZ4xKcMxu8LbOGOItTCA6XYpE1wNo7INWAcVqHDVLPu1N8vTRMftGZlPAfB1xGZJoZ EuBOISMAaDFaR3nSXekrHZ0Km3XCTiCd1tmzNaM8+ZPdr8bJR9N71U3eaHJqXhYRJmLx qTUQAYQ0Jng90/TPFY/9flplvDzMFssFoVTtX/Y2xpsI/g/tVwTvgpxCSyMO+9O5lO0D 03UJ7b1vGD6DqZeO5MRmRsrS3MXxSLl4W/6/rBp5abwWY/Mkuj/WA/92PvXj2k11FdRW XNPzWUTCFSrCt1cozOAhlhenm+l7VS1O08nwdICSum2r904KYfPGFqFQC/NG8YmG9PPm qTvw==
X-Received: by 10.107.137.170 with SMTP id t42mr44546718ioi.16.1433380087134; Wed, 03 Jun 2015 18:08:07 -0700 (PDT)
Received: from [192.168.0.14] (CPE7cb21b2cb904-CM7cb21b2cb901.cpe.net.cable.rogers.com. [99.231.49.38]) by mx.google.com with ESMTPSA id u35sm340894iou.7.2015.06.03.18.08.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 18:08:06 -0700 (PDT)
Message-ID: <556FA4E3.3040303@gmail.com>
Date: Wed, 03 Jun 2015 21:07:47 -0400
From: Rene Struik <rstruik.ext@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: Taylor R Campbell <campbell+cfrg@mumble.net>
References: <20150603224640.AF2A460567@jupiter.mumble.net>
In-Reply-To: <20150603224640.AF2A460567@jupiter.mumble.net>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/bMb5in2oFeGtNfxGo1Q_anQi01M>
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] Elliptic Curves - signature scheme: friendliness to low memory implementations (ends on June 3rd)
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Jun 2015 01:08:21 -0000

Hi Taylor:

I  think that lots of assertions and claims in the email poll are 
somewhat (or, perhaps, a lot) "off" and put people (at least me) on the 
wrong footing. Hence, my email.

Thanks for your anecdotal pointers, which are well-documented factoids 
of in-expert implementations (aka stupidity).

Rene

On 6/3/2015 6:47 PM, Taylor R Campbell wrote:
>     Date: Wed, 03 Jun 2015 17:14:57 -0400
>     From: Rene Struik <rstruik.ext@gmail.com>
>
>     Isn't the double signing merely an artifact of running the Schnorr
>     signature scheme in a mode where the ephemeral private key is
>     deterministically derived from message and private info?
>     I don't see how this would apply with the original Schnorr scheme, since
>     there one simply has s:= k - e d (mod n), where e=h(m,R), where R:=kG,
>     where n size of prime-order subgroup, and where k is randomly picked.
>
> Requiring signers to have a source of entropy at signing time to
> randomly choose a distinct k for each signature has historically been
> a source of high-profile cryptography disasters[1][2].
>
> The NIST was warned about this in 1991 when standardizing the DSA, and
> ignored the warning[3], claiming that entropy at signing time is no
> more likely to be bad than entropy at key generation time.  Debian
> showed them wrong.
>
> There are three security concerns in Alexey's poll and your question:
>
> (a) secret key recovery if k is reused or even slightly predictable,
>
> (b) signature forgery if the attacker can find collisions in the hash
> function, and
>
> (c) denial of service or processing of unauthenticated data if a
> protocol requires the verifier to consume arbitrarily large messages
> before verifying the signature.
>
> Randomized DSA- or Schnorr-type schemes that use an entropy source at
> signing time are vulnerable to (a).  You can defend against this (and
> EdDSA does) by hashing the secret key together with the message to
> derive k deterministically: the secret key is unpredictable to the
> attacker, so standard PRF assumptions imply k is unpredictable too.
> (Bonus: easy test vectors for the real signing code.)
>
> Schemes defined in terms of H(m) for a fixed H are vulnerable to (b).
> You can defend against this (and EdDSA does) by using a keyed hash
> H_k(m) and relying only on target collision resistance instead of
> collision resistance.
>
> You could defend against both (a) and (b) by hashing the message under
> a different key, say h, and signing H_h(m) -- that is, choose h
> randomly, compute H_h(m), and derive k from the secret key and H_h(m)
> to sign the message h || H_h(m).  But this leaves (c).
>
> Protocols designed under the assumption of streaming I/U/F are likely
> to be vulnerable to (c).  You can defend against this (and EdDSA does)
> by encouraging protocol designers to sign and verify short messages
> rather than long ones, and to split long messages into independently
> verifiable parts, e.g. by signing each part separately or signing the
> root of a Merkle tree of parts.
>
>
> [1] Debian broke OpenSSL's PRNG seeding so that it had only 2^15
> possible seeds, enabling recovery of (EC)DSA secret keys used on
> affected systems with predictable k even if the secret key was
> otherwise secure.  https://wiki.debian.org/SSLkeys
>
> [2] Sony reused k verbatim for PlayStation 3 firmware updates signed
> with ECDSA, enabling recovery of the firmware signing key.
>
> fail0verflow, `Console Hacking 2010: PS3 Epic Fail', 27c3, 2010.
> http://events.ccc.de/congress/2010/Fahrplan/attachments/1780_27c3_console_hacking_2010.pdf
>
> [3] Miles E. Smid and Dennis K. Branstad (NIST), `Response to Comments
> on the NIST Proposed Digital Signature Standard', CRYPTO'92, LNCS 740,
> pp. 76--88, Springer, 1993.  (See Sec. 4.9 about k.)


-- 
email: rstruik.ext@gmail.com | Skype: rstruik
cell: +1 (647) 867-5658 | US: +1 (415) 690-7363