I'm new in HSM and I don't find any Information about detail communication. How does the communication between HSM and Host application work? I know there are some Driver but I want to understand the part of decryption and encryption by key. How can the application encrypt Messages? How it knows the specific Key?
Thank you for support.
Cheers, Horst
There will be a low level protocol, which will be something like */IP (TCP or UDP), when the HSM is in an appliance form-factor, or a PCIe driver when it is a PCIe card, or a USB driver when it is a USB form-factor.
Layered on top of that will be the HSMs own communications protocol. This is the "comms" protocol, not the crypto system.
On top of the comms protocol, will be a crypto system. Standards-based crypto systems are like PKCS#11 or CAPI/CSP/CNG or JCE. The HSM will probably have its own native crypto system also, and in most cases the standards-based crypto system is simply a bridge to the proprietary system.
So, how the HSM prepares a key for use, and how your application uses the key is entirely up to the HSM, and your application.
In general, your application will:
The HSM will
You can use a software based HSM simulator (SoftHSM, Utimaco GmbH's CryptoServer Simulator) to investigate how to use them in your local environment.