MatrixAI / js-encryptedfs

Encrypted Filesystem for TypeScript/JavaScript Applications
https://polykey.com
Apache License 2.0
10 stars 3 forks source link

Improvement to AES-GCM #12

Closed CMCDragonkai closed 4 years ago

CMCDragonkai commented 5 years ago

https://news.ycombinator.com/item?id=19693434

CMCDragonkai commented 4 years ago

Hey @robert-cronin I think you mentioned this is not necessary in our previous review. Can you justify it here, and close this issue?

robert-cronin commented 4 years ago

Yeah so AES-GCM-SIV is primarily used to prevent the same init vector from encrypting the same data more than once, i.e. a nonce being reused. This is a concern in encryption as an attacker can observe repeat encryptions with the same init vector and message. I believe this to be redundant in EFS because the init vector we use for chunk level encryption is randomised every time a chunk is encrypted so reusing of a nonce doesn't occur.