News for hackers. Stuff that matters.
Re:Password protect a static HTML page by trusz on Saturday February 18, 2023 @03:05PM (#34850513)
Oh yes! Thank you for the feedback. I've added a new version where the `iv` and the `salt` is random. Maybe a followup question: Because you need both the `iv` and `salt` to decrypt the message is it ok in an E2E scenario to send all three: `iv`, `salt` and the encrypted message?
Re:Password protect a static HTML page by tptacek on Saturday February 18, 2023 @03:09PM (#34850546)
I didn't look to see what "salt" means in your design, but the idiom for using GCM in message encryption is to send ciphertexts that take the form `nonce || ciphertext`, and to decrypt by reading the nonce off the front of the message.