Author

Topic: PIN codes and Hardware Wallets (Read 428 times)

hero member
Activity: 714
Merit: 1298
Cashback 15%
January 30, 2023, 04:16:39 AM
#42
Wouldn't be too much work for you to extend  a bit more your research by adding  the description of GUI used by different HWs to enter PIN code?. Recently the firmware of ledger nano s+ has  been elevated to 1.0.4 and the most noticeable change was the new GUI to enter PIN  code.  I  think the new GUI in  s+ is more convenient than it was before upgrade.
Hi satscraper.
I really don't have time to do this for all hardware wallets and I don't personally own all devices to know about this, but people can write about that in this and I will consider updating something.
My idea was to collect basic information how PIN code function in this devices, that is not related with GUI on specific devices that can change all the time.
I think that wallets like Passport, Colcard and maybe Keystone have one of the best GUI's for entering PIN codes and it's much easier to enter PIN when you have numbers and real buttons.

Thanks for your response. I have managed to find the relevant answer from reliable source. They had to modify PIN interface to elevate the level of security: "We hence decided to design a whole new PIN-entry interface, conceived specifically to prevent any meaningful dependency. From a security standpoint, the philosophy of this design is simple: instead of trying to hide the number of illuminated pixels in each row, we will make this information useless to an attacker, by making it independent of the typed PIN. The straightforward way is to make the number of illuminated pixels in each row constant."
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 29, 2022, 02:47:44 PM
#41
Wouldn't be too much work for you to extend  a bit more your research by adding  the description of GUI used by different HWs to enter PIN code?. Recently the firmware of ledger nano s+ has  been elevated to 1.0.4 and the most noticeable change was the new GUI to enter PIN  code.  I  think the new GUI in  s+ is more convenient than it was before upgrade.
Hi satscraper.
I really don't have time to do this for all hardware wallets and I don't personally own all devices to know about this, but people can write about that in this and I will consider updating something.
My idea was to collect basic information how PIN code function in this devices, that is not related with GUI on specific devices that can change all the time.
I think that wallets like Passport, Colcard and maybe Keystone have one of the best GUI's for entering PIN codes and it's much easier to enter PIN when you have numbers and real buttons.
hero member
Activity: 714
Merit: 1298
Cashback 15%
October 29, 2022, 11:27:22 AM
#40
~

@dkbit98, Wouldn't it be too much work for you to extend  a bit more your research by adding  the comparison of GUI used by different HWs to enter PIN code?. Recently the firmware of ledger nano s+ has  been elevated to 1.0.4 with the most noticeable change in GUI to enter PIN  code.  I  think the new GUI in  s+ is more convenient for use than it was before upgrade.
legendary
Activity: 2268
Merit: 18503
October 26, 2022, 04:13:22 PM
#39
It was probably encrypted and locked without unlocking option, but I never saw clear official explanation what really happens in this case.
But if that's the case, then a hard reset in which all the data is encrypted and then deleted would achieve the exact same amount of security without requiring the user to purchase a new device.

Any time someone tells me their device or their wallet forgot their password or their PIN (and not just in bitcoin), then I am of the opinion that by far the most likely explanation is human error. Sure, he may have a faulty device, but far more likely he is simply entering the wrong PIN (especially if he hasn't entered it for a few months). Prime example is Peter Schiff, who claimed his wallet forgot his password, before admitting that actually he was entering the wrong information.
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 26, 2022, 04:03:16 PM
#38
Follow up question to the 4-5 posts immediately above: What is actually happening when a device is bricked? Is the data being wiped? Is it being encrypted?
It was probably encrypted and locked without unlocking option, but I never saw clear official explanation what really happens in this case.

One  recent post got my attention and inactive ledger device owners could check if this is true or not, but one guy reported that after few months of not using his legder wallet there was an issue with his PIN code.
Device forgot PIN code by itself, and he needed to restore everything again by importing seed words from scratch.
It could be one more mysterious issues after ledger devices were not used for longer periods of time, but support confirmed this is not normal behavior.
https://www.reddit.com/r/ledgerwallet/comments/yc5jf8/ledger_nano_s_forgets_pin/
legendary
Activity: 2268
Merit: 18503
October 22, 2022, 03:52:14 AM
#37
I remember when hacker and electrical engineer Kingpin aka Joe Grand cracked PIN code for one of his customer Trezor wallet, he was very careful not to spend all wrong PIN attempts.
Original owner spend most of them, so he could only miss a few times with wrong PIN before device would get wiped and erased.
In this case, he managed to pull the PIN from the device's RAM during an update. So in such a case it wouldn't have mattered how many attempts were available to begin with or how many were used, as long as there was at least one remaining and the device hadn't wiped/bricked itself.

Follow up question to the 4-5 posts immediately above: What is actually happening when a device is bricked? Is the data being wiped? Is it being encrypted? Yes, the device may not operate through the normal channels anymore, but can you say for sure the hardware which is bricking itself is completely impervious to all attempts to access it? I guess I'm still not convinced that bricking adds meaningful security over proper data shredding.
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 21, 2022, 08:56:01 AM
#36
An SSD is some flash chips + a flash controller. There are already devices with 'SSDs' that are actually just the flash chips like smartphones and M1/M2 Apple computers which handle the flash controller functionality in the processor / SoC. They still have full disk encryption; so that should also work on hardware wallets, from a technical point of view.
Most hardware wallets have a secure element and use that to encrypt the flash, for instance. As soon as the secure element chip tosses the key, it's realistically impossible to retrieve any useful data from the flash.
Some hardware wallets still don't have secure elements like Trezor's and their forks, but for all other devices you would have to trust closed source elements are encrypting everything correctly without flaw.
We don't even know what kind of encryption they are using, we can't verify anything, and not every encryption is made equal.
Even if encryption would get broken we wouldn't know anything about it because of signed NDA's.
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 20, 2022, 06:20:41 PM
#35
Its not a split second delete, which should scare the crap out of users should their device do that!
That's not necessarily the case anymore, though. Nowadays, you can securely (basically, as long as state-of-the-art symmetric cryptography is not broken) 'wipe' a drive quickly, by using full disk encryption and tossing they key.
This is true for SSD drives with encryption, but I am not sure is this is the case with small devices like hardware wallets because they are not using drives but memory.
An SSD is some flash chips + a flash controller. There are already devices with 'SSDs' that are actually just the flash chips like smartphones and M1/M2 Apple computers which handle the flash controller functionality in the processor / SoC. They still have full disk encryption; so that should also work on hardware wallets, from a technical point of view.
Most hardware wallets have a secure element and use that to encrypt the flash, for instance. As soon as the secure element chip tosses the key, it's realistically impossible to retrieve any useful data from the flash.
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 20, 2022, 02:49:30 PM
#34
Its not a split second delete, which should scare the crap out of users should their device do that!
That's not necessarily the case anymore, though. Nowadays, you can securely (basically, as long as state-of-the-art symmetric cryptography is not broken) 'wipe' a drive quickly, by using full disk encryption and tossing they key.
This is true for SSD drives with encryption, but I am not sure is this is the case with small devices like hardware wallets because they are not using drives but memory.
I never researched if wiping hardware wallet is deleting seed words from memory with or without encryption, but in recent times I prefer devices that deletes everything after power is turned off.
So you are basically doing reset of your wallet every time, and you can quickly import seed words with a QR code, so there is no need to have PIN codes or secure elements.
I mean there are pros and cons for everything, and I am not expecting everyone to stop using PIN codes now Smiley
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 19, 2022, 05:50:57 PM
#33
Its not a split second delete, which should scare the crap out of users should their device do that!
That's not necessarily the case anymore, though. Nowadays, you can securely (basically, as long as state-of-the-art symmetric cryptography is not broken) 'wipe' a drive quickly, by using full disk encryption and tossing they key. It is super fast, yet completely secure, as it leaves you with all the data 'intact' on the drive, but impossible to recover.
Keep in mind that currently used symmetric crypto schemes are already quantum-resistant, so you gain negligible speed-up even with a quantum computer.

Obviously, when it comes to a drive without encryption, it's better to do a few passes of overwriting with zeroes than just deleting an entry in the partition table.
With all that said; this applies to HDDs. Hardware wallets use flash chips which work very differently, so the 'overwrite with 0' method is not the best anymore; in fact, overwriting zeroes can harm SSD drives. So I doubt that Model T does this, it's probably just a little bit slow. Wink
hero member
Activity: 758
Merit: 606
October 19, 2022, 05:22:11 PM
#32
A key point to reflect on is how the PIN/SEED are removed when the "count" hits the device preset limit.  Speaking from knowledge on my Trezor T's the PIN/SEED removal is a WIPE and not a simple delete.  Most everyone knows that deleting something is almost worthless against even a moderately skilled adversary.  e.g. - using my WIPE PIN code I can observe a full wipe not a simple delete.  Of course the code is open source if you wanted to examine it for yourself!  You can observe the wipe in progress as the operation is performed.  Its not a split second delete, which should scare the crap out of users should their device do that!
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 19, 2022, 01:31:42 PM
#31
If you are talking about an attack which can bypass the PIN counter, then whatever the PIN counter is set to is irrelevant.
I can't say it's totally irrelevant, but I don't know how this attack would be performed on Passport device, and if this is even possible.
I remember when hacker and electrical engineer Kingpin aka Joe Grand cracked PIN code for one of his customer Trezor wallet, he was very careful not to spend all wrong PIN attempts.
Original owner spend most of them, so he could only miss a few times with wrong PIN before device would get wiped and erased.
There was an attack on old Coldcard Mk2 device with a laser that recovered PIN Code from this device, but I think this was related with flaws in their old secure element that was later replaced.

legendary
Activity: 2268
Merit: 18503
October 19, 2022, 02:34:34 AM
#30
but my question is what are the chances of someone cracking PIN with some external software/hardware attack?
From a pure numbers point of view, Ledger allow the lowest number of guesses (3), with a PIN between 4 and 8 characters. This gives a lower limit of 1 in 3,333 and an upper limit of 1 in 33,333,333. Passport allows 21 guesses but with a longer PIN between 6 and 12 characters, giving a lower limit of 1 in 47,619 and an upper limit of 1 in 47,619,047,619. So it compares favorably.

If you are talking about an attack which can bypass the PIN counter, then whatever the PIN counter is set to is irrelevant.
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 18, 2022, 11:36:57 PM
#29
Thanks for your response.

In short, with all the possible supply chain attacks out there, we want to encourage that customers only purchase Passport from us or from an official reseller. If it was possible to reset Passport to factory state, I think we'd see a lot of used devices on Ebay and such, and I think that sets a bad security precedent.

There's no way to factory reset Passport even if you know the PIN – you can wipe the device and create/restore a seed, but you cannot ever reach the "Welcome to Passport" setup screen.
I take your point about not allowing a factory reset back to the Welcome screen, but I'm not sure this fully explains the requirement to brick the device however. Since you can already wipe the device and return to the restore a seed option, then surely you could just implement a similar wipe once you hit the 21 PIN limit? That way you keep the exact same protections against resetting to a factory state, while also not forcing users to buy a new device if they accidentally brick their wallet.
Hmm...one thing we could potentially do is clear the seed and PIN, but display a warning screen to the user that Passport has been previously used.
That wouldn't even be required, since just like when 'wiping the device', you won't get the 'Welcome to Passport' setup screen ever again, right? That was Leo's idea; handle the 21 attempt limit as if the user had gone to Advanced > Erase Passport.

I'll discuss with our CTO to see if I'm missing any nuance with regard to the secure element configuration.
I still suspect that the secure element doesn't have the ability to do an 'Erase Passport' / i.e. if you want to use the secure element's secure counter feature, you have to brick the chip when a set limit is reached.
But I'd be thrilled to hear if my suspicion is right or not!
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 18, 2022, 02:24:25 PM
#28
This also makes it easier from a support/documentation perspective. If the device is new, then the user goes through the usual and well-documented onboarding flow. If you're instead presented with the PIN screen on startup, that means that the device has already been previously set up by someone else.
I think 21 wrong PIN's are more than enough, and it's very unlikely bricking of device would happen by accident, but my question is what are the chances of someone cracking PIN with some external software/hardware attack?
There are more than enough chances for hackers to try, since Passport have most wrong PIN attempts out of all other hardware wallets.
I understand that this was first introduced with Coldcard wallet, but they have 13 wrong PIN's instead.

An additional benefit here is that there's no incentive to steal a Passport, because it's unusable if you don't know the PIN.
It's similar situation like when someone buys used smartphone that is locked and it's practically unusable, except for spare parts.
member
Activity: 58
Merit: 104
October 18, 2022, 09:44:47 AM
#27
Thanks for your response.

In short, with all the possible supply chain attacks out there, we want to encourage that customers only purchase Passport from us or from an official reseller. If it was possible to reset Passport to factory state, I think we'd see a lot of used devices on Ebay and such, and I think that sets a bad security precedent.

There's no way to factory reset Passport even if you know the PIN – you can wipe the device and create/restore a seed, but you cannot ever reach the "Welcome to Passport" setup screen.
I take your point about not allowing a factory reset back to the Welcome screen, but I'm not sure this fully explains the requirement to brick the device however. Since you can already wipe the device and return to the restore a seed option, then surely you could just implement a similar wipe once you hit the 21 PIN limit? That way you keep the exact same protections against resetting to a factory state, while also not forcing users to buy a new device if they accidentally brick their wallet.

Hmm...one thing we could potentially do is clear the seed and PIN, but display a warning screen to the user that Passport has been previously used. I'll discuss with our CTO to see if I'm missing any nuance with regard to the secure element configuration.
legendary
Activity: 2268
Merit: 18503
October 18, 2022, 04:35:29 AM
#26
Thanks for your response.

In short, with all the possible supply chain attacks out there, we want to encourage that customers only purchase Passport from us or from an official reseller. If it was possible to reset Passport to factory state, I think we'd see a lot of used devices on Ebay and such, and I think that sets a bad security precedent.

There's no way to factory reset Passport even if you know the PIN – you can wipe the device and create/restore a seed, but you cannot ever reach the "Welcome to Passport" setup screen.
I take your point about not allowing a factory reset back to the Welcome screen, but I'm not sure this fully explains the requirement to brick the device however. Since you can already wipe the device and return to the restore a seed option, then surely you could just implement a similar wipe once you hit the 21 PIN limit? That way you keep the exact same protections against resetting to a factory state, while also not forcing users to buy a new device if they accidentally brick their wallet.
member
Activity: 58
Merit: 104
October 18, 2022, 12:42:26 AM
#25
Hi all, Zach from Foundation here, wanted to comment as to why we brick Passport after 21 PIN attempts instead of factory resetting it.

In short, with all the possible supply chain attacks out there, we want to encourage that customers only purchase Passport from us or from an official reseller. If it was possible to reset Passport to factory state, I think we'd see a lot of used devices on Ebay and such, and I think that sets a bad security precedent.

There's no way to factory reset Passport even if you know the PIN – you can wipe the device and create/restore a seed, but you cannot ever reach the "Welcome to Passport" setup screen.

This also makes it easier from a support/documentation perspective. If the device is new, then the user goes through the usual and well-documented onboarding flow. If you're instead presented with the PIN screen on startup, that means that the device has already been previously set up by someone else.

An additional benefit here is that there's no incentive to steal a Passport, because it's unusable if you don't know the PIN.

There's tradeoffs here for sure, and we are always open to reconsidering our approach based on feedback.
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 17, 2022, 07:26:16 PM
#24
Anyway, I like this self-destruct mechanism, other wallets have this enabled when you try to open device and mess with the inside.
I'm personally relatively 'neutral' about the self-destruct; I'd prefer it to just fully reset itself when hitting the PIN entry limit, due to the possibility of false positives, as o_e_l_e_o pointed out. These devices aren't exactly cheap.
What I do hate is when devices, like you mentioned, self-destruct when opened. It is essential to be able to fix and potentially even check hardware against its specification ('verifiable builds' - hardware style).
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 17, 2022, 05:08:06 PM
#23
What is the benefit of a device bricking itself after x number of attempts, rather than just factory resetting itself? Assuming in both cases there is no chance to recover access to the original wallet without knowledge of the seed phrase, then bricking instead of simply securely wiping/shredding the data seems like a bug, not a feature, and simply forces the user to purchase another hardware wallet rather than just using their newly reset one to recovery from a back up.
Maybe there is still a theoretical chance that some important secure leftovers could remain in secure element, and that could be exploited by malicious attacker.
Passport used old Coldcard code as a base and they are the first ones to introduce this feature, knowing how old secure elements they used had known security flaws, this is not totally impossible.
You won't hear about flaws in ledger and similar blackbox devices, because they signed secret NDA  Tongue
Anyway, I like this self-destruct mechanism, other wallets have this enabled when you try to open device and mess with the inside.

If there is a secure / non-bypassable PIN counter implementation that doesn't rely on the secure element, I currently see no technical reason holding hardware wallet developers back from using that instead of the more destructive method. I doubt that any 'non-destructive' implementation is as secure as one that leverages secure chip counters, though.
Passport is hardware wallet for (old) 007 James Bond, mi6 only needs to add special bomb explosion option when you enter wrong pin 13-1 time  Cheesy 💣


hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 16, 2022, 07:27:11 PM
#22
Or use any other attack type that doesn't require waiting for potentially days or weeks.
But surely it you can bypass the PIN counter altogether to earn yourself unlimited attempts, then you would also bypass any delay imposed on repeated attempts. In such a case it then becomes fairly easy to set up a program to just brute force every combination from 00000000 to 99999999. And with the seed dumping vulnerability you mention now patched, then if such an attack were possible then I suspect we would have seen it by now.
I'm not sure that they added such delay deliberately, but as soon as you attack an embedded device (from a separate PC), you either have inherent delays in the communication or need to add some yourself since the device may not be ready to respond fast enough or the data isn't yet available. It's not like bruteforcing a software target on the same machine which could process PIN attempts at incredible speeds.

So if it seems not possible to bypass the PIN counter, then that comes back to the original question of what does bricking after x attempts rather than resetting after x attempts achieve, other than forcing you to buy a new device?
If there is a secure / non-bypassable PIN counter implementation that doesn't rely on the secure element, I currently see no technical reason holding hardware wallet developers back from using that instead of the more destructive method. I doubt that any 'non-destructive' implementation is as secure as one that leverages secure chip counters, though.
legendary
Activity: 2268
Merit: 18503
October 16, 2022, 03:26:55 AM
#21
Or use any other attack type that doesn't require waiting for potentially days or weeks.
But surely it you can bypass the PIN counter altogether to earn yourself unlimited attempts, then you would also bypass any delay imposed on repeated attempts. In such a case it then becomes fairly easy to set up a program to just brute force every combination from 00000000 to 99999999. And with the seed dumping vulnerability you mention now patched, then if such an attack were possible then I suspect we would have seen it by now.

So if it seems not possible to bypass the PIN counter, then that comes back to the original question of what does bricking after x attempts rather than resetting after x attempts achieve, other than forcing you to buy a new device?
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 15, 2022, 07:41:51 PM
#20
I'm not sure that this is 100% accurate, but it may be a technical limitation actually.
That's an interesting angle which I had not considered. It does however raise the question that if this were the case, why have we not seen the PIN counter being reset on other devices which do not use this hardware counter? Given how eager hardware wallet manufacturers are to disparage the competition, if this were possible would we not have seen a disclosure that "X wallet's PIN counter can be bypassed"?
I'm sure that on a hardware wallet like Trezor without secure element, this is a pretty viable attack vector. My guess is that if you already go through the trouble of doing hardware attacks, you may as well skip all the boring bruteforcing that is still required in this example and 'go for gold', directly dumping the seed during the boot process, like Joe Grand did it. Or use any other attack type that doesn't require waiting for potentially days or weeks.
This actually makes this list even more interesting, because we can now easily point out which hardware wallets have a non-destructive 'attempt counter', while also having a secure chip. These are exactly the devices where it may make sense to attempt finding the storage location of the counter (obviously outside the secure element) and attacking that to get unlimited PIN entry attempts.
legendary
Activity: 2268
Merit: 18503
October 15, 2022, 03:40:41 PM
#19
I'm not sure that this is 100% accurate, but it may be a technical limitation actually.
That's an interesting angle which I had not considered. It does however raise the question that if this were the case, why have we not seen the PIN counter being reset on other devices which do not use this hardware counter? Given how eager hardware wallet manufacturers are to disparage the competition, if this were possible would we not have seen a disclosure that "X wallet's PIN counter can be bypassed"?
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 15, 2022, 12:57:39 PM
#18
That makes no sense though; in case the thief / attacker finds a wallet that just erases itself to factory settings after 3 attempts, they can't recover it any more or less easily than if it destroys itself after the same amount of attempts, right?
My point exactly. If the argument is that bricking a device is safer than simply factory resetting because you cannot guarantee that all the data is destroyed with a factory reset, then they are pretty much admitting that they think data can be extracted from their device via some method. In which case, whether the device resets or bricks itself is irrelevant, since no attacker would attempt to brute force an unknown PIN with 3/10/20 whatever attempts, and instead proceed to extract the data through whatever these methods may be.

Also, if the argument is that bricking is more secure than a factory reset, then the devices should come with a huge warning to never sell your device, give it to a friend, etc., since even if you factory reset it your wallets would be at risk. As far as I am aware, no device comes with such a warning.
What I can extract from available information by Foundation (since I've looked up more information about this wallet than any other) is this.

The Secure Element is configured so that if the monotonically increasing counter ever reaches the same value as in the Match Count slot, then it is no longer possible to read or use the PIN Stretch key in Slot 2 of the Secure Element – which means it’s impossible to hash the PIN with it, so there is no way to login to the device after that. The device is essentially “bricked.”

Passport allows a maximum of 21 unsuccessful PIN attempts.
I guess they chose to use the built-in counter mechanism of the secure element, to make sure that nobody is able to bypass the counter. If they stored the number in flash for instance, a skilled attacker could reset the number to 0 before hitting the n-th attempt at which it would factory reset (or brick itself). This could even be automated with relatively limited required hardware and combined with a brute-force PIN guessing script.
The downside is that the secure chip with this secure built-in counter probably doesn't have the ability to factory reset the device when the counter is reached, since it doesn't have as 'direct' and immediate, full control over the main processor, the type of acces it does have to its own internal secure storage 'slots'.

Therefore it leaves you with 2 options:
(1) Use the secure counter of the secure element, but when it reaches its maximum value, it can only trigger a 'permanent brick' as it's not capable to factory reset the device.
(2) Use an insecure counter stored in flash, and have the freedom to do with your MCU what you want. Erase the flash, restore to factory settings, brick it, you name it.

I'm not sure that this is 100% accurate, but it may be a technical limitation actually.
legendary
Activity: 2268
Merit: 18503
October 15, 2022, 12:23:41 PM
#17
That makes no sense though; in case the thief / attacker finds a wallet that just erases itself to factory settings after 3 attempts, they can't recover it any more or less easily than if it destroys itself after the same amount of attempts, right?
My point exactly. If the argument is that bricking a device is safer than simply factory resetting because you cannot guarantee that all the data is destroyed with a factory reset, then they are pretty much admitting that they think data can be extracted from their device via some method. In which case, whether the device resets or bricks itself is irrelevant, since no attacker would attempt to brute force an unknown PIN with 3/10/20 whatever attempts, and instead proceed to extract the data through whatever these methods may be.

Also, if the argument is that bricking is more secure than a factory reset, then the devices should come with a huge warning to never sell your device, give it to a friend, etc., since even if you factory reset it your wallets would be at risk. As far as I am aware, no device comes with such a warning.
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 15, 2022, 12:10:01 PM
#16
What is the benefit of a device bricking itself after x number of attempts, rather than just factory resetting itself?
[...]
Given that we know plenty of people leave hardware wallets lying around where they shouldn't, on desks, in drawers, etc., I'd be pretty pissed if a kid (for example) picked it up thinking it was some kind of phone and inadvertently permanently bricked my $200+ device.
Good point and good question! I will ask @zherbert, since I'll also start working on my Passport v2 review soonTM. So I can get their answer to this bug / feature question in there, as well.

bricking instead of simply securely wiping/shredding the data seems like a bug, not a feature, and simply forces the user to purchase another hardware wallet rather than just using their newly reset one to recovery from a back up.
I think from a business perspective this is the goal, so they buy again if they forget it. But they can also say something along the lines that it protects your assets if somebody stole them. In case you lost your wallet, the hacker has no chance to recover it while you can with another device/wallet as long as you have a backup.
That makes no sense though; in case the thief / attacker finds a wallet that just erases itself to factory settings after 3 attempts, they can't recover it any more or less easily than if it destroys itself after the same amount of attempts, right?
legendary
Activity: 2170
Merit: 1789
October 15, 2022, 09:40:07 AM
#15
bricking instead of simply securely wiping/shredding the data seems like a bug, not a feature, and simply forces the user to purchase another hardware wallet rather than just using their newly reset one to recovery from a back up.
I think from a business perspective this is the goal, so they buy again if they forget it. But they can also say something along the lines that it protects your assets if somebody stole them. In case you lost your wallet, the hacker has no chance to recover it while you can with another device/wallet as long as you have a backup.
legendary
Activity: 2268
Merit: 18503
October 15, 2022, 06:20:23 AM
#14
What is the benefit of a device bricking itself after x number of attempts, rather than just factory resetting itself? Assuming in both cases there is no chance to recover access to the original wallet without knowledge of the seed phrase, then bricking instead of simply securely wiping/shredding the data seems like a bug, not a feature, and simply forces the user to purchase another hardware wallet rather than just using their newly reset one to recovery from a back up.

Given that we know plenty of people leave hardware wallets lying around where they shouldn't, on desks, in drawers, etc., I'd be pretty pissed if a kid (for example) picked it up thinking it was some kind of phone and inadvertently permanently bricked my $200+ device.
legendary
Activity: 2730
Merit: 7065
Farewell, Leo. You will be missed!
October 15, 2022, 04:59:48 AM
#13
Coldcard wallet
Coldcard permanently bricks itself after entering wrong PIN 13 times!
I wanted to say how American of them, but they are assembled in Canada. Still, close enough.

I remember reading that ColdCard has a unique PIN that you can set up that bricks your device just by entering it once. I forgot what it was called, so I had to look it up. BrickMe PIN Grin
Enter it once, and it achieves the same result as a wrongly entered main PIN 13 times.

Ledger wallet -3 times
Coldcard wallet - 13 times
There is a difference between these two. If you wrongly enter your PIN 3 times on a Ledger, the device will reset itself to factory settings. It can still be used but you need to recover it from seed. If you enter the PIN wrongly 13 times on a ColdCard, the HW gets permanently bricked. It's destroyed and you can't use it any longer. Ever.

I never said I am against passphrases at all, I just don't like how ledger is connecting them with PIN codes.
It doesn't have to be connected and accessible with the PIN. You can set a temporary passphrase valid only for that session and until you turn the device off. In that case, you don't need to attack a new PIN to your passphrase account.
hero member
Activity: 758
Merit: 606
October 13, 2022, 05:14:40 PM
#12
Quote
dkbit98,

I think that ledger devices are also encrypting PIN's, but I am not sure about all other hardware wallets.
There could be a problem with losing access to your funds if you forget encryption password so I would be very careful with this I think that ledger devices are also encrypting PIN's, but I am not sure about all other hardware wallets.
There could be a problem with losing access to your funds if you forget encryption password so I would be very careful with this


Unless a user is a complete newbie this would never be an issue.  Let me explain:  The very FIRST step a user should complete on ANY hardware wallet is a complete multiple backup of the SEED used  -------- period!!  If I forget my PIN or misplace my encryption SD card I would simply blow away the Trezor and recreate my wallets from scratch.  Very easy to do!!

My comments did assume you were using PIN=password in your post above.  If you actually meant passwords and not a PIN then you are correct.  Just wanted to make sure some of our readers are clear that PINs don't present a big problem with proper SEED backups.  .02

PIN attempts:
Regarding PIN attempts on hardware wallets.  Trezor T allows for 16 attempts.  What do you think the odds are of someone guessing my unique (used nowhere else ever) 9 digit PIN in only 16 attempts.  Basically zero!!  With advanced encrypted PIN on SD you can't even enter a PIN without the file.  The exception is for my Wipe PIN where the wallet wipes!
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
October 13, 2022, 10:48:33 AM
#11

Can you explain in more detail what is the advantage of more attempts to enter a PIN code than 3 for Ledger? I may be wrong, but it seemed to me that the more attempts there are, the more chances there are to pick up a PIN code for a non-owner of the hardware wallet. At the same time, the more times, the more chances the owner will have to remember his PIN code. It's like you need some average value, which (in my opinion) will be optimal - 5-7 times or a little more (may be ~10 times).
There is no 'perfect number', but if your device bricks after 3 wrong entries, a false-positive is quite likely.
A good password / PIN is not significantly more likely to be brute-forced if you give an attacker 3 or 20 tries. If it's 3 or 3000, it could be a different story.

Basically, brute-forcing 20 attempts in the real world is just as unlikely to unlock the device as if you only had 3.

I agree with m2017 here.
Ledger device will not break after 3 attempts, it will just reset. And the owner has the private key.

If an attacker just enter into my house and find the device he may discover the secret code in 17 attempts that some those device allow. This is not a brute force, he is trying easy pins.

Although people should not use birthdays, year of birth,etc as pin code, those are VERY common. Someone may just try a few dates or other easy to remember combinations and discover the pin.

I feel safer with 3 attempts and device is reseted.

Just to illustrate... When I am traveling and I need wifi passwords, I just try "nameofstore2022" or 2021, 2020 etc and it works like 10-20% of the times.
hero member
Activity: 882
Merit: 5811
not your keys, not your coins!
October 12, 2022, 06:35:11 PM
#10
Looking through the list above, I have an idea that only Ledger has the most adequate number of attempts to enter a PIN (although it's not ideal).
I would disagree.
Less is not better, especially compared to all other hardware wallets.
There is a good reason why everyone else (except ledger crap) made much more wrong attempts for PIN, some can even brick a device.
Can you explain in more detail what is the advantage of more attempts to enter a PIN code than 3 for Ledger? I may be wrong, but it seemed to me that the more attempts there are, the more chances there are to pick up a PIN code for a non-owner of the hardware wallet. At the same time, the more times, the more chances the owner will have to remember his PIN code. It's like you need some average value, which (in my opinion) will be optimal - 5-7 times or a little more (may be ~10 times).
There is no 'perfect number', but if your device bricks after 3 wrong entries, a false-positive is quite likely.
A good password / PIN is not significantly more likely to be brute-forced if you give an attacker 3 or 20 tries. If it's 3 or 3000, it could be a different story.

Basically, brute-forcing 20 attempts in the real world is just as unlikely to unlock the device as if you only had 3.
legendary
Activity: 2968
Merit: 3406
Crypto Swap Exchange
October 12, 2022, 08:34:20 AM
#9
Feel free to post your suggestions for new hardware wallets,
  • SecuX - If you enter the PIN incorrectly five times, it'll reset the device [refer to #8 and #10].
  • Ngrave - Ten wrong PIN codes results in the device wiping itself [source].

As far as I know only ledger is using multiple PIN's,
While I was reading the "Wallet and Device Issues [refer to #5]" section on SecuX, I discovered they also have such a thing in place.
legendary
Activity: 1792
Merit: 1296
keep walking, Johnnie
October 12, 2022, 07:58:37 AM
#8
Looking through the list above, I have an idea that only Ledger has the most adequate number of attempts to enter a PIN (although it's not ideal).
I would disagree.
Less is not better, especially compared to all other hardware wallets.
There is a good reason why everyone else (except ledger crap) made much more wrong attempts for PIN, some can even brick a device.
Can you explain in more detail what is the advantage of more attempts to enter a PIN code than 3 for Ledger? I may be wrong, but it seemed to me that the more attempts there are, the more chances there are to pick up a PIN code for a non-owner of the hardware wallet. At the same time, the more times, the more chances the owner will have to remember his PIN code. It's like you need some average value, which (in my opinion) will be optimal - 5-7 times or a little more (may be ~10 times).
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 11, 2022, 05:42:38 AM
#7
Why not? Passphrase just add an extra security. I don't see downsides. It is designed specifically for physical attacks.
I never said I am against passphrases at all, I just don't like how ledger is connecting them with PIN codes.
There is a big difference between this two (PIN vs Passphrase) so I don't want to mix them together, and yes I know Trezor have passphrase option like most other hardware wallets.
People often think that Password is the same as Pin or as Passphrase, but that can only create confusion.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
October 10, 2022, 04:03:54 PM
#6
As far as I know only ledger is using multiple PIN's, but I think they are mixing and connecting this with wallet passphrase, and I don't like this very much.

Why not? Passphrase just add an extra security. I don't see downsides. It is designed specifically for physical attacks.

The trezor device does exactly the same, but you don't have the extra pin to access it easily.
https://wiki.trezor.io/Passphrase
legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 10, 2022, 02:20:01 PM
#5
The Trezor T Hardware wallet device has the capability to encrypt the PIN and the SEED.  I use that feature with my Trezors.  
I think that ledger devices are also encrypting PIN's, but I am not sure about all other hardware wallets.
There could be a problem with losing access to your funds if you forget encryption password so I would be very careful with this.

Looking through the list above, I have an idea that only Ledger has the most adequate number of attempts to enter a PIN (although it's not ideal).
I would disagree.
Less is not better, especially compared to all other hardware wallets.
There is a good reason why everyone else (except ledger crap) made much more wrong attempts for PIN, some can even brick a device.

Since your topic is about PIN codes in general, I will suggest that you add a session about "multiple PIN codes". Some hardware wallets allow you to use multiple PIN codes when you add a passphrase. This is interesting because you can have 2 wallets in the same device, and even a "hidden" one in case of a physical attack.
As far as I know only ledger is using multiple PIN's, but I think they are mixing and connecting this with wallet passphrase, and I don't like this very much.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
October 10, 2022, 01:55:10 PM
#4
I am starting this topic as an exploration and research about PIN codes and how they work in various hardware wallets.
Not all hardware wallets are made equal, and nor all PIN codes work the same in hardware wallets.

Nice idea for a topic, I didn't know about all those variations since our last chat in another topic.

Since your topic is about PIN codes in general, I will suggest that you add a session about "multiple PIN codes". Some hardware wallets allow you to use multiple PIN codes when you add a passphrase. This is interesting because you can have 2 wallets in the same device, and even a "hidden" one in case of a physical attack.

Ledger nano allows 2 PIN codes:
https://www.ledger.com/academy/passphrase-an-advanced-security-feature
Quote
Another option is to link a passphrase of your choosing to a secondary PIN code. When choosing this option, you would first create a passphrase directly on your Ledger device. After having done so, you would be able to choose a secondary PIN code for your Ledger device. After this, each time you turn on your device, you could choose between entering your normal PIN code or your secondary PIN code. If you would enter your secondary PIN code, your accounts hidden behind a passphrase would be accessible.

For example:

Regular PIN code: 1653 → Normal accounts
Secondary PIN code: 8530 → Hidden accounts

In ledger nano case, both wallets (one for each PIN) will have the same seed, but one of them will have a passphrase. So, they are different wallets.
legendary
Activity: 1792
Merit: 1296
keep walking, Johnnie
October 10, 2022, 01:47:39 AM
#3
Looking through the list above, I have an idea that only Ledger has the most adequate number of attempts to enter a PIN (although it's not ideal).

Ledger wallet -3 times
Trezor wallet - 16 times
Coldcard wallet - 13 times
Passport wallet - 21 times
Keystone wallet - 12+5 times

Although in my opinion, the optimal amount could be about 5-7 times. More than 10, as for the proposed devices, I think it’s too much and the owner of the hardware wallet doesn’t need so much (he will dial the correct PIN with fewer attempts), while the attacker gets more chances to pick up a PIN with a large number of attempts.

Of course, this is not the whole list of existing devices, and most likely OP will add information about others later too.
hero member
Activity: 758
Merit: 606
October 09, 2022, 04:53:33 PM
#2
Quote
PIN codes can be hacked with right tools and equipment so don't consider them as ultimate protection for your devices.

While I know you are aware of this, newer members, or those new to Trezor Hardware wallets may not be:

The Trezor T Hardware wallet device has the capability to encrypt the PIN and the SEED.  I use that feature with my Trezors.  Its important to utilize software encryption, and I strongly prefer it to the notion that some devices have a "secure chipset".  If you believe that I want to sell you the Brooklyn Bridge, LOL!  Of course unrelated to this thread you should consider employing a passphrase to fortify your defenses.  NO hardware wallet stores passphrases so there is nothing to hack from the physical device along those lines of attack.

legendary
Activity: 2212
Merit: 7060
Cashback 15%
October 07, 2022, 10:55:49 AM
#1
I am starting this topic as an exploration and research about PIN codes and how they work in various hardware wallets.
Not all hardware wallets are made equal, and nor all PIN codes work the same in hardware wallets.

What is PIN code?
- Postal Index Number or PIN code is usually a four to six digit number code, that was first introduced in 1972 by Shriram Bhikaji Velankar for Indian Post.
This year we celebrate 50 years since usage of PIN codes, and today we use them everywhere including in hardware wallets.

In hardware wallets PIN code is used as protection, and entering wrong PIN can create different results for different hardware wallets.
PIN codes can be hacked with right tools and equipment so don't consider them as ultimate protection for your devices.
Some wallets use regular Password instead of PIN, and they can use letters, pattern or biometrics like fingerprints.
Note that some hardware wallets can be bricked and permanently unusable if wrong PIN was entered specific amount of times!

Ledger wallet
Enter an incorrect PIN code 3 times in a row and device will reset after the third incorrect attempt as a security measure.
https://support.ledger.com/hc/en-us/articles/360017582434-Reset-to-factory-settings-?docs=true

Trezor wallet
Trezor hardware wallet will be wiped after entering 16 failed attempts, but delay time was longer each time you enter wrong pin.
https://wiki.trezor.io/Security:Threats

Coldcard wallet
Coldcard permanently bricks itself after entering wrong PIN 13 times!
https://coldcard.com/docs/

Passport wallet
Passport permanently bricks itself after entering wrong PIN 21 times!
The Secure Element includes monotonic counters that enable PIN attempt tracking, where the Secure Element will “brick” itself by no longer permitting login attempts if the maximum number of attempts is exceeded.
https://github.com/Foundation-Devices/passport-firmware/blob/main/SECURITY/SECURITY.md

Keystone wallet
After 12 incorrect attempts using the pattern unlock option, users will be required to unlock their devices with the text password.
After 5 incorrect attempts to unlock your device with the text password option, the device will automatically wipe itself of all data.
If your device is wiped in this way, please be advised that your Keystone can only be restored with the recovery phrase. The system password can also only be reset by entering the recovery phrase.
https://support.keyst.one/basic-features/password

SecuX
If you enter the PIN incorrectly five times, it'll reset the device.
https://secuxtech.com/faq#wallet_device_issues

Ngrave
Ten wrong PIN codes results in the device wiping itself.
https://support.ngrave.io/hc/en-us/articles/4409603287185-The-wallet-doesn-t-recognize-my-fingerprint-how-do-I-access-my-wallet-

Jade
PIN entered wrong 3 times are locked out by the server.



This page is a work in progress.
Feel free to post your suggestions for new hardware wallets, and correct any mistake I accidently made.
Jump to: