lattigo icon indicating copy to clipboard operation
lattigo copied to clipboard

Why levels and logQ doesn't increase?

Open macknight opened this issue 1 year ago • 0 comments

Hi, image I'm running examples/ckks/bootstrapping/main.go, what surprises me is that after bootstrapping, the levels and logQ is decreased to a lower value than before bootstrapping.

Shouldn't the values of levels and logQ increase after bootstrapping?

How could I know the bootstrapping circuit from below code N16QP1546H192H32 ? image

The code here: N16QP1546H192H32 = defaultParametersLiteral{ ckks.ParametersLiteral{ LogN: 16, LogSlots: 15, DefaultScale: 1 << 40, Sigma: rlwe.DefaultSigma, H: 192, Q: []uint64{ 0x10000000006e0001, // 60 Q0 0x10000140001, // 40 0xffffe80001, // 40 0xffffc40001, // 40 0x100003e0001, // 40 0xffffb20001, // 40 0x10000500001, // 40 0xffff940001, // 40 0xffff8a0001, // 40 0xffff820001, // 40 0x7fffe60001, // 39 StC 0x7fffe40001, // 39 StC 0x7fffe00001, // 39 StC 0xfffffffff840001, // 60 Sine (double angle) 0x1000000000860001, // 60 Sine (double angle) 0xfffffffff6a0001, // 60 Sine 0x1000000000980001, // 60 Sine 0xfffffffff5a0001, // 60 Sine 0x1000000000b00001, // 60 Sine 0x1000000000ce0001, // 60 Sine 0xfffffffff2a0001, // 60 Sine 0x100000000060001, // 56 CtS 0xfffffffff00001, // 56 CtS 0xffffffffd80001, // 56 CtS 0x1000000002a0001, // 56 CtS }, P: []uint64{ 0x1fffffffffe00001, // Pi 61 0x1fffffffffc80001, // Pi 61 0x1fffffffffb40001, // Pi 61 0x1fffffffff500001, // Pi 61 0x1fffffffff420001, // Pi 61 }, }, Parameters{ EphemeralSecretWeight: 32, SlotsToCoeffsParameters: advanced.EncodingMatrixLiteral{ LinearTransformType: advanced.SlotsToCoeffs, LevelStart: 12, BSGSRatio: 2.0, BitReversed: false, ScalingFactor: [][]float64{ {0x7fffe60001}, {0x7fffe40001}, {0x7fffe00001}, }, }, EvalModParameters: advanced.EvalModLiteral{ Q: 0x10000000006e0001, LevelStart: 20, SineType: advanced.Cos1, MessageRatio: 256.0, K: 16, SineDeg: 30, DoubleAngle: 3, ArcSineDeg: 0, ScalingFactor: 1 << 60, }, CoeffsToSlotsParameters: advanced.EncodingMatrixLiteral{ LinearTransformType: advanced.CoeffsToSlots, LevelStart: 24, BSGSRatio: 2.0, BitReversed: false, ScalingFactor: [][]float64{ {0x100000000060001}, {0xfffffffff00001}, {0xffffffffd80001}, {0x1000000002a0001}, }, }, }, }

BR

macknight avatar Aug 17 '22 15:08 macknight