Re: [Cfrg] testability of signature input/output parameters

Rene Struik <rstruik.ext@gmail.com> Thu, 04 June 2015 17:00 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 9B38F1A0100 for <cfrg@ietfa.amsl.com>; Thu, 4 Jun 2015 10:00:28 -0700 (PDT)
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 68d-0OoBFGbM for <cfrg@ietfa.amsl.com>; Thu, 4 Jun 2015 10:00:27 -0700 (PDT)
Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (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 CD70A1A0067 for <cfrg@irtf.org>; Thu, 4 Jun 2015 10:00:23 -0700 (PDT)
Received: by igbsb11 with SMTP id sb11so44129728igb.0 for <cfrg@irtf.org>; Thu, 04 Jun 2015 10:00:23 -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=Q28FvqHt638jg4lccHIMY1x4jqAKe8iKTOXo7eAqMDQ=; b=T4Ku03s8CFP2x5tlvbtIG7qSAhSeK97EeBSjh45P3sNv0MKnrkNreeuKVOxXcFIJ1P 0GnhfPSAn7Iwhpanr+AdgtBN/XDiF23jQBFd1YxEmgtWZrub4ja/2dVN/k2SR3A0R1ZJ Yw/X0KsbczdT3k9gyPc5cb9D9oOzaEJLVvfgBs0GzNx19oSTuR0Z5whqv7nsGnyuu4wE 0gWbhDdK5yrWJE0MYWcQ/4eyG4bD3WTYkndd2n6hm/RMZsam7ne0QSOyf35WKsj3DzZ7 U09ecNyuP2u3Ctulu7mgOY30eWMSGeDZqyQE5nZQ0oakPlWFkZ6gaboBNmIFJqQYue1a R0GA==
X-Received: by 10.107.15.149 with SMTP id 21mr50825274iop.44.1433437223355; Thu, 04 Jun 2015 10:00:23 -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 d4sm1544883iod.17.2015.06.04.10.00.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jun 2015 10:00:22 -0700 (PDT)
Message-ID: <55708413.6010404@gmail.com>
Date: Thu, 04 Jun 2015 13:00:03 -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: <20150604163716.8D164605E8@jupiter.mumble.net>
In-Reply-To: <20150604163716.8D164605E8@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/oQRZbsQYZlwhkKiCF9aDRTjnymI>
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] testability of signature input/output parameters
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 17:00:28 -0000

This only verifies that the implementation outputs behavior consistent 
with what is written in the spec. It does not verify correctness for any 
other input or for a non-exposed signing key {an implementation could 
simply include a table look-up for "CFRG test vectors" and do its own 
thing otherwise (and you would not catch this...)}. This illustrates the 
limited value of such tests. Comparing test results with a handful of 
printed values in a spec is *not* the same as validating the proper 
functioning of an implementation module.

On 6/4/2015 12:38 PM, Taylor R Campbell wrote:
>     Date: Thu, 04 Jun 2015 11:24:18 -0400
>     From: Rene Struik <rstruik.ext@gmail.com>
>
>     Well, neither do deterministic signatures seem to help here: if one
>     presumes k=f(m,d) and indeed finds that, for fixed public signature key,
>     repeats of message m produce the same signature, this does not
>     necessarily imply that f depends on private parameter d (for all one
>     knows, k could only depend on public parameter m). This can only be
>     detected if one prints the private parameter d in the spec. However,
>     this does not say anything about behavior with "non-printed-in-the-spec"
>     parameters.
>
> How do you write a test vector for signing without including the
> signing key?
>
> For a deterministic scheme, test vectors of the form
>
> (secret key, message, signature)
>
> verify correctness of the complete signing operation.

>
> For a nondeterministic scheme, test vectors of the form
>
> (secret key, message, nonce, signature)
>
> verify only correctness of the deterministic part of the signing
> operation, and cannot verify correctness of nonce generation.  For
> RSASSA-PSS, `nonce' generation is inconsequential for security; for
> ECDSA, nonce generation makes or breaks it.


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