# Postio ## Overview Postio is a encrypted file sender and receiver. Written in [Rust](https://www.rust-lang.org/en-US/) Postio will encrypt a file (Using [AES-256](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) or [ChaCha](https://en.wikipedia.org/wiki/Salsa20#ChaCha_variant) (`postio` uses XChaCha20Poly1305 which has a 24-byte nonce) in [CBC](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29) mode, using [Curve 25519](https://en.wikipedia.org/wiki/Curve25519) public/private keys from [Dalek](https://doc.dalek.rs/curve25519_dalek/)) and send this file to an [AWS S3](https://aws.amazon.com/s3/). Your public key is sent to the AWS S3 store (different S3 instance) for the sender to get your public key to properly encrypt the file. This project no longer depends on `openssl` bindings for its cryptographic operations. Instead it uses the [RustCrypto](https://github.com/RustCrypto) crates ([aes](https://crates.io/crates/aes), [chacha20](https://crates.io/crates/chacha20), and [SHA-3](https://crates.io/crates/sha3)). ## How to Install You'll definitely need [rust](https://rustup.rs) if you want to compile from source, also `git`. To install `postio`: `cargo install postio` or `cargo install --git https://github.com/deg4uss3r/postio` Next, you'll want to add your AWS key ID and secret access key in your environment (even this is not a good way to do things, be careful with these keys coin miners will cost you thousands in seconds!!). You can do this in unix by adding this to your `.bashrc` or `.bash_profile` and running `source ~/.bashrc`or `source ~/.bash_profile` or by adding these to the terminal you currently have open (limit control of these files, and make sure you do not accidentally check them in to a git repository!): ``` export AWS_ACCESS_KEY_ID="your_key_id_here" export AWS_SECRET_ACCESS_KEY="your_secret_access_here" ``` After that and you have a working binary you are good to go! ## Options ``` Postio 0.7.0 Ricky (Degausser) Send and receive encrypted files USAGE: Postio [FLAGS] [OPTIONS] FLAGS: -x, --setup Create config file and populate settings -l, --list List files in your queue -d, --no-delete Do not delete files after getting them -a, --all Get all files at once -Q, --clear Deletes all files in your queue OPTIONS: -g Gets file from queue -s Send file to user -c, --config Sets a custom config file (defaults to $HOME/.postio/config) --encrypt Set the encryption algorithm [default: AES] -o Change output directory to something other than the current directory -u User to receive file ``` ## Config File Structure Using [serde](https://crates.io/crates/serde) postio will parse the config file in toml format. The configure file should look like below: ``` email = "ricky@hosfelt.io" private_key = "/Users/rthosfelt/.postio/private_key.pem" public_key = "/Users/rthosfelt/.postio/public_key.pem" file_store = "postio" file_store_region = "eu-west-2" public_key_store = "postio-keys" public_key_store_region = "eu-central-1" ``` On the first run the program will set up the config file for you (or you can ran `postio -x` to setup another config file), including generating the 25519 private/public keys. ## Contact Feel free to put in a ticket for any issues in the code or to call me names. Email: ricky`@`hosfelt`.`io IRC: degausser (freenode) Software will remain free but be a good sport and buy me a beer/coffee BTC: `1HJL1PMXi7rgALSo5cPLnRxhdPLBQDjQhd` ## Licensing and Warning I take no responsibly for getting your files stolen/deleted/hacked/cracked/etc. Also _please_ make sure you set up your AWS instance correctly or someone can run up the charges on your instance! Be smart, be secure! Covered under the MIT license (C) Hosfelt.io