diff --git a/crypten/mpc/primitives/arithmetic.py b/crypten/mpc/primitives/arithmetic.py index f3f4dabb..415e3eb2 100644 --- a/crypten/mpc/primitives/arithmetic.py +++ b/crypten/mpc/primitives/arithmetic.py @@ -435,6 +435,7 @@ def mul_(self, y): return self._arithmetic_function_(y, "mul") def div(self, y): + print("WARNING: Probabilistic truncation leaks some information, see https://eprint.iacr.org/2024/1127 for discussion. ") """Divide by a given tensor""" result = self.clone() if isinstance(y, CrypTensor): @@ -444,6 +445,7 @@ def div(self, y): return result.div_(y) def div_(self, y): + print("WARNING: Probabilistic truncation leaks some information, see https://eprint.iacr.org/2024/1127 for discussion. ") """Divide two tensors element-wise""" # TODO: Add test coverage for this code path (next 4 lines) if isinstance(y, float) and int(y) == y: diff --git a/crypten/mpc/primitives/replicated.py b/crypten/mpc/primitives/replicated.py index 4f245b82..e06e781c 100644 --- a/crypten/mpc/primitives/replicated.py +++ b/crypten/mpc/primitives/replicated.py @@ -103,6 +103,8 @@ def square(x): def truncate(x, y): + print("WARNING: Probabilistic truncation leaks some information, see https://eprint.iacr.org/2024/1127 for discussion. ") + """Protocol to divide an ArithmeticSharedTensor `x` by a constant integer `y` using RSS (see ABY3 Figure 2: https://eprint.iacr.org/2018/403.pdf).