Closed johnjohntheleprechaun closed 2 months ago
Ok so, I think I should go back and finish that course on cryptography first....
Ok so I figure I use AES-GCM. Nonce storage is a bit tricky, but I think I have a solution, which is to store the document versions nonce at the beginning of the file, like as a header.
the document versions nonce
To clarify, I mean that since documents are encrypted with one key (that shouldn't change, at least not often), and versioning is enabled in the s3 bucket, I need to be using a nonce for each version of the document.
crypto utils are finished. code is in crypto.ts
Encryption, decryption, key derivation etc.