7 comments

[ 2.5 ms ] story [ 22.2 ms ] thread
You acknowledge your random number generator not being cryptographically secure. (https://github.com/prettymuchbryce/hellobitcoin/blob/20af54c...) Reseeding the generator every time is wrong as well.

Why not just use crypto/rand instead, which is suitable for this kind of job?

It even has a Read([]byte) method for automatically filling a []byte with cryptographically secure psuedorandom numbers, so the loop would not be necessary!
I worked this summer as an intern at Conformal Systems where we developed a more sophisticated version of this, essentially a simulator [1] where random transactions between wallets can happen. The main reason for this was to stress-test btcd [2], the full-node bitcoin client that is developed by Conformal. Overall it was a great experience working with Go and bitcoin.

[1] https://github.com/conformal/btcsim

[2] https://github.com/conformal/btcd

Interesting. This is a tangent, but how does Conformal make money? Are they for hire contractors? They seem to be doing a lot of open source work that doesn't appear to pay anything right now and they also appear to be a small team.
While perusing the Conformal homepage[1] it seems their main commercial offering is Cyphertite[2], which they bill as a cross-platform "scalable high security solution for online backups" complete with paid data plans (similar to tarsnap).

[1] https://www.conformal.com/

[2] https://www.cyphertite.com/

(comment deleted)