rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
199 stars 55 forks source link

Abstract out keyring read/write functionality in preparation for keybox read/write #33

Open ronaldtse opened 7 years ago

ronaldtse commented 7 years ago

GnuPG 2.1 now uses the .kbx format for key storage instead of the previous .gpg keyring.

In any case, the .gpg keyring format is not defined in RFC 4880, but is a GnuPG-proprietary format that uses an OpenPGP message to store keys together with "Trust Packet"s. Normal OpenPGP messages do not have the "Trust Packet" (Tag 12), and the "Trust Packet"s are not exported. The contents of the "Trust Packet" is also implementation-specific as defined in RFC 4880.

Given that GnuPG now uses a different .kbx format, it would be beneficial to have a general interface to manipulate stored keys.

We should abstract out keyring manipulation code into generic primitives such as:

etc.

And bridge them to the specific "GnuPG keyring" or "GnuPG kbx" implementations.

ronaldtse commented 7 years ago

@catap this issue is for the extraction of the key storage interface.

Preferably it should be FFI-friendly/accessible (#64).

ni4 commented 5 years ago

@ronaldtse @dewyatt I think we abstracted out keyring saving/loading functionality enough?