From aeb4159e2b6b381c5a184f37c3b17fcd9bf213b5 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 8 Mar 2010 22:16:50 +0000 Subject: Blinder::choose_nonce added a single byte of the timestamps 8 times, instead of each byte once... --- src/pubkey/blinding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pubkey') diff --git a/src/pubkey/blinding.cpp b/src/pubkey/blinding.cpp index 2bb6680d6..819d0dd20 100644 --- a/src/pubkey/blinding.cpp +++ b/src/pubkey/blinding.cpp @@ -36,14 +36,14 @@ BigInt Blinder::choose_nonce(const BigInt& x, const BigInt& mod) u64bit ns_clock = get_nanoseconds_clock(); for(size_t i = 0; i != sizeof(ns_clock); ++i) - hash->update(get_byte(0, ns_clock)); + hash->update(get_byte(i, ns_clock)); hash->update(BigInt::encode(x)); hash->update(BigInt::encode(mod)); u64bit timestamp = system_time(); for(size_t i = 0; i != sizeof(timestamp); ++i) - hash->update(get_byte(0, timestamp)); + hash->update(get_byte(i, timestamp)); SecureVector r = hash->final(); -- cgit v1.2.3