MCPcopy Create free account
hub / github.com/ProtonMail/proton-python-client / process_challenge

Method process_challenge

tests/testserver.py:57–71  ·  view source on GitHub ↗
(self, client_challenge, client_proof)

Source from the content-addressed store, hash-verified

55 return self._authenticated
56
57 def process_challenge(self, client_challenge, client_proof):
58 self.A = bytes_to_long(client_challenge)
59 self.u = custom_hash(self.hash_class, self.A, self.B)
60 self.secret = pow(
61 (
62 self.A * pow(self.verifier, self.u, self.modulus)
63 ),
64 self.b, self.modulus
65 )
66
67 if client_proof != self.calculate_client_proof():
68 return False
69
70 self._authenticated = True
71 return self.calculate_server_proof(client_proof)

Callers 1

test_srpMethod · 0.95

Calls 4

bytes_to_longFunction · 0.90
custom_hashFunction · 0.90

Tested by

no test coverage detected