Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paramiko/cryptography deprecation warnings: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers [duplicate]

I keep getting the following deprecation warnings when doing simple SSH connections:

2019-03-04 02:21:14 [transport] INFO : Connected (version 2.0, client OpenSSH_7.4)
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:39: 
  CryptographyDeprecationWarning: encode_point has been deprecated 
  on EllipticCurvePublicNumbers and will be removed in a future 
  version. Please use EllipticCurvePublicKey.public_bytes to obtain 
  both compressed and uncompressed point encoding.
m.add_string(self.Q_C.public_numbers().encode_point())
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:96: 
  CryptographyDeprecationWarning: Support for unsafe construction of 
  public numbers from encoded data will be removed in a future version. 
  Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:111: 
CryptographyDeprecationWarning: encode_point has been deprecated on 
   EllipticCurvePublicNumbers and will be removed in a future version. 
   Please use EllipticCurvePublicKey.public_bytes to obtain both 
   compressed and uncompressed point encoding.
hm.add_string(self.Q_C.public_numbers().encode_point())
2019-03-04 02:21:14 [transport] INFO : 
   Authentication (keyboard-interactive) successful!

This more of an annoyance, as the program runs successfully, any ideas on how to get rid of these messages?

I am using Paramiko 2.4.2 with Python 2.7.9

like image 574
mbenhalima Avatar asked Mar 04 '19 07:03

mbenhalima


People also ask

How do I ignore Cryptographydeprecationwarning in Python?

filterwarnings() to suppress the warning.

Is Blowfish deprecated?

[Support] #2038: (via #2039) Recent versions of Cryptography have deprecated Blowfish algorithm support; in lieu of an easy method for users to remove it from the list of algorithms Paramiko tries to import and use, we've decided to remove it from our “preferred algorithms” list.


1 Answers

This has been fixed in Paramiko 2.5.0 already:
https://www.paramiko.org/changelog.html#2.5.0
https://github.com/paramiko/paramiko/pull/1379
https://github.com/paramiko/paramiko/issues/1369

like image 139
Martin Prikryl Avatar answered Oct 22 '22 16:10

Martin Prikryl