How to use Pkcs11Interop with an NitroKey HSM to derive an shared secret with an EC

本秂侑毒 提交于 2019-12-10 11:13:37

问题


I bought a NitroKey HSM and manged to create an EC on it.

Now I want to derive a shared secret.
I found Pkcs11Interop, which seems to be the right tool for the job, but the handling is unclear.

A code snipplet or link to a working project would be very appreciated.


回答1:


You can take a look at Pkcs11Admin application for a real world sample using Pkcs11Interop library.

As far as I remember NitroKey HSM should be used with OpenSC middleware so your unmanaged library implementing PKCS#11 API will be opensc-pkcs11.dll.

I believe these resources might be helpful for you:

  1. Getting started with Pkcs11Interop
  2. Pkcs11Interop code samples which contain also key derivation sample
  3. PKCS#11 specification


来源:https://stackoverflow.com/questions/42161179/how-to-use-pkcs11interop-with-an-nitrokey-hsm-to-derive-an-shared-secret-with-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!