
Is it normal that the size is much larger after serialize an encrypted data?
Am I doing anything wrong?
Is it normal that the size is much larger after serialize an encrypted data?
Am I doing anything wrong?
You are probably printing the size of a pointer rather than the data itself. Ciphertext in OpenFHE C++ is a pointer.
Is the size of the serialized data normal?
Could you specify the crypto parameters such as the ring dimension, multiplicative depth, and scaling technique?
Also confirm the size unit here (Bytes, KB, or … )?
Hi, I’m in the same senior project group as @kanjanarat
To specify the crypto parameters in createCKKS(multDepth, scaleModSize, firstModSize, ringDim, batchSize):
the parameters are 17 50 60 8192 1
Serialize(Text) is return a bytes object. So, I think len(tmp) should returns the number of Bytes.
A freshly encrypted CKKS ciphertext size (in bytes), using OpenFHE 64-bit build which is the default build, can be estimated as follows:
bytes = 2*N*(d+1)*8
where N denotes the ring dimension and d denotes the multiplicative depth.
Note that if you use the default scaling technique FLEXIBLEAUTOEXT
, the “+1” part in the above equation becomes “+2”.
So, for your case:
bytes = 2*8192*18*8 = 2359296 which is sort of close to what your code returns. So the size of the serialized data looks normal to me.
Thank you so so much!!