Jiang Xiaoqian, Kim Miran, Lauter Kristin, Song Yongsoo
University of Texas, Health Science Center.
Microsoft Research.
Conf Comput Commun Secur. 2018 Oct;2018:1209-1222. doi: 10.1145/3243734.3243837.
Homomorphic Encryption (HE) is a powerful cryptographic primitive to address privacy and security issues in outsourcing computation on sensitive data to an untrusted computation environment. Comparing to secure Multi-Party Computation (MPC), HE has advantages in supporting non-interactive operations and saving on communication costs. However, it has not come up with an optimal solution for modern learning frameworks, partially due to a lack of efficient matrix computation mechanisms. In this work, we present a practical solution to encrypt a matrix homomorphically and perform arithmetic operations on encrypted matrices. Our solution includes a novel matrix encoding method and an efficient evaluation strategy for basic matrix operations such as addition, multiplication, and transposition. We also explain how to encrypt more than one matrix in a single ciphertext, yielding better amortized performance. Our solution is generic in the sense that it can be applied to most of the existing HE schemes. It also achieves reasonable performance for practical use; for example, our implementation takes 9.21 seconds to multiply two encrypted square matrices of order 64 and 2.56 seconds to transpose a square matrix of order 64. Our secure matrix computation mechanism has a wide applicability to our new framework E2DM, which stands for encrypted data and encrypted model. To the best of our knowledge, this is the first work that supports secure evaluation of the prediction phase based on both encrypted data and encrypted model, whereas previous work only supported applying a plain model to encrypted data. As a benchmark, we report an experimental result to classify handwritten images using convolutional neural networks (CNN). Our implementation on the MNIST dataset takes 28.59 seconds to compute ten likelihoods of 64 input images simultaneously, yielding an amortized rate of 0.45 seconds per image.
同态加密(HE)是一种强大的密码原语,用于解决在将敏感数据的外包计算转移到不可信计算环境时出现的隐私和安全问题。与安全多方计算(MPC)相比,HE在支持非交互式操作和节省通信成本方面具有优势。然而,它尚未为现代学习框架提出最优解决方案,部分原因是缺乏高效的矩阵计算机制。在这项工作中,我们提出了一种实用的解决方案,用于对矩阵进行同态加密并对加密矩阵执行算术运算。我们的解决方案包括一种新颖的矩阵编码方法和一种针对加法、乘法和转置等基本矩阵运算的高效评估策略。我们还解释了如何在单个密文中加密多个矩阵,从而产生更好的摊销性能。我们的解决方案具有通用性,因为它可以应用于大多数现有的HE方案。它在实际应用中也实现了合理的性能;例如,我们的实现对两个64阶加密方阵进行乘法运算需要9.21秒,对一个64阶方阵进行转置需要2.56秒。我们的安全矩阵计算机制在我们的新框架E2DM(代表加密数据和加密模型)中具有广泛的适用性。据我们所知,这是第一项支持基于加密数据和加密模型对预测阶段进行安全评估的工作,而以前的工作仅支持将普通模型应用于加密数据。作为基准,我们报告了使用卷积神经网络(CNN)对手写图像进行分类的实验结果。我们在MNIST数据集上的实现同时计算64个输入图像的十个似然值需要28.59秒,平均每个图像的计算时间为0.45秒。