On Wed, 18 Feb 2026 at 16:32, 'Robert Relyea' via
[email protected] <[email protected]> wrote:

> 2) reusing keys and session objects. After you free a key or session
> object, that object is placed on a free list because a number of things
> that you create with the object (like the session or the locks), could
> be fairly expensive and key creation/destruction can happen quite
> frequently. This can of reuse can be capped, though we may need to add
> some machinery to allow applications to cap them.
>
> How many freed key structures that are kept around is determined by the
> maxKeyCount variable in the slot. Unfortunately we currently have no way
> to set it from the application. It's set based on the token's
> maxKeySessionCount in it's tokenInfo structure. Typically it's '0',
> which sets maxKeyCount to 800. Sounds like you would like a call that
> will set that value to 0 for your tests. That will change the timing of
> things (since PK11_SymKeyFree() and creating new keys will both take
> longer), but it would reduce the noise of reuse... particularly lock reuse.

Thanks for the pointer!  I'll just hack my local build.

The code is also churning through a lot of temp symkeys, I wonder if
it hits the 800 limit.

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/CAJeAr6vVQZq6_z8s%2B8gjSb0xqK%3DX4u_WpU%3Dcya9%3D_%2Bz%2B-kvZYQ%40mail.gmail.com.

Reply via email to