There are numerous ways to place decryption backdoors into a website’s JavaScript. How would you make sure that there is no MITM when trying to safely encrypt (e.g.) an e-mail in your browser?
Of course you can do secure encryption in a browser.
Talking about “bad takes”, aren’t we? There is no way to ensure that your end-to-end encryption is not decrypted on the fly when done by a website (= a potential attacker).
Who said anything about a website? You said browser. You can run fully-local resources in a browser, such as browser extensions, locally hosted tools, even just running in a .html file on your local disk somewhere. Javascript also isn’t the only option available to solve this problem.
You can run fully-local resources in a browser, such as browser extensions, locally hosted tools, even just running in a .html file on your local disk somewhere.
How would you do that without violating essential security measurements?
Create or download an implementation of your preferred encryption algorithm for Javascript (or use some WebAssembly alternative). e.g. https://github.com/ricmoo/aes-js
Run the implementation on your local computer and open it in a browser.
You are aware that WASM requires JS, right?
I mean, yes, running the application itself would be secure, but that’s not in the browser. You cannot trust your browser. Ever.
I think you’re mistaken, there. WASM is often used alongside Javascript, but beyond the one-liner to fetch and load it, there’s actually nothing which inherently requires JS beyond that.
Can you explain why you feel that locally running Javascript is more insecure than using, say, locally running Python code, for encryption?
WASM is often used alongside Javascript, but there’s actually nothing which inherently requires it.
There is no established way to load WASM in your browser without JavaScript code that does it for you, so there actually is.
Can you explain why you feel that locally running Javascript is more insecure than using, say, locally running Python code, for encryption?
A web browser is the most vulnerable software on your computer.
To stick with the one example I brought, namely GnuPG encrypted e-mails: Running GnuPG locally on my machine to encrypt/decrypt/verify an e-mail before pasting the result into (e.g.) my e-mail client is reasonably secure. GnuPG has been audited thoroughly enough, so it’s (relatively) safe to assume that no bad actor will read and/or modify the e-mail on the way. I am not aware of any JavaScript alternative with a similar security record.
I think we’re derailing a bit though. My original comment was:
You can’t do that (= secure encryption) in a browser.
Locally and in a browser are, in real life, mostly different things and I assume you know that. GnuPG in webmail software without having used it locally first, which is what I was hinting at, just isn’t secure.
edit: Bed time, might continue this tomorrow after work if I’ll find some Lemmy time… good night for now!
There are numerous ways to place decryption backdoors into a website’s JavaScript. How would you make sure that there is no MITM when trying to safely encrypt (e.g.) an e-mail in your browser?
Talking about “bad takes”, aren’t we? There is no way to ensure that your end-to-end encryption is not decrypted on the fly when done by a website (= a potential attacker).
Who said anything about a website? You said browser. You can run fully-local resources in a browser, such as browser extensions, locally hosted tools, even just running in a .html file on your local disk somewhere. Javascript also isn’t the only option available to solve this problem.
Not sure if you’re just trolling at this point.
You said:
No, you can’t. I explained why.
…and I just explained to you how you can?
Ok, I’ll bite:
How would you do that without violating essential security measurements?
Hope this helps.
You are aware that WASM requires JS, right?
I mean, yes, running the application itself would be secure, but that’s not in the browser. You cannot trust your browser. Ever.
I think you’re mistaken, there. WASM is often used alongside Javascript, but beyond the one-liner to fetch and load it, there’s actually nothing which inherently requires JS beyond that.
Can you explain why you feel that locally running Javascript is more insecure than using, say, locally running Python code, for encryption?
There is no established way to load WASM in your browser without JavaScript code that does it for you, so there actually is.
A web browser is the most vulnerable software on your computer.
To stick with the one example I brought, namely GnuPG encrypted e-mails: Running GnuPG locally on my machine to encrypt/decrypt/verify an e-mail before pasting the result into (e.g.) my e-mail client is reasonably secure. GnuPG has been audited thoroughly enough, so it’s (relatively) safe to assume that no bad actor will read and/or modify the e-mail on the way. I am not aware of any JavaScript alternative with a similar security record.
I think we’re derailing a bit though. My original comment was:
Locally and in a browser are, in real life, mostly different things and I assume you know that. GnuPG in webmail software without having used it locally first, which is what I was hinting at, just isn’t secure.
edit: Bed time, might continue this tomorrow after work if I’ll find some Lemmy time… good night for now!