2 ms·
Can you make a mode that is compatible with the -chacha option to (modern) "openssl enc" output? That level of interoperability would greatly increase confiden
by chasil 4y ago
Can you make a mode that is compatible with the -chacha option to (modern) "openssl enc" output?
That level of interoperability would greatly increase confidence, I think, but this doesn't use Argon2id and BLAKE2b.
$ echo foobar > .pwfile
$ openssl enc -chacha20 -e -pbkdf2 -pass file:.pwfile -in sensitive.db -out sensitive.cha
$ openssl enc -chacha20 -d -pbkdf2 -pass file:.pwfile -in sensitive.cha -out test.db
$ diff test.db sensitive.db
$
- markdascher 4y agoIt's a good idea, and some sort of easily-verified compatibility with openssl was actually an early goal. But I gave up on that since the algorithms are so different. A compatible mode would end up sharing very little code, so it wouldn't say much about moochacha itself. But good news! I've come up with... something. https://codeberg.org/markdascher/moochacha/src/branch/main/openssl.sh https://codeberg.org/markdascher/moochacha/src/branch/main/o... That strings together a combination of argon2 and openssl commands to decrypt a file. It's extremely unsafe though, since all of the secrets end up in command-line arguments. Also some of those commands might be new in OpenSSL 3.
- chasil 4y agoI will take a look tomorrow. I recently discovered exactly how unsafe PuTTY's "psftp -pw" option is (20+ years after introduction), so purging argv is always prudent. https://www.linuxjournal.com/content/putty-scripted-passwords-are-exposed-passwords https://www.linuxjournal.com/content/putty-scripted-password...