SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
LEDGER
Bitcoin wallets security
Erring on the hardware side
About the speaker
Nicolas Bacca, CTO of Ledger (previously BTChip),
designing hardware wallets (Ledger Wallet,
USB smartcard being the first)
15 years smartcard / embedded security industry experience
Engineer by day, reverse engineer by night
Jailbreaking things since 2002
Risks, threats and mitigations
Theft => encrypted USB drives, BIP 38
Bad crypto
Programming errors => audits ...
Brittle RNGs => RFC 6979
Malware => multi signature, BIP 70
Dumb (sweeping private keys)
Smart
Adapting to your environment
Abusing crypto
What’s needed
Protection against physical theft
Protection against malware
Protection of the private keys, critical asset
Validation of what is getting signed, in a trusted
environment
Protection against bad cryptography
Trustworthy RNG
Side channel resistant implementation
Hardware Wallet
Physical device offering those guarantees
Or isolated enclave offering those guarantees
Attacks on hardware wallets
Programming error (resulting in code execution)
Non invasive (SPA / DPA)
Slightly invasive (glitching)
Destructive (chip reverse engineering)
#TLDR protection profile
Hardware Wallet should not leak secrets on the go
with a not too intrusive attack
An attacker that did his homework previously should not
be able to run a SPA / glitching attack in a shop
Hardware Wallet should take some time to leak secrets
when borrowed, preferably only using a highly intrusive
method
Value of acceptable time may vary, let’s say 1 day
Sample programming error
Textbook stack overflow, leading to arbitrary code
execution, in TREZOR 1.2.0
https://github.com/trezor/trezor-
mcu/commit/524f2a957afb66e6a869384aceaca1cb7f9cba60
Reported, fixed quickly, no harm done
Future mitigation with stack protection at compiler level
Simple Power Analysis (SPA)
Based on direct mapping between CPU instructions +
operand and current consumption
Non invasive, non detectable
Easy, low cost, and fast (once calibrated)
Basically allows to read the code flow on oscilloscope
SPA apllied to Bitcoin
ECC Scalar multiplication (also consider Modular inversion, Montgomery mult)
Input: scalar k, P point k = {kn-1...k0}, kn-1 == 1
Output: R=k.P
R = ϑ
for i = n-1 to 0
R = R²
if ki == 1 R = R+P
end
s = kinv (h + r.d) => d = (s.k - h) . rinv
1 0 1 1 ….
Differential Power Analysis (DPA)
Non invasive, non detectable attack
Direct mapping between CPU instruction + operand and
current consumption
Not so easy, middle cost, longer time to set up
Retrieve secret value through mathematical analysis of
multiple high precision oscilloscope acquisitions
Differential Power Analysis (DPA)
Need to be able to fix all input value except one in attacked
code
In theory, ECDSA signature no really DPA vulnerable due to
random k
BUT: RFC 6979 make ECDSA DPA vulnerable at two levels:
we control all in first step of RFC, except x which is the
secret key
K = HMAC_K(V || 0x00 || int2bytes(x) || bits2bytes(h1))
s = kinv (h + r.d) : kinv is not known but always fixed for
the same input
Lack of real world attacks on this, anyone interested ?
Fault Injections Vulnerabilities
Invasive, hard to detect attack, unless hardware helps
Hard, high cost for bus/memory modifications
Hard, low/middle cost for clock/Vcc glitching on non secure
chips
Retrieve secret value through mathematical analysis of
multiple correct and incorrect computation (or fail chain)
Main type of attack:
C Safe Error
M Safe Error
Differential Fault Analysis (DFA)
A fail chain (and how to avoid it)
Read The Fine Chip Datasheets
Use your Open Source libraries with a large amount of salt
The “many eyes” paradigm doesn’t scale well for
complex (OpenSSL) or boring (X-Win) security issues
Read them more
A fail chain (and how to avoid it)
STM32 flash memory interface
A fail chain (and how to avoid it)
Typical implementation in libopencm3 (along with a warning.
in the source code.)
A fail chain (and how to avoid it)
Consequence : free lunch if a flash operation fails and
no status check (glitch it in the most unsubtle way possible,
keep running happily)
A fail chain (and how to avoid it)
Read The Fine Chip Datasheets (think I mentioned that
already)
Design your code with glitching in mind
Isolate critical operations and recheck them
Use appropriate Hamming distance for your critical
constants (no, 0 for False, everything else for True
doesn’t cut it)
Use appropriate hardware (if it can run with arbitrary clock
and voltage, or offers JTAG+lolfuse, good luck)
Sampling security in 2 minutes
PIN/passwords with limited attempts implementations are
nice to check and allow trivial attacks.
Timing attacks when comparing (SPA)
memcmp fail
Easy glitching attacks (Fault injection)
increase attempts after check fail
insecure check fail
sector
erase
sector
erase
sector
write
sector erase ...
Gentle trigger event from HW
sector
erase
starts
chip reset sequence ...
chip reset sequence ...
sectore erase
starts
Minimal chip voltage reached,
chip reset is triggered by HW.
Why smartcards help
Designed to prevent trivial clock / voltage glitching
Hardware validation of code paths
Usually come with cryptographic libraries that are
SPA/DPA/DFA resistant
Including patent licensing …
Small attack surface, being a dedicated hardware
component
Quick word about other enclaves
Pioneered by Hal Finney for Bitcoin
https://bitcointalk.org/index.php?topic=154290.0
Security to be probed (vendor dependant, RAM isolation
can be tricky,…)
Open source can happen
See Open TEE https://github.com/OP-TEE
Jailowning could be the new Jailbreaking
Commercial approach, see Rivetz talk
Conclusion
More eyes and hands needed
Consider hardware & software together
Break more hardware !
Failsafes
If the hardware can’t hodl by design, fail gracefully
(passphrases on microcontrollers based hardware
wallets)
LEDGER
Questions ?
nicolas@ledger.fr

Weitere ähnliche Inhalte

Was ist angesagt?

Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...Positive Hack Days
 
IoT Saturday PN 2019 - Eurotech
IoT Saturday PN 2019 - EurotechIoT Saturday PN 2019 - Eurotech
IoT Saturday PN 2019 - EurotechLuca Dazi
 
Scaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsScaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsBalena
 
Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Elaf A.Saeed
 
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh OjhaKazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh OjhaYogesh Ojha
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of ThingsPaul Fremantle
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...idsecconf
 
IoT Security – Executing an Effective Security Testing Process
IoT Security – Executing an Effective Security Testing Process IoT Security – Executing an Effective Security Testing Process
IoT Security – Executing an Effective Security Testing Process EC-Council
 
RSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsRSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsDaniel Miessler
 
IoT Security by Sanjay Kumar
IoT Security by Sanjay KumarIoT Security by Sanjay Kumar
IoT Security by Sanjay KumarOWASP Delhi
 
[2.2] Hacking Internet of Things devices - Ivan Novikov
[2.2] Hacking Internet of Things devices - Ivan Novikov[2.2] Hacking Internet of Things devices - Ivan Novikov
[2.2] Hacking Internet of Things devices - Ivan NovikovOWASP Russia
 
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Zoltan Balazs
 
Your Thing is Pwned - Security Challenges for the IoT
Your Thing is Pwned - Security Challenges for the IoTYour Thing is Pwned - Security Challenges for the IoT
Your Thing is Pwned - Security Challenges for the IoTWSO2
 
IOT privacy and Security
IOT privacy and SecurityIOT privacy and Security
IOT privacy and Securitynoornabi16
 
IoT security-arrow-roadshow #iotconfua
IoT security-arrow-roadshow #iotconfuaIoT security-arrow-roadshow #iotconfua
IoT security-arrow-roadshow #iotconfuaAndy Shutka
 

Was ist angesagt? (20)

IoT Security
IoT SecurityIoT Security
IoT Security
 
Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...
 
IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]IoT Security: Cases and Methods [CON5446]
IoT Security: Cases and Methods [CON5446]
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
IoT Saturday PN 2019 - Eurotech
IoT Saturday PN 2019 - EurotechIoT Saturday PN 2019 - Eurotech
IoT Saturday PN 2019 - Eurotech
 
Scaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsScaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of Things
 
Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)Lesson 9- NodeMCU with Arduino UNO (UART)
Lesson 9- NodeMCU with Arduino UNO (UART)
 
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh OjhaKazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
 
Iot Security
Iot SecurityIot Security
Iot Security
 
IoT security zigbee -- Null Meet bangalore
IoT security zigbee -- Null Meet bangaloreIoT security zigbee -- Null Meet bangalore
IoT security zigbee -- Null Meet bangalore
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
 
IoT Security – Executing an Effective Security Testing Process
IoT Security – Executing an Effective Security Testing Process IoT Security – Executing an Effective Security Testing Process
IoT Security – Executing an Effective Security Testing Process
 
RSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsRSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of Things
 
IoT Security by Sanjay Kumar
IoT Security by Sanjay KumarIoT Security by Sanjay Kumar
IoT Security by Sanjay Kumar
 
[2.2] Hacking Internet of Things devices - Ivan Novikov
[2.2] Hacking Internet of Things devices - Ivan Novikov[2.2] Hacking Internet of Things devices - Ivan Novikov
[2.2] Hacking Internet of Things devices - Ivan Novikov
 
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
Hacktivity 2016: The real risks of the IoT security-nightmare: Hacking IP cam...
 
Your Thing is Pwned - Security Challenges for the IoT
Your Thing is Pwned - Security Challenges for the IoTYour Thing is Pwned - Security Challenges for the IoT
Your Thing is Pwned - Security Challenges for the IoT
 
IOT privacy and Security
IOT privacy and SecurityIOT privacy and Security
IOT privacy and Security
 
IoT security-arrow-roadshow #iotconfua
IoT security-arrow-roadshow #iotconfuaIoT security-arrow-roadshow #iotconfua
IoT security-arrow-roadshow #iotconfua
 

Andere mochten auch

Blue Planet Technologies2010 V03 Short
Blue Planet Technologies2010 V03 ShortBlue Planet Technologies2010 V03 Short
Blue Planet Technologies2010 V03 ShortWESAustralia
 
Super catarina y los super insectos
Super catarina y los super insectosSuper catarina y los super insectos
Super catarina y los super insectoslesliecapeles
 
Illuminati sociedad que controla el mundo
Illuminati sociedad que controla el mundoIlluminati sociedad que controla el mundo
Illuminati sociedad que controla el mundoCarlosLombeida
 
Jaque Mate mes de octubre 2012
Jaque Mate mes de octubre 2012Jaque Mate mes de octubre 2012
Jaque Mate mes de octubre 2012ComiteOlimpicoG
 
Emerging City Report - Brasilia (2014)
Emerging City Report - Brasilia (2014)Emerging City Report - Brasilia (2014)
Emerging City Report - Brasilia (2014)ResearchFox
 
Arias antiguas
Arias antiguasArias antiguas
Arias antiguaspazybien2
 
especialidades del INWTD
especialidades del INWTDespecialidades del INWTD
especialidades del INWTDSofia Erroa
 
Catalyst Group's Latest Environment, Health and Safety Project
Catalyst Group's Latest Environment, Health and Safety ProjectCatalyst Group's Latest Environment, Health and Safety Project
Catalyst Group's Latest Environment, Health and Safety ProjectSajid Modan, RPh
 
Competitors landscape
Competitors landscapeCompetitors landscape
Competitors landscapePaola Cretico
 
6 secrets of persuasive writing
6 secrets of persuasive writing6 secrets of persuasive writing
6 secrets of persuasive writingPamela Thorne
 
Programa de Dirección en Big Data - IE Business School
Programa de Dirección en Big Data - IE Business School Programa de Dirección en Big Data - IE Business School
Programa de Dirección en Big Data - IE Business School DEMETRIO BARRAGAN
 
Construccion de ciudadania -Camila 3º A
Construccion de ciudadania -Camila 3º AConstruccion de ciudadania -Camila 3º A
Construccion de ciudadania -Camila 3º Aleandraspinosa
 
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)CV_Carlos_Prieto_Lopez_2016_ES_VF (2)
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)Carlos Prieto
 

Andere mochten auch (20)

Blue Planet Technologies2010 V03 Short
Blue Planet Technologies2010 V03 ShortBlue Planet Technologies2010 V03 Short
Blue Planet Technologies2010 V03 Short
 
3 codigo ascii ≈ [×bern@chea m×™]
3 codigo ascii ≈ [×bern@chea m×™]3 codigo ascii ≈ [×bern@chea m×™]
3 codigo ascii ≈ [×bern@chea m×™]
 
Play station 4
Play station 4Play station 4
Play station 4
 
Best Practices for File Sharing
Best Practices for File SharingBest Practices for File Sharing
Best Practices for File Sharing
 
Super catarina y los super insectos
Super catarina y los super insectosSuper catarina y los super insectos
Super catarina y los super insectos
 
Illuminati sociedad que controla el mundo
Illuminati sociedad que controla el mundoIlluminati sociedad que controla el mundo
Illuminati sociedad que controla el mundo
 
Jaque Mate mes de octubre 2012
Jaque Mate mes de octubre 2012Jaque Mate mes de octubre 2012
Jaque Mate mes de octubre 2012
 
Emerging City Report - Brasilia (2014)
Emerging City Report - Brasilia (2014)Emerging City Report - Brasilia (2014)
Emerging City Report - Brasilia (2014)
 
Formato hoja vida_juan_sebastian
Formato hoja vida_juan_sebastianFormato hoja vida_juan_sebastian
Formato hoja vida_juan_sebastian
 
Arias antiguas
Arias antiguasArias antiguas
Arias antiguas
 
especialidades del INWTD
especialidades del INWTDespecialidades del INWTD
especialidades del INWTD
 
FahrradJäger
FahrradJägerFahrradJäger
FahrradJäger
 
Proposal TTI
Proposal TTIProposal TTI
Proposal TTI
 
Catalyst Group's Latest Environment, Health and Safety Project
Catalyst Group's Latest Environment, Health and Safety ProjectCatalyst Group's Latest Environment, Health and Safety Project
Catalyst Group's Latest Environment, Health and Safety Project
 
Competitors landscape
Competitors landscapeCompetitors landscape
Competitors landscape
 
6 secrets of persuasive writing
6 secrets of persuasive writing6 secrets of persuasive writing
6 secrets of persuasive writing
 
Programa de Dirección en Big Data - IE Business School
Programa de Dirección en Big Data - IE Business School Programa de Dirección en Big Data - IE Business School
Programa de Dirección en Big Data - IE Business School
 
Construccion de ciudadania -Camila 3º A
Construccion de ciudadania -Camila 3º AConstruccion de ciudadania -Camila 3º A
Construccion de ciudadania -Camila 3º A
 
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)CV_Carlos_Prieto_Lopez_2016_ES_VF (2)
CV_Carlos_Prieto_Lopez_2016_ES_VF (2)
 
Frases Acuarelas Musica Ir
Frases Acuarelas Musica IrFrases Acuarelas Musica Ir
Frases Acuarelas Musica Ir
 

Ähnlich wie Bitcoin hardware wallets security

Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]RootedCON
 
BalCCon2k18 - Towards the perfect cryptocurrency wallet
BalCCon2k18 - Towards the perfect cryptocurrency walletBalCCon2k18 - Towards the perfect cryptocurrency wallet
BalCCon2k18 - Towards the perfect cryptocurrency walletNemanja Nikodijević
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slidesMoabi.com
 
CheapSCAte: Attacking IoT with less than $60
CheapSCAte: Attacking IoT with less than $60CheapSCAte: Attacking IoT with less than $60
CheapSCAte: Attacking IoT with less than $60Riscure
 
Hacking RF based IoT devices
Hacking RF based IoT devicesHacking RF based IoT devices
Hacking RF based IoT devicesErez Metula
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 vijaydeepakg
 
Tools for Practical Attacks on Analog-to-Digital Conversion
Tools for Practical Attacks on Analog-to-Digital ConversionTools for Practical Attacks on Analog-to-Digital Conversion
Tools for Practical Attacks on Analog-to-Digital ConversionAlexander Bolshev
 
1300 david oswald id and ip theft with side-channel attacks
1300 david oswald   id and ip theft with side-channel attacks1300 david oswald   id and ip theft with side-channel attacks
1300 david oswald id and ip theft with side-channel attacksPositive Hack Days
 
Georgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityGeorgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityDefconRussia
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
OT Security - h-c0n 2020
OT Security - h-c0n 2020OT Security - h-c0n 2020
OT Security - h-c0n 2020Jose Palanco
 
Tinkercad Workshop PPT, Dept. of ECE.pptx
Tinkercad Workshop PPT, Dept. of ECE.pptxTinkercad Workshop PPT, Dept. of ECE.pptx
Tinkercad Workshop PPT, Dept. of ECE.pptxJayashreeSelvam5
 
Cryptography and secure systems
Cryptography and secure systemsCryptography and secure systems
Cryptography and secure systemsVsevolod Stakhov
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practicalMoabi.com
 
side-channel-kevin2600
side-channel-kevin2600side-channel-kevin2600
side-channel-kevin2600Kevin2600
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -evechiportal
 

Ähnlich wie Bitcoin hardware wallets security (20)

Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
 
BalCCon2k18 - Towards the perfect cryptocurrency wallet
BalCCon2k18 - Towards the perfect cryptocurrency walletBalCCon2k18 - Towards the perfect cryptocurrency wallet
BalCCon2k18 - Towards the perfect cryptocurrency wallet
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slides
 
CheapSCAte: Attacking IoT with less than $60
CheapSCAte: Attacking IoT with less than $60CheapSCAte: Attacking IoT with less than $60
CheapSCAte: Attacking IoT with less than $60
 
Hacking RF based IoT devices
Hacking RF based IoT devicesHacking RF based IoT devices
Hacking RF based IoT devices
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812
 
Tools for Practical Attacks on Analog-to-Digital Conversion
Tools for Practical Attacks on Analog-to-Digital ConversionTools for Practical Attacks on Analog-to-Digital Conversion
Tools for Practical Attacks on Analog-to-Digital Conversion
 
Arduino
ArduinoArduino
Arduino
 
1300 david oswald id and ip theft with side-channel attacks
1300 david oswald   id and ip theft with side-channel attacks1300 david oswald   id and ip theft with side-channel attacks
1300 david oswald id and ip theft with side-channel attacks
 
Georgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityGeorgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software security
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
amrapali builders@@sub way hacking.pdf
amrapali builders@@sub way hacking.pdfamrapali builders@@sub way hacking.pdf
amrapali builders@@sub way hacking.pdf
 
OT Security - h-c0n 2020
OT Security - h-c0n 2020OT Security - h-c0n 2020
OT Security - h-c0n 2020
 
Tinkercad Workshop PPT, Dept. of ECE.pptx
Tinkercad Workshop PPT, Dept. of ECE.pptxTinkercad Workshop PPT, Dept. of ECE.pptx
Tinkercad Workshop PPT, Dept. of ECE.pptx
 
Cryptography and secure systems
Cryptography and secure systemsCryptography and secure systems
Cryptography and secure systems
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
Iot Workshop NITT 2015
Iot Workshop NITT 2015Iot Workshop NITT 2015
Iot Workshop NITT 2015
 
side-channel-kevin2600
side-channel-kevin2600side-channel-kevin2600
side-channel-kevin2600
 
presentation_sas2016_V3
presentation_sas2016_V3presentation_sas2016_V3
presentation_sas2016_V3
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 

Kürzlich hochgeladen

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 

Kürzlich hochgeladen (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 

Bitcoin hardware wallets security

  • 2. About the speaker Nicolas Bacca, CTO of Ledger (previously BTChip), designing hardware wallets (Ledger Wallet, USB smartcard being the first) 15 years smartcard / embedded security industry experience Engineer by day, reverse engineer by night Jailbreaking things since 2002
  • 3. Risks, threats and mitigations Theft => encrypted USB drives, BIP 38 Bad crypto Programming errors => audits ... Brittle RNGs => RFC 6979 Malware => multi signature, BIP 70 Dumb (sweeping private keys) Smart Adapting to your environment Abusing crypto
  • 4. What’s needed Protection against physical theft Protection against malware Protection of the private keys, critical asset Validation of what is getting signed, in a trusted environment Protection against bad cryptography Trustworthy RNG Side channel resistant implementation
  • 5. Hardware Wallet Physical device offering those guarantees Or isolated enclave offering those guarantees Attacks on hardware wallets Programming error (resulting in code execution) Non invasive (SPA / DPA) Slightly invasive (glitching) Destructive (chip reverse engineering)
  • 6. #TLDR protection profile Hardware Wallet should not leak secrets on the go with a not too intrusive attack An attacker that did his homework previously should not be able to run a SPA / glitching attack in a shop Hardware Wallet should take some time to leak secrets when borrowed, preferably only using a highly intrusive method Value of acceptable time may vary, let’s say 1 day
  • 7. Sample programming error Textbook stack overflow, leading to arbitrary code execution, in TREZOR 1.2.0 https://github.com/trezor/trezor- mcu/commit/524f2a957afb66e6a869384aceaca1cb7f9cba60 Reported, fixed quickly, no harm done Future mitigation with stack protection at compiler level
  • 8. Simple Power Analysis (SPA) Based on direct mapping between CPU instructions + operand and current consumption Non invasive, non detectable Easy, low cost, and fast (once calibrated) Basically allows to read the code flow on oscilloscope
  • 9. SPA apllied to Bitcoin ECC Scalar multiplication (also consider Modular inversion, Montgomery mult) Input: scalar k, P point k = {kn-1...k0}, kn-1 == 1 Output: R=k.P R = ϑ for i = n-1 to 0 R = R² if ki == 1 R = R+P end s = kinv (h + r.d) => d = (s.k - h) . rinv 1 0 1 1 ….
  • 10. Differential Power Analysis (DPA) Non invasive, non detectable attack Direct mapping between CPU instruction + operand and current consumption Not so easy, middle cost, longer time to set up Retrieve secret value through mathematical analysis of multiple high precision oscilloscope acquisitions
  • 11. Differential Power Analysis (DPA) Need to be able to fix all input value except one in attacked code In theory, ECDSA signature no really DPA vulnerable due to random k BUT: RFC 6979 make ECDSA DPA vulnerable at two levels: we control all in first step of RFC, except x which is the secret key K = HMAC_K(V || 0x00 || int2bytes(x) || bits2bytes(h1)) s = kinv (h + r.d) : kinv is not known but always fixed for the same input Lack of real world attacks on this, anyone interested ?
  • 12. Fault Injections Vulnerabilities Invasive, hard to detect attack, unless hardware helps Hard, high cost for bus/memory modifications Hard, low/middle cost for clock/Vcc glitching on non secure chips Retrieve secret value through mathematical analysis of multiple correct and incorrect computation (or fail chain) Main type of attack: C Safe Error M Safe Error Differential Fault Analysis (DFA)
  • 13. A fail chain (and how to avoid it) Read The Fine Chip Datasheets Use your Open Source libraries with a large amount of salt The “many eyes” paradigm doesn’t scale well for complex (OpenSSL) or boring (X-Win) security issues Read them more
  • 14. A fail chain (and how to avoid it) STM32 flash memory interface
  • 15. A fail chain (and how to avoid it) Typical implementation in libopencm3 (along with a warning. in the source code.)
  • 16. A fail chain (and how to avoid it) Consequence : free lunch if a flash operation fails and no status check (glitch it in the most unsubtle way possible, keep running happily)
  • 17. A fail chain (and how to avoid it) Read The Fine Chip Datasheets (think I mentioned that already) Design your code with glitching in mind Isolate critical operations and recheck them Use appropriate Hamming distance for your critical constants (no, 0 for False, everything else for True doesn’t cut it) Use appropriate hardware (if it can run with arbitrary clock and voltage, or offers JTAG+lolfuse, good luck)
  • 18. Sampling security in 2 minutes PIN/passwords with limited attempts implementations are nice to check and allow trivial attacks. Timing attacks when comparing (SPA) memcmp fail Easy glitching attacks (Fault injection) increase attempts after check fail insecure check fail
  • 20. sector erase starts chip reset sequence ... chip reset sequence ... sectore erase starts Minimal chip voltage reached, chip reset is triggered by HW.
  • 21. Why smartcards help Designed to prevent trivial clock / voltage glitching Hardware validation of code paths Usually come with cryptographic libraries that are SPA/DPA/DFA resistant Including patent licensing … Small attack surface, being a dedicated hardware component
  • 22. Quick word about other enclaves Pioneered by Hal Finney for Bitcoin https://bitcointalk.org/index.php?topic=154290.0 Security to be probed (vendor dependant, RAM isolation can be tricky,…) Open source can happen See Open TEE https://github.com/OP-TEE Jailowning could be the new Jailbreaking Commercial approach, see Rivetz talk
  • 23. Conclusion More eyes and hands needed Consider hardware & software together Break more hardware ! Failsafes If the hardware can’t hodl by design, fail gracefully (passphrases on microcontrollers based hardware wallets)