auth-encrypt

Crates.ioauth-encrypt
lib.rsauth-encrypt
version0.1.0
sourcesrc
created_at2022-04-13 03:56:32.918815
updated_at2022-04-13 03:56:32.918815
descriptionAllows accessing encrypted files over the web by decrypting them through `openssl`.
homepage
repositoryhttps://git.matt.felle.nz/matt/auth-encrypt
max_upload_size
id566776
size72,994
Matt Fellenz (mattfbacon)

documentation

README

Auth Encrypt

Allows accessing encrypted files over the web by decrypting them through openssl.

The cipher used is ChaCha2 with PBKDF2, where the key is the base-64 encoding of the username and password joined by a colon (the value of the token for HTTP basic authentication). Here's how to encrypt a file such that it can be decrypted by the server:

openssl enc -e -pbkdf2 -chacha20 -k "$(echo -n 'username:password' | base64)" < plain.txt > encrypted.txt

Note that the server has absolutely no notion of whether a file is encrypted or not, and will blindly try to decrypt any file within its working directory if requested to do so. Usually this will cause an OpenSSL error which is reported as a 500 error code in the HTTP response. Wrong passwords are also not detected, and will result in garbage decrypted output.

Commit count: 0

cargo fmt