Reproducing "Optimization of Homomorphic Comparison Algorithm on RNS-CKKS Scheme" using GenMinimaxCompositePolynomial #565
-
|
The paper "Optimization of Homomorphic Comparison Algorithm on RNS-CKKS Scheme" (https://eprint.iacr.org/2021/1215) by Lee et al. uses the multi-interval Remez algorithm in its implementation of Algorithm 5: MinimaxComp (page 5). Lattigo provides the only open source implementation of this algorithm I have been able to find, based on a paper by the same authors. The authors provide code for calculating optimal polynomial degrees for the comparison operator here. Running their default example (with It seems like package main
import (
"fmt"
"math/big"
"github.com/tuneinsight/lattigo/v6/circuits/ckks/minimax"
)
func main() {
prec := uint(10000)
logerr := 16
logalpha := 16
deg := []int{5}
f := func(x *big.Float) *big.Float {
if x.Cmp(big.NewFloat(0)) > 0 {
return big.NewFloat(1)
}
return big.NewFloat(-1)
}
coeffs:= minimax.GenMinimaxCompositePolynomial(prec, logalpha, logerr, deg, f)
fmt.Println("Generated Coefficients:", coeffs)
} Am I misusing the function? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
My original implementation of the multi-interval Remez algorithm, currently present in Lattigo, is unfortunately unstable and suffers from many issues, notably during the steps that tries to find zeroes of the error function. I re-implemented the Remez algorithm with a different approach, which fixes all these issue. It can be found here. And you can also find the API to compute the minimax polynomials here. |
Beta Was this translation helpful? Give feedback.

My original implementation of the multi-interval Remez algorithm, currently present in Lattigo, is unfortunately unstable and suffers from many issues, notably during the steps that tries to find zeroes of the error function.
I re-implemented the Remez algorithm with a different approach, which fixes all these issue. It can be found here. And you can also find the API to compute the minimax polynomials here.