Comment by cryptonector
4 years ago
Your tool would be safer if you used CBC (with some MAC) rather than GCM as the cipher mode, so that key & IV reuse would not be as dangerous. That said, since you generate a different salt and IV every time, the likelihood of key & IV reuse is very low, and having to implement an AEAD cipher mode by generic construction would be somewhat annoying. So I think the choice of GCM is fine enough.
I started with CBC (without MAC) and upgraded with GCM since it was a more convenient way to provide integrity without adding the MAC step manually.
I should really make sure IV/Salt are regenerated automatically after use. (there is a small print warning in the creator about reuse)
> I should really make sure IV/Salt are regenerated automatically after use.
Good idea.
> I started with CBC (without MAC)
Oof, you really didn't want to do that :) Glad you upgraded to GCM.