snwagh / falcon-public

Implementation of protocols in Falcon
89 stars 45 forks source link

Large error #25

Open aibohang opened 2 years ago

aibohang commented 2 years ago

An array of 500 decimals of type flaot,

  1. First, scale it to mytype type,

  2. Call Falcon's multiplication operation for each number in the array to calculate the square of each number

  3. Then add up the decimals represented by mytype, and are also represented by mytype,

  4. It is found that the and corresponding plaintext of mytype are about 200 smaller than the plaintext calculated directly by flaot

  5. Is the error caused by the continuous accumulation of the data in the multiplication step and the real product?

However, if you scale the 500 float data into mytype, and then add it up, you will find no error, so I'd like to ask you

snwagh commented 2 years ago

My intuition says the error should not be because of point 5. What is the fixed-point precision you're using? What do you mean by plaintext of mytype? Have you converted a reconstructed value and interpret it (divide by fixed-point precision) before comparing it to the corresponding plaintext of float?