Created
January 20, 2014 22:46
-
-
Save endreszabo/8530941 to your computer and use it in GitHub Desktop.
aessss. q&d combination of aes and ssss.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $*; do | |
HASH=$(openssl dgst -sha256 -binary < "$i" | perl -ne'map{printf("%02x",ord($_))} split//') | |
KEY=$(dd if=/dev/random bs=1 count=32 | perl -ne'map{printf("%02x",ord($_))} split//') | |
echo -n "$KEY" | openssl aes256 -aes-256-xts -e -pass stdin -in "$i" -out "${HASH}.bin" | |
echo -n "$KEY" | ssss-split -x -t 3 -n 4 -w "$HASH" -q | split --lines=1 --numeric-suffixes=1 --suffix-length=1 - "$HASH-" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment