Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note on IV re-use in AES-GCM #209

Closed
franziskuskiefer opened this issue Jul 31, 2018 · 4 comments
Closed

Add note on IV re-use in AES-GCM #209

franziskuskiefer opened this issue Jul 31, 2018 · 4 comments

Comments

@franziskuskiefer
Copy link

This issue was originally reported by @asanso.

The AesGcmParams dictionary allows to set an IV. It's well known that IV re-use is bad in AES-GCM. For example, it allows to recover a key that is marked as unwrap only and not extractable.
It's probably not a good idea to not allow setting IVs. But a note warning of these pitfalls would be good.

@asanso
Copy link

asanso commented Aug 13, 2018

I dug a bit the archive and I found this old kind of related issue https://www.w3.org/2012/webcrypto/track/actions/86

@sleevi
Copy link
Contributor

sleevi commented Aug 13, 2018

There's two separate issues here:

  1. Whether the API should expose the IV
  2. Whether the API should document the risks of IV reuse

To the first point, it was intentional to expose the IV, for deterministic control over the encryption. This matches other APIs that expose GCM.

To the second point, documentation about cryptographic design and the security considerations of algorithms was intentionally decided as out of scope. There was an (abandoned) attempt at documenting some of these at https://www.w3.org/2012/webcrypto/draft-irtf-cfrg-webcrypto-algorithms-01.html , but it was by design that the API focus on the API, and cryptographic best practices, which constantly evolve, left separate.

@sleevi
Copy link
Contributor

sleevi commented Aug 13, 2018

(Pretty sure this is a WontFix)

@sideshowbarker
Copy link
Contributor

Closing per #209 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment