Module operation over shares
Given a public prime R and each party get a share of "a", labeled as a_i , can I let each party locally compute a_i mod R ? Or can I let them cooperatively compute the share of r = (a mod R)?
As far as I know, this depends on the secret-sharing scheme being used. Which protocol are you intending to use?
Replicated secret sharing among three parties, I surpose
Assuming the question is about the facilities of MP-SPDZ: The local computation would require using either the C++ interface or the client interface [1] as the virtual machine design doesn't support that. Secret computation is only supported if R is a power of two via the mod2m function [2]. More generally, I would expect that the local computation produces a random result unless R divides the computation modulus and the secret sharing doesn't have a MAC (as is the case with replicated secret sharing). MP-SPDZ already makes use of this when converting between arithmetic and binary with power-of-two moduli in the arithmetic domain.
[1] https://mp-spdz.readthedocs.io/en/latest/client-interface.html [2] https://mp-spdz.readthedocs.io/en/latest/Compiler.html#Compiler.types.sint.mod2m
Can I directly set the modulus of the secret sharing scheme to be a multiple of R?
MP-SPDZ only supports moduli that are a power of two or a prime. This implies that R would need to be a power of two as well. Replicated secret sharing does support any modulus in theory, however.
That's all I wanted to ask! So thankful for your quick response!