Earlier quoted context omitted.
If you really want to be sure, you can create your own private key with dice: http://www.swansontec.com/bitcoin-dice.html https://www.reddit.com/r/Bitcoin/comments/2s2w1r/generate_ad...
Thanks! That bitcoin-dice.html link is awesome. It links to a rather short bash script that seems to do the key to public address conversion. That is exactly what is needed.
What If Bitcoin – Shoot I didn't invest
31–36 of 36 posts
Re: What If Bitcoin – Shoot I didn't invest
#32Earlier quoted context omitted.
> There is just no way to securely create a secret key. That is wrong. You can generate one relatively easily with dice (google for it). > Because the algorithm is so complex, you have to trust somebody else's software to create the key. You're conflating generating the key, which is just generating a random number in a certain range, with calculating the public address, which involves some operations on elliptic cur…
You can read the source code. Which code? Any link to that 30 lines of C code?
Here's some C code I used when I played around with it 5 years ago. No guarantees that it is bug-free or does anything useful (you still need a double sha256 and base58 encoding to get a string representation), but it gives you an idea of the complexity/simplicity.
void sha256_ripe160(uint8_t *bytes, size_t len, uint8_t result[RIPEMD160_DIGEST_LENGTH])
{
uint8_t buf[32];
CC_SHA256(bytes, len, buf);
RIPEMD160(buf, 32, result);
}
void privkey_to_pubsig_hash(uint8_t privkey[32], uint8_t pubsig[20])
{
static EC_GROUP *curve = 0;
if (!curve) {
curve = EC_GROUP_new_by_curve_name(NID_secp256k1);
}
assert(curve);
BIGNUM *priv_bn = BN_new();
priv_bn = BN_bin2bn(privkey, 32, priv_bn);
assert(priv_bn);
EC_POINT *pub_pt = EC_POINT_new(curve);
BN_CTX *ctx = BN_CTX_new();
int result = EC_POINT_mul(curve, pub_pt, priv_bn, NULL, NULL, ctx);
assert(result);
BN_free(priv_bn);
BIGNUM *pub_bn = BN_new();
EC_POINT_point2bn(curve, pub_pt, POINT_CONVERSION_UNCOMPRESSED, pub_bn, ctx);
EC_POINT_free(pub_pt);
BN_CTX_free(ctx);
assert(BN_num_bytes(pub_bn) == 65);
uint8_t pub_bytes[65];
BN_bn2bin(pub_bn, pub_bytes);
BN_free(pub_bn);
sha256_ripe160(pub_bytes, 65, pubsig);
}
One of the myriad Python libraries to deal with bitcoin is probably a better starting point if you want to explore more.Re: What If Bitcoin – Shoot I didn't invest
#33Earlier quoted context omitted.
"All our savings and our house went up in smoke because I shot them all on a volatile investment I knew nothing about" must come in a close second.
"Invest only what you can afford to lose" really are wise words. They aren't words that will get you insanely rich in the blink of an eye, of course, but they are words that mean you won't lose your house.
Re: What If Bitcoin – Shoot I didn't invest
#34I refuse to visit this website in order to preserve my own sanity. I was floating around forums trading BTC while it was $5. Life moves on, trees keep growing.
On the flipside I have no idea when or if I would have cashed out. When it hit $100? $1000? Impossible to say.
Re: What If Bitcoin – Shoot I didn't invest
#35As much as I see myself as wild person when it comes to offshoot bets, I still can't reason myself into buying bitcoins. Not sure I must be too Gen X to find this reasonable. Anyone here comment "how well they did?" and if you've pulled out or are seriously thinking about pulling out? I feel silly, but I'm still not going to put my hard earned cash in it any time soon... In fact, I wouldn't really know how.
I bought a dozen coins at $100 a coin. I eventually sold when they reached around $800 per coin. My rationale was that I was far too obsessive about it, I checked the price every day, I read and watched articles and videos and kept up with all the drama. The amount of brain time I was spending on it was just too much. I would have remained a holder if I wasn't obsessive. The technology and ecosystem is very interesti…
Seems the only reasonable way to do it is with 'fuck money', pardon the term. You know, money you happened to have forgotten about or came about that you didn't budget for.
Re: What If Bitcoin – Shoot I didn't invest
#36Funny, this could be extended to all sorts of investments. What if I spent 1000 USD on Apple in 1990? I'd have about 1000 Apple stock now, currently worth around 160k.
That's nothing like the return on BTC