using FHEW/TFHE I wanted to calculate a simple score
a = b* (x) + (b-1)* (x+1) ; for x = {1,..,5} and b = {0,1}
I figured I could use EvalFunc() for computing x+1 and use the CMUX gate to choose either x or x+1 depending on b. But this does not seem to be the case. The result I get is neither x nor x+1. What can I do to fix this?
The CMUX gate is only supported for the mode where all inputs are Boolean, which is not the case for x.
A simpler way would be to to use BGV or BFV for this (w/o any bootstrapping). You could simply use the homomorphic multiplication for CMUX. If b comes from an encrypted comparison, then you could do comparison using EvalFunc and run CMUX (multiplication) in CKKS. In other words, you could look into scheme switching examples for this.