I have a need to fetch automatically the GPG private key from a Linux server to decrypt files on a Windows 10 computer in production.
There are a few challenges here:
- How to assure SCP from the Windows 10 to the Linux server that not everybody who operates on the machine can perform this task?
- Where to store the private key to decrypt the material? I don't want the private key to be stolen by anybody. I thought about a script which fetches the key, imports it to a temporary GPG keystore, decrypts it and then deletes the keystore securely. But that is far beyond from security as everybody who has a bit of knowledge on batch scripting can fetch the key anyway (see for point 1).
Anybody an idea for a secure design how to handle this?