This project implements Multi-Party Computation (MPC) with a frontend interface and backend calculations to securely gather and analyze sensitive information about UNC students without revealing individual data. The system calculates various statistics about the student body, including the average year at university, financial aid, family income, GPA, and other relevant factors. Beyond simple averages, our implementation also computes the correlation and standard deviation of selected variables. To ensure the confidentiality and integrity of the data, shares of the sensitive information are persisted in separate databases. This architecture guarantees that no individual party can access or deduce information about any single student, thereby preserving privacy and security.
Below is an overview of the API endpoints implemented in this application. API URL: https://us-east1-outstanding-map-421217.cloudfunctions.net
Takes various data points and divides them into shares among parties.
POST /insert_data
JSON object must follow the below format. Valid values for each field must be a number or decimal value.
{
"gpa": 3.5,
"age": 18,
"financial_aid": 5000
}
A successful response will return the number of data points entered and the number of parties.
{
"data_points": 3,
"parties": 3
}
Calculates the mean of a specified statistic using MPC calculations.
POST /calculate_mean
JSON object must follow the below format. Valid values for the "statistic" field are "gpa"
, "age"
, and "financial_aid"
.
{
"statistic": "gpa"
}
A successful response will make the MPC calculations and return the mean for the specified statistic.
{
"mean": 3.5
}
Calculates the standard deviation of a specified statistic using MPC calculations.
POST /calculate_standard_deviation
JSON object must follow the below format. Valid values for the "statistic" field are "gpa"
, "age"
, and "financial_aid"
.
{
"statistic": "gpa"
}
A successful response will make the MPC calculations and return the standard deviation for the specified statistic.
{
"sd": 1.0
}
Calculates the correlation coefficient between two statistics using MPC calculations.
POST /calculate_correlation
JSON object must follow the below format. Valid values for the "statistic1" and "statistic2" fields are "gpa"
, "age"
, and "financial_aid"
.
{
"statistic1": "gpa",
"statistic2": "age",
}
A successful response will make the MPC calculations and return the correlation for the specified statistic.
{
"data": 1.0
}