Cryptology ePrint Archive: Report 2021/1505

EVA Improved: Compiler and Extension Library for CKKS

Sangeeta Chowdhary and Wei Dai and Kim Laine and Olli Saarikivi

Abstract: Homomorphic encryption (HE), especially the CKKS scheme, can be extremely challenging to use. The EVA language and compiler (Dathathri et al., PLDI 2020) was an attempt at addressing this challenge. EVA allows a developer to express their encrypted computation in a simple form with a Python-integrated language called PyEVA. It then compiles the program into an executable form by inserting operations such as relinearization and rescaling, applying optimizations, and choosing encryption parameters with the objective of minimizing execution time. Compiled programs can be executed with a parallelizing back-end against a library of HE primitives.

Our work improves upon the EVA toolchain in several ways: changes to the Python front-end make writing PyEVA programs more natural, while a rework of EVA's C++ APIs makes writing new passes easier. We also implement two new optimizations, common subexpression elimination and reduction balancing, which we show allow users to write simpler and more modular PyEVA programs.

We argue that the abstraction EVA provides is insufficient to resolve some common usability challenges. For example, managing vectors of arbitrary size is non-trivial. To resolve these problems, we demonstrate how building a library of commonly used data structures and functions is simple in PyEVA. EVA's automation allows writing very concise code, which gets fused and optimized together with the user program. We create the beginnings of an EVA Extension Library (EXL), that provides vector and matrix classes and a collection of common statistical functions, to demonstrate the power of this approach.

Category / Keywords: public-key cryptography / compilers; fully homomorphic encryption

Original Publication (in the same form): WAHC'21
DOI:
10.1145/3474366.3486929

Date: received 14 Nov 2021

Contact author: kim laine at gmail com

Available format(s): PDF | BibTeX Citation

Version: 20211115:125857 (All versions of this report)

Short URL: ia.cr/2021/1505


[ Cryptology ePrint archive ]