Skip to content

CryptographyDeprecationWarning with latest version of cryptography and aws-encryption-sdk #319

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

Closed
tleonhardt opened this issue Feb 11, 2021 · 5 comments · Fixed by #355
Closed

Comments

@tleonhardt
Copy link

I'm using the following package versions:

  • aws-encryption-sdk==2.0.0
  • cryptography==3.4.4

When I import a module which uses aws_encryption_sdk, I get the following warning:

/usr/local/lib/python3.7/site-packages/aws_encryption_sdk/internal/crypto/elliptic_curve.py:21: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import InterfaceNotImplemented, int_from_bytes, int_to_bytes, verify_interface
@ohadbenita
Copy link

Happens to me as well. Any update on when will it be solved? it floods our logs.

@farleyb-amazon
Copy link
Contributor

Hi,

Sorry for the slow response here. We'll be fixing these warnings as part of our deprecation of Python 2, which will happen in an upcoming release. We'll update this issue once we have further details.

Thanks,
Ben

@stevenmu
Copy link

In order to solve this, install cryptography version 3.3.2
pip install cryptography==3.3.2
Worked for me.

@ghost
Copy link

ghost commented Mar 24, 2021

pip install cryptography==3.3.2

It works! not seeing the warning now. Tho, I haven't tried the whole app yet. Hopefully, all goes well. Thanks

@farleyb-amazon
Copy link
Contributor

Hey folks,

The most recent release of the Python Encryption SDK (3.0.0) no longer uses the deprecated int_from_bytes method. There are no breaking changes in this major version (aside from dropping support for Python 2), so as long as you're not on Python 2 you should be able to seamlessly upgrade to the most recent version and you'll no longer see these warnings.

Thanks,
Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants