Module openpgp

Source
Expand description

OpenPGP-related functions.

Structsยง

HsmKey ๐Ÿ”’
PGP-adapter for a NetHSM key.
KeyUsageFlags
Key usage flags that can be set on the generated certificate.
OpenPgpUserId
A basic representation of a User ID for OpenPGP
OpenPgpUserIdList
A list of OpenPgpUserId
OpenPgpVersionIter
An iterator over the variants of OpenPgpVersion

Enumsยง

Error
OpenPgpUserIdType ๐Ÿ”’
A distinction between types of OpenPGP User IDs
OpenPgpVersion
The OpenPGP version

Functionsยง

add_certificate
Generates an OpenPGP certificate for the given NetHSM key.
extract_certificate
Extracts certificate (public key) from an OpenPGP TSK.
hash_to_oid ๐Ÿ”’
Converts OpenPGP hash algorithm into an OID form for PKCS#1 signing.
hsm_pk_to_pgp_pk ๐Ÿ”’
Converts NetHSM public key to OpenPGP public key.
parse_signature ๐Ÿ”’
Parse signature bytes into algorithm-specific vector of MPIs.
prepare_digest_data ๐Ÿ”’
Transforms the raw digest data for cryptographic signing.
sign
Generates an OpenPGP signature using a given NetHSM key for the message.
sign_hasher_state
Generates an armored OpenPGP signature based on provided hasher state.
to_rpgp_error ๐Ÿ”’
Wraps an Error in a std::io::Error and returns it as a [pgp::errors::Error].
tsk_to_private_key_import
Converts an OpenPGP Transferable Secret Key into PrivateKeyImport object.