Search content
Sort by

Showing 6 of 6 results by lottoshares
Post
Topic
Board Development & Technical Discussion
Re: Hash based confidential txn chains..
by
lottoshares
on 23/12/2015, 00:13:03 UTC
How do you propose generating a random number? Unless your computer is hooked up to a hardware random number generator it could be producing pseudorandom numbers which are unsuitable for sensitive applications like cryptography.
And how do you think generating private keys happens on a computer?

According to Stackexchange Bitcoin core uses RAND_bytes from OpenSSL.

http://bitcoin.stackexchange.com/questions/24722/what-kind-of-random-numbers-source-does-getnewaddress-in-bitcoin-core-api-bitco

Quote
It uses RAND_bytes from OpenSSL. The relevant call is CKey::MakeNewKey.

getnewaddress is in rpcwallet.cpp. It tries to get a key from the pool, and if the pool is

empty it allocates a new one which is populated using RAND_bytes



Quote
As others mentioned Bitcoin core uses OpenSSL random sources.

This means that it uses any random source available, like:

the operation system, i.e. interrupts
random sources of the CPU or the chip set
dedicated hardware for entropy generation
So in order to make sure your hardware random generator works with Bitcoin you must make sure it works with OpenSSL.

RAND_bytes from OpenSSL uses OS specific calls to various random sources. However that system can sometimes fail silently according to some of the Bitcoin core devs.

https://github.com/bitcoin/bitcoin/pull/5885#issuecomment-78611027


Quote
We've seen operating system RNG's fail silently in really frightening ways several times over the last few years, a belt-and-suspenders approach where silent failure at least gets a best effort bit of entropy-snake-oil (or maybe not so snakeoil: after going and writing a bunch of entropy collecting code I'm more impressed with the performance than I expected) seems to be a clear improvement. OpenSSL's (and libressl's) system entropy randomness generator is also pretty scary (it can fail silently back to snakeoil entropy much weaker than what this code does).

That's why the core devs have been developing their own random number generating system, which is slated to replace OpenSSL RNG use in core version 0.13,


https://github.com/bitcoin/bitcoin/pull/5885#issuecomment-161609639

Quote
Slated for 0.13 (with the goal of getting rid of OpenSSL dependency by then), opened #7162 to track this

However, the core devs say the weaknesses they identified in OpenSSL RNG do not significantly undermine Bitcoin's security because Bitcoin Core hardens the RNG input with additional timing information.


https://www.reddit.com/r/Bitcoin/comments/3ccb7w/bitcoin_core_uses_rand_bytes_from_openssl_to/csu885c

Quote
There are many theoretical concern related to OpenSSL's operation as well as Linux's /dev/random (and other operating systems) behavior in general-- and there is a long term project underway to replace it: https://github.com/bitcoin/bitcoin/pull/5885 (and you can see from the comments there, we're well aware of how it works, more so than even the concerns you've expressed here).

That said, these are theoretical weaknesses. In Linux /dev/random and /dev/urandom are the same rng, but /dev/random uses an entropy estimator. The estimator provides basically no value and is often misunderstood. This page has an excellent and correct debunking: http://www.2uo.de/myths-about-urandom/

The "aren't very random" you're quoting is taken out of context-- the context is "The main thing which I am much more worried about is that on various embedded systems, which do not have a fine-grained clock, and which is reading from flash which has a much more deterministic timing for their operations, is that when userspace tries to generate long-term public keys immediately after the machine is taken out of the box and plugged in, that there isn't a sufficient amount of entropy, "--- e.g. context that matter a lot for generating SSH keys, but not so much for Bitcoin.

Beyond the basic operation there, OpenSSL and Bitcoin Core further harden the input with additional timing information.

Finally, the bit of concern you're sowing there doesn't make a relative comparison. It would be no good to chase someone from using Bitcoin Core due to niche and speculative issues to something that was practically less secure.


For a simple random number generation as proposed by spartacusrex I would find a better alternative than an OpenSSL RNG.

There is a thread full of posts by heavyweights discussing the best way to manually generate a truly random private key by repeatedly throwing dice. The reason they generate keys that way is to avoid 100% of all BS regarding computer-generated entropy sources & algorithms.


Anyway a lot of the heavy weights are in this thread. I would have thought that generating private keys manually might be termed a little extreme.

Depends on your definition of cost-to-benefit ratio:

Cost:  Spending 20 minutes, one time, to create entropy and convert it to a wallet
Benefit: Avoiding 100% of all BS regarding computer-generated entropy sources & algorithms, until the end of time

If you're holding a "lot" of money, some people would rather just remove all doubt.  And the cost of doing so really isn't that high.
Post
Topic
Board Development & Technical Discussion
Re: Hash based confidential txn chains..
by
lottoshares
on 21/12/2015, 22:52:41 UTC
How do you propose generating a random number? Unless your computer is hooked up to a hardware random number generator it could be producing pseudorandom numbers which are unsuitable for sensitive applications like cryptography.
Post
Topic
Board Development & Technical Discussion
Re: Is it possible to guess a privkey?
by
lottoshares
on 26/11/2015, 23:18:18 UTC
As the title asks, is it possible to guess a privkey/generate an existing wallet's privkey?

That depends.  If the private key that you are attempting to "guess" was generated from a non-random source (such as a passphrase or faulty random number generator) and you know something about how it was generated, then it may be possible to guess or generate the same key.



Blockchain.info briefly generated private keys using a non-random source due to a programming bug. An honest programmer has a computer running which constantly scans the network for such vulnerable private keys, and transferred the coins controlled by them to his own secure address. He returned them to blockchain.info with an explanation of the programming error it had made that left them vulnerable to theft.
Post
Topic
Board Development & Technical Discussion
Re: hacking bitcoin transactions
by
lottoshares
on 26/11/2015, 23:08:02 UTC
If I am understanding the correctly, all of the information in the BTC programming is needed in order for the block chain to properly work right.  So I am guessing in order for you to do that, you would have to rewrite the complete block chain from the start so it all lines up.  Am I on the right track with my thinking?

No, "rewriting" the blockchain will not enable you to forge a signature. You either have to break ECDSA (or the specific curve used for bitcoin) or get the private key in question. Also not every single line of code within bitcoin core is needed for the protocoll to work. A large portion is the wallet part that is not required.

Rewriting the blockchain is impossible for anything but the most recent blocks, and rewriting those would need over 50% of the computational power of the entire network. Each block in the blockchain contains a hash of the previous block in its header. If you attempt to change anything in the previous block its hash changes, and the next block needs to store that changed hash in its header. All Bitcoin nodes store a copy of the blockchain containing those hashes, and if you attempted changing an old block they would refuse to accept it as valid because its hash wouldn't match theirs.

Post
Topic
Board Development & Technical Discussion
Re: Suggestion: Button that check/uncheck "send this transaction anonymously"
by
lottoshares
on 20/11/2015, 23:18:59 UTC
Automating the whole process of the CoinJoin thing in Bitcoin would change the fundamental nature of what Bitcoin is. New code would need writing which decides which coins get mixed with other coins. That code could make Bitcoin illegal in some jurisdictions, either now or in the future. Currently third part mixer services provide mixing functionality for those that want it, and it may be better to leave it to third parties to avoid legal issues.
Post
Topic
Board Development & Technical Discussion
Re: Priority Transactions; What Are The Implications?
by
lottoshares
on 20/11/2015, 23:09:54 UTC

EDIT I just saw a thing on the Lightning Network which I didn't 100% understand but get enough of to see it is different than this (off chain) would Alan not be the perfect remedy to prioritized tx?

The impression I have of the Lightning Network is that it will be centralized and therefore open to regulation. It might suit off chain high frequency micro transactions, but exchanges do that anyway and most of them are being regulated. Prioritized transactions will also be channeled through a centralized pool, and I wonder if that too will be open to regulation by whatever country the owners reside in.