News for hackers. Stuff that matters.
Re:Extracting the private key from a TREZOR with an oscillos... by monochromatic on Wednesday June 06, 2018 @09:52PM (#17252628)
Are there simple techniques that can mitigate these attacks?
Re:Extracting the private key from a TREZOR with an oscillos... by remcob on Thursday June 07, 2018 @02:12AM (#17253680)
There is a software solution called blinding. The idea is to 1) scramble your input (message, private key) by multiplying with a random blinding factor, 2) do the crypto math and 3) divide out the random blinding factor.

Since all the crypto math happens with what is now essentially random numbers, you gain no knowledge from power analysis.

Downside of this method is that it requires additional operations and your crypto algorithm needs to be suitable for this. There is literature on this method, but don't be confused by "blind signatures" which is something different.

Any crypto wizz around that can tell me if secp256k1 ecdsa can be blinded?

Re:Extracting the private key from a TREZOR with an oscillos... by letsgetphysITal on Thursday June 07, 2018 @03:48AM (#17254034)
But this is an enclosed system. Can't those blinding factor values also be pulled via the same monitoring techniques, or at least give enough information to reduce the number of possible values for brute forcing them?
Re:Extracting the private key from a TREZOR with an oscillos... by tempay on Thursday June 07, 2018 @07:00AM (#17254764)
Definitely not an expert, but I think this defends against differential power analysis as you can't statistically correlate multiple runs (assuming you can't force or precisely measure the random number used each time).
Re:Extracting the private key from a TREZOR with an oscillos... by jnwatson on Thursday June 07, 2018 @02:19AM (#17253712)
The first mistake is they used a non-constant-time scalar multiply. So, first do that. Of course that just hides the timing, not the power usage.

There is a bunch of elliptic curve stuff you can do like "multiplicative blinding", e.g. https://www.iacr.org/archive/ches2010/62250433/62250433.pdf.

Re:Extracting the private key from a TREZOR with an oscillos... by vvanders on Wednesday June 06, 2018 @10:43PM (#17252853)
If I recall correctly most secure hw chips have "inverse" transistors that balance power draws so you can't read bits as easily.

Still have to have solid software that doesn't do early returns and the like.

Re:Extracting the private key from a TREZOR with an oscillos... by tzs on Thursday June 07, 2018 @02:02AM (#17253648)
In this particular attack, it looks like the attacker measured the power drawn over USB. This could probably be defeated by buffering power.

Include some kind of energy storage on the device, such as a battery or an ultra-capacitor. Your external power source (e.g., USB) charges your storage device, and your computation is powered from the storage device. Only charge the storage device between complete operations.

Someone watching power over USB would then see no power draw during key operations, and a smooth power draw between operations.

If your threat model includes attackers that will be able to probe inside the device while it is doing operations, and so who could look at the power on the far side of the battery or capacity, then buffering power won't be sufficient.

Re:Extracting the private key from a TREZOR with an oscillos... by exoesquitur on Thursday June 07, 2018 @02:16AM (#17253700)
Anyone measuring power will have the capability to bypass / defeat any external power filtering. To be of value this must be done at the die level.
Re:Extracting the private key from a TREZOR with an oscillos... by esmi on Thursday June 07, 2018 @10:58AM (#17256289)
I was thinking the same thing. The equivalent of a power factor conversion stage at input makes this type of attack impossible unless they have access inside the product.
Re:Extracting the private key from a TREZOR with an oscillos... by adtac on Thursday June 07, 2018 @01:50AM (#17253602)
I have absolutely zero experience in things like this, but would an integrated component (so that it can't be ripped off) that draws a random amount of heat (through a controllable variable resistor) solve this?
Re:Extracting the private key from a TREZOR with an oscillos... by sannee on Thursday June 07, 2018 @04:24AM (#17254205)
> random amount of heat

Random noise would just mean that you have to take multiple measurements and average them. Depending on the system in question, "multiple" may or may not be impractically many.

Re:Extracting the private key from a TREZOR with an oscillos... by jacobush on Thursday June 07, 2018 @04:04AM (#17254106)
It raises the bar, but dedicated (pros or super advanced hobbyists) attackers strip ICs of their packaging and probe at the die level.