A Mutable Log

Secure file transmission using asymmetric cryptography

The secure file transmission mechanism, depicted in the diagram below, has the following properties

graph LR
    Program-->data["Encrypted Data"]
    subgraph Alice
    priva["Alice's Private Key"]-->Program
    pubb["Server's Public Key"]-->Program
    subgraph Server
    privb["Server's Private Key"]-->Server
    puba["Alice's Public Key"]-->Server

Here’s how the mechanism works

  1. Program calculates a secure hash of file data
  2. Program encrypts file data using a randomly generated secret key
  3. Program encrypts hash and secret key using Alice’s private key, and Server’s public key
  4. Program transmits all encrypted data to Server
  5. Server decrypts hash and secret key using its private key and Alice’s public key
  6. Server decrypts file data using secret key
  7. Server calculates hash of file data and compares it with hash sent by Program