GNU-divert-to-card S2K format

Peter Lebbing peter at
Wed Feb 25 10:49:52 CET 2015

Oops, I realised I made a mistake.

On 24/02/15 19:49, Peter Lebbing wrote:
>>      - [Optional] If string-to-key usage octet was 255 or 254, a
>>        string-to-key specifier.  The length of the string-to-key
>>        specifier is implied by its type, as described above.
> specifier 110
> hash algo 0
> 3 bytes prefix GNU
> (together 5 bytes)

As is apparent from the part of doc/DETAILS Werner quoted from, this is missing
something. It should be:

S2K specifier 110
hash algo 0
3 bytes prefix GNU
GNU protection mode specifier 2 (for mode 1002)
Serial number length 16
(together 7 bytes)

If the specified serial number length (16 for OpenPGP cards) is greater than 16,
only 16 bytes of serial number are read regardless.

Obviously, I could have made more mistakes.



I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <>

More information about the Gnupg-users mailing list