Hi,

I am doing some addition multiplication on a 1 batchsize vector. If I understand correctly – increasing the ring dimension security increases and estimated precision as well – at the cost of compute. But in my code if 2**i multiplied to ring dimension decreases Est precision by i bits. May I know why this is happening?

Thank you very much.
Bhavin.

Could you please formulate the question in (correct) English? I do not understand what you are asking about as there are numerous grammatical errors. Other participants of the Discourse forum will not be able to understand this question either.

If you have a question about a particular example, please provide a minimal working example so we could understand what specific behavior you are referring to.

Thank you for understanding.

I am very sorry for not making it clear. The question is as follows,

I am interested in knowing how does ring dimension affect the estimated precision in the following code,

```
//==================================================================================
// BSD 2-Clause License
//
// Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors
//
// All rights reserved.
//
// Author TPOC: contact@openfhe.org
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
```

This file has been truncated. show original

I get following results,
0. `parameters.SetRingDim(1 << 11);`

Estimated precision: 26 bits

`parameters.SetRingDim(1 << 12);`

Estimated precision: 25 bits
`parameters.SetRingDim(1 << 13);`

Estimated precision: 25 bits
`parameters.SetRingDim(1 << 14);`

Estimated precision: 21 bits
`parameters.SetRingDim(1 << 15);`

Estimated precision: 18 bits
Motivation: Raising the security level to 128 bit and would like to maintain the estimated precision high as well.

Thank you very much.
Bhavin.

Thank you for clarifying. I suggest reading Approximate Homomorphic Encryption with Reduced Approximation Error to learn how the error (precision) in leveled CKKS depends on the ring dimension. In the case of bootstrapping, it gets even more complicated as there are several levels of approximation involved. If you need increased (roughly double) precision after bootstrapping, you can use iterative bootstrapping (see openfhe-development/src/pke/examples/iterative-ckks-bootstrapping.cpp at main · openfheorg/openfhe-development · GitHub )

1 Like

Thank you very much for the suggestion