C 522: IBM Homomorphic Encryption (25 pts extra)

What you need:

Purpose

To run a very basic example of homomorphic encryption: a system that performs mathematical operations on encrypted data without ever decrypting it.

Install XCode

On your Mac, in Safari, go to

https://apps.apple.com/us/app/xcode/id497799835?mt=12

It will open in the App store. Install the software.

Installing XCode Command Line Tools

Open a Terminal. Execute this command:
xcode-select --install
Install the software.

Install CMAKE

In a Terminal, execute this command:
cmake -version
If you see a version number of 3.17.1 or higher, you have a recent enough cmake installed.

Otherwise, download and install this package:

https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Darwin-x86_64.dmg

Installing the Toolkit in XCode

Launch XCode. If you are not presented with the Welcome to XCode page, within the XCode IDE, click Window, "Welcome To Xcode".

From the Welcome to Xcode page, click "Clone an existing Project".

Enter this URL:

https://github.com/IBM/fhe-toolkit-macos.git
You will next be asked which branch you would like to clone. Select the "master" branch.

Click the Clone button.

Accept the default location to clone to, which is the Documents folder. Click the Clone button.

Installing Dependencies

Open a Terminal and execute these commands:
cd
cd Documents
cd fhe-toolkit-macos
cd dependencies
./setup.sh
Many pages of messages scroll by as software downloads and installs. It will take some time--more than ten minutes when I did it.

in XCode, at the top left, click fhe-toolkit-macos. You should see the date shown below.

Privacy Preserving Search

Follow the steps on this page to build the project:

https://github.com/IBM/fhe-toolkit-macos/blob/master/Privacy%20Preserving%20Search/README.md

The app opens, as shown below.

You can click on a country, and it searches the database to find its capital. It is REALLY SLOW. As you can see, it took 257 seconds when I did it.

C 522.1: Privacy Preserving Search (15 pts)

In the left pane, click Wales. You don't need to wait for the search to finish.

The flag is covered by a green rectangle in the image below.

Credit Card Fraud Demo

Follow the steps on this page to build the project:

https://github.com/IBM/fhe-toolkit-macos/blob/master/Credit%20Card%20Fraud/README.md

The app opens, as shown below.

C 522.2: Credit Card Fraud (10 pts)

In XCode, navagate in the left pane to find the file shown below.

Find the createContexts function.

The flag is covered by a green rectangle in the image below.

References

IBM Fully Homomorphic Encryption Toolkit for MacOS

Posted 9-15-20 by Sam Bowne
Color updated 6-19-24