-
Notifications
You must be signed in to change notification settings - Fork 504
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
RSA module throws AttributeError #6
Comments
Paramiko verifies RSA signatures in an insecure way and it does that by means of some old, questionable parts of the PyCrypto API (specifically, the method PyCryptodome is (fortunately or unfortunately, depending on how you look at it) not 100% compatible to PyCrypto: I explicitly removed or modified those few APIs that are inherently dangerous (like the I was considering submitting a PR to paramiko so that safer and less-error prone APIs already offered by PyCrypto are used instead (i.e. the |
Many packages can use those "old, questionable parts", maybe adding them with I got this error using |
That is a good point, and raising |
Waiting for a cleaner solution, to make it work with paramiko, I had to make 2 things: class RsaKey(object):
...
def verify(self, m, sig):
warnings.warn("verify is deprecated on RSA key", FutureWarning)
s, = sig[:1]
return self._encrypt(s) == m
... and in paramiko: transport.py def _get_cipher(self, name, key, iv):
...
return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter=counter)
... |
I don't knew that error is because of
Paramiko==1.16.0
but withPyCrypto
it works. I am usingpycryptodome==3.3.1
.The text was updated successfully, but these errors were encountered: