libp11

The PKCS#11 API is an abstract API to perform operations on
cryptographic objects such as private keys, without requiring
access to the objects themselves. That is, it provides a logical
separation of the keys from the operations. The PKCS#11 API is
mainly used to access objects in smart cards and hardware or
software security modules (HSMs). In these modules, cryptographic
keys are isolated and not made available to applications.
