Bitcoin Forum
July 16, 2024, 11:43:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: GPG for Windows remembers passwords or not?  (Read 121 times)
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 7034


In memory of o_e_l_e_o


View Profile WWW
October 14, 2020, 10:05:46 PM
Merited by Last of the V8s (1)
 #1

I have created the following two scripts to encrypt and decrypt files on my computer:

Code:
#!/bin/bash
# Encrypt script

gpg -e -u <REDACTED> -r <REDACTED> -a -o $1 /tmp/gpg123${1} && rm /tmp/gpg123${1}
echo RELOADAGENT | gpg-connect-agent

Code:
#!/bin/bash
# Decrypt script

gpg -u <REDACTED> -o /tmp/gpg123${1} -d $1 && gedit /tmp/gpg123${1}
echo RELOADAGENT | gpg-connect-agent

First script encrypts the files into a GPG file and wipes the password from memory so it forces me to enter it again, second script decripts the GPG file to a temporary, that's deleted in the encrypt script, and opens it in a text editor so I can change it if I want. And wipes the password too.

This works fine on Linux, but I need to also get something working on Windows using batch scripts. That's easily doable, but I need to know if there's also gpg-connect-agent for Windows, or if plain old gpg for Windows caches the passwords or doesn't remember them. I really don't want it to remember any passwords I type, that's why I'm asking this.
Vod
Legendary
*
Offline Offline

Activity: 3766
Merit: 3102


Licking my boob since 1970


View Profile WWW
October 17, 2020, 04:10:55 PM
 #2

This works fine on Linux, but I need to also get something working on Windows using batch scripts. That's easily doable, but I need to know if there's also gpg-connect-agent for Windows, or if plain old gpg for Windows caches the passwords or doesn't remember them. I really don't want it to remember any passwords I type, that's why I'm asking this.

Why not use Lastpass?   It stores everything encrypted, and it's free for both OS.
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 7034


In memory of o_e_l_e_o


View Profile WWW
October 17, 2020, 08:24:02 PM
 #3

This works fine on Linux, but I need to also get something working on Windows using batch scripts. That's easily doable, but I need to know if there's also gpg-connect-agent for Windows, or if plain old gpg for Windows caches the passwords or doesn't remember them. I really don't want it to remember any passwords I type, that's why I'm asking this.

Why not use Lastpass?   It stores everything encrypted, and it's free for both OS.

It's because I'm already using Lockwise for that purpose, and I have things like SSH keys and other sensitive info that aren't exactly a username and password, so I need to dump those in an encrypted text file that I can quickly decrypt when I want to edit them. I don't fancy spelling out gpg -e -u KEY <a bunch of other options I use but can't remember> because I can't type that quickly without getting the command wrong.



I might end up using the gpg from Cygwin to avoid having to put a Windows gpg program in my %PATH% and diagnosing for the next 3 hours why the command is not found.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!