Using SCALE-MAMBA Framework in Java

53 views
Skip to first unread message

Giga Tron

unread,
Sep 20, 2021, 2:46:06 PM9/20/21
to SPDZ/SCALE-MAMBA Discussion Group

Hi,

i'm trying to use SCALE-MAMBA Framework to use secret sharing within a Java project.

I read the documentation but found nothing about how i could use this in Java.

It would be very nice if you could help me out there a little bit and tell me if it’s even possible to use your Framework in Java (and when yes: how do i start).

 

Regards and thanks in advance,

Cookyzi

gege...@outlook.de

unread,
Sep 20, 2021, 8:21:36 PM9/20/21
to SPDZ/SCALE-MAMBA Discussion Group
Hi Cookyzi,

before we begin, a short disclaimer:
i am a researcher and software developer not affiliated with Nigel Smart and his team.
So any statement regarding  SCALE-MAMBA should be taken with a grain of salt.
If i make any wrong assumptions or mistakes, feel free to correct me.

Regarding your question:
you should specify more precisely your use case because requiring secret sharing in java does not necessarily qualify the use of SCALE-MAMBA.
Maybe a more lightweight solution which simply computes a shamir secret is enough for your application.
There are also java implementation of secure multiparty computation available such as https://github.com/aicis/fresco

Short Anwser: No
There are no bindings implemented allowing you to interact with SCALE through a java API.

Long answer: Up to you
You could implement it yourself by creating an java API which allows you to load programs, start and stop the execution as well as manage the IO of SCALE.
Using Java Native Interface (JNI) you would then bind your new API with the existing C++ one of SCALE.
However, you are crossing not only language barriers but also programming models (pointers, GC etc.) which is non trivial.

A better solution in my opinion is to create a binding which is not agnostic to the language by wrapping SCALE as a microservice,
thus providing all functions through an REST API or, if the service runs on the same machine as the java application, via Inter Process Communication (IPC).
This requires you to implement the server api in C++ and then call it from java, making the use of JNI obsolete.

I hope this anwser helps.

Greetings
Gernot
Reply all
Reply to author
Forward
0 new messages