original_docstring: The extended Euclidian algorithm for determining 'd' the private key.
  
      Params:
          e: int -- The public key used for encryption.
          tot: int -- The totient value.
  
      Returns:
          int -- 'd' the private decryption key if inverse exists.
          None -- if there is no inverse.
      
docstring: The extended Euclidian algorithm for determining 'd' the private key.
docstring_tokens: The extended Euclidian algorithm for determining ' d ' the private key .
code: def extEuclid(e, tot):
      """The extended Euclidian algorithm for determining 'd' the private key.
  
      Params:
          e: int -- The public key used for encryption.
          tot: int -- The totient value.
  
      Returns:
          int -- 'd' the private decryption key if inverse exists.
          None -- if there is no inverse.
      """
      n_zero = tot
      b_zero = e
      t_zero = 0
      t = 1
      q = n_zero // b_zero
      r = n_zero - q * b_zero
      while r > 0:
          temp = t_zero - q * t
          if temp >= 0:
              temp = temp % tot
          if temp < 0:
              temp = tot - ((-temp) % tot)
          t_zero = t
          t = temp
          n_zero = b_zero
          b_zero = r
          q = n_zero//b_zero
          r = n_zero - q * b_zero
      if b_zero != 1:
          print("no inverse")
          return None
      else:
          return t % tot
code_tokens: def extEuclid ( e , tot ) : n_zero = tot b_zero = e t_zero = 0 t = 1 q = n_zero // b_zero r = n_zero - q * b_zero while r > 0 : temp = t_zero - q * t if temp >= 0 : temp = temp % tot if temp < 0 : temp = tot - ( ( - temp ) % tot ) t_zero = t t = temp n_zero = b_zero b_zero = r q = n_zero // b_zero r = n_zero - q * b_zero if b_zero != 1 : print ( "no inverse" ) return None else : return t % tot
short_docstring: The extended Euclidian algorithm for determining 'd' the private key.
short_docstring_tokens: The extended Euclidian algorithm for determining ' d ' the private key .
comment: """The extended Euclidian algorithm for determining 'd' the private key.
  
      Params:
          e: int -- The public key used for encryption.
          tot: int -- The totient value.
  
      Returns:
          int -- 'd' the private decryption key if inverse exists.
          None -- if there is no inverse.
      """