Skip to main content
. 2022 Oct 24;22(21):8124. doi: 10.3390/s22218124
Algorithm 8  Heuristicallyparameterise RNS-CKKS scheme using expected cost of computation.
Require: c: Integer maximal cost of this cyphertext group.
Require: s: Integer scale power, the scale of the cyphertext. Default: s=40. We advise not to go below 30 due to noise accumulation and lack of prime availability.
Require: p: Float special prime multiplier, the multiplier that dictates the scale-stabilised special primes in the coefficient modulus chain. Default: p=1.5
Ensure: parms: MS-SEAL RNS-CKKS parameter dictionary/map.
  function parameterise(c, s, p)
        parmsdict()
        parms[scheme]2            ▹ 2 is CKKS in MS-SEAL
        parms[scale]pow(2,s)              ▹ scale power
        m[sforiinrange(c+2)]
        m[0]int(m[0]p)             ▹ Mult first special prime
        m[1]int(m[1]p)            ▹ Mult last special prime
        b27
        while b<sum(m) do
            bb2
        parms[poly_modulus_degree]int(1024(b/27))
        return parms