vernamlab / cuFHE

CUDA-accelerated Fully Homomorphic Encryption Library
MIT License
211 stars 60 forks source link

Add a __syncthreads() call to prevent a race condition in NTT/NTTInv #4

Closed fjarri closed 6 years ago

fjarri commented 6 years ago

Fixes #3 (hopefully).

Logically, there should be another sync necessary at the end of NTT1024Core()/NTTInv1024Core(), because the shared memory is read and written with a different pattern in the end of the function and at the beginning of the parent one, but tests seem to show that the error disappears even without it.

WeiDaiWD commented 6 years ago

Thanks a lot! It seems to work.