pingPong.py¶
-
class
qAuth.nonEnt.pingPong.Authenticator(name)¶ Class for Authenticator
-
authenticate(key, receiver)¶ Method that takes care of authenticator’s job.
Parameters: - key (str) – Secret Key Shared by two parties.
- receiver (str) – Prover’s name.
Returns: Result of authentication check and updated key.
Return type: Tuple
-
checkAuth(key)¶ Method that authenticates the prover.
Parameters: key (str) – Secret Key Shared by two parties. Returns: Updated Key Return type: String
-
recvEncoded(key)¶ Method that receives the encoded qubits.
Parameters: key (str) – Secret Key Shared by two parties.
-
-
class
qAuth.nonEnt.pingPong.Participant¶ Class which defines common functions. Prover and Authenticator inherit this class.
-
encodeQubits(qubit_list, key)¶ Method that encodes the qubits according to the protocol.
Parameters: - qubit_list (list of Qubit Objects) – List of qubits to encode.
- key (str) – Secret Key Shared by two parties.
-
prepareSequence(key, receiver)¶ Method that prepares the qubits according to the protocol and sends it to the receiver.
Parameters: - key (str) – Secret Key Shared by two parties.
- receiver (str) – Authenticator’s name.
-
update_key(qubit_list, key)¶ Method that updates the key.
Parameters: - qubit_list (list of Qubit Objects) – List of qubits to encode.
- key (str) – Secret Key Shared by two parties.
Returns: Updated Key
Return type: String
-
-
class
qAuth.nonEnt.pingPong.Prover(name)¶ Class for Prover
-
authenticate(key, sender)¶ Method that takes care of prover’s job.
Parameters: - key (str) – Secret Key Shared by two parties.
- sender (str) – Authenticator’s name.
Returns: Updated Key.
Return type: String
-
recvSequence(key, name)¶ Method that receives ping pong particles from authenticator.
Parameters: - key (str) – Secret Key Shared by two parties.
- name (str) – Authenticator’s name.
-
sendEncoded(key, receiver)¶ Method that encodes ping pong particles and send it to the authenticator.
Parameters: - key (str) – Secret Key Shared by two parties.
- receiver (str) – Authenticator’s name.
-