Bitcoin Forum
May 13, 2024, 07:43:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Extracting the Private Key from a TREZOR ... with a 70 $ Oscilloscope  (Read 5129 times)
bitbouillion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 250



View Profile
April 12, 2015, 10:19:37 PM
Last edit: April 13, 2015, 05:32:14 AM by bitbouillion
 #1

http://johoe.mooo.com/trezor-power-analysis/

Paper claims that private keys from a TREZOR device could be extracted via a side channel attack, but newer firmware fixes the vulnerability.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715629426
Hero Member
*
Offline Offline

Posts: 1715629426

View Profile Personal Message (Offline)

Ignore
1715629426
Reply with quote  #2

1715629426
Report to moderator
1715629426
Hero Member
*
Offline Offline

Posts: 1715629426

View Profile Personal Message (Offline)

Ignore
1715629426
Reply with quote  #2

1715629426
Report to moderator
1715629426
Hero Member
*
Offline Offline

Posts: 1715629426

View Profile Personal Message (Offline)

Ignore
1715629426
Reply with quote  #2

1715629426
Report to moderator
criptix
Legendary
*
Offline Offline

Activity: 2464
Merit: 1145


View Profile
April 12, 2015, 10:48:17 PM
 #2

nice link and good read thanks.

so every trezor user shoulda update their firmware asap Smiley

                     █████
                    ██████
                   ██████
                  ██████
                 ██████
                ██████
               ██████
              ██████
             ██████
            ██████
           ██████
          ██████
         ██████
        ██████    ██████████████████▄
       ██████     ███████████████████
      ██████                   █████
     ██████                   █████
    ██████                   █████
   ██████                   █████
  ██████
 ███████████████████████████████████
██████████████████████████████████████
 ████████████████████████████████████

                      █████
                     ██████
                    ██████
                   ██████
                  ██████
                 ████████████████████
                 ▀██████████████████▀
.LATTICE - A New Paradigm of Decentralized Finance.

 

                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█▌
 

             ▄████▄▄   ▄
█▄          ██████████▀▄
███        ███████████▀
▐████▄     ██████████▌
▄▄██████▄▄▄▄█████████▌
▀████████████████████
  ▀█████████████████
  ▄▄███████████████
   ▀█████████████▀
    ▄▄█████████▀
▀▀██████████▀
    ▀▀▀▀▀
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
April 13, 2015, 05:06:48 AM
 #3

Good read, great to see security research in this space.  Hope you get a tip!
Fabrizio89
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


View Profile
April 13, 2015, 05:10:41 AM
 #4

Wow, that was some crazy shit
innocent93
Legendary
*
Offline Offline

Activity: 896
Merit: 1000



View Profile
April 13, 2015, 06:20:19 PM
 #5

Wow that is a creative attack!
coinfusion
Full Member
***
Offline Offline

Activity: 141
Merit: 100


View Profile
April 15, 2015, 05:01:16 AM
 #6

Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port.  He mentioned removing the screen as well to clean up the signal, so I guess the device isn't even tamper-resistant? It doesn't seem to be going by the Trezor website. Too bad everything has to be made as cheaply as possible.
Hawkix
Hero Member
*****
Offline Offline

Activity: 531
Merit: 505



View Profile WWW
April 15, 2015, 06:22:35 AM
 #7

Adding caps will not stop anyone to measure directly at the processor pins. And the device is tamper-evident, not resistant. Nothing is. The goal is to slower and make attack more expensive.

Donations: 1Hawkix7GHym6SM98ii5vSHHShA3FUgpV6
http://btcportal.net/ - All about Bitcoin - coming soon!
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8420



View Profile WWW
April 15, 2015, 11:53:55 AM
 #8

Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port.  He mentioned removing the screen as well to clean up the signal, so I guess the device isn't even tamper-resistant? It doesn't seem to be going by the Trezor website. Too bad everything has to be made as cheaply as possible.
It isn't connecting to the jtag is easier than the power analysis.

But-- not quite the same, it's conceivable that a sufficiently creative attacker could do basically the same power analysis attack just by recording EMI picked up by the soundcard in the computer or via RF emissions from the device. (It's apparently quite easy to pick up noise from the trezor from across the screen with a radio receiver).  People who've tried this have been frustrated by the extreme amount of noise put off by the screen and power regulators, but sufficiently advanced DSP may overcome it.
coinfusion
Full Member
***
Offline Offline

Activity: 141
Merit: 100


View Profile
April 16, 2015, 02:24:56 AM
 #9

Adding caps will not stop anyone to measure directly at the processor pins. And the device is tamper-evident, not resistant. Nothing is. The goal is to slower and make attack more expensive.

That's true, 'swhy I specified power only at the USB port.  It would allow the tamper-evident feature to do its job, as only needing non-invasive monitoring would let someone try without being noticed.  It really only needs to withstand attack long enough for its owner to notice it missing.

Quote from: gmaxwell link=topic=1022815
.... it's conceivable that a sufficiently creative attacker could do basically the same power analysis attack just by recording EMI picked up by the soundcard in the computer or via RF emissions from the device. (It's apparently quite easy to pick up noise from the trezor from across the screen with a radio receiver).  People who've tried this have been frustrated by the extreme amount of noise put off by the screen and power regulators, but sufficiently advanced DSP may overcome it.
Hmm, I wonder if it's FCC class B certified.  Seems unlikely if it's throwing out a noticeable amount of RFI, so maybe using more elaborate shielding and coupling to the detector would help passive monitoring succeed.  Might try placing it near a machine with an old taiwanese ISA-bus soundblaster clone in it; those were great at picking up noise!
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
April 16, 2015, 06:27:47 PM
 #10

I always feel uneasy to connect a device with private key directly to an untrusted online computer

I hope something like a audio modem could be implemented but seems it's too slow to be practically used?

https://bitcointalk.org/index.php?topic=135423.0

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
coinfusion
Full Member
***
Offline Offline

Activity: 141
Merit: 100


View Profile
April 17, 2015, 01:47:42 AM
 #11

It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8420



View Profile WWW
April 17, 2015, 11:16:15 AM
 #12

It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
Actually, from the computer the Trezor is connected to itself (after all, the point of the Tezor is the assumption the host computer is compromised); nearby would be an even more impressive stunt--  in terms of nearby but not connected; that would better be done with a software defined radio receiver (e.g. not merely a remote compromise).

All of that is a long shot, but thats the annoyance about defense; you have to defend against all attackers, and an attacker may spend a lot of time and resources on a single valuable target.  It's quite hard to be confident that you do not have an exploitable weakness. If you're sure you're secure you're probably not being creative enough.
Darkblock
Full Member
***
Offline Offline

Activity: 124
Merit: 100


photo taken by ESSA-7 satelite. 1968


View Profile
April 17, 2015, 01:12:58 PM
 #13

It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
Actually, from the computer the Trezor is connected to itself (after all, the point of the Tezor is the assumption the host computer is compromised); nearby would be an even more impressive stunt--  in terms of nearby but not connected; that would better be done with a software defined radio receiver (e.g. not merely a remote compromise).

All of that is a long shot, but thats the annoyance about defense; you have to defend against all attackers, and an attacker may spend a lot of time and resources on a single valuable target.  It's quite hard to be confident that you do not have an exploitable weakness. If you're sure you're secure you're probably not being creative enough.

wooow. crazy shit. reminds me of the hollywood movie "eagle eye". But not long ago i ve read an article about some scientists from Tel Aviv University who were able to extract RSA keys from the "noise" of a CPU!!! So the above scenario, where a nearby computer "attacks" a victim within his noise-recognition area by "listening to its processor", should be practically possible. maybe we should start adding noise protection measures to our computers and trezors... LOL

bigbitmine
Full Member
***
Offline Offline

Activity: 196
Merit: 100


Big Bit Mine


View Profile
April 17, 2015, 01:18:48 PM
 #14

You never break into my Trezor collection.

Blazr
Hero Member
*****
Offline Offline

Activity: 882
Merit: 1005



View Profile
April 17, 2015, 01:21:33 PM
Merited by ABCbits (3)
 #15

This is why I always advise people to wait a few more years before using hardware wallets to store significant amounts of Bitcoin. They are too new, untested and unstudied and due to this they may have undiscovered flaws like this, in fact my opinion is that there are many other side-channel attacks similar to this, however in a few years once they have been better studied, tested and improved and we fully understand all the security concerns involved then hardware wallets will really shine.

user2020
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
April 19, 2015, 08:36:43 PM
 #16

This is why I always advise people to wait a few more years before using hardware wallets to store significant amounts of Bitcoin. They are too new, untested and unstudied and due to this they may have undiscovered flaws like this, in fact my opinion is that there are many other side-channel attacks similar to this, however in a few years once they have been better studied, tested and improved and we fully understand all the security concerns involved then hardware wallets will really shine.

Did you saw this?

http://www.eliptibox.com/#!The-perfect-hardware-part-1-REDBLACK/cw4e/54fdf26b0cf24585978defdb

Looks that it is claims to be protected against all of these attucks
medUSA
Legendary
*
Offline Offline

Activity: 952
Merit: 1003


--Signature Designs-- http://bit.ly/1Pjbx77


View Profile WWW
April 19, 2015, 09:08:18 PM
 #17

A good read. Demonstrates how a chain is only as strong as its weakest link. This attack is so easy for someone who knows the stuff. 512bit key generation defeated by a current meter.  Smiley
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8420



View Profile WWW
April 19, 2015, 09:09:46 PM
Last edit: April 19, 2015, 09:47:30 PM by gmaxwell
 #18

Looks that it is claims to be protected against all of these attucks
Unlikely.  Power filtering cannot help you when the leak is so gross that it makes timing differences you could darn near measure with a stopwatch.

Though the device looks pretty interesting and would be good for applications where the software is already largely protected! But the invest page makes it severely smell like a scam.
bitbouillion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 250



View Profile
April 20, 2015, 12:42:12 AM
 #19

Looks that it is claims to be protected against all of these attucks
Unlikely.  Power filtering cannot help you when the leak is so gross that it makes timing differences you could darn near measure with a stopwatch.

In the article they also write about emission from signal lines. Electronic designers have been working for decades on such problems to avoid interference with other devices and to satisfy regulatory requirements. Simple layout changes of the PCB can achieve this at marginal cost. On the other hand electromagnetic emissions can't be completely avoided and an attacker can use more sophisticated measurement and analysis methods, but a good PCB design can drive the costs for such an attack significantly up. Therefore EMI-engineering should be mandatory for the development of security hardware.

johoe
Full Member
***
Offline Offline

Activity: 217
Merit: 241


View Profile
April 23, 2015, 10:35:49 AM
Last edit: April 23, 2015, 10:58:57 AM by johoe
 #20

Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port.  

The TREZOR definitely has some filtering caps; Beyond 10 kHz I can see no signal.  The main problem was that the bn_inverse function is noisy (several branches) and quite slow in executing (it does a thousand additions of 256 bit numbers).  One could filter these out with larger caps but it probably was never a design requirement to put the largest cap that would fit inside the casing of the TREZOR.  And of course you can always break it open.  The problem with the noisy bn_inverse function has been fixed (now, it is only used once on the z coordinate of the public key, which is even randomized).

My next project is analysing the Ledger.  This has no filtering caps worth mentioning.  It is just the secure element with a USB connector.  The oscilloscope shows much more details.  However, some of it is noise the device is producing deliberately to make these kinds of analysis more difficulty.  It also randomizes the timing.  I will probably report more of this, once the analysis is finished.  Still, even with the secure elements, you can see a lot of details of the executed code on the power line.  The producers of the Ledger are aware of this and use constant time code to compute the public from the private key.  We will see, whether they did this right.

Donations to 1CF62UFWXiKqFUmgQMUby9DpEW5LXjypU3
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!