Re:Minibone: practical end-to-end encryption for web apps
by kisamoto on Tuesday April 09, 2024 @02:21AM
(#39976624)
Ah - you might be right that there are some crossed wires here as I was imagining a "just use TLS and store keys on the server" scenario.
Could you correct me please so we're on the same discussion ground? Where does encryption happen and what mechanisms are used to ensure the security of keys?
Re:Minibone: practical end-to-end encryption for web apps
by tptacek on Tuesday April 09, 2024 @02:36AM
(#39976696)
I don't know. Just do what this library does: encrypt rows with AES-GCM. Use random keys, push the keys to clients in cookies or to store in local storage. The server "sees" the key when incoming requests arrive, but doesn't store them.
Re:Minibone: practical end-to-end encryption for web apps
by kisamoto on Tuesday April 09, 2024 @03:22AM
(#39976931)
Thanks.
Hm I still would prefer plain text not leaving the device. There have been historical examples of plain text passwords ending up in logs (Twitter) so I would prefer encrypted on my device so there's no chance of interception (mistaken or purposeful) on the server.
Plus this would result in a loss of features - keys would then live only on a device for as long as the cookies/storage existed. New browser/device/clean storage the keys are lost and the ciphertext unable to be decrypted.
Your scenario 2 analysis works by suggesting that attackers can't easily subvert the Javascript contexts of clients (it mentions for instance "resource integrity"). But every request for any resource that alters the DOM or loads code allows an attacker to pull this off; it's the premise of the attack. This is an even weaker case for browser JS crypto.
I think the big premise mismatch we have is that you're assuming I'm saying "just use TLS and store keys on the serverside".
I feel like discussions about WebCrypto always fall apart in arguments over abstractions, like software update versus HTTP requests. But I'm saying, it seems like you can literally just skip all the clientside cryptography, stuff keys in cookies (or whatever), and do all the encryption serverside, and end up with the same threat model, which to me is telling.
I don't think people are crazy for pushing back on this. People smarter than me disagree about it. I wonder if David Adrian wants to take a swipe at this argument.