Pkcs # 11 memory error - what could be common causes?

I get an error code CKR_DEVICE_MEMORYto call C_Encryptusing a cryptocurrency library.

From the PKCS # 11 specification, it CKR_DEVICE_MEMORYmeans that the token does not have enough memory to perform the requested function.

Under what circumstances do we completely fill the token memory?

HSM runs 24x7 for 7 days, continuously encrypting and decrypting files in the daytime using two parallel sessions. I have not called C_Finalizein the last 7 days. therefore, the crypto library works in its memory space from the point at which it was initialized ( see the linked post on this ).

I can see from my applications, the debug log, that ever, I allocate, I free, so there is no memory leak from my application code.

UPDATE 1: There is a detailed discussion on how I can invoke C_Finalizein Application_EndASP.NET, The main reason I could not use this is because after reuse / timeout, ASP.net threads access one session, which leads to CKR_OPERATION_ACTIVE error . In my case, several applications access HSM via webservice.

+3
source share
2 answers

, . , , , CKR_DEVICE_MEMORY s.

+1

HSM - ( Cryptoki) . Cryptoki CKR_DEVICE_MEMORY, HSM CKR_HOST_MEMORY, Cryptoki - ( , ). , pkcs11 , CKR_DEVICE_MEMORY (HSM) . . . . , Cryptoki:

  • . Cryptoki , Cryptoki. , Cryptoki C_EncryptFinal. , Cryptoki CKR_BUFFER_TOO_SMALL.
  • HSM. CKR_DEVICE_MEMORY , .
  • Cryptoki. , , . , . Cryptoki , . , . , ( , CKR_DEVICE_MEMORY CKR_HOST_MEMORY). (, ). , , . , : " , ". . , . . , , , 2, Cryptoki - .

.

+4

Source: https://habr.com/ru/post/1754214/


All Articles