Updated on 2023-01-16 GMT+08:00

Overview

Huawei Cloud BCS provides a homomorphic encryption library to facilitate development. In addition to the encryption function offered by common encryption algorithms, homomorphic encryption also allows computation and conversion of cipher texts, which is important for security. Homomorphic encryption enables users without keys to perform computing on ciphertexts. In this way, the communication cost can be reduced, computing tasks can be transferred, and the calculation costs can be balanced among the involved parties. By using the homomorphic encryption technology, a decryption party obtains only the decryption result, but cannot obtain each message ciphertext. This improves information security.

BCS provides homomorphic encryption libraries for clients and chaincodes. These libraries are mainly used for transaction ciphertext computing to ensure user privacy and security.

  • Library for clients: It provides the additive homomorphic encryption function and generates proofs of transaction amounts at clients.
  • Homomorphic encryption chaincode IDChaincode.go: In a homomorphic encryption scenario, you need to download, install, and instantiate chaincodes for BCS instances before instance deployment.
  • Library for chaincodes: It provides the zero knowledge proof function to verify the transaction proof of a user in a ciphertext case and generate post-transaction data. In this way, an endorser does not need to decrypt the transaction data of the user to determine the balance range.

Downloading Resources

Table 1 Library list

Matching Hyperledger Fabric Version

Library Version

Link

Fabric v1.1.0, v1.4.0, and v2.2

1.8.5

Homomorphic encryption library

1.9.2

Homomorphic encryption library

1.11.5

Homomorphic encryption library

NOTICE:
  • Select a package of the same version as the local compilation environment. For example, if the local Golang compiler is of version 1.8.5, download the library of version 1.8.5.
  • The OSCCA-published cryptographic algorithm SDK must be installed before using a homomorphic encryption library.
  • The api_ahe_cc.tar.gz package is used only for local compilation.