← Back to context

Comment by gruez

1 month ago

>The correct solution is to use free software cryptography on top of these things.

If implemented correctly, "hardware" encryption can be more secure than "free software cryptography". The most obvious benefit is protection against brute-attacks, which you can't meaningfully implement with software. Not to mention added protection of biometric authentication as a second factor, compared to typing a password into a possibly untrusted machine.

> If implemented correctly, "hardware" encryption can be more secure than "free software cryptography".

Well you can use open-source / free software cryptography to encrypt and decrypt using a secret key which you do not need to remember and which is safely stored behind a secure element.

And there are quite a few people doing just that.

It's immensely more secure than trusting Lenovo or Microsoft or whatever company.

And you can have your secret on the secure element protected by biometric auth too (some do offer just that).

And there are devices like that with a tiny attack surface that accept biometric (like your fingerprint) to unlock the secret.

To get the best of both world you trust the HSM with one thing: the secret, and that's it. And you use open-source software and protocols (like GPG and OpenSSH) with that secret.

Well, by sealing the LUKS key to a TPM you can get rate limiting. Of course then you need to trust the TPM to do its job correctly, and we're back to the same potential issues as with HW disk encryption, but to be honest I'm going to trust a TPM over OPAL any day. Especially the Google Ti50 in my chromebook.

“Correctly” is a big caveat. Almost no HW implementation is auditable in any way.

My baseline assumption is that even the good commercial products are only secure from a non-determined attacker, not TLAs. Anything safe from TLAs is what’s being sold only to them.

  • If you own an Android device, your disk encryption is most likely provided via a UFS/eMMC hardware component known as the "Inline Cryptographic Engine" (ICE). Reputable device manufacturers validate the ciphertext that these devices write out to storage in a test environment by running the plaintext through a software encryption process using the same encryption keys as the OS provides to the ICE. If the ciphertexts match, then it would be unlikely that the hardware encryption engine isn't doing its job right.

    • That’s not validating an implementation. You’re just comparing the output for a few known inputs to known results.

      The hardware is still a black box and you’ll never know how it behaves in conditions you didn't test against.

      3 replies →

    • The inline crypto engine is in the SoC for the phone case. Inline crypto engines for OPAL on the storage device side have a far worse security record.

  • >Anything safe from TLAs is what’s being sold only to them.

    I think you're overestimating how much backdoors there are in products vs actual bugs. As we've seen with with recent vulnerability disclosures, there's plenty of bugs that were put there unintentionally.

    • I didn’t make any mention of backdoors or bugs, intentional or accidental, or the prevalence of either. You aren’t wrong but you addressed a point I never made.

      The point was that there are special products, implementations of already known algorithms, sold only to TLAs. They have the code validated to the Moon and back, unlike the commercial products.

    • We don't know how many of those bugs were intentional, or known, by the three letter agencies.

you're not gonna brute force an AES256 key

if you have a bad password that's a user issue

  • You're not gonna remember a AES256 key either (or at least not many of them), not to mention the ergonomics associated with entering a AES256 key. The whole point of security chips like google's titan m2 or apple's secure enclave is to strengthen weak passwords (eg. 6 digit pins) so they offer comparable security to 256 bit keys, without having to enter 256 bit keys.

  • >you're not gonna brute force an AES256 key

    There was a great article around last week about PDFs using randomly generated keys that ended up using non-secure random number generators and the effect was the only unique portion of the key is was 9bits, and obviously forceable. I wouldn’t even describe this between burrito bites activity as “brute”.

    The point being “AES” doesn’t mean secure. Secure through the whole implementation means secure. People fuck up crypto all day, calling out a specific cipher doesn’t mean much.