[pycrypto] [Sks-devel] Help parsing OpenPGP packets and pubkey "normalization"

Kim Minh Kaplan kaplan+sks at kim-minh.com
Thu May 20 14:08:13 CST 2010

Jesus Cea writes:

> You can parse the pubkey bundle, extract the packet
> and sort them in lexicographic order, for instance, paying attention to
> hierachical considerations.
> I need to "normalize" the key to ensure that "HASH(pubkey bundle)" is
> the same everywhere, because that is what is feeded to the hasntree to
> syncronize.
> How does SKS solve this issue?.

If my reading is correct, SKS the kind of canonicalization you describe.
Keys are first parsed with parse_keystr then merged with merge_pkeys.
See the function merge at

Kim Minh

More information about the pycrypto mailing list