From: Jason Davies <jason@jasondavies.com>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] KETAMINE: Multiple vulnerabilities in SecureRandom(), numerous cryptocurrency products affected.
Date: Tue, 10 Apr 2018 09:51:51 +0100 [thread overview]
Message-ID: <333F9973-6092-45B7-A87F-32730D752501@jasondavies.com> (raw)
In-Reply-To: <69fb5cc4-7b3d-e23d-2b7e-cddcd7b2877b@musalbas.com>
On 10 Apr 2018, at 00:39, mus@musalbas.com wrote:
> The original disclosure didn't contain any information about the library
> in question, so I did some digging.
>
> I think that the vulnerability disclosure is referring to a pre-2013
> version of jsbn, a JavaScript crypto library. Before it used the CSRNG
> in the Web Crypto API, it tried to use nsIDOMCrypto, but incorrectly did
> a string comparison when checking the browser version.
>
> In practice though, this doesn't really matter, because
> navigator.appVersion < "5" returns true anyway for old browsers. The
> real issue is that modern browsers don't have window.crypto.random
> defined, so Bitcoin wallets using a pre-2013 version of jsbn may not be
> using a CSPRNG, when run on a modern browser.
Yes, it looks like high-quality entropy via crypto.getRandomValues was only
added in Tom Wu's latest version (v1.4) in July 2013.
Note that even with v1.4, it still does not use high-quality entropy for
Internet Explorer, because getRandomValues is provided under window.msCrypto
for that browser.
http://www-cs-students.stanford.edu/~tjw/jsbn/rng.js
> As is noted though, even if a CSPRNG is used, the library passes the
> output of the CSPRNG through RC4, which generates some biased bits,
> leading to possible private key recovery.
I think this is the real issue: even if high-quality entropy is utilised, the
RNG is RC4-based, which is known to generate biased output.
Finally, note that even Chrome used RC4 for crypto.getRandomValues at one
point (as recently as 2015)!
https://bugs.chromium.org/p/chromium/issues/detail?id=552749
--
Jason Davies, https://www.jasondavies.com/
next prev parent reply other threads:[~2018-04-10 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 19:53 [bitcoin-dev] KETAMINE: Multiple vulnerabilities in SecureRandom(), numerous cryptocurrency products affected ketamine
2018-04-06 20:51 ` Matias Alejo Garcia
2018-04-09 21:11 ` Mustafa Al-Bassam
2018-04-09 21:17 ` Mustafa Al-Bassam
2018-04-09 23:39 ` Mustafa Al-Bassam
2018-04-10 8:51 ` Jason Davies [this message]
2018-04-10 13:15 ` Aymeric Vitte
2018-04-10 13:32 ` Jason Davies
2018-04-10 13:50 ` Aymeric Vitte
2018-04-10 0:42 ` Jason Davies
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=333F9973-6092-45B7-A87F-32730D752501@jasondavies.com \
--to=jason@jasondavies.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox