00:00:38 | dgenr8: | KryptoKit has its own randomBytes function ... implemented with Math.random() |
00:00:49 | dsnrk: | yes, I know. |
00:01:09 | dsnrk: | a month ago I made many attempts to contact them, couldn't get anybody to reply to me. |
00:01:20 | grubles: | what about bitaddress.org |
00:01:45 | dsnrk: | gmaxwell can attest to that, as can petertodd. |
00:03:10 | pigeons: | counterwallet.co, the wallet for counterparty switched a few months or so ago from bitcoinjs lib because after a signing issue was fixed, they found that something about the way they were using the lib made weaker keys than expected, even though it was kind of a usage error, there was no indication, so they switched to bitcoind for that |
00:03:30 | dsnrk: | dgenr8: I mean give it a shot, I tried my best to find somebody to fix it. |
00:04:26 | gmaxwell: | pigeons: in their case some older version of the underlaying lib would hash a stringified ["string"] a later version called with the same array input would has "Object" ... go go type safty failure. |
00:07:50 | dsnrk: | pigeons: keep in mind too that switching doesn't really help anybody unless they rotate their keys as well. |
00:10:50 | gmaxwell: | works especially well with all this address reuse ... even if you rotate off people may be 'refunding' you money to compromised keys. |
00:13:30 | dsnrk: | ah yes, blockchain.info uses cryptojs too |
00:14:47 | gmaxwell: | why are all these things using "Cryptojs" the bitcoinjs code has a window.crypto based rng (though in a try block to guarentee doom if something unexpected happens). |
00:15:09 | pigeons: | dsnrk: yes they had users generate new keys and sweep funds from the old ones |
00:15:58 | dsnrk: | gmaxwell: what does prefixing wind.crypto with an underscore do in javascript? |
00:16:16 | dsnrk: | https://github.com/blockchain/My-Wallet/blob/110459dbf17363e2ea68b5fd531724f1acda201b/bitcoinjs-lib/src/jsbn/rng.js#L31 |
00:18:18 | dsnrk: | I'm not even sure if that is used for anything actually. |
00:18:21 | dsnrk: | window 5 |
00:20:41 | gmaxwell: | dsnrk: in isolation? nothing, _window doesn't eixst. |
00:20:43 | gmaxwell: | er exist |
00:21:01 | gmaxwell: | presumably they're doing something 'fancy' elsewhere. |
00:21:13 | gmaxwell: | (reasons you know none of this code has been audited) |
00:21:47 | dsnrk: | there's at least 2 different modified copies of that SecureRandom function in different files, both neutered |
00:22:55 | gmaxwell: | they do this elsewhere, |
00:22:55 | gmaxwell: | ./bitcoinjs-lib/src/crypto-js/crypto.js: var _window = {}; |
00:22:55 | gmaxwell: | ./bitcoinjs-lib/src/crypto-js/crypto.js: var _window = window; |
00:22:55 | gmaxwell: | ./bitcoinjs-lib/src/crypto-js/crypto.js:var Crypto = _window.Crypto = {}; |
00:22:59 | gmaxwell: | which makes it work. |
00:23:14 | dsnrk: | ... why |
00:23:54 | dsnrk: | the blame on that change says something about "fixing" IE support |
00:24:17 | gmaxwell: | the last time those lines were change it was in "Fix IE js error" ... but the change there was to just add some random ^M (0_o) |
00:25:03 | dsnrk: | what is "typeof Int32Array != 'undefined'" meant to be testing for? |
00:25:14 | gmaxwell: | Navigator 4 level JS, I believe. |
00:25:57 | dsnrk: | ah right, that's where they broke it by forking in webworkers which didn't have that |
00:27:19 | gmaxwell: | the _window stuff was added in a commit "Added SMS Notifications" 1bfc9813ba40b90609fb7726926fcdb2f66d691b Appears to be an intentionally hidden change or a mistaken commit, it has nothing to do with the rest of the commit. |
00:30:48 | dsnrk: | makes sense. I suppose they're not immediately vulnerable then. why that fallback even exists is beyond reason though. |
00:31:25 | gmaxwell: | I can't believe they didn't remove it after getting burned by it once. |
00:32:37 | dsnrk: | I'm sure their security officer will find it when he audits their code. |
00:33:27 | dsnrk: | as he says in one of his talks, the RNG is everything |
00:39:45 | maaku: | maaku is now known as Guest95144 |
01:29:24 | [\\\]: | bit late, but chrome on win8.1 0000000000000000000000000000000000000000000000000000000000000000 |
01:33:54 | dsnrk: | only one we have missed then is Opera really, and I doubt anybody really used that. |
01:51:24 | Guest95144: | Guest95144 is now known as maaku |
01:53:34 | [\\\]: | lol |
03:33:02 | justanotheruser: | dsnrk: 0000000 on seamonkey |
03:34:14 | justanotheruser: | let me download every dead/obscure browser and test it. brb |
03:35:08 | dsnrk: | I think the result is fairly clear, no *no* platform is the RNG anywhere near good enough for Bitcoin |
03:37:54 | justanotheruser: | dsnrk: Could you please explain how replacing Math.floor(Math.random()*256) with Math.floor(0) and the result being 0 implies it isn't a good RNG? |
03:38:06 | justanotheruser: | I mean, wouldn't the expected result be 0? |
03:38:37 | dsnrk: | it's meant to be using window.crypto as a CSRNG. it doesn't though, it's just using Math.random which is a PRNG. |
03:39:04 | dsnrk: | if it *was* using window.crypto as it is supposed to be, replacing math.random would have no effect. |
03:39:38 | justanotheruser: | dsnrk: Did the code imply it was using window.crypto? |
03:40:08 | dsnrk: | yes |
03:40:14 | justanotheruser: | ok, makes sense then |
03:40:41 | dsnrk: | the hacky change is just to prove it. |
03:40:43 | justanotheruser: | OT, but does window.crypto get random numbers from the OS? |
03:41:19 | dsnrk: | yes |
03:41:32 | dsnrk: | I think in browsers it's supposed to just be a pipe to /dev/urandom |
03:42:02 | justanotheruser: | ok thanks |
05:29:46 | fanquake: | fanquake has left #bitcoin-wizards |
05:55:48 | roidster: | roidster is now known as Guest11838 |
05:57:14 | Guest11838: | Guest11838 is now known as zzyzx |
06:20:24 | justanotheruser: | justanotheruser is now known as Caled |
06:20:50 | Caled: | Caled is now known as justanotheruser |
06:37:27 | OneFixt_: | OneFixt_ is now known as OneFixt |
07:22:12 | Pasha: | Pasha is now known as Cory |
15:40:04 | gmaxwell: | oy, so after spending a non-totally-trivial amount of effort trying to get this working, I see they've updated the paper: http://www.cs.princeton.edu/~stevenag/bitcoin_threshold_signatures.pdf |
15:47:22 | GAit: | interesting |
15:57:07 | iddo: | i argued with them about pros/cons versus multisig in the comments of https://freedom-to-tinker.com/blog/stevenag/new-research-better-wallet-security-for-bitcoin/ |
19:41:21 | HobGoblin: | HobGoblin is now known as Guest29935 |
19:43:15 | paavo_: | paavo_ is now known as paavo |
20:00:51 | Guest29935: | Guest29935 is now known as UukGoblin |
21:31:48 | forrestv_: | forrestv_ is now known as forrestv |
22:15:35 | phantomcircuit: | if somebody told you they had made a crypto break that made bitcoin mining more efficient, would anybody here believe them? |
22:24:35 | GAit: | not by default but i'd listen |
22:27:10 | gavinandresen: | phantomcircuit: I've heard that claim at least three times before. But if you're talking about making hardware ASICs marginally more efficient… meh. plausible, but not very interesting. |
22:30:21 | GAit: | gavinandresen: claim as in it was vaporware? |
22:31:03 | phantomcircuit: | gavinandresen, talking 10%+ more efficient |
22:31:15 | GAit: | i remember at some point someone was mining blocks with number of transaction => some power of 2 |
22:47:52 | andytoshi: | eh, i'll bet a lot of people do that because they have broken merkle tree code. do it with powers of 3 and i'll believe it's the same person |
22:55:58 | gmaxwell: | GAit: those were KNC blocks, they were that way because of eloipool defaults to use power of two sized blocks. Eloipool has that option because before the second preimage vulnerability was fixed in bitcoin it was possible for an attacker to cause blocks of non-power of two sizes to get orphaned... and luke is too clever for his own good. |
22:59:49 | GAit: | i seem to remember some of Luke's patches around this |
23:00:08 | gmaxwell: | Unrelated. Electrum closed my "UI looks like you can only use 5 addresses" bug today as fixed. |
23:12:43 | maaku: | maaku is now known as Guest98607 |
23:27:46 | pigeons_: | pigeons_ is now known as pigeons |