Skip to content

A golang + vue web app to allow secure sharing of files over network

License

Notifications You must be signed in to change notification settings

raydwaipayan/secure-share

Repository files navigation

secure-share
Go Report Card

Share files securely over network.
Written with Golang + Vue.

Inspiration

I needed a file sharing service which had the following:

  • Minimal but simple interface
  • Data is encrypted using strong cryptographic algorithm on server side
  • Only a user with the crypto key could unlock the file
  • File would be deleted after first download
  • Material Dark design is a plus

Secure-share is built with all of these in mind.

Cryptographic Details

The cryptographic algorithm used is AES-256. GCM mode is used. Since GCM is a stream cipher mode, a nonce is required. Both the nonce and keys are randomly generated using crypto/rand.

What the server stores:

  • Unencrypted metadata - Only filename and size
  • Encrypted file data

The keys are never stored physically. If the user loses the key, it is impossible to recover the file.

Development

The application can be easily started using the makefile The following construct starts both the client and server:

make run-all

Note that the .env file must exist under both root and client/ directories. The make constructs automatically does that for you. For manual runs:

cp sample.env .env
cp .env ./client/.env

Deployment

The application can be deployed using docker-compose.

docker-compose up -d