An electronic calculating device for performing obfuscated arithmetic in a commutative ring (n;n[x]/f(x)), the ring having a finite number of ring elements, a ring-addition and a ring-multiplication being defined on the ring elements, the calculating device operating on integer-lists (a1/a2)) encoding ring elements (ua1−ua2), the integer-lists comprising at least two integers, wherein an integer-list (a1, a2)) encodes a ring element (a) such that the ring element equals a linear combination of powers (a=ua1−ua2;
- a=ua1+a2−ua2;
- a=ua1+ua2) of a base ring element (u), the base ring element having an order (k) in the ring, wherein the powers have exponents determined by the integer-list, a difference between a first exponent (a1) and a second exponent (a2) is comprised in an allowed-differences list (A), and wherein the size of the allowed-differences list is less than the order (k),
- the calculating device comprising
- a storage arranged to store an increment table (T) defined for an increment ring element (1;
- ut),
- the increment table mapping an integer list representing an input ring element (k=uk1−uk2) to an output integer-list (T((k1,k2))=(l1,l2)) encoding an output ring element (l=ul1−ul2), such that the output ring element equals the increment ring element ring-added to the input ring element (l=k+1), the output ring element equals a linear combination of powers of the base ring element (u) wherein the powers have exponents determined by the output integer-list, a difference between a first exponent (l1) and a second exponent (l2) is comprised in an allowed-differences list (A).