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

Is AES-256 supported? #3446

tedmiston opened this Issue Mar 13, 2017 · 2 comments


None yet
2 participants

tedmiston commented Mar 13, 2017

Hi, I'm working on a project that shares encrypted values with an existing Node system using AES 256 via crypto-js. What I would like to do is encrypt / decrypt the values in Python with cryptography as well.

I'm trying to understand if AES 256 is currently supported?

I wasn't able to answer this clearly myself from the docs. For example, I see references to 256-bit key sizes in some tests and mentions of 256-bit keys in the AES algorithm class docs but the Fernet class (which seems to be the encouraged app user level interface) looks to use 128 bits for the AES key per the docs and linked spec. On the other hand, this library seems to be referenced as the modern replacement for others such as PyCrypto.

AES 256 seems like a common use case, so finding myself poking around the hazmat layer concerned me that I may be missing a higher level interface like the Fernet class but using AES 256.


This comment has been minimized.


alex commented Mar 13, 2017

Yes, cryptography supports AES256, as this example demonstrates:

Fernet is a specific recipe that implements a pre-defined protocol, it happens to use AES128.

@alex alex closed this Mar 13, 2017


This comment has been minimized.

tedmiston commented Mar 13, 2017

Thank you, @alex — exactly what I was looking for.

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