A Mutable Log

A blog by Devendra Tewari


Project maintained by tewarid Hosted on GitHub Pages — Theme by mattgraham

Secure file transmission using asymmetric cryptography

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

Server
Alice
Service
Server's Private Key
Alice's Public Key
File
Program
Alice's Private Key
Server's Public Key
File
Encrypted Data

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