-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password from stdin alternatives. #215
Comments
Fascinating! I didn't expect that to work, but it clearly does in scrypt 1.2.1. Test case:
(assuming that you're in a directory containing an Background: I stopped this from working in 1306fba, or #198. That happened in August 2019, but unfortunately I can't remember why I thought it was necessary. It was right before I added (I still don't see the use case for this -- if you already know the If @cperciva thinks that we should allow this behaviour, it'd be trivial to revert those commits and add it to our test suite. |
Update: the test case works in
I'm still curious about the goal of having both the password and input file on stdin, though. |
A silly example:
Test it like this:
I think this type of situation is why I thought it was a bad idea to have both the passphrase and input on stdin -- a little mistake in the shell script could end up with the file being encrypted using the first line of the input file, and the encrypted data not containing the first line of the intended plaintext. Of course, we'd hope that everybody would test that their encrypted files contain what they think they do... just like we hope that everybody tests their backups. I still can't think of a case where having the passphrase and input both on stdin is a good idea, so I'm leaning towards breaking this "workflow" (oblig. xkcd 1172). [[I was tempted to make a dark joke here, but it would look really bad out of context, especially since a close friend's child was born today.]] |
Thank you for your answer. NB: usually is considered more secure to read the password from a file than from an environment. |
Hi @masarlabs and @nodesocket (from #201), The master branch of scrypt now includes |
Hi,
I have batch script that used to call Scrypt in a pileline in this way:
With the new version of Scrypt I get the error:
scrypt: Cannot read both passphrase and input file from standard input
Is there an alternative way to pass the password, for example from an environment variable or from a file?
If not, is it possible enable the old way to pass the password?
The text was updated successfully, but these errors were encountered: