International Association for Cryptologic Research

International Association
for Cryptologic Research

CryptoDB

Plaintext-Ciphertext Matrix Multiplication and FHE Bootstrapping: Fast and Fused

Authors:
Youngjin Bae , CryptoLab Inc.
Jung Hee Cheon , Seoul National University / CryptoLab Inc.
Guillaume Hanrot , CryptoLab Inc.
Jai Hyun Park , Seoul National University
Damien Stehlé , CryptoLab Inc.
Download:
DOI: 10.1007/978-3-031-68382-4_12 (login may be required)
Search ePrint
Search Google
Presentation: Slides
Conference: CRYPTO 2024
Abstract: Homomorphically multiplying a plaintext matrix with a ciphertext matrix (PC-MM) is a central task for the private evaluation of transformers, commonly used for large language models. We provide several RLWE-based algorithms for PC-MM that consist of multiplications of plaintext matrices (PC-MM) and comparatively cheap pre-processing and post-processing steps: for small and large dimensions compared to the RLWE ring degree, and with and without precomputation. For the algorithms with precomputation, we show how to perform a \pcmm with a single floating-point PC-MM of the same dimensions. This is particularly meaningful for practical purposes as a floating-point PC-MM can be implemented using high-performance BLAS libraries. The algorithms rely on the multi-secret variant of RLWE, which allows to represent multiple ciphertexts more compactly. We give algorithms to convert from usual shared-secret RLWE ciphertexts to multi-secret ciphertexts and back. Further, we show that this format is compatible with homomorphic addition, plaintext-ciphertext multiplication, and key-switching. This in turn allows us to accelerate the slots-to-coeffs and coeffs-to-slots steps of CKKS bootstrapping when several ciphertexts are bootstrapped at once. Combining batch-bootstrapping with efficient PC-MM results in MaMBo (Matrix Multiplication Bootstrapping), a bootstrapping algorithm that can perform a PC-MM for a limited overhead.
BibTeX
@inproceedings{crypto-2024-34236,
  title={Plaintext-Ciphertext Matrix Multiplication and FHE Bootstrapping: Fast and Fused},
  publisher={Springer-Verlag},
  doi={10.1007/978-3-031-68382-4_12},
  author={Youngjin Bae and Jung Hee Cheon and Guillaume Hanrot and Jai Hyun Park and Damien Stehlé},
  year=2024
}