intel / cryptography-primitives

Apache License 2.0
318 stars 86 forks source link

Is IppsECCPState thread safe? #50

Open cyjseagull opened 1 year ago

cyjseagull commented 1 year ago

I am using the ecc library of ipp-crypto to implement the function of ecc-mutiply. All ecPoints share the same IppsECCPState. I found that after the outer layer is parallelized using the tbb library, the program will coredump. But if every ecPoint use a IppsECCPState, the program works fine.

After checking the source code, I found that IppsECCPState has cpGFpReleasePool and cpGFpGetPool methods. Does it mean that IppsECCPState cannot be shared between different ec-points?

However, additional creation of IppsECCPState will bring a certain performance overhead. Is there a way to share IppsECCPState with multiple ecPoints?