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

NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead #776

Closed
spaceone opened this Issue Jul 18, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@spaceone

spaceone commented Jul 18, 2016

Since some days I receive the following traceback:

$ python -c "import paramiko; ssh = paramiko.SSHClient(); ssh.connect('10.200.27.114', username='root', password='univention')"                                                                             
No handlers could be found for logger "paramiko.transport"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 265, in connect
    t.start_client()
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 406, in start_client
    raise e
NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead

How to fix it?

@bitprophet

This comment has been minimized.

Show comment
Hide comment
@bitprophet

bitprophet Jul 20, 2016

Member

Please provide more details - see http://www.contribution-guide.org/#submitting-bugs for a guide on what level of detail is useful for bug reports. Thanks!

Member

bitprophet commented Jul 20, 2016

Please provide more details - see http://www.contribution-guide.org/#submitting-bugs for a guide on what level of detail is useful for bug reports. Thanks!

@jonasbardino

This comment has been minimized.

Show comment
Hide comment
@jonasbardino

jonasbardino Oct 12, 2016

This one sounds like an attempt to use paramiko with pycryptodome instead of pycrypto:
https://pypi.python.org/pypi/pycryptodome
http://www.xavierdupre.fr/app/pymyinstall/helpsphinx/blog/main_0001.html#post-2016-02-27-pycryptopycryptodomeparamikotoopenasshconnection-aggmain-0001
While the description of pycryptodome sounds like it should be a drop-in replacement for pycrypto, I got the same error when trying out that setup, and the release notes explain that some features like Crypto.Signature.pkcs1_15 were removed:
http://pycryptodome.readthedocs.io/en/latest/src/changelog.html
so it is not really a drop-in for pycrypto in relation to paramiko.

Searching the web for the particular NotImplementedError sounds like some projects or distributions silently made the switch from pycrypto to pycryptodome and broke stuff:
http://stackoverflow.com/questions/36501031/notimplementederror-use-module-crypto-signature-pkcs1-15-instead/36506902
http://agileadam.com/2016/04/paramiko-error-use-module-crypto-signature-pkcs1_15-instead/

[EDIT: rewrote the rest with latest paramiko news in mind]
For users running paramiko 1.x I suppose this issue can be closed just pointing to the above reinstall pycrypto+paramiko workaround but explicitly using e.g.
pip install paramiko==1.17.2
With the recent switch from pycrypto to python cryptography in the 2.x series it should also suffice to just upgrade to a paramiko 2.x version.

jonasbardino commented Oct 12, 2016

This one sounds like an attempt to use paramiko with pycryptodome instead of pycrypto:
https://pypi.python.org/pypi/pycryptodome
http://www.xavierdupre.fr/app/pymyinstall/helpsphinx/blog/main_0001.html#post-2016-02-27-pycryptopycryptodomeparamikotoopenasshconnection-aggmain-0001
While the description of pycryptodome sounds like it should be a drop-in replacement for pycrypto, I got the same error when trying out that setup, and the release notes explain that some features like Crypto.Signature.pkcs1_15 were removed:
http://pycryptodome.readthedocs.io/en/latest/src/changelog.html
so it is not really a drop-in for pycrypto in relation to paramiko.

Searching the web for the particular NotImplementedError sounds like some projects or distributions silently made the switch from pycrypto to pycryptodome and broke stuff:
http://stackoverflow.com/questions/36501031/notimplementederror-use-module-crypto-signature-pkcs1-15-instead/36506902
http://agileadam.com/2016/04/paramiko-error-use-module-crypto-signature-pkcs1_15-instead/

[EDIT: rewrote the rest with latest paramiko news in mind]
For users running paramiko 1.x I suppose this issue can be closed just pointing to the above reinstall pycrypto+paramiko workaround but explicitly using e.g.
pip install paramiko==1.17.2
With the recent switch from pycrypto to python cryptography in the 2.x series it should also suffice to just upgrade to a paramiko 2.x version.

@bitprophet

This comment has been minimized.

Show comment
Hide comment
@bitprophet

bitprophet Oct 12, 2016

Member

Thanks @jonasbardino - yes, we've had issues in the past with people trying to use Cryptodome as a drop-in replacement. And yup, these days folks ought to be trying Paramiko 2.x for improved backend support / cryptography.io.

Member

bitprophet commented Oct 12, 2016

Thanks @jonasbardino - yes, we've had issues in the past with people trying to use Cryptodome as a drop-in replacement. And yup, these days folks ought to be trying Paramiko 2.x for improved backend support / cryptography.io.

@bitprophet bitprophet closed this Oct 12, 2016

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