Crates.io | obg |
lib.rs | obg |
version | 3.0.1 |
source | src |
created_at | 2023-07-31 14:23:22.856485 |
updated_at | 2023-10-31 01:40:44.056207 |
description | encrypt or decrypt something with nothing or vice-versa |
homepage | https://github.com/whynothingmatters/obg |
repository | |
max_upload_size | |
id | 930929 |
size | 191,599 |
encrypt or decrypt something with nothing or vice-versa
cargo install obg
For instance, any video, image, audio or any files binary or plaintext can be used to encrypt another file.
Let's download nothing.png
and use that as raw-bytes "password"
input in a PBKDF2 key-derivation thus generating a AES key to later
encrypt/decrypt files.
wget https://oceania.sh/nothing.png
obg keygen --password ./nothing.png --salt "nihilism" --cycles 84000 -o key-made-of-nothing.yml
obg encrypt file --key-file key-made-of-nothing.yml nothing.png nothing-encrypted.png
obg encrypt file --key-file key-made-of-nothing.yml nothing-encrypted.png nothing.png
obg keygen --password "here goes your password" --salt "here goes your salt" --randomize-iv --cycles 42000 -o key-made-of-typed-password.yml
From there the encryption/decryption works the same as above.
dd if=/dev/random of="$(pwd)/password72.bin" bs=9 count=8
dd if=/dev/random of="$(pwd)/salt.bin" bs=5 count=8
obg keygen --password "$(pwd)/password72.bin" --salt "$(pwd)/salt.bin" --randomize-iv --cycles 37000 -o key-made-of-dev-random.yml
rm -f "$(pwd)/salt.bin" "$(pwd)/password72.bin"
From there the encryption/decryption works the same as above.
Both --password
or -salt
options of obg keygen
can be
paths to files, but if the given path don't exist in the file-system
the password or salt will be that path. Those options can be repeated to create a chain of (un)seemingly random bytes.