title: Module 'cryptography.utils' has no attribute 'bit_length'
body: <p>I am currently trying to figure out how to use netmiko to automate some of my routine work.Such as getting configuration backup, creating vlans etc.I've managed to use it on Aruba and Huawei Switches without problem.But on alcatel switch I'm facing this issue:</p>
  <pre><code>Unknown exception: module 'cryptography.utils' has no attribute 'bit_length'
  Traceback (most recent call last):
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py&quot;, line 2075, in run
  self.kex_engine.parse_next(ptype, m)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py&quot;, line 101, in parse_next
  return self._parse_kexdh_gex_reply(m)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py&quot;, line 281, in _parse_kexdh_gex_reply
  self.transport._verify_key(host_key, sig)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py&quot;, line 1886, in _verify_key
  if not key.verify_ssh_sig(self.H, Message(sig)):
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py&quot;, line 148, in verify_ssh_sig
  key = dsa.DSAPublicNumbers(
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py&quot;, line 212, in public_key
  return backend.load_dsa_public_numbers(self)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py&quot;, line 871, in load_dsa_public_numbers
  dsa._check_dsa_parameters(numbers.parameter_numbers)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py&quot;, line 145, in _override_check_dsa_parameters
  if crypto_utils.bit_length(parameters.q) not in [160, 256]:
  AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
  
  Traceback (most recent call last):
  File &quot;C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py&quot;, line 75, in
  config_backup(cihaz_secim,ip_address,username,password)
  File &quot;C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py&quot;, line 12, in config_backup
  net_connect=ConnectHandler(**switch) #Baglanti kuruldu.
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\ssh_dispatcher.py&quot;, line 312, in ConnectHandler
  return ConnectionClass(*args, **kwargs)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py&quot;, line 346, in init
  self._open()
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py&quot;, line 351, in _open
  self.establish_connection()
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py&quot;, line 920, in establish_connection
  self.remote_conn_pre.connect(**ssh_connect_params)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\client.py&quot;, line 406, in connect
  t.start_client(timeout=timeout)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py&quot;, line 660, in start_client
  raise e
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py&quot;, line 2075, in run
  self.kex_engine.parse_next(ptype, m)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py&quot;, line 101, in parse_next
  return self._parse_kexdh_gex_reply(m)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py&quot;, line 281, in _parse_kexdh_gex_reply
  self.transport._verify_key(host_key, sig)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py&quot;, line 1886, in _verify_key
  if not key.verify_ssh_sig(self.H, Message(sig)):
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py&quot;, line 148, in verify_ssh_sig
  key = dsa.DSAPublicNumbers(
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py&quot;, line 212, in public_key
  return backend.load_dsa_public_numbers(self)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py&quot;, line 871, in load_dsa_public_numbers
  dsa._check_dsa_parameters(numbers.parameter_numbers)
  File &quot;C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py&quot;, line 145, in _override_check_dsa_parameters
  if crypto_utils.bit_length(parameters.q) not in [160, 256]:
  AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
  </code></pre>
  <p>Thanks for your help in advance.</p>