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

Support cryptography >= 37.0.0 #43

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

dvzrv
Copy link
Contributor

@dvzrv dvzrv commented May 19, 2022

Fixes #42

dvzrv added 2 commits May 20, 2022 00:10
spsdk/crypto/__init__.py:
The unused wildcard import of `cryptography.hazmat.backends.interfaces`
prevents spsdk to work with cryptography >= 37.0.0.
None of the Backend classes found in the module are used and therefore
the import can be safely removed.
requirements.txt:
When removing unused imports, spsdk is actually compatible with
cryptography >= 37.0.0.
@dvzrv
Copy link
Contributor Author

dvzrv commented May 19, 2022

Related: I think it would be best to completely circumvent wildcard imports such as the one I removed:
https://github.com/NXPmicro/spsdk/blob/c3c7fb241acb23977651a9970e25230b69dac52f/spsdk/crypto/__init__.py

If there are issues with mypy, then it either needs to be configured differently or typing issues need to be ignored.

@dvzrv
Copy link
Contributor Author

dvzrv commented Jul 31, 2022

@mwsk It would be really helpful to get feedback on these types of PRs, as they are vital for downstreams.
Incorporating changes on a large scale from version to version is neither transparent nor helpful and shuts out any external contributor from this project 😢

@marekvi95
Copy link
Contributor

Hello @dvzrv, thanks for your PR. I have tested cryptography 37 and 38 and it seems that everything is working as expected. The only downside is quite a significant slowdown when operating with RSA keys. See pyca/cryptography#7236

The next version of SPSDK will support cryptography 38+.

@marekvi95 marekvi95 merged commit 1da1b6c into nxp-mcuxpresso:master Sep 27, 2022
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 this pull request may close these issues.

Unused import prevents use of cryptography >= 37
2 participants