RAM consumption for CKKS Bootstrapping KeyGen

Please see Measuring size of bootstrapping keys The high level idea is that the bootstrapping key is composed of a number of identically-sized EvalAutomorphism (rotation) keys. You can serialize one of them, check its size, and then multiply this size by the number of keys. The size of each rotation key on disk is close to the size of each rotation key in memory.

In v1.6.0, we will expose special API for serializing bootstrapping keys (see Add API for serializing bootstrapping keys · Issue #353 · openfheorg/openfhe-development · GitHub)

One can also exactly compute the size of each rotation key in memory if the parameters are known, but this requires deep understanding of the underlying crypto parameters. Table 5 of Revisiting Homomorphic Encryption Schemes for Finite Fields can be used to compute the size of a rotation key for a given set of crypto parameters.

You can also use the classical Linux command to show peak RAM usage of EvalBoostrapKeyGen: /usr/bin/time -v