Communication between "clusters"

39 views
Skip to first unread message

Pedro Jorge

unread,
Dec 19, 2021, 4:39:31 AM12/19/21
to SPDZ/SCALE-MAMBA Discussion Group
Hi everybody,

My goal is to use multi-party computation to facilitate the use of secure encrypted data in geo-replicated databases, within an eventually consistent system. So the idea is that there would be several "clusters", with 3 scale-mamba "players" each, that would need to communicate between themselves to provide incremental updates to the data.

My question is, is this idea feasible? I've glanced at the scale-mamba documentation and read about the private inputs and outputs, but it seems to only be implemented for communication in channels between the players of one ''cluster", or can it also be adapted to communicate with the outside world, and thus with players in other "cluster"?

Appreciate any response!

Best regards,
Pedro Jorge

Nigel Smart

unread,
Dec 20, 2021, 11:02:41 AM12/20/21
to sp...@googlegroups.com
Hi

I think a bit more explanation would be needed in order
to get a good answer to you.

Suppose we have two clusters of MPC boxes {A,B,C}
and {X,Y,Z}.

Now were is your data and how is it held. Is it held
by another entity/entities. If multiple is it held in
secret shared form? If a single entity how is it secured
[encrypted or what]. Can external entities alter this
data without going back to the MPC engines. If you have
two clusters how are you going to get consensus on
the underlying data?

Basically these questions are to define what you mean
by "outside world" :-)

Nigel
> --
> You received this message because you are subscribed to the Google
> Groups "SPDZ/SCALE-MAMBA Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spdz+uns...@googlegroups.com
> <mailto:spdz+uns...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/spdz/bd12e737-c7d7-44ee-8404-e2f7d43627cen%40googlegroups.com
> <https://groups.google.com/d/msgid/spdz/bd12e737-c7d7-44ee-8404-e2f7d43627cen%40googlegroups.com?utm_medium=email&utm_source=footer>.
OpenPGP_signature

Pedro Jorge

unread,
Jan 11, 2022, 7:05:33 AM1/11/22
to SPDZ/SCALE-MAMBA Discussion Group
Hi

Appreciate the answer!

The data would be held by an external entity, let's say a custom application that interacts with the MPC boxes. This custom application would split the data into secret shares, and provide them to each player in the "closest" or more available at the moment MPC box, let's say it's box {A,B,C}. Eventually this MPC box would need to propagate the data to other boxes, let's say box {X,Y,Z}, in a way that A would send its secret share to X, B to Y, and C to Z. Let's say that later the {A,B,C} box was unavailable, the client could keep making their necessary computations using the {X,Y,Z} box. I hope this is making some kind of sense...

Based on the SCALE-MAMBA documentation, there seems to be an implemented IO procedure that allows this sharing of secret shares through the methods input_share() and output_share() in the Input_Output_Simple.cpp file. Can this procedure be used for what I tried to explain above? And if so, how shouldI go about it?

Best regards,
Pedro Jorge

Nigel Smart

unread,
Jan 11, 2022, 7:33:40 AM1/11/22
to sp...@googlegroups.com
Hi

This is rather complex in the full threshold case as you need to
ensure that the data being transferred is authentic. How does
box {X,Y,Z} know the stuff from box {A,B,C} is actually correct
or not? You need to design specific protocols for this, which is
beyond the scope of what we designed SCALE-MAMBA for.

Naively what you propose is OK, but only for semi-honest
security

Nigel
To unsubscribe from this group and stop receiving emails from it, send an email to spdz+uns...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/spdz/bccbbc54-c568-405d-8f5e-53ca61139a36n%40googlegroups.com.

OpenPGP_signature

Pedro Jorge

unread,
Jan 11, 2022, 7:50:55 AM1/11/22
to SPDZ/SCALE-MAMBA Discussion Group
Semi-honest security is the intended goal, for now. Eventually a protocol could be developed to guarantee the authenticity of the secret shares being transferred, but let's assume that for now that is not a concern.

How should I go about accessing these shares? Should this be done by changing the tinkering with the Setup source code, the Player source code, or in a custom .mpc file in the Programs folder? My question is, at which point in the SCALE-MAMBA computation cycle can we interact with the two mentioned above methods? 

Pedro Jorge

Nigel Smart

unread,
Jan 11, 2022, 8:06:48 AM1/11/22
to sp...@googlegroups.com
If you are only interested in semi-honest security then
SCALE-MAMBA is probably not for you.

Best access is indeed with the input_share and output_share
operations on IO

Nigel
OpenPGP_signature

titouan...@gmail.com

unread,
Jan 11, 2022, 8:13:14 AM1/11/22
to SPDZ/SCALE-MAMBA Discussion Group
Hi,

Also note that the first step in your protocol is already only semi-honest secure.
If you want to process data shared from an external entity, you have to make sure that whatever parties A,B,C received from the data provider is actually what they input into the MPC computation.

You can have a look at https://groups.google.com/g/spdz/c/j_AQfjJjWIE/m/rH9HwgKnFgAJ for more details.
Note that the same idea (with a few tweaks) may also allow for an actively secure "propagation" of data between your MPC boxes.

Titouan

Pedro Jorge

unread,
Jan 11, 2022, 8:19:46 AM1/11/22
to SPDZ/SCALE-MAMBA Discussion Group
Appreciate all the help!

Yes, I am aware of that. 

Thank you for the reference, I will have a look at it. 

Pedro Jorge

unread,
Jan 12, 2022, 11:46:45 AM1/12/22
to SPDZ/SCALE-MAMBA Discussion Group

Hello, again, 

So, I tried experimenting a bit with the output_shares process, but it seems to be outputting the sum value, instead of the separate shares. It also seems to not be using the channel I just created, but the default channel.

For example,  the following bit of code results in the following output:

CODE:
c = open_channel_with_return(regint(10))
inp = [sint(33), sint(24)]
output_shares(regint(10), *inp)
close_channel(regint(10))

OUTPUT:
Opening channel 10
Output channel 0 : 0 33
Output channel 0 : 0 24
Closing channel 0

Any chance you could go over what I may be doing wrong?

Thank you.

titouan...@gmail.com

unread,
Jan 17, 2022, 5:35:02 AM1/17/22
to SPDZ/SCALE-MAMBA Discussion Group
Hi,

Regarding the shares' value, in your program you essentially load a public value into a secret shared type.
Therefore what happens internally is that player 0 is given as share the value, and other players are given 0.

If you were to add something like
output = inp[0] * inp[1]
output_shares(regint(10), output)

you should see a random sharing of the product.

I am not sure why the channel isn't the right one though.
(It also says channel 0 for me)

Titouan
Reply all
Reply to author
Forward
0 new messages