Node-red flow creator for Fully Homomorphic Encryption (FHE)
Table of Contents
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.
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
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 has 3 types of workspace that allow each user create his/her data flows with respect to the functionalities:
- 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.
- Edge: The Node-RED workspace allows the IoT developers to construct the encryption flow.
- 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.

There are a few things the developers need to learn how to configure the HE nodes of Cipherflow node extension.
- Input node
- Introduction to Node-RED CipherFlow How to install Node-RED in Docker and Node-RED CipherFlow from the pallet
- FHE library based on node-SEAL
- FHE Evaluator supports the following operations:
- Multiply : two ciphertexts,
- Add : additive two ciphertexts,
- Sub : divide two ciphertexts,
- Square : square root of ciphertext,
- MultiplyPlain : Multiply a ciphertext with a plaintext,
- AddPlain : Add a plaintext to a ciphertext,
- SubPlain : Sub a plaintext to sub,
- SumElements : Sum all elements in the ciphertexts,
, where
- Multiply : two ciphertexts,
- CipherFlow extension for FHE Evaluator
- Reciprocal : find the multiplicative inverse (1/x) of ciphertext based on the modified Goldshmidt iterative methods.
- FHE Evaluator supports the following operations:
- FHE schemes :
- CKKS
- Allow us to compute over real numbers with approximation
- Compress a vector of values into a message by an encoding technique.
- CKKS





