alaric / nitrokey-hsm-cryptoki-example

Example of using the cryptoki crate with a Nitrokey HSM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example Usage of Nitrokey HSM with Cryptoki Rust Crate

This repository provides a simple example of using the cryptoki crate to extract the public key for an encryption, then decrypt using the Nitrokey HSM.

This assumes you've initialized the Nitrokey HSM already, and have keys generated according to the intstructions. Once that's done you should be able to run in somewhat similarly to, with parameters altered as necessary:

cargo run -- --module /usr/lib/opensc-pkcs11.so --pin 123456 --slot 0 --id 10

I also documented a couple of the quirks on this blog post.

About

Example of using the cryptoki crate with a Nitrokey HSM

License:MIT License


Languages

Language:Rust 100.0%