Multi party computation over ring and fields

I am recently reading about multi party computation and its various existing protocols. From what I understand, all the arithmetic operations are performed over a field or a ring such that when two secret values, a and b, are used to perform secure computation c = f(a,b), the output of the MPC protocol is c mod P (for some modular P).

My question is, in real-life applications when we are performing MPC to get the desired output, this modulo operation may wrap multiple distinct shares into a single field/ring element. Such cases can occur when we are working with real-life applications. In such scenarios, how the accuracy of the original reconstructed output is ensured? The output c may exceed the value P, which will hamper the output as the original accepted output is c, not c mod P.

I am not sure but taking a higher/big P value may mitigate this issue. But in such scenarios what's the issue with directly working on original shares instead of the field elements after the secret sharing is performed?

I am very new to the concept of MPC and may have overlooked some crucial points while understanding the concept. Your help and clarifications are appreciated. Thank you.

• It's the same problem for non MPC computations using machine words, such as 32 or 64 bit integers. Jul 4 at 16:34
• yeah that's true. How to handle such situations mainly in the context of MPC to maintain the security as well as the accuracy of the MPC computation? Jul 4 at 17:02

Representing integers as field elements is something that comes up a lot in MPC and zero knowledge proofs. For example, zcash transactions have to show that the output amount doesn't exceed the input amount(s): $$\mathsf{in}_1 + \ldots + \mathsf{in}_k \geq \mathsf{out}$$ where all the values are mod $$p$$ for some prime $$p$$.
So how does zcash make sure overflow doesn't happen? It just adds extra constraints requiring that $$0 \leq \mathsf{in}_i < \lfloor p/k \rfloor$$ for all $$i$$.