Echo asterisks/passphrase as it's being typed in gnupg with tty pinentry

8

1

I'm using gnupg with tty pinentry agent to encrypt a file with a symmetric passphrase. When I'm typing it, both to encrypt and decrypt the file, gnupg's tty pinentry avoid displaying the characters I'm entering to avoid it getting stolen by someone watching my screen while I'm typing. It also avoids displaying an asterisk so that my passphrase length can't be stolen as well.

However, suppose I'm aware of the risk and I want to view an asterisk every time I type a character in, allowing me to know if my input was received or if I failed to press the key, or if I accidentally pressed a neighbouring one as well, allowing me to understand when a backspace get correctly received as well (by deleting an asterisk each time I press it).

Suppose I even want to see the character I'm typing echoed, to know if I'm mistyping some, for how inadvisable that may be.

How do I achieve those two things?

Jeffrey Lebowski

Posted 2017-01-12T16:12:55.137

Reputation: 343

1What I usually do in such cases(extremely difficult password ), I open any text editor, type password there, then copy/paste to gpg/ssh and other such program. Just don't save and close immediately that editor after password pasted – Alex – 2017-01-15T05:35:50.300

I'd recommend making this an answer as the only other feasible way is re-compiling gpg2 itself to allow this. – linuxdev2013 – 2018-12-28T02:12:24.433

Answers

0

This is not supported by pinentry-tty.

pinentry-curses does echo asterisks; switching to that may be your solution.

Gabe

Posted 2017-01-12T16:12:55.137

Reputation: 1 837