On Tue,  6 Jun 2017 14:39, ndk.cla...@gmail.com said:
> Is it possible to "extract" the used session key, so that the requester
> just ignores the asymmetric crypto and just uses the symmetric key to
> decode the file? Drawbacks? Other ideas?

Here is how I would do that:

 ( gpg --status-fd 1 --show-session-key --max-output 1 \
      -o /dev/null 2>/dev/null FILE || true ) \
   | awk '$1=="[GNUPG:]" && $2=="SESSION_KEY" {print $3}'

Note that gpg exists with a failure (due to the "exceeded --max-output
limit" error message) and for extra cleanness I shortcut that error.

The output can then be used with --override-session-key


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

Attachment: pgptLRY1EOcay.pgp
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to