Injecting Status-fd output

Florian Weimer fweimer at bfk.de
Thu Mar 15 09:24:38 CET 2007


* Werner Koch:

> On Tue, 13 Mar 2007 20:40, nicholas.cole at gmail.com said:
>
>> I just don't know how to use "OpenPGP streamed encoding": can gpg spit it out?
>
> I guess Florian is thinking of the partial length encoding as used
> with OpenPGP apckets.  However, this does not help if people wnat to
> mix that with the status lines.

Oh, perhaps I should make my suggestion more explicit.  The basic idea
is to use data blocks prefixed by explict length information, like
OpenPGP does.  And for each data block, you can add a flag which
indicates the type.  Inside GnuPG, you buffer the data in reasonably
sized chunks, and write the data only if the buffer is full, or a
flush is required because you need to switch block types.

It's not necessary to use OpenPGP's bit stuffing.  You could use a
simple protocol like this:

  ...
  DATA 8192\n
  <8192 data bytes follow>
  DATA 121\n
  <121 data bytes follow>
  STATUS 39\n
  DECRYPTION_OKAY\n
  GOODMDC\n
  END_DECRYPTION\n

-- 
Florian Weimer                <fweimer at bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99



More information about the Gnupg-devel mailing list