PALISADE consists of a number of library objects that can be linked into lattice cryptography applications.
The source files in the demo directories, particularly those in src/examples/pke, illustrate the use of the library.
To use PALISADE, you must
- select a lattice element to be used for your application. We support:
Poly
NativePoly
DCRTPoly
- select a scheme to use
- BFV
- BFVrns
- BFVrnsB
- BGV
- BGVrns
- CKKS
- Null (a test scheme which does not actually encrypt/decrypt anything)
- Stehle-Steinfeld
- create a CryptoContext for the scheme and lattice element type. This requires that you:
- run a parameter generation function or, alternatively,
- decide on lattice parameters (cyclotomic order, ciphertext modulus)
- decide on encoding parameters (plaintext modulus)
- decide on scheme-specific parameters
- enable the algorithms that you want to use, e.g.,
- Enable(ENCRYPTION) - allows for key generation and encrypt/decrypt
- Enable(PRE) - allows for the use of proxy re-encryption
- Enable(SHE) - enables SHE operations such as EvalAdd and EvalMult
- Enable(MULTIPARTY) - enables threshold FHE operations
In order to make this easier for the user, there are several CryptoContextFactory methods for the various schemes.
Streamlining and improving the process of parameter selection and CryptoContext generation is an area that is being actively worked.
Anything done in PALISADE is done through the CryptoContext. All operations are CryptoContext methods. The code only allows operations between objects that were created in the same context, and will generate an error if it finds that this is not the case.
Objects created by a CryptoContext usually have a Serialize method that converts the object into a cereal object that can be saved to a string or to a disk file.