Express service to store encrypted backups
- MongoDB (Installation Guide: https://docs.mongodb.com/v3.2/installation/)
- yarn
- Install dependencies
yarn install
- start server
yarn start
Unit tests: yarn test
Integration tests (requires MongoDB to run on localhost:27017
): yarn test:integration
Endpoint: POST /store-backup
Required Data:
{
auth: {
pubKey: <hex-public-key>,
date: <current date in ISO format>,
sig: <signature of date generated with the private key related to the public key>,
},
data: {
keys: [
{
pubKey: <public key used to encrypt>,
cipher: <encrypted symmetric encryption key>',
}
],
data: 'cipher text of data'
}
}
Endpoint: POST /get-backup
Required Data:
{
auth: {
pubKey: <hex-public-key>,
date: <current date in ISO format>,
sig: <signature of date generated with the private key related to the public key>,
}
}