code: def crack_secret_exponent_from_k(generator, signed_value, sig, k):
      
      r, s = sig
      return ((s * k - signed_value) * generator.inverse(r)) % generator.order()
docs: Given a signature of a signed_value and a known k, return the secret exponent.