Author

Topic: Gold collapsing. Bitcoin UP. - page 608. (Read 2032291 times)

legendary
Activity: 1764
Merit: 1002
December 25, 2014, 06:18:53 AM
I wonder if you could use the current CPU temperature to the first or second decimal place as a source of entropy.

The least significant bit of a 16 bit audio sample always seemed a good idea to me.

The nice thing about randomness: you can mix many sources (using xor or whatever) and you'll not lose anything even if one source is bad.

Unfortunately what you may get wrong if you are too careless about this is how much useful randomness you have.

If I recall correctly some sources in the Linux kernel rng are added to the pool but counted as zero entropy.


this is why understanding the inner workings of predifined rng's or procedure calls to generate entropy is essential.

Also making sure that entropy is explicitly used properly is key. Simply make sure entropy is being used for what it is being generated for.

Somebody should code  up an entropy "meter"  to go in the menu bar of Linux   distros.
donator
Activity: 2772
Merit: 1019
December 25, 2014, 05:22:20 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.


Trezor seems safe. A simple paper wallet generated offline on a new computer running linux is safe too  Wink

the problem with a paper wallet is to spend the coins safely.
An average bitcoin user these days isn't able to create a linux live CD, import a private key, export the transaction by USB and broadcast it on another online computer running a full node.

Exactly. Like I said above: trezor (with additional passphrase against theft of seed backup) is quite secure, but most importantly: it's both easy to use securely (hard to fuck up) and very convenient. I use it as a day-to-day wallet (plus mycelium on the phone)
legendary
Activity: 1470
Merit: 1000
Want privacy? Use Monero!
December 25, 2014, 03:34:34 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.


Trezor seems safe. A simple paper wallet generated offline on a new computer running linux is safe too  Wink

the problem with a paper wallet is to spend the coins safely.
An average bitcoin user these days isn't able to create a linux live CD, import a private key, export the transaction by USB and broadcast it on another online computer running a full node.
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
December 25, 2014, 02:27:36 AM
I wonder if you could use the current CPU temperature to the first or second decimal place as a source of entropy.

The least significant bit of a 16 bit audio sample always seemed a good idea to me.

The nice thing about randomness: you can mix many sources (using xor or whatever) and you'll not lose anything even if one source is bad.

Unfortunately what you may get wrong if you are too careless about this is how much useful randomness you have.

If I recall correctly some sources in the Linux kernel rng are added to the pool but counted as zero entropy.


this is why understanding the inner workings of predifined rng's or procedure calls to generate entropy is essential.

Also making sure that entropy is explicitly used properly is key. Simply make sure entropy is being used for what it is being generated for.
hero member
Activity: 644
Merit: 504
Bitcoin replaces central, not commercial, banks
December 25, 2014, 01:39:30 AM

"This way the paper wallet has never touched a computer or a network, and as soon as you eject the device the private key is wiped from memory"

This is not true.  Anyone printing paper wallet should be careful of what printer they are using.  Larger industrial printers have hard drives that record all spooled print data in some cases, especially older models.  Most of them are also connected to the internet.  Some of the newer models have data security or drive encryption installed by default but not all.  Smaller personal and desktop printers that don't have hard drives may be ok.  IMO dedicated hardware wallets are the better option.

http://www.cbsnews.com/news/digital-photocopiers-loaded-with-secrets/



Is Trezor a single address that is reused?

no trezor has bip32 HD wallet
legendary
Activity: 1764
Merit: 1002
December 25, 2014, 01:14:07 AM

"This way the paper wallet has never touched a computer or a network, and as soon as you eject the device the private key is wiped from memory"

This is not true.  Anyone printing paper wallet should be careful of what printer they are using.  Larger industrial printers have hard drives that record all spooled print data in some cases, especially older models.  Most of them are also connected to the internet.  Some of the newer models have data security or drive encryption installed by default but not all.  Smaller personal and desktop printers that don't have hard drives may be ok.  IMO dedicated hardware wallets are the better option.

http://www.cbsnews.com/news/digital-photocopiers-loaded-with-secrets/



Is Trezor a single address that is reused?
hero member
Activity: 622
Merit: 500
December 25, 2014, 12:45:24 AM

"This way the paper wallet has never touched a computer or a network, and as soon as you eject the device the private key is wiped from memory"

This is not true.  Anyone printing paper wallet should be careful of what printer they are using.  Larger industrial printers have hard drives that record all spooled print data in some cases, especially older models.  Most of them are also connected to the internet.  Some of the newer models have data security or drive encryption installed by default but not all.  Smaller personal and desktop printers that don't have hard drives may be ok.  IMO dedicated hardware wallets are the better option.

http://www.cbsnews.com/news/digital-photocopiers-loaded-with-secrets/

legendary
Activity: 1764
Merit: 1002
legendary
Activity: 1288
Merit: 1000
Enabling the maximal migration
December 24, 2014, 03:19:01 PM
legendary
Activity: 1153
Merit: 1000
December 24, 2014, 02:54:08 PM
I use http://www.issihosts.com/haveged/ to get more entropy (based on "processor flutter").


Those are both really cool projects, thanks for sharing. If anything their existence shows that generating true randomness on deterministic computers is hard and it is necessary to resort to the variability that is found in the real physical world.
legendary
Activity: 1764
Merit: 1002
legendary
Activity: 1246
Merit: 1010
December 24, 2014, 10:33:47 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.


Trezor seems safe. A simple paper wallet generated offline on a new computer running linux is safe too  Wink

One idea is that a small custom device like the trezor could have put an accelerometer in for just a few bucks

Haveged might be really bad on an isolated device.  No interrupts coming in...
legendary
Activity: 1204
Merit: 1002
Gresham's Lawyer
December 24, 2014, 09:29:48 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.


Trezor seems safe. A simple paper wallet generated offline on a new computer running linux is safe too  Wink

Did you miss Rocks post above discussing the vulnerability of using new computers, or just saying it is safe enough for you because you disagree with the risk?
hero member
Activity: 1022
Merit: 500
December 24, 2014, 08:16:03 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.


Trezor seems safe. A simple paper wallet generated offline on a new computer running linux is safe too  Wink
hero member
Activity: 527
Merit: 500
December 24, 2014, 07:59:20 AM
I use http://www.issihosts.com/haveged/ to get more entropy (based on "processor flutter").
legendary
Activity: 2968
Merit: 1198
December 24, 2014, 05:47:59 AM
I wonder if you could use the current CPU temperature to the first or second decimal place as a source of entropy.

The least significant bit of a 16 bit audio sample always seemed a good idea to me.

The nice thing about randomness: you can mix many sources (using xor or whatever) and you'll not lose anything even if one source is bad.

Unfortunately what you may get wrong if you are too careless about this is how much useful randomness you have.

If I recall correctly some sources in the Linux kernel rng are added to the pool but counted as zero entropy.

donator
Activity: 2772
Merit: 1019
December 24, 2014, 05:43:04 AM
I wonder if you could use the current CPU temperature to the first or second decimal place as a source of entropy.

The least significant bit of a 16 bit audio sample always seemed a good idea to me.

The nice thing about randomness: you can mix many sources (using xor or whatever) and you'll not lose anything even if one source is bad.
donator
Activity: 2772
Merit: 1019
December 24, 2014, 05:40:17 AM
out of curiosity to the security experts here.

which do you consider more secure, Armory or Trezor?

I'm not a security expert, but I would say trezor (with passphrase).

It's also easier to use securely.
legendary
Activity: 1162
Merit: 1010
December 23, 2014, 06:29:24 PM
what is "constant time"?

Improved signing security

For 0.10 the security of signing against unusual attacks has been improved by making the signatures constant time and deterministic.

This change is a result of switching signing to use libsecp256k1 instead of OpenSSL. Libsecp256k1 is a cryptographic library optimized for the curve Bitcoin uses which was created by Bitcoin Core developer Pieter Wuille.

There exist attacks[1] against most ECC implementations where an attacker on shared virtual machine hardware could extract a private key if they could cause a target to sign using the same key hundreds of times. While using shared hosts and reusing keys are inadvisable for other reasons, it's a better practice to avoid the exposure.

OpenSSL has code in their source repository for derandomization and reduction in timing leaks, and we've eagerly wanted to use it for a long time but this functionality has still not made its way into a released version of OpenSSL. Libsecp256k1 achieves significantly stronger protection: As far as we're aware this is the only deployed implementation of constant time signing for the curve Bitcoin uses and we have reason to believe that libsecp256k1 is better tested and more thoroughly reviewed than the implementation in OpenSSL.

[1] https://eprint.iacr.org/2014/161.pdf


A countermeasure against

http://en.m.wikipedia.org/wiki/Timing_attack

?

Although I can't think of a practical scenario where a typical user would ever be exposed to this, yes, the concern is side-channel attacks (e.g., a timing attack):

Quote from: N Benger et al
ABSTRACT. We apply the Flush+Reload side-channel attack based on cache hits/misses to extract a small amount of data from OpenSSL ECDSA signature requests. We then apply a “standard” lattice technique to extract the private key, but unlike previous attacks we are able to make use of the side-channel information from almost all of the observed executions. This means we obtain private key recovery by observing a relatively small number of executions, and by expending a relatively small amount of post-processing via lattice reduction. We demonstrate our analysis via experiments using the curve secp256k1 used in the Bitcoin protocol. In particular we show that with as little as 200 signatures we are able to achieve a reasonable level of success in recovering the secret key for a 256-bit curve. This is significantly better than prior methods of applying lattice reduction techniques to similar side channel information.

From: N. Benger, J van de Pol, N.P. Smart, Y. Yar, “‘Ooh Aah... Just a Little Bit’: A small amount of side channel can go a long way,” from International Association for Cryptologic Research, 2014.

Basically, there's a bunch of number crunching done by your CPU each time your wallet signs a bitcoin transaction.  If a "constant time" algorithm is used, it takes the same amount of time to produce an ECDSA signature regardless of the message being signed (or the k value or private key used).  If the signing time is always the same, then an attacker cannot learn anything about your private keys by inspecting the timing variations (since there are none) when you sign various messages.  

Where does "timing variation" come from?  As one example, your wallet needs to perform the following elliptic curve point multiplication as part of the ECDSA signing process:

  (x1, y1) = k x G

There's several different algorithms that can be used to carry out this multiplication.  The simplest is probably the "double and add" method.  However, the amount of time it takes this algorithm to execute depends on the specific value of k (G is always constant for bitcoin).  On the other hand, the "Montgomery Ladder" approach computes the point multiplication in a fixed amount of time (regardless of the specific value of k).  So a wallet would use a constant-time approach like the Montgomery Ladder technique rather than the double-and-add method as part of ensuring "constant time" ECDSA signatures.

Why does "constant time" matter?  In most cases I don't think it really does.  But let's imagine a contrived scenario where an attacker can get my wallet to produce several bitcoin-signed message with one of its funded private keys.  The attacker can pass it any piece of text, and my wallet will sign that text and relay the signature back to the attacker.  Normally this shouldn't be a problem because bitcoin-signed messages are safe.  But if the attacker can somehow accurately time how long my CPU takes to produce each signature, and then fiddle with the messages that it's requesting my wallet to sign, perhaps it can leach out enough information to determine my private key…

I think deterministic signatures are much more important than constant-time signatures (there's been a non-trivial amount of funds lost due to the repeat k-value problem but I doubt a single satoshi has ever been lost due to a genuine side-channel attack).  Someone like gmaxwell could comment better on the practical risks here…


legendary
Activity: 1260
Merit: 1008
December 23, 2014, 05:27:00 PM
what is "constant time"?

Improved signing security

For 0.10 the security of signing against unusual attacks has been improved by making the signatures constant time and deterministic.

This change is a result of switching signing to use libsecp256k1 instead of OpenSSL. Libsecp256k1 is a cryptographic library optimized for the curve Bitcoin uses which was created by Bitcoin Core developer Pieter Wuille.

There exist attacks[1] against most ECC implementations where an attacker on shared virtual machine hardware could extract a private key if they could cause a target to sign using the same key hundreds of times. While using shared hosts and reusing keys are inadvisable for other reasons, it's a better practice to avoid the exposure.

OpenSSL has code in their source repository for derandomization and reduction in timing leaks, and we've eagerly wanted to use it for a long time but this functionality has still not made its way into a released version of OpenSSL. Libsecp256k1 achieves significantly stronger protection: As far as we're aware this is the only deployed implementation of constant time signing for the curve Bitcoin uses and we have reason to believe that libsecp256k1 is better tested and more thoroughly reviewed than the implementation in OpenSSL.

[1] https://eprint.iacr.org/2014/161.pdf


A countermeasure against

http://en.m.wikipedia.org/wiki/Timing_attack

?
Jump to: