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.46k stars 694 forks source link

Size of DynArray #670

Closed simjunjie closed 8 months ago

simjunjie commented 8 months 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 8 months 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 8 months ago

i see. thank you!