Value of var0002:
98
Value of var0002:
4294967197
Value of var0002:
31
Value of var0001:
98
Value of var0001:
4294967197
Value of var0001:
0
For the public integer variable var0002, it works as expected. In the binary form, it can represented as:
00000000 00000000 00000000 01100010 ->
11111111 11111111 11111111 10011101 ->
00000000 00000000 00000000 00011111, which is finally 31.
However, for the secret integer variable var0001, it goes wrong at the step of shifting. I guess there is some problem with shifting operations on secret integers. I also tried this example on signed integers and arithmetic sharing, which showed the same result. Otherwise, did I use the shifting operation in the wrong way?
Hi, when I use a shifting operation on the secret integer data type, it turns out to be an unexpected behavior. Here is an example.
The output is:
For the public integer variable var0002, it works as expected. In the binary form, it can represented as: 00000000 00000000 00000000 01100010 -> 11111111 11111111 11111111 10011101 -> 00000000 00000000 00000000 00011111, which is finally 31. However, for the secret integer variable var0001, it goes wrong at the step of shifting. I guess there is some problem with shifting operations on secret integers. I also tried this example on signed integers and arithmetic sharing, which showed the same result. Otherwise, did I use the shifting operation in the wrong way?