I am having a query regarding sessions with HSM.
I am aware that there is an overhead if you initialise and finalise the cryptoki api for every file you want to encrypt/decrypt.
My queries are,
Is there an overhead in opening and closing individual sessions for every file, you want to encrypt/decrypt.(C_Initialize/C_Finalize)
How many maximum number of sessions can i have for a HSM simultaneously, with out affecting the performance?
Is opening and closing the session for processing individual files the best approach or opening a session and processing multiple files and then closing the session the best approach?
Thanks
First and foremost, PKCS#11 spec has pretty extensive documentation under general overview about threads, applications and sessions.
Secondly, it depends on your HSM hardware and PKCS#11 module implementation. How does your PKCS#11 provider represent slots? Do you use the same key all the time? What are the authentication mechanisms for the key?
Try with a single session. Are you sure your bottleneck will be the session handling?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With