Logistic regression over encrypted data using Fully Homomorphic Encryption (FHE) to detect credit card fraud privately. Development of an Android app to send encrypted data to the cloud and perform FHE operations, and retrieve the results.
Increasingly, companies around the world are collecting and selling customer data for financial gain. Users are willingly giving their unencrypted data to companies in exchange for a service at the expense of their privacy. This thesis explores Fully Homomorphic Encryption with approximate arithmetic, a new form of encryption that allows approximate mathematical computation on encrypted data. It provides a mechanism to homomorphically encrypt data operands on mobile devices and then send them to a third-party for evaluation. We propose a Secure Machine Learning model that performs inference on encrypted operands and returns an encrypted prediction to the user. We propose an approximate activation function and three homomorphic algorithms which, when combined, homomorphically classify a data sample. We show that Secure Machine Learning is practical. Our model performs to 97% accuracy and our homomorphic inference results in only 6% loss. Predictions operate, on average, for 7.7 seconds with average precision on the order of 10E−4. We show that companies can perform data analytics on user data for financial gain without compromising their privacy.
This repository contains code for running logistic regression over encrypted data using Microsoft SEAL. A sister repository contains a project for training and evaluating the credit card fraud task in plaintext which can be used to output weights and used for FHE inference in this repository. The following two repositories contain lambda functions for AWS that perform the FHE operations discussed in the thesis (SEAL lambda function, location data lambda function). The pdf file contains my BASc thesis, written in 2020, to satisfy the requirements for completion of a Bachelor of Applied Science in Engineering Science degree at the University of Toronto. For any data or files that are linked within the code and not present, please reach out to the author ([email protected]).
Vele Tosevski, M.A.Sc.
Faculty of Applied Science & Engineering, University of Toronto