Re: [dsfjdssdfsd] What has gone wrong with RNGs in practice

Arnold Reinhold <> Sun, 17 November 2013 00:06 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id ACE9811E80E6 for <>; Sat, 16 Nov 2013 16:06:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -5.725
X-Spam-Status: No, score=-5.725 tagged_above=-999 required=5 tests=[AWL=0.522, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, SARE_SUB_11CONS_WORD=0.352]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id PKXNFe1BB2+k for <>; Sat, 16 Nov 2013 16:05:56 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id D618711E80E2 for <>; Sat, 16 Nov 2013 16:05:56 -0800 (PST)
Received: from new-host-3.home ( []) by (Oracle Communications Messaging Server 7u4-27.08( 64bit (built Aug 22 2013)) with ESMTPSA id <> for; Sun, 17 Nov 2013 00:05:39 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.14, 0.0.0000 definitions=2013-11-16_02:2013-11-15, 2013-11-16, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1308280000 definitions=main-1311160224
Content-type: text/plain; charset="us-ascii"
MIME-version: 1.0 (Mac OS X Mail 7.0 \(1822\))
From: Arnold Reinhold <>
In-reply-to: <>
Date: Sat, 16 Nov 2013 19:05:37 -0500
Content-transfer-encoding: quoted-printable
Message-id: <>
References: <>
To: Nick Mathewson <>
X-Mailer: Apple Mail (2.1822)
Subject: Re: [dsfjdssdfsd] What has gone wrong with RNGs in practice
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "The dsfjdssdfsd list provides a venue for discussion of randomness in IETF protocols, for example related to updating RFC 4086." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 17 Nov 2013 00:06:03 -0000

On Nov 15, 2013, at 11:36 AM, Nick Mathewson <> wrote:

> == What has gone wrong in practice and led to actual working attacks:
> A. Not actually using randomness at all for something that needs some
> or all of the properties of a random bitstring.
> Example: Sony's implementation of ECDSA failed to actually change the
> k value between signatures; they just had a constant.[1]
> * Underdocumented, underexplained randomness requirements.
> Before you sniff too loudly at Sony's mistake in [1]: Pretend that you
> are a programmer in a hurry looking at FIPS 186-2, or your favorite
> (early) standards-body description of DSA. How well does it explain
> the importance of making 'k' completely unpredictable for each
> message, and how well does it explain the consequences for failing to
> do so?

I has also been suggested that Sony's failure to generate unique k's could have been caused by a compiler that optimized the k=crypto_random(); call out of a loop.  Whether that happened or not in the Sony case, the possibility should be dealt with in any RNG standard, as the consequence of a repeated k is easy recovery of the private key. Perhaps there should be a requirement that two (or more) test signatures be generated at application startup to verify independent k's are being generated, as code that worked initially could later be recompiled with different optimization settings for a new release.. 

Arnold Reinhold