Live data from Hacker News

ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

eprint.iacr.org

21–30 of 56 posts

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#21

Silly question based on my layman's understanding of the attack: Can you impede the extraction process simply by having your phone/tablet/laptop generate interference while the decryption process is happening? For instance, if your laptop is simultaneously playing music through its speakers, would the analysis still let them definitively pick out the signing key?

Valid question. You shift the burden from being a cryptography related problem to signal processing related problem.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#22
post #16

Earlier quoted context omitted.

Upvoted, you're totally correct. Each of these attacks is providing support to DJB's focus on constant time implementations of everything.

Does constant time mean constant power usage and constant EM emission? It seems like those would be separate problems.

Constant time only reduces the chance of 'simple power analysis' (SPA) which is predominantly what the authors perform ('simple' is misleading but it's just the name for it).

There are a number of works that perform 'differential power analysis' (DPA) attacks on mobile devices that target symmetric crypto. These are generally both constant time and constant execution path. In this instance, attackers can attack the data dependancy in the EM emanations.

Simple example! a program that XORs two registers:

r1 = r1 XOR r2

If r2 has all the bits set to 1, then this will completely invert the contents of r1. This in turn consumes more energy (and hence emit more EM) in comparison to if r2 was all 0's. Hope that clarifies.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#23
post #16

Earlier quoted context omitted.

Does constant time mean constant power usage and constant EM emission? It seems like those would be separate problems.

They are highly correlated. The best way to achieve constant time is making your code paths data independent, that is, it always execute the same instructions, whatever the data. This code will also use constant power and have constant EM emission. (Except for low level optimizations in hardware, that may break any of those characteristics.)

That parenthetical sounds extremely important! Won't executing the same instructions on different data use different amounts of power and emit different amounts of EM? For example, I would think (naively, I'm only familiar with the most basic of hardware whatnot) that multiplying 0 and 0 would not use the same amount of power and emit the same EM as multiplying 0xffffffff by 0xffffffff.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#24

Silly question based on my layman's understanding of the attack: Can you impede the extraction process simply by having your phone/tablet/laptop generate interference while the decryption process is happening? For instance, if your laptop is simultaneously playing music through its speakers, would the analysis still let them definitively pick out the signing key?

You can add noise, which means they will have to collect more data and filter it in order to perform the attack. That cans make the attack harder, but not impossible.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#25
I always see these non-intrusive side channels being applied to asymmetric cryptography. From using a microphone to listen in on GPG RSA private keys, to now the difference between point adding and point doubling in ECDSA.

But I wonder if there are feasible, modern attacks against software using symmetric encryption. For example products offering full disk encryption, or encrypted volumes. Or are the operations in symmetric ciphers so 'constant' as not to reveal anything about the master key?

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#26
post #11
post #8

This is a really impressive piece of work. Unfortunately, the authors completely ignore Curve25519[0], which was designed by DJB (and implemented as NaCl[1]), with the goal to reduce side-channel vulnerabilities. From a random Curve25519 presentation [2]: - No data-dependent branches. - No data-dependent indexing. I really wonder how much can be extracted from a NaCl implementation under the same conditions. [0] http…

Please elaborate the downvotes. While not actually testing Curve25519 is perfectly valid for the authors, comepletly ignoring its existence is a bit far-fetched, as it is clearly in scope. To quote the first sentence of the paper: "We show that elliptic-curve cryptography implementations on mobile devices are vulnerable to electromagnetic and power side-channel attacks." At least they should have said "some implement…

This is academic crypto research involving one of the most important names in this part of the field (Eran Tromer is one of the people who invented microarchitectural side channel attacks).

I don't know that it's typical for research like this to comprehensively evaluate targets that aren't relevant to the research. Regardless, here we have an attack on the ECDSA k-nonce. People who use Curve25519 don't even use ECDSA; they use Ed25519's deterministic Schnorr-style signatures. It's not even the same signature construction.

So what you're asking of the authors seems a bit like the authors of the DROWN paper explaining that their RSA padding oracle attack doesn't work if you instead use DH key agreement.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#27
post #25

I always see these non-intrusive side channels being applied to asymmetric cryptography. From using a microphone to listen in on GPG RSA private keys, to now the difference between point adding and point doubling in ECDSA. But I wonder if there are feasible, modern attacks against software using symmetric encryption. For example products offering full disk encryption, or encrypted volumes. Or are the operations in sy…

From one of the same authors:

https://www.tau.ac.il/~tromer/papers/cache.pdf

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#28
post #4

Side-Channel attacks are nasty. Wonder why the FBI wasn't able to use this to hack the San Bernardino iPhone 5C, the NSA must be aware of this? From the article In the sequel, unless stated otherwise, the experiments were performed on Apple iPhone 3GS which exhibited a particularly clear signal. Hope Apple fixes this in future models, even when opened.

How would that attack work? The key isn't resident; it's derived in part from the passcode. The target can't do any useful work with the key that could leak through side channels, because it doesn't have the key.

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#29
post #14
post #9

Earlier quoted context omitted.

San Bernardino 5C could be cracked in two days using a NAND flash write blocker. You only need to program an FPGA to buffer writes to NAND chips in RAM instead of passing them through and to allow the reads, then you just try N PIN codes and reboot while resetting the blocker state cache. N is 4 if they haven't tried any PINs and 1 if there are delays after each because they've tried a couple PINs already. Phone boot…

Do you have a good citation for that or is it just a personal theory?

A personal theory. The iPhone Wiki has a description of iPhone storage structure - it seems newer phones (pre Secure Enclave) don't have separate NOR, NVRAM and NAND - they just use NAND for everything. [1] https://www.theiphonewiki.com/wiki/NOR

Re: ECDSA Key Extraction from Mobile Devices via Nonintrusive Physical Side Channels

#30
post #8

This is a really impressive piece of work. Unfortunately, the authors completely ignore Curve25519[0], which was designed by DJB (and implemented as NaCl[1]), with the goal to reduce side-channel vulnerabilities. From a random Curve25519 presentation [2]: - No data-dependent branches. - No data-dependent indexing. I really wonder how much can be extracted from a NaCl implementation under the same conditions. [0] http…

> - No data-dependent branches. > - No data-dependent indexing.

These are implementation properties not properties of the curve. 25519 is a fine set of parameters but it always disappoints me to see this conflation.

The implementations being attacked here were grotesquely sidechannel vulnerable. There are grotesquely sidechannel vulnerable ed25519 implementations (esp. parties that have been bitten by the 'tutorial to ecc' bug and implemented it themselves; or are otherwise reusing the verification multi-exp for signing)... and there are implementation of other things which are not vulnerable.

Post reply on HN