To support game fairness and eliminate possibilities of cheating, at the start of every network game each client should generate an asymmetric key pair and send the public key to the other endpoint. These public keys should be part of the game's initial state, to support resuming disconnected games later.
Acceptance Criteria:
Logic to generate key pairs using MS crypto services in .net
Logic to encode public key as a network message
Logic to sign data using private key and encode data and signature as a network message
Logic to create encrypted data using single-message private key and encode encrypted data and single-message public key as a network message
Logic to unlock encrypted data by encoding single-message private key as a network message
Logic to verify signed data used indicated key pair and was not tampered with
Logic to perform cryptograhically protected random number generation, by exchanging encrypted random values, then exchanging unlocking keys, XORing the decrypted values, and using the result as a shared random number
To support game fairness and eliminate possibilities of cheating, at the start of every network game each client should generate an asymmetric key pair and send the public key to the other endpoint. These public keys should be part of the game's initial state, to support resuming disconnected games later.
Acceptance Criteria: