Open Bktero opened 5 years ago
params.h:24:1: warning: this decimal constant is unsigned only in ISO C90
const ZmodQ v_inverse = 3758096385; // 1/v mod Q
Adding a U at the end of the constant makes it unsigned ;)
In params.h
, I tried to replace all long int
s with int64_t
s and all int
s with int32_t
. Calling make
no longer generates warnings.
However, I can tell you about if the modifications still generates a correct software. Indeed, with or without my modifications, the tests fails on my machine. The output seems to be the same in both cases:
$ ./fhewTest 15
Setting up FHEW
Generating secret key ... Done.
Generating evaluation key ... this may take a while ... Done.
Testing depth-2 homomorphic circuits 15 times.
Circuit shape : (a GATE NOT(b)) GATE (c GATE d)
NOT Enc(1) = Enc(0)
Enc(1) AND Enc(0) = Enc(0)
Enc(1) NOR Enc(1) = Enc(0)
Enc(0) OR Enc(0) = ERROR: Please only use independant ciphertexts as inputs.
The error message above ( ERROR: Please only use independant ciphertexts as inputs.) is not normal behavior, but I can't reproduce the issue.
I'm shooting in the dark here, but maybe you can give a shot at commit #827dfbd ?
I have updated my repository and switched to the type_bug. The code compiles fine 👍
The test still fails but now the cause is different:
$ ./fhewTest 15
Setting up FHEW
Generating secret key ... Done.
Generating evaluation key ... this may take a while ... Done.
Testing depth-2 homomorphic circuits 15 times.
Circuit shape : (a GATE NOT(b)) GATE (c GATE d)
NOT Enc(1) = Enc(0)
Enc(1) AND Enc(0) = Enc(3)
ERROR: incorrect Homomorphic Gate computation at iteration 2
Darn.
Am I right to understand that you are running a 32 bit system ? I've only tested 64 bits systems...
Maybe there is another int with unspecified size somewhere beyond params.h and that is the source of all those issues. I can take a look, but since you have the possibility to test and I don't maybe it will be much easier for you...
Could be that the issue is at the interface with the FFTW library ?
Did you solved this in the end ?
Sorry but this is very old... I don't remember to be honest :/
Hello,
When I clone the repository and simply type 'make' in my terminal, I get a lot of scary warnings:
Here are some details about my OS & compiler :
Looking at closed issues, these problems have already arose on other platforms, other versions. Seems like it's still here. You should used types like
std::uint64_t
to enfore the sizes of your integers.Regards, Bktero