Re: Encrypt to a key without importing it to keyring

2017-11-24 Thread Werner Koch
On Wed, 22 Nov 2017 11:16, seby2k...@gmail.com said: > Is there any possibility i could encrypt some text to a public key but > without importing it to my keyring? Passing it to gnupg via command line or gpg -e -f FILE_WITH_KEY or -F for hidden recipient. --recipient-file file -f Thi

Re: Encrypt to a key without importing it to keyring

2017-11-24 Thread Seby
"Ingo Klöcker" wrote: On Freitag, 24. November 2017 02:44:08 CET Seby wrote: > Back to the subject, saving to at least a temporary keyring is my only > solution? Nothing else I can use in batch mode to serve the armored > key from clipboard somehow and do the operation? Yes. > If this is the o

Re: Encrypt to a key without importing it to keyring

2017-11-23 Thread Ingo Klöcker
On Freitag, 24. November 2017 02:44:08 CET Seby wrote: > Back to the subject, saving to at least a temporary keyring is my only > solution? Nothing else I can use in batch mode to serve the armored > key from clipboard somehow and do the operation? Yes. > If this is the only solution, what are t

Re: Encrypt to a key without importing it to keyring

2017-11-23 Thread Seby
Seby wrote: >> Approximation would be using ephemeral GNUPGHOME. >> >> I mean, starting your GnuPG session (or script) with: >> >>$ export GNUPGHOME=$(mktemp -p /run/user/$(id -u) -d) >>$ chmod og-rwx $GNUPGHOME; echo $GNUPGHOME >> >> and remove the $GNUPGHOME after its use. >> >> This is

Re: Encrypt to a key without importing it to keyring

2017-11-23 Thread Seby
Hello, Thanks a lot for the reply. NIIBE Yutaka wrote: > Seby wrote: >> Basically use gnupg without a keyring or trustdb. And the pass the armored >> pgp public key with each command and operation. > > AFAIK, such a usage is not supported by GnuPG. > > Well, I would imagine some use cases when

Re: Encrypt to a key without importing it to keyring

2017-11-23 Thread NIIBE Yutaka
Seby wrote: > Basically use gnupg without a keyring or trustdb. And the pass the armored > pgp public key with each command and operation. AFAIK, such a usage is not supported by GnuPG. Well, I would imagine some use cases when we want to avoid any dependency to specific user's configuration, ke

Re: Encrypt to a key without importing it to keyring

2017-11-22 Thread Seby
I need to pass it via batch or something... Like this: $pgp_public_key = 'pgp public key text armored' gpg -e -r $pgp_public_key --always_trust Basically use gnupg without a keyring or trustdb. And the pass the armored pgp public key with each command and operation. Thank you in advance. On Nov

Encrypt to a key without importing it to keyring

2017-11-22 Thread Seby
Hello, Is there any possibility i could encrypt some text to a public key but without importing it to my keyring? Passing it to gnupg via command line or something (i do know and accept that if i want to encrypt multiple messages or files to the same key i will have to provide it every time) . Se