Crypt Comm
Cryptographic communication must protect confidentiality and integrity. This is done by Computer 1 providing a digital signature and encrypting the communication. When Computer 2 receives the message, it decrypts the message and verify the signature. This program is essentially a secure upload of a file. First is a set of functions establishing communication between a client and a server. Communications are not protected. Second is another set of functions that encrypts and signs a message. The protocol is summarized here.
Client: Ask the user which file is to be sent. Open the file, perform the digital signature and encryption and send to the server.
Server: Decrypt the communication, verify the signature and send a message back to the client as to whether the upload was successful. If successful, store the file. (Here, signature and encryption is optional)
Client: Tell the user if the upload was successful and offer to upload another file.