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.
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.
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
The application can be deployed using docker-compose.
docker-compose up -d