microsoft / SEAL

Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.
https://www.microsoft.com/en-us/research/group/cryptography-research/
MIT License
3.52k stars 703 forks source link

Cannot Decrypt #696

Closed czh-rot closed 1 month ago

czh-rot commented 1 month ago

The question is follows: the error occurs in line 128. image

kimlaine commented 1 month ago

Did you debug this? It seems you are calling Plaintext::set_zero on coefficient at index 0, but your Plaintext has coeff_count 0, so there are no coefficients at all (you are calling this constructor).

czh-rot commented 1 month ago

I was busy with other things in the past, so I didn't reply in time. I've figured out what the problem is, and a mismatch between the parameter input for decrypt and pt actually causes it.