Paperkey (Was: Re: )
David Shaw
dshaw at jabberwocky.com
Sat Mar 13 14:25:45 CET 2010
On Mar 13, 2010, at 5:22 AM, john espiro wrote:
> Hi there -
>
> Thanks to your help, and David's, I have tried a few other things. Using yoru script I found that indeed it was dtmx that was failing due to the file being larger than 1555 bytes.
>
> I deleted all of the commented lines such as this, and then ran dtmxwrite:
>
> # Secret portions of key C8093ECE9373F385DB82D721245C4CBC467F1AE1
> # Base16 data extracted Sat Mar 13 10:47:10 2010
> # Created with paperkey 1.2 by David Shaw
> #
> # File format:
> # a) 1 octet: Version of the paperkey format (currently 0).
> # b) 1 octet: OpenPGP key or subkey version (currently 4)
> # c) n octets: Key fingerprint (20 octets for a version 4 key or subkey)
> # d) 2 octets: 16-bit big endian length of the following secret data
> # e) n octets: Secret data: a partial OpenPGP secret key or subkey packet as
> # specified in RFC 4880, starting with the string-to-key usage
> # octet and continuing until the end of the packet.
> # Repeat fields b through e as needed to cover all subkeys.
> #
>
> That worked and it successfully generated the bar code.
>
> I found that adding in some of the commented lines still allowed the bar code to be generated, albeit a different bar code.
>
> What is the advantage of encoding the commented lines into the bar code? I'll go investigate if paperkey will allow an output without the commented sections.
paperkey can generate text output (which has the comments on top) and raw output. The raw output is binary (so not directly printable as text, and obviously no comments), but has the advantage of being significantly smaller as one byte is one byte, rather than the 3 bytes it takes up in text form. If you are piping to something like dmtx, you should use raw output (--output-type raw).
David
More information about the Gnupg-users
mailing list