1 / 13

PALISADE Library: Homomorphic Cryptography Framework for Programmers

PALISADE library offers a user-friendly framework for experimenting with homomorphic cryptography without requiring deep expertise in the field. It supports multiple encodings, schemes, and implementation options, making it accessible for programmers of all levels. The architecture provides flexibility in choosing implementations at different layers, allowing easy integration of new implementations and hardware accelerators.

dopido
Download Presentation

PALISADE Library: Homomorphic Cryptography Framework for Programmers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Implementation Notes PALISADE Library Homomorphic Cryptography For Programmers, By Programmers NJIT Cybersecurity Research Center Jerry Ryan gwryan@njit.edu

  2. Principles • Do not require deep expertise in homomorphic cryptography to use the library • Provide a framework for experimenting with all levels of implementation • Be straightforward for programmers to use

  3. PALISADE Architecture Multiple Encodings Multiple schemes Several options

  4. Each Layer Provides… • A mechanism to choose a particular implementation for a given layer, and a guideline for providers of new implementations – Example: Victor Shoup’s NTL library was integrated into PALISADE with a thin wrapper layer – Able to – and interested in – integrating hardware accelerators • Interface specification (class definitions) • Prototypes for operations to be implemented • C++ operator overloads – Example: Eval Mult is implemented as an overload of operator* for pairs of Ciphertexts, or for a Ciphertext and a Plaintext

  5. CryptoContext • Container for all crypto operations – Factory methods by scheme, with parameters set at construction time – All operations (encryption, decryption, homomorphic operators) are CryptoContext methods – Parameter checking and type safety provided – Provides factory methods for all crypto objects (Plaintext of various types, Ciphertext, RationalCiphertext, and matrices) – Simple initialization and straightforward serialize/deserialize operations

  6. Crypto Schemes • A variety of schemes are supported – LTV – StSt – BGV – (B)FV, BFVrns – Null (test scheme) • Individual features (Encryption, FHE, SHE, etc) are enabled/disabled at run time

  7. Creating a CryptoContext • CryptoContextFactory methods exist for each crypto scheme – Create the context from passed parameters – Generate parameters for the context based on constraints (desired security level, depth of operations) – Create a new context from a previously serialized context or other crypto object

  8. Creating a New Scheme? • Create new subclass definitions for your scheme • Build implementations for supported methods • Provide new CryptoContextFactory method(s)

  9. What’s a Null Scheme? • Useful testing platform – All keys are elements full of zeroes – Encrypt/Re-Encrypt/Decrypt are simply copies – EvalAdd is mod p element-wise add – EvalMult is mod p convolution

  10. Element • Library classes are currently templated based on type of the underlying data elements – Poly – NativePoly – DCRTPoly

  11. Basic Operations • Key Generation • Re-Encryption Key Generation • Encrypt • Decrypt • ReEncrypt • EvalAdd • EvalMult • …

  12. Example Usage CryptoContext<Poly> cc = CryptoContextFactory<Poly>::genCryptoContextFV(…); cc->Enable(ENCRYPTION); // Perform the key generation operation. LPKeyPair<Poly> kp = cc->KeyGen(); // Encryption Plaintext ptxt = cc->MakeIntegerPlaintext(42); Ciphertext ctxt = cc->Encrypt(kp.publicKey, ptxt); //Decryption Plaintext ptxtNew; DecryptResult result = cc->Decrypt(kp.secretKey, ctxt, &ptxtNew);

  13. Example Usage cc->Enable(ENCRYPTION); cc->Enable(SHE); LPKeyPair<Poly> kp = cc->KeyGen(); cc->EvalMultKeyGen(kp.secretKey); Plaintext p1 = cc->MakeCoefPackedPlaintext({12,32,17,4}); Plaintext p2 = cc->MakeCoefPackedPlaintext({12,5,12,18}); auto c1 = cc->Encrypt(kp.publicKey, p1); auto c2 = cc->Encrypt(kp.publicKey, p2); auto ans = c1 * (c1 + c2); //Decrypt and print the answer Plaintext ptxtNew; cc->Decrypt(kp.secretKey, ans, &ptxtNew); cout << ptxtNew << endl;

More Related