4 ms·
What the fuck kind of cryptographic hardware security device is unlocked with a PIN and stores the plaintext of the PIN? What cryptosystem generates a recovery
by tptacek 9y ago
What the fuck kind of cryptographic hardware security device is unlocked with a PIN and stores the plaintext of the PIN? What cryptosystem generates a recovery key and then stores the recovery key? That is a clown-car vulnerability.
Later
You know what I bet? I bet the PIN check is literally a string comparison, between the input PIN, and a stored "correct" PIN that they decrypt every time you try a PIN.
- zwily 9y agoThe recovery key isn’t just used for recovery - every operation is derived from the recovery key. The device has to know it, in plaintext, in order to actually do anything.
- Scoundreller 9y agoMaybe he's looking for one-way encryption ;)
- darkmighty 9y ago> The device has to know it, in plaintext, in order to actually do anything How so? You can use pins for encryption, I believe that's what tptacek was referring to. If you use a strong key derivation function with an efficient hardware (i.e. within a few orders of efficiency limits of current generation), while using maybe 10J of energy, will economically protect at least about $1000, or $16000 with an 8 character pin. In practice significantly more because of hardware costs for a parallel attack, and the casual cracker wouldn't be willing to spend that much on a totally uncertain reward. At moderate hardware costs it could take years to crack.
- zwily 9y agoThat's how they work - the PIN decrypts the encrypted seed key. However, after decryption, the seed key ("recovery key") is kept around in memory in order to actually be able to sign transactions/etc.
- Scoundreller 9y agoThere are a few methods in which they could avoid keeping direct plaintext entries in memory that are difficult to extract without knowing the ROM code.
- tptacek 9y agoFrom the Trezor MCU source code on Github, it looks like I was right, and the PIN check is literally a string comparison.
- zwily 9y agoYeah, I don't know why they do that. I was just responding to the decrypted key being stored in memory.
- matthewaveryusa 9y agoHere I am sweating about if my hkdf and onioning different aes modes is future-proof enough. It's a good reminder that time to market is the only thing that matters.
- JoachimSchipper 9y agoApparently Trezor is to a HSM what MtGox is to a bank. Given the ecosystem, I'm not really surprised...