SEAL icon indicating copy to clipboard operation
SEAL copied to clipboard

How can I configure `SEAL_CIPHERTEXT_SIZE_MAX`?

Open ppppbamzy opened this issue 2 years ago • 0 comments

In here SEAL_CIPHERTEXT_SIZE_MAX is fixed to be 16 while a check is followed on whether it is greater than 0x100000000ULL / SEAL_POLY_MOD_DEGREE_MAX, where the latter can be at least 2^15 (way too larger than 16!):

// Upper bound on the size of a ciphertext (cannot exceed 2^32 / poly_modulus_degree)
#define SEAL_CIPHERTEXT_SIZE_MAX 16
#if SEAL_CIPHERTEXT_SIZE_MAX > 0x100000000ULL / SEAL_POLY_MOD_DEGREE_MAX
#error "SEAL_CIPHERTEXT_SIZE_MAX is too large"
#endif

My question is:

  1. Why SEAL_CIPHERTEXT_SIZE_MAX cannot be configured before building and why the current bound of ciphertext size is so small?
  2. Why do a static comparison on fixed (constant) values?

ppppbamzy avatar Jul 25 '23 03:07 ppppbamzy