Closed zfscgy closed 1 year ago
Hi @zfscgy
Thank you very much for raising this issue and pointing out improvement plans. This issue has been fixed in this PR #72
You can update the development
branch to try it out. If you find any other issue, please feel free to raise them.
Thanks!
When using
encrypt
inside aomp parallel for
loop, the errorippMontExp: set Mont input error.
is very likely to occur, especially when the plaintext is large, e.g., close to N. Here is the simplest code to reproduce the problem.The error seems to be caused by the
ippsMod_BN
function, which somehow modifies the data of modulus (the m_nquare field) during its computation. Hence it is not thread-safe. However, I notice that copyingm_square
inraw_encrypt
probably fixes the problem.