Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/selfup/moat
Make your files safe before saving them to the cloud
https://github.com/selfup/moat
Last synced: about 2 months ago
JSON representation
Make your files safe before saving them to the cloud
- Host: GitHub
- URL: https://github.com/selfup/moat
- Owner: selfup
- License: mit
- Created: 2019-08-28T04:10:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-09T02:12:55.000Z (over 5 years ago)
- Last Synced: 2024-04-14T05:13:13.835Z (9 months ago)
- Language: Go
- Size: 1.16 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Moat
Make your files safe before saving them to the cloud.
No passphrases to remember. Everything is generated for you.
## In Development - POTENTIALLY UNSTABLE
```
$ moat -service="fixtures"
Moat path is: C:\Users\selfup\Moat
Service path is: fixtures\MoatLabel Key written to: C:\Users\selfup\Moat\moatlabel
Private Key written to: C:\Users\selfup\Moat\moatprivate
Public Key written to: fixtures\Moat\moatpublic
Encrypted AES Key written to: fixtures\Moat\moatkey$ echo "wow this is going to be encrypted and saved to a cloud service directory" >> ~/Moat/wow.txt
$ moat -service="fixtures" -cmd=push
Moat path is: C:\Users\selfup\Moat
Service path is: fixtures\MoatEncrypted: C:\Users\selfup\Moat\wow.txt - to: fixtures\Moat\wow.txt
$ moat -service="fixtures" -cmd=pull
Moat path is: C:\Users\selfup\Moat
Service path is: fixtures\MoatDecrypted: fixtures\Moat\wow.txt - to: C:\Users\selfup\Moat\wow.txt
```## What does this do?
1. Encrypts files to other directories
1. Decrypts files from other directories back into your vaultBy default `$HOME/Moat` or `%USERPROFILE%\Moat` are used for your Vault. This ensures any file written here will be encrypted to any service directory you want (Dropbox/Google Drive/A USB device/etc..).
Typically you would say something like: `-service=$HOME/Dropbox`
And when you run `moat` it will encrypt files from your Vault to `$HOME/Dropbox/Moat`.
You can also define your own Vault path, but we can talk about that later.
## How is this safe?
1. Keys are randomly generated (passphrase, label)
1. RSA 4096 (Public/Private Auth - Encryption for passphrase)
1. AES 256 (Encrypts/Decrypts files)#### In your Vault:
Private RSA key is stored. As well as a random 32 byte label.
#### In your service directory:
Public RSA key as well as an encrypted (using said public RSA key) randomly generated 32 byte passphrase.
#### Decryption/Encryption of files
All files are encrypted using a 32byte passphrase paired with a 32 byte label.
Your 32 byte passphrase is encrypted using the Public RSA key before being stored in your service directory.
The 32 byte passphrase is decrypted using the Private RSA key in your Vault.
All files are decrypted using the 32byte passphrase paired with the local 32 byte label.
## Custom Paths (Vaults)
```
$ moat -home="archive" -service="fixtures"
Moat path is: archive\Moat
Service path is: fixtures\MoatLabel Key written to: archive\Moat\moatlabel
Private Key written to: archive\Moat\moatprivate
Public Key written to: fixtures\Moat\moatpublic
Encrypted AES Key written to: fixtures\Moat\moatkey$ echo "wow this is going to be encrypted and saved to a cloud service directory" >> archive/Moat/wow.txt
$ moat -home="archive" -service="fixtures" -cmd=push
Moat path is: archive\Moat
Service path is: fixtures\MoatEncrypted: archive\Moat\wow.txt - to: fixtures\Moat\wow.txt
$ moat -home="archive" -service="fixtures" -cmd=pull
Moat path is: archive\Moat
Service path is: fixtures\MoatDecrypted: fixtures\Moat\wow.txt - to: archive\Moat\wow.txt
```## Help
```
$ moat -h
Usage of moat:
-cmd string
OPTIONAL
main command
push will encrypt Moat/filename.ext to Service/Moat/filename.ext
pull will decrypt from Service/Moat/filename.ext to Moat/filename.ext
if no command is passed initial setup will be attempted
if Moat dir and Service/Moat dir exist nothing will be generated
-home string
OPTIONAL
Home dir (here you want Moat to be created at) - defaults to $HOME or USERPROFILE
-moat string
OPTIONAL
What you want Moat to be called - essentially Vault names
-service string
REQUIRED
Directory of cloud service that will sync on update
```