We are using Pkcs11Interop
library for cryptography and we customize&implement Pkcs11Interop
code samples for our project where Pkcs11Interop
documents in Github. In production, not everyday but we have to restart server after CPU usage reach maximum when we get a consecutive(4 or 5 times) CKR_ENCRYPTED_DATA_INVALID
exception. What cause this ? How can we fix this problem ? Any ideas will be appreciated. If anyone want I can share our code sample. Thanks for helping.
2017-07-11 10:45:07,580 ERROR HSM | 11.07.2017 10:45:07 | HSM Decrypt error occured Net.Pkcs11Interop.Common.Pkcs11Exception: Method C_Decrypt returned CKR_ENCRYPTED_DATA_INVALID at Net.Pkcs11Interop.HighLevelAPI41.Session.Decrypt(Mechanism mechanism, ObjectHandle keyHandle, Byte[] encryptedData) at Pkcs11HsmHost.DecryptInSession(Session session, String value, Int32 keyIndex, Int32 retryCount) in Security\Pkcs11HsmHost.cs:line 164