Hacker News new | ask | show | jobs
by hdhzy 3304 days ago
Very cool. This could be used to implement offline wallet with minimal amount of third party code.

One issue I'd like to point is I wish the author used proper random generated private key. Examples on the internet have a nasty habits of being copy pasted and reused verbatim :(

2 comments

Not using cryptographically safe random key is very stupid, even though it is only an example. It should be very trivial to fix this example.

I think in python the right way is to use the os.urandom() function.

My intention in using "hand crafted"/memorable private keys was just to make the article and what I was doing easier to follow.

I don't think there's any harm in people copying and pasting examples, it only becomes an issue if they start depositing money to either of the addresses that I listed the private keys for. I hope that's an obvious enough mistake not to make! Thanks for the feedback anyway, I'll keep an eye on those addresses and if they start getting mysterious deposits change the article to include more cryptographically secure keys.