Skip to main content
2 of 2
replaced https://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc

Using GCM with a long term fixed key is dangerous; if you repeat the nonce, you can leak the authentication piece.

Instead, what I would suggest is that you use AES-SIV instead. It doesn't have the problems with repeating a nonce. It is more complex, and slower, however it is far better suited if you have to use a long term key.

poncho
  • 150.6k
  • 11
  • 230
  • 369