-1

If a software uses end-to-end encryption and the encryption key of a client never leaves the device, isn't it still relatively "simple" to get the encryption keys of clients?

A hacker just would need to hack the software company that provides the software with end-to-end encryption and modify it so that it sends the encryption keys of clients to a given server.

It would take quite a while until people notice this since users don't check every day what data is sent where and it is quite hard to figure out that it's their encryption key that is sent.

I couldn't find a way to prevent hackers to distribute compromised software to steal the user's encryption key.

Edit: The hacker could also compromise the server and distribute its public key instead of forwarding the client's public key and thus can encrypt all messages that way.

Seems impossible to even initiate a secure connection between two parties, without both of them already sharing a secret.

4
  • 4
    There is no 100% security. Nothing where "if you do X" then you are safe from all possible harm. Security controls exist to counter threats. E2E encryption is not designed to counter threats on the device itself...
    – schroeder
    Commented Jan 25, 2023 at 19:40
  • 1
    This is why perfect forward secrecy is important. If the client's private key is compromised by an attacker, then at least the attacker can not use it to go back and decrypt all past messages that were encrypted using that key.
    – mti2935
    Commented Jan 25, 2023 at 20:18
  • @schroeder I am not looking for 100% security. But it seems to me that end-to-end encryption is next to useless since the server can give you any public and it's impossible to make sure it's the public key of an authentic client.
    – Mointy
    Commented Jan 26, 2023 at 2:36
  • You are still not understanding my comment. It is not useless for the use case it is intended to address. The fact that you can imagine a scenario where this security control will not work is irrelevant.
    – schroeder
    Commented Jan 26, 2023 at 8:52

2 Answers 2

5

Software supply chain security is a real concern. Hopefully an attacker getting code into the pipeline is not "simply" done. But if it were there might be an attack there. Although that's not really a fault of end-to-end encryption exactly. It can however be a circumvention of end-to-end encryption.

Further mitigation might be:

  • Key material is not directly handled by the app but instead kept securely in key management services of the OS (iOS Keychain or Android Keystore) or the device (Trustzone, HSM, TPM). These APIs generally have no mechanism to export the key material that they hold and instead only allow encryption/decryption/sign/verify operations by the App against the key without ever exposing it.
1
  • Thanks for your answer. I "ignored" iOS Keychain or Android Keystore because there is no Web API yet, which makes web applications vulnerable.
    – Mointy
    Commented Jan 26, 2023 at 0:57
-1

There are defences against this, for example software such as Little Snitch that reports all network connections opened by every app you’re running. If you’re diligent, you’ll see the connection to the attacker’s systems when your key is uploaded to them. Your key will have been compromised, but at least you’ll know about it and can take appropriate measures.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .