Hi everyone!
I have a question regarding the size of CKKS evaluation keys and crypto context in memory. I initially thought the size of the keys would scale linearly with the ring dimension, but after conducting some measurements, I observed something different.
For ring dimensions from 2^13 to 2^18 with the following parameters:
- SPARSE_TERNARY
- HEStd_NotSet
- FLEXIBLEAUTO
- dcrt_bits = 59
- first_modulus = 60
- levels_available_after_bootstrap = 15
- level_budget = [4, 4]
- Enabled: PKE, KEYSWITCH, LEVELEDSHE, ADVANCEDSHE, FHE
- Bootstrapping precomputed, along with several rotation keys
I measured the memory usage before and after precomputing, and here are the results in log-log scale:
At lower dimensions, the size of the keys scales almost linearly, but for 2^18, the size is 95 GiB compared to 28 GiB for 2^17—definitely not linear. I’ve verified that my measurements seem to be accurate.
Could someone help explain why the dependency isn’t linear? Is it supposed to be linear, or if not, what should the scaling look like?
Thanks in advance!