fresco
fresco copied to clipboard
Replace the use of maxBitLength
Currently we use the maxBitLength variable in numeric protocol suites such as SPDZ to set an upper limit on the maximum bit length of numbers that will be represented in an MPC computation. This is then used in protocols such as comparison where such a limit must be known.
There are a number of problems with the way maxBitLength is used, among others:
- It is not clear how to safely set maxBitLength. For example for comparison it must be set no higher than modBitLength - 60 and in some cases modBitLength/2 - 60 (which relates to an other magical constant). However, this is not documented or enforced.
- There is essentially no validation/exception handling on maxBitLength meaning that when set wrongly, FRESCO will fail in mysterious ways.
- maxBitLength is only set once when initializing the protocol suite. However, there is no reason it could not be specified when actually performing the operations that needs it. This could potentially give some performance improvements as well (i.e., by not having the same value of maxBitLength through out an entire MPC computation).
This is somewhat relates to issue #222