MohamadMansouri / fault-tolerant-secure-agg

5 stars 1 forks source link

Blinding values issue #3

Open pierreeliseeflory opened 1 year ago

pierreeliseeflory commented 1 year ago

Hi,

Sorry for the delay, I have only been able to test the modifications provided by commit 59845d6. I still have some computations errors for instance for the following configuration (dimension=100, inputsize=16,nclients=6,threshold=2/3, dropout=0.0).

A theoretical upper bound for the value of encoded vectors elements size in

https://github.com/MohamadMansouri/fault-tolerant-secure-agg/blob/59845d6aee26c98805863d60a8fb63a126b635e2/ftsa/protocols/buildingblocks/VectorEncoding.py#L60

would be valuesize + floor(log2(addops)) + 1 given that addops is actually the number of operands and not operations. However this also leads to some incorrect computations.

This seems to be caused by the blinding method :

https://github.com/MohamadMansouri/fault-tolerant-secure-agg/blob/59845d6aee26c98805863d60a8fb63a126b635e2/ftsa/protocols/ourftsa22/client.py#L243

we add 2 valuesize elements modulo 2**elementsize. Thus when encoding the vector XplusB in Client.TJL.Protect the input elements are of size valuesize + 1. Moreover this blinding is not really effective since, for instance, a blinded value of 0 maps to a single combination of plaintext + blind value. A correct blinding algorithm would be to compute XplusB = X + B mod 2**valuesize. However, using this blinding algorithm, I am unsure if the server will be able to correctly unblind the value.

pierreeliseeflory commented 1 year ago

Is there an update on this topic ?