Skip to content

adamdoyle630/comp590-mpc-final

Repository files navigation

MPC Data Gathering

Project Description

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.

Project Update Document

Project Update

API Overview

Below is an overview of the API endpoints implemented in this application. API URL: https://us-east1-outstanding-map-421217.cloudfunctions.net

Insert Data

Takes various data points and divides them into shares among parties.

Endpoint

POST /insert_data

Request Body

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
}

Response

A successful response will return the number of data points entered and the number of parties.

{
	"data_points": 3,
	"parties": 3
}

Calculate Mean

Calculates the mean of a specified statistic using MPC calculations.

Endpoint

POST /calculate_mean

Request Body

JSON object must follow the below format. Valid values for the "statistic" field are "gpa", "age", and "financial_aid".

{
    "statistic": "gpa"
}

Response

A successful response will make the MPC calculations and return the mean for the specified statistic.

{
    "mean": 3.5
}

Calculate Standard Deviation

Calculates the standard deviation of a specified statistic using MPC calculations.

Endpoint

POST /calculate_standard_deviation

Request Body

JSON object must follow the below format. Valid values for the "statistic" field are "gpa", "age", and "financial_aid".

{
    "statistic": "gpa"
}

Response

A successful response will make the MPC calculations and return the standard deviation for the specified statistic.

{
    "sd": 1.0
}

Calculate Correlation

Calculates the correlation coefficient between two statistics using MPC calculations.

Endpoint

POST /calculate_correlation

Request Body

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",
}

Response

A successful response will make the MPC calculations and return the correlation for the specified statistic.

{
    "data": 1.0
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •