Expand description
Library for PKCS #11 HSM usage with Sequoia PGP.
Example use, uploading an OpenPGP key to a PKCS #11 device:
use openpgp_pkcs11_sequoia::Op11;
// PKCS #11 driver module
let module = "/usr/lib64/pkcs11/yubihsm_pkcs11.so";
// Serial of the PKCS #11 slot
let serial = "07550916";
// Open PKCS #11 context and slot
let mut pkcs11 = Op11::open(module)?;
let slot = pkcs11.slot(serial)?;
// Open a read-write session, log in as user
let session = slot.open_rw_session()?;
session.login("0001password")?;
// Upload an OpenPGP component key to the PKCS #11 device as id "3"
session.upload_key(&[3], &pgp_key, &common_name)?;Structsยง
- Op11
- OpenPGP PKCS #11 context
- Op11
KeyPair - PKCS #11 implementation of
sequoia_openpgp::crypto::Signerandsequoia_openpgp::crypto::Decryptor, as well assequoia_openpgp::parse::stream::DecryptionHelperandsequoia_openpgp::parse::stream::VerificationHelper. - Op11
Session - OpenPGP PKCS #11 Session
- Op11
Slot - OpenPGP PKCS #11 Slot