Secure Multi-Party Communication with Big Data

A glimpse of privacy preserving joint computation

Secure Multi-Party Communication (SMPC) is a critical aspect of modern cryptography, addressing the challenge of secure information exchange among multiple parties. As our digital world becomes increasingly interconnected, ensuring the privacy and integrity of sensitive data shared between multiple entities is paramount. In this article, we delve into the intricacies of SMPC, exploring its foundations, applications, and relevance in the context of Big Data.

Yao's Millionaires' problem

One of the foundational problems in the field of secure multi-party computation is Yao's Millionaires' problem. Proposed by Andrew Yao in 1982, this problem illustrates the challenge of two millionaires wishing to determine who is wealthier without revealing their actual net worth to each other.

This cryptographic scenario laid the groundwork for developing secure multi-party communication protocols, prompting researchers to devise solutions allowing parties to jointly compute functions without revealing their inputs.

Secure Multi-Party Communication

In a two-party scenario, cryptographic protocols such as secure channels and cryptographic primitives like homomorphic encryption can be employed to facilitate secure information exchange between two entities. When more than two parties are involved, the challenges in secure communication become more intricate. Traditional cryptographic methods may not suffice to protect the privacy of each participant's input. Multi-party computation (MPC) protocols have emerged to address these challenges, allowing parties to jointly compute a function while keeping the individual inputs private.

SMPC protocols guarantee that the final result is the only information exposed, protecting the privacy of individual inputs. The goal is to enable secure computation on shared data without revealing the raw information to any single party, even when participants do not fully trust each other.

Examples

We look at some samples using the ciphercore library. The below setup will be required to run the examples:

Python wrapper library:

pip install ciphercore

Compiler and CLI tools:

cargo install ciphercore-base

Graph visualization tool:

sudo apt install graphviz

Running the examples below

Create a computation graph

python main.py > plain_graph.json

Visualize the computation graph created

ciphercore_visualize_context plain_graph.json | dot -Tsvg -o plain_graph.svg

Compile the computation graph into a secure protocol. Here the input and output parties are to be specified. In this example, inputs are from party 0 and party 1 and the output is shared with party 2

ciphercore_compile plain_graph.json simple 0,1 2 > mpc_graph.json

Visualize the computation graph of the secure protocol

ciphercore_visualize_context mpc_graph.json | dot -Tsvg -o mpc_graph.svg

Stats of the graph

ciphercore_inspect mpc_graph.json

Execute the compiled graph with the input data file

ciphercore_evaluate mpc_graph.json inputs.json

Example 1: Two millionaires

import ciphercore as cc

st = cc.UINT32 # single unsigned 32-bit integer to represent the wealth of each millionaire

context = cc.create_context()
with context:
    g = context.create_graph()
    with g:
        first_millionaire = g.input(cc.scalar_type(st))
        second_millionaire = g.input(cc.scalar_type(st))

        # convert integer value to binary array in order to perform comparison
        output = first_millionaire.a2b() > second_millionaire.a2b()

        output.set_as_output()
    g.set_as_main()
print(context)

Computation graph

computation graph

Example 2: Matrix Multiplication

import ciphercore as cc

n = 2 # Number of rows of the first matrix
m = 3 # Number of columns of the first matrix (and number of rows of the second matrix)
k = 4 # Number of columns of the second matrix

st = cc.INT32 # Scalar type of matrix elements

context = cc.create_context()
with context:
    g = context.create_graph()
    with g:
        first_matrix_type = cc.array_type([n, m], st)
        second_matrix_type = cc.array_type([m, k], st)

        first_matrix_input = g.input(first_matrix_type)
        second_matrix_input = g.input(second_matrix_type)

        output = first_matrix_input @ second_matrix_input

        output.set_as_output()
    g.set_as_main()
print(context)

Computation graph

computation graph

Secure computation graph

secure computation graph

SMPC in Big Data

As the volume of data generated and processed with Big Data workflows continues to grow, the importance of SMPC is even more pronounced. Multiple parties often need to jointly analyze large datasets without disclosing sensitive information. This interesting paper provides insights into how SMPC can be a joint computation without disclosing their private inputs.

Vehicle Market Concentration Job

There are several applications for SMPC in the Big Data paradigm like Credit Card regulation, Market concentration, Advertising measurement, Bank stress tests and more

Summary

Secure Multi-Party Communication stands as a cornerstone in the realm of modern cryptography, providing a robust framework for parties to collaborate on computation tasks without compromising data privacy. As technology continues to advance, the development and application of secure communication protocols like SMPC are crucial for safeguarding sensitive information in an interconnected world. The intersection of SMPC and Big Data holds promise for addressing the challenges of privacy-preserving collaborative analytics, opening new avenues for secure and efficient information exchange among multiple parties.

Did you find this article valuable?

Support Mayur's Journal by becoming a sponsor. Any amount is appreciated!