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

Tracking changes required for full crypto backend independence #114

Closed
12 tasks done
mattsb42-aws opened this issue Dec 25, 2018 · 7 comments
Closed
12 tasks done

Tracking changes required for full crypto backend independence #114

mattsb42-aws opened this issue Dec 25, 2018 · 7 comments

Comments

@mattsb42-aws
Copy link
Contributor

mattsb42-aws commented Dec 25, 2018

As discussed in #108 and #109, the various cryptographic backends are not all independently operable. This tracking issue will enumerate the changes that need to be made and track the PRs that fix them.

Tags will use the names for dependency grouping as defined in the extras installs, with "base" used to define the python-rsa/python-ecdsa backend.

Known Issues

Test failures

cryptography

base

pycrypto

passing

pycryptodome

passing

compatibility (all backends installed concurrently)

Cross-dependencies

cryptography

CryptographyECKey depends on ecdsa.utils encoding functions.

pycrypto/dome

@mattsb42-aws
Copy link
Contributor Author

After looking into the issues with the firebase tests failing in "base" mode, my conclusion is that the root cause here is that python-rsa cannot load certificates. I am not familiar with Firebase, so I will assume that the tests are written in a reasonable manner and so conclude that Firebase interactions require working with certificates.

It is my conclusion, then, that if you want to use this library with Firebase or any other application that passes certificates, you will need one of the more fully featured crypto backends.

@mpdavis
Copy link
Owner

mpdavis commented Dec 27, 2018

@mattsb42-aws I want to thank you for all of this effort, especially over Christmas. I'm looking at this now to hopefully get all of these merged.

@mattsb42-aws
Copy link
Contributor Author

Happy to help!

While I had my head in this space I went ahead and tackled the pycrypto/dome dependency on python-rsa too by centralizing the ASN1 handling into a separate module. This change fully removes any dependency on python-rsa or python-ecdsa outside of those specific backend modules (albeit by making pyasn1 a dependency of the pycrypto/dome backends).

I'm going to hold off on cutting that PR until #120 is merged, just because it builds very heavily on top of the changes in that.

I still haven't found a solution to the problem of how to have "default" extras; not sure what a good approach to that will be.

@mattsb42-aws
Copy link
Contributor Author

^ rather; it removes the dependency on python-rsa. I forgot until I went to run the full isolation tests that the pycrypto/dome backend doesn't supply an ECDSA implementation.

@mattsb42-aws
Copy link
Contributor Author

#121 and #122 should wrap this up and clear the way for merging the backend isolation dev branch in.

@mattsb42-aws
Copy link
Contributor Author

We're on the final stretch! #128 is prepping backend-explicit-tests for merge into master by doing the reverse (the changes to master since backend-explicit-tests forked off are much less than the changes that backend-explicit-tests introduces).

@mattsb42-aws
Copy link
Contributor Author

This is resolved with #129

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

No branches or pull requests

2 participants