-
Notifications
You must be signed in to change notification settings - Fork 259
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
CookieDealer.create_cookie reuses the IV for AES encryption of cookies #363
Comments
Ah, I see! Well spotted! |
schlenk
pushed a commit
to schlenk/pyoidc
that referenced
this issue
Jun 7, 2017
Added per cookie IV's to the CookieDealers encryption handling. This fixes CZ-NIC#363. Also restyled the encrypt and MAC construction for cookie security to use a more modern AEAD approach. In this case it is AES-SIV (RFC 5297), which has the nice property to be a bit resistant to IV reuse.
schlenk
pushed a commit
to schlenk/pyoidc
that referenced
this issue
Jun 8, 2017
Added per cookie IV's to the CookieDealers encryption handling. This fixes CZ-NIC#363. Also restyled the encrypt and MAC construction for cookie security to use a more modern AEAD approach. In this case it is AES-SIV (RFC 5297), which has the nice property to be a bit resistant to IV reuse.
schlenk
pushed a commit
to schlenk/pyoidc
that referenced
this issue
Jun 8, 2017
Added per cookie IV's to the CookieDealers encryption handling. This fixes CZ-NIC#363. Also restyled the encrypt and MAC construction for cookie security to use a more modern AEAD approach. In this case it is AES-SIV (RFC 5297), which has the nice property to be a bit resistant to IV reuse.
andrewkrug
pushed a commit
to mozilla-iam/pyoidc
that referenced
this issue
Jun 6, 2019
Added per cookie IV's to the CookieDealers encryption handling. This fixes CZ-NIC#363. Also restyled the encrypt and MAC construction for cookie security to use a more modern AEAD approach. In this case it is AES-SIV (RFC 5297), which has the nice property to be a bit resistant to IV reuse.
andrewkrug
pushed a commit
to mozilla-iam/pyoidc
that referenced
this issue
Jun 6, 2019
Added per cookie IV's to the CookieDealers encryption handling. This fixes CZ-NIC#363. Also restyled the encrypt and MAC construction for cookie security to use a more modern AEAD approach. In this case it is AES-SIV (RFC 5297), which has the nice property to be a bit resistant to IV reuse.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CookieDealer class has some peculiar use of the AES IV.
It creates ONE IV when the class is initialized, this is then reused for every cookie created by the class.
Depending on AES mode, this can be fatal for the security of the key. For AES-GCM it would totally ruin security, for CBC mode it is not as fatal, but still bad.
The Cookie dealer should probably use one fresh IV per cookie and store it in the cookie with the encrypted value.
The text was updated successfully, but these errors were encountered: