RSAPrivateKey and RSAPublicKey read content

6/28/2019 10:37:30 AM
Total Posts 2

RSAPrivateKey and RSAPublicKey read content

I am getting RSAPrivateKey and RSAPublicKey in the application which is generated through HSM device my doubt is that key is the actual key which is stored in my HSM card? if is same I need to use the private key for SFTP server authentication so that I need SSH type of key could you please provide a code for this. Currently, I am using the trial version of NCryptoki if it is possible I need to purchase this. Could you please help me?

7/3/2019 10:50:06 AM
Total Posts 300
Ugo Chirico

Re: RSAPrivateKey and RSAPublicKey read content


the RSAPrivateKey and RSAPublicKey that you get from NCryptoki are handles to the actual keys on the HSM.

You can read the public key data extracting it from the HSM by following this code:

You can read the private key data, only if it is set as "Exportable", by using the code here: