<link>http://www.ncryptoki.com/forum.aspx</link> <description /> <docs>http://www.rssboard.org/rss-specification</docs> <generator>mojoPortal Forum module</generator> <item> <title>Re: New session per operation or cache sessions? Ugo,

Anything related to balanced server?

br,

VenĂ¢ncio

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=326~-1#post1165 hbiri http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Mon, 29 Jan 2018 18:11:55 GMT Re: New session per operation or cache sessions? Hi! Ugo,

When I reuse such an object for all subsequent operations, my application receive the code 144 (OPERATION ACTIVE).

Do you understand?

Thanks.

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=326~-1#post1164 hbiri http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Mon, 29 Jan 2018 17:35:13 GMT
Re: New session per operation or cache sessions? You can get a session object once and then reuse such an object for all subsequent operations such as EncryptInit, SignInit and so on

Consider that NCryptoki is a wrapper to a PKCS#11 module so it supports all programming models supported by PKCS#11 specifications. I suggest to read the PKCS#11 specifications

 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=326~-1#post1163 hbiri http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Mon, 29 Jan 2018 07:13:01 GMT
Re: New session per operation or cache sessions? hi Hannes,

I have the same question! I maked it, open a new session for each operation.

br,


VenĂ¢ncio (BR)

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=326~-1#post1162 hbiri http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Thu, 25 Jan 2018 17:28:49 GMT
New session per operation or cache sessions? hi,

currently in my application I am opening a new session for each operation:
- Login to the HSM
- Get the active slot
- Open a session with a token from that slot
- Do the operation f.e. encryption
- Close the session

I am wondering if this is the best way how to do it.

An alternative would be to 
- Login to the HSM only once + get active slot only once
- Open a session with a token from that slot + cache the session
- Reuse the cached session for each operation (encryption, decryption, signing)

But I also have to initialize the session different per operation type f.e. call "session.EncryptInit(...)" if I want to do encryption operations.
So in general - does it make sense to cache session or should one open a new session for each operation?

br,
Hannes
 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=326~-1#post1148 hbiri http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Wed, 22 Nov 2017 13:53:54 GMT