3

During one of the seminars at my university on Cryptography, the presenter said that while computing $x/y$ over Finite Rings $\mathbb Z_{2^\ell}$, there exist some problems such as:

  1. $y^{-1}$ may not exist as over the ring $\mathbb Z_{2^\ell}$, only odd numbers have inverses and even numbers don’t.

I understand this is required as for the inverse to exist this condition needs to be satisfied: $\gcd(y,2^\ell)=1$

  1. Another problem is regarding the information leakage. Here, the final output of $x/y$ being odd will say that both x and y are odd with very high probability.

I understand this observation comes from the first point only.

Now, I was thinking what if we use IEEE-754 floating point arithmetic on rings to obtain the value $x/y$. Here, instead of first computing $1/y$, we will directly obtain $x/y$ by using different ring sizes for the sign, exponent, and significand values. As far as I know, in IEEE-754 FP arithmetic, we can compute $x/y$ without using any division operation directly, but rather using only addition, multiplication, left & right shift, and XOR operations. We can perform all of these operations on rings. We also don't need any inverse operations here and we can actually perform $x/y$ directly here without the risk of the initial problems discussed in the first two points. In this case, we may lose some accuracy (maybe in the order of $10^{-10}\ldots10^{-15}$), but a close result can be obtained and subsequently, we can prevent such leakages. Am I missing something? I tried searching over the internet for this but it didn't help. Any input on this will be very helpful.

fgrieu
  • 149,326
  • 13
  • 324
  • 622

1 Answers1

1

You have to be careful. Using floating point arithmetic automatically means that you are no longer in the ring and what happens in this arithmetic is completely independent on (say) whether $\gcd(y,2^\ell)=1,$ for example.

It doesn't matter what the floating point error is, if the operational properties you obtain are not the same in the ring $\mathbb{Z}_{2^\ell}$ and in the structure obtained via your floating point approximation, say in a new set $S$, which it won't be in general. The fact that there is a non-exact floating point approximation is enough to destroy the arithmetic properties of the original ring.

Just try representing $x_1 y_1^{-1} + x_2 y_2^{-1}$ and $x_1 y_1^{-1} \times x_2 y_2^{-1}$ directly and compare the representations obtained to that obtained by representing $x_1 y_1^{-1}$ and $x_2 y_2^{-1}$ individually and then computing the addition and multiplication. There will be a small error as you point out, but the error will manifest itself as the answer not being the same. In a finite ring, this is deadly.

To repair this problem maybe you'd need to brute force through all finite expressions within the approximation error from the incorrect one and check one by one if any of them gives the real answer. In general, you may not want to do this.

kodlu
  • 25,146
  • 2
  • 30
  • 63