Skip to content

Commit ea262af

Browse files
doegoxb0l0k
authored andcommitted
1 parent 9299a06 commit ea262af

4 files changed

Lines changed: 56 additions & 9 deletions

File tree

src/content/threat-model/device-genuineness.md

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,68 @@ layout: threat-model
33
title: Threat Model - Genuineness
44
---
55

6-
The ability to prove genuineness of the device's secure element is one of the main security features, from both hardware and firmware points of view. The hardware wallet must have a secure mechanism for this, and this is at the utmost importance. An attacker could otherwise have replaced a genuine device by a fake and backdoored one (through supply chain or evil maid attacks for instance). In this case, he would be able to access to the crypto assets afterwards.
6+
The ability to prove the genuineness of the device's secure element is one of the main security features, from both hardware and firmware points of view. The hardware wallet must include a secure mechanism for this, and it is of utmost importance. Otherwise, an attacker could replace a genuine device with a fake, backdoored one (through supply chain or evil maid attacks, for instance). In this case, they would be able to access the crypto assets afterward.
77

8-
Anti-tampering seals (or holographic seals) can give a false sense of security: not only are they trivial to clone, but it is also easy to open and close a package without damaging the seal.
8+
Classic anti-tampering seals (or holographic seals) can give a false sense of security: not only are they trivial to clone, but it is also easy to open and close a package without damaging the seal.
99

10-
### Ledger Genuine Check
1110

12-
To prove the genuineness of Ledger signers secure elements, the following steps take place during the manufacturing (in secure environment):
13-
- Each Ledger signer secure element generates a unique pair of keys: a public key and a private key. The private key is kept secret to the device only and cannot be exported nor retrieved.
14-
- The device sends its public key to Ledger’s HSM (Hardware Security Module). Our HSM signs the public key with the Ledger Root of Trust and sends it back to the device. This signed public key is the device’s attestation, which is stored inside the secure element.
11+
### What is an attestation and how does it work?
1512

16-
After manufacturing, this attestation allows the user (through Ledger Wallet) to verify if the device's secure element is genuine. The HSM sends a challenge which must be signed by the secure element and sent back along the attestation. This allows the HSM to verify the attestation and the challenge signature and eventually tell whether the secure element is genuine or not. More details can be found in [this blogpost](https://www.ledger.com/a-closer-look-into-ledger-security-the-root-of-trust/).
13+
Attestation is a validation process used to check the genuineness of Ledger secure elements.
14+
In simple terms, every time you use a Ledger device to process a critical action at the firmware level (such as updating the OS or installing or removing apps), an HSM (secure server) sends a challenge to the secure element (a randomly generated number). This means it is requesting the device to prove the genuineness of its secure element. The secure element can prove that it is genuine by providing a correct signature for the challenge.
15+
If the server is able to verify the signature from the secure element, it validates its genuineness and allows the connection. Otherwise, it blocks it.
16+
Let’s take a closer look at it.
17+
18+
### Setting up an attestation for Ledger signers during manufacturing
19+
20+
To make use of a Root of Trust, the following steps take place **during manufacturing** of a device:
21+
22+
* Each Ledger device’s secure element generates a unique key pair: a **public key** and a **private key**. The private key is stored inside the secure element and cannot be extracted.
23+
The same principle is used for your cryptocurrency accounts.
24+
* The secure element sends its public key to Ledger’s HSM (secure server).
25+
* Our HSM (secure server) signs the public key with the Ledger Root of Trust and sends it back to the device. This signed public key is the device’s attestation.
26+
27+
This attestation allows Ledger’s HSM to verify afterward whether the secure element is genuine.
28+
29+
### Using the Root of Trust after manufacturing
30+
31+
After manufacturing, this attestation allows the user (through Ledger Wallet) to verify if the device's secure element is genuine.
32+
33+
Here is how it works:
34+
35+
![](schema-genuine-check.png)
36+
37+
* **Ledger’s HSM** (secure server) sends a challenge to the **Ledger device**.
38+
* The Ledger device’s **secure element** signs the challenge it receives using its private key. This signature is sent back to **Ledger’s HSM along with the attestation** (signed public key).
39+
* **Ledger’s server** can then authenticate the Ledger secure element by doing the following:
40+
* Verify the attestation of the device (that the given public key is actually signed by the HSM)
41+
* Verify the challenge with the attestation.
42+
43+
If the secure element’s signature is confirmed as correct by the HSM, the secure element is established as genuine and is allowed to access the Ledger Wallet manager.
44+
45+
![](genuine-device.png)
46+
47+
Otherwise, an error message indicates that the genuine check could not be completed, and the Ledger Wallet application will not interact further with the device.
48+
49+
This authentication procedure protects Ledger users against counterfeited Ledger devices.
50+
51+
### When do we use a Root of Trust to check if a device is genuine?
52+
53+
![](onboarding-genuine-check.png)
54+
55+
* When you connect your signer to Ledger Wallet for the first time during the genuine check (see image above)
56+
* Each time you access the Ledger Wallet application
57+
* Every time you install an application from the Ledger Wallet application
58+
* Each time you update your firmware.
59+
60+
None of the above can be performed with a counterfeit device.
1761

1862
### End User Physical Verification
1963

20-
Ledger signers are designed so users can check the integrity of their devices by themselves as detailed in [this support article](https://support.ledger.com/article/4404382029329-zd).
64+
Note that a Genuine check cannot detect unauthorized physical modifications to the hardware, such as spying implants, if the original Secure Element remains intact.
65+
66+
This is why buying directly [from Ledger or Authorised Resellers](https://www.ledger.com/reseller) is safer: Ledger’s Genuine Check confirms authenticity, but it cannot verify the device’s physical supply chain history.
2167

68+
Moreover, Ledger signers are designed so users can check the integrity of their devices by themselves as detailed in [this support article](https://support.ledger.com/article/4404382029329-zd).
2269

23-
> **Associated Threats**: An attack allowing to extract a device attestation is a major threat to the genuineness security mechanism. Generally speaking, any attack allowing a non genuine device to pass the genuine check is a valid attack.
70+
> **Associated Threats**: An attack that allows extraction of a device attestation is a major threat to the genuineness security mechanism. Generally speaking, any attack that allows a non-genuine device to pass the genuine check is a valid attack.
7.36 KB
Loading
22.9 KB
Loading
52 KB
Loading

0 commit comments

Comments
 (0)