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

Replaced pycrypto with pycryptodome #128

Merged
merged 4 commits into from
Aug 19, 2019
Merged

Replaced pycrypto with pycryptodome #128

merged 4 commits into from
Aug 19, 2019

Conversation

Pourliver
Copy link
Contributor

We had many reason to replace pycrypto with pycryptodome. First, it hasn't been supported in 4-5 years, and second it blocks #127.

The only "downside" with pycryptodome is that we cannot use raw RSA to encrypt and decrypt. Since it is considered unsafe to encrypt/decrypt without padding, they removed the ability to do so, but it is needed for the "RDP" security level. I took the logic behind the original pycrypto RSA module, and made a new class out of it with the required functions.

I've tested most of the different use case, and everything works as intended 🎉

@Pourliver Pourliver requested review from xshill and Res260 July 4, 2019 19:02
@Pourliver Pourliver mentioned this pull request Jul 4, 2019
pyrdp/security/crypto.py Outdated Show resolved Hide resolved
pyrdp/security/crypto.py Outdated Show resolved Hide resolved
pyrdp/security/crypto.py Outdated Show resolved Hide resolved
@Res260 Res260 self-requested a review July 5, 2019 20:39
Copy link
Collaborator

@xshill xshill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you can't install both pycrypto and pycryptodome, I would add a section in the README to tell users that we moved from pycrypto to pycryptodome. Include an example error message you would get from having the wrong lib for googlability.

@Pourliver
Copy link
Contributor Author

Done! Should be good now @xshill

@Res260 Res260 merged commit 2dafb79 into master Aug 19, 2019
@obilodeau obilodeau deleted the remove_pycrypto branch November 27, 2019 21:53
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.

3 participants