|
|
|
|
|
by megawatthours
3389 days ago
|
|
From looking at "upload.js" you are using AES in counter mode. var aesCtr = new aesjs.ModeOfOperation.ctr(encryptionKeyBytes, new aesjs.Counter(-1));
Please use https://github.com/bitwiseshiftleft/sjcl which supports a very high-level sjcl.encrypt(passphrase, plaintext) API and has been audited, instead of using crypto primitives.One specific issue is you are only encrypting, not authenticating, so if the servers are compromised someone could send back a fake plaintext. |
|
The server is sending the JS responsible for doing the encryption, no? If the server is compromised, all bets are off. You must trust this third party with your (unencrypted) data, unless you verify the JavaScript each and every time.