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.62k stars 711 forks source link

Size of DynArray #670

Closed simjunjie closed 1 year ago

simjunjie commented 1 year ago

I would like to ask how the DynArray that stores the ciphertext polynomials (c0,c1) is structured. This is because when I initialize the polynomial modulus degree to 4096, I am expected the size to be 8192, where each c_i is of length 4096. However, when I run ctxt.dyn_array().size(), I get 16384.

Thank you

fionser commented 1 year ago

should multiply the number of primes For example the polynomial c0 is defined over N coefficients and the coefficients are defined over Z_q where the modulus q is defined over q=q0*q1*...*qk.

Current SEAL will stores c0 in the modulus-first order. That is N uint64 for c mod q0 then folllowed by another modulus N uint64_t for c mod q1 and so on

simjunjie commented 1 year ago

i see. thank you!