Use the input_share method

115 views
Skip to first unread message

Lucas Benmouffok

unread,
Jun 21, 2021, 9:30:42 AM6/21/21
to SPDZ/SCALE-MAMBA Discussion Group
Hello everyone, 

I would like to use the input_share method with my program. But i did not find enough information about it in the documentation.
My questions are the following: 
- How do i use the input_share method to input a share from an external source ? 
- As i saw the definition of a Share in the Share.h, there should be 3 values to enter when prompted in the terminal after using the input_share method ? 
- How can i MAC the share properly ? Is there any scale mamba method i should be using  or any external algorithm ? What does scale mamba recognise as properly MACed ? 
- Would you be able to produce an example of using this method ? 

Thanks for your time, 

Lucas Benmouffok.

Nigel Smart

unread,
Jun 21, 2021, 9:43:46 AM6/21/21
to sp...@googlegroups.com
The idea is as follows:

Input share is used to input a share of something which
you have previously stored using output share. So you
should NOT call input share without having got the
data out using output share.

It is built for the following use case.

You want to store the shares used by parties in a DB.
With Party 1 storing their shares in their DB and so
on.

The idea is NOT for an external party to enter data
into an MPC computation. Because, as you point out
that would require some way of creating the MAC etc.

I suspect what you want is for someone [not one of
the computing parties] to enter some data in, without
it being learnt by the computing parties. But that
would require some external plumbing outside of
SCALE to connect the computing parties with the inputing
party. It is also quite hard to do whilst still
maintaining active security.

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/2601814e-14bc-40e0-a702-31a45fae86d5n%40googlegroups.com
> <https://groups.google.com/d/msgid/spdz/2601814e-14bc-40e0-a702-31a45fae86d5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

OpenPGP_signature

titouan...@gmail.com

unread,
Jun 21, 2021, 10:16:38 AM6/21/21
to SPDZ/SCALE-MAMBA Discussion Group
Hi,

If Nigel is right and what you are trying to achieve is to have "Data Providers" which are NOT "Computing parties", then this has been discussed here already:

In particular, Dragos pointed out that Fig.2 of https://eprint.iacr.org/2015/1006.pdf proposes a protocol to allow external parties to securely provide inputs.
As you'll see, the external party does not directly provide shares, but rather broadcast a public value which is masked with a MACed value.

Note that SCALE doesn't implement this protocol, however it is surely possible to dig into the C++ code to implement it yourself (but probably not trivial).

Best,
Titouan

abdelrahaman aly

unread,
Jun 28, 2021, 7:21:53 AM6/28/21
to SPDZ/SCALE-MAMBA Discussion Group
Hi,

To achieve this without fundamentally changing SM code, you could try the following:

As the guys point out  Fig.2 of https://eprint.iacr.org/2015/1006.pdf, is your best bet. You could see that they have an x they want to secret share, they want to use a mask s to hide it and they have an authentication tag w, such that w=rs with r being some sampled randomness. 

You could produce all of this elements on SM using mpc code (w, and sample r and s). You can then use the output_shares instruction on s w and r. At this stage you could simply transmit the shares of the elements without the SPDZs Macs, as the authentication is coming from w.
 
If the validation passes you could then simply mask the client's input with the reconstructed s and, as it is a public value you can then use input_public to recover it on SM and use input_shares for s. Note that you can do this bc the processing parties (and only them) hold the Macs of s

This way you could achieve this without fundamentally changing SM code. Note that if you want the IO to work with files, you would have to follow the manual instructions for that. 


Kr,

Abdel


Tilen Marc

unread,
May 23, 2022, 8:21:18 AM5/23/22
to SPDZ/SCALE-MAMBA Discussion Group
Hi SCALE-MAMBA team,
I have a follow up questions on the topic of input_share functionality:
- If one uses Shamir style secret sharing (so not a full threshold scheme, but just an honest majority one), is there still a problem if an outside node simply provides shares? Am I missing something?
- I cannot find input_share functionality implemented for rust compiler. Are you planning to add this?
Thanks!
Tilen

ponedeljek, 28. junij 2021 ob 13:21:53 UTC+2 je oseba abdelrah...@gmail.com napisala:
Reply all
Reply to author
Forward
0 new messages