Skip to content

donkyduck/CipherFlow

Repository files navigation

CipherFlow

Node-red flow creator for Fully Homomorphic Encryption (FHE)

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. References

About The Project

CipherFlow is a tool to create a visual data flow based on the Node-RED platform that allows the user to play with the data encryption and decryption based on the Fully Homomorphic Encryption (FHE) with the CKKS scheme. The CipherFlow is aimed to simplify the way the IoT developers to develop their privacy preserving IoT solutions without hard-code program. The IoT developers just drag and drop the FHE nodes on the Node-RED workspace and wire the relevant nodes to complete the flow.

Getting Started

The CipherFlow is a Node-RED toolkit that builds FHE cipher nodes on Node-RED platform.

  • Prerequisites

  • Installation
    There are 2 options:

    cd ~/.node-red
    npm install node-red-cipherflow
    
    • Install in docker (cipherflow version 0.2)
    docker run -it -u root --name cipherflow-0.2.0 -p 2000:1880 nataset/node-red-cipherflow:0.2.0_arm64
    

Usage

CipherFlow Node Extension

The CipherFlow provides 3 types of node extension: 1) HE operation (yellow nodes), 2) Arithmetic operation (blue nodes), and 3) Object/base64 converters (green).

CipherFlow Workspaces

CipherFlow has 3 types of workspace that allow each user create his/her data flows with respect to the functionalities:

  1. Playground: The Node-RED workspace allows the IoT developers to construct their Node-RED CipherFlow and verify the correctness of the results from the computation over the encryption. Therefore, in this workspace, CipherFlow offers an "input" node to perform an initial input data and to encrypt this data with the chosen CKKS configuration.
    • Chain-Index is an indicator to hint at an IoT developer the maximum number of multiplications the flow can perform.

  1. Edge: The Node-RED workspace allows the IoT developers to construct the encryption flow.

  1. Cloud: The Node-RED workspace allows the IoT developer to construct the computation flow based on the HE operations.
  • Instead of using an input node, in the cloud, the setContext is used to set the HE environment same as that of the edge.

CipherFlow Node Configuration

There are a few things the developers need to learn how to configure the HE nodes of Cipherflow node extension.

  • Input node
    • First we have to configure the context parameters as shown in the figure. We provide 3 default options: Large [default], Medium [default], and Small [default]. SetContext
    • We can use the default setting or create a new one. SetContext
    • Then, we generate a new key pair associated with the new context. SetContext

Reference

  • FHE library based on node-SEAL
    • FHE Evaluator supports the following operations:
      • Multiply : two ciphertexts, equation
      • Add : additive two ciphertexts, equation
      • Sub : divide two ciphertexts, equation
      • Square : square root of ciphertext, equation
      • MultiplyPlain : Multiply a ciphertext with a plaintext, equation
      • AddPlain : Add a plaintext to a ciphertext, equation
      • SubPlain : Sub a plaintext to sub, equation
      • SumElements : Sum all elements in the ciphertexts, equation, where equation
    • CipherFlow extension for FHE Evaluator
      • Reciprocal : find the multiplicative inverse (1/x) of ciphertext based on the modified Goldshmidt iterative methods.
  • FHE schemes :
    • CKKS
      • Allow us to compute over real numbers with approximation
      • Compress a vector of values into a message by an encoding technique.

About

Node-red for Fully Homomorphic Encryption

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors