Efficient-Fully-Homomorphic-Encryption-from-Standard-LWE (2)
tfhe 全同态 白话文

tfhe 全同态白话文
TFHE是Fully Homomorphic Encryption的缩写,全同态加密
的意思是一种特殊的加密方式,它允许在加密状态下进行计算操作,而无需解密数据。
下面我将以白话文的方式解释TFHE全同态加密的
概念。
传统的加密方式,比如对称加密和公钥加密,都需要在解密之
后才能对数据进行计算操作。
这意味着,如果我们想对加密数据进
行计算,就需要先解密数据,然后再进行计算,最后再重新加密。
这样的过程可能会导致数据的安全性受到威胁,因为在解密和计算
的过程中,数据可能会暴露在不安全的环境中。
而全同态加密的概念就是为了解决这个问题而提出的。
全同态
加密允许在加密状态下对数据进行计算操作,而无需解密数据。
这
意味着,在使用全同态加密的情况下,数据可以一直保持加密状态,不会暴露在不安全的环境中。
TFHE是一种实现全同态加密的工具库。
它使用了一种特殊的加
密算法,可以在加密状态下进行各种计算操作,比如加法、乘法、
逻辑运算等。
TFHE的设计目标是高效、安全和可扩展的全同态加密。
全同态加密在实际应用中有很多潜在的用途。
比如,在云计算中,用户可以将数据加密后上传到云端,而云端可以在不解密数据的情况下对其进行计算,从而保护用户数据的隐私性。
另外,全同态加密还可以用于保护机密计算任务的隐私,比如医疗数据分析、金融数据处理等。
总结来说,TFHE是一种实现全同态加密的工具库,全同态加密是一种特殊的加密方式,可以在加密状态下进行计算操作,而无需解密数据。
全同态加密在保护数据隐私和实现安全计算方面具有重要的应用前景。
深度优先局部聚合哈希

Vol.48,No.6Jun. 202 1第48卷第6期2 0 2 1年6月湖南大学学报)自然科学版)Journal of Hunan University (Natural Sciences )文章编号:1674-2974(2021 )06-0058-09 DOI : 10.16339/ki.hdxbzkb.2021.06.009深度优先局艺B 聚合哈希龙显忠g,程成李云12(1.南京邮电大学计算机学院,江苏南京210023;2.江苏省大数据安全与智能处理重点实验室,江苏南京210023)摘 要:已有的深度监督哈希方法不能有效地利用提取到的卷积特征,同时,也忽视了数据对之间相似性信息分布对于哈希网络的作用,最终导致学到的哈希编码之间的区分性不足.为了解决该问题,提出了一种新颖的深度监督哈希方法,称之为深度优先局部聚合哈希(DeepPriority Local Aggregated Hashing , DPLAH ). DPLAH 将局部聚合描述子向量嵌入到哈希网络 中,提高网络对同类数据的表达能力,并且通过在数据对之间施加不同权重,从而减少相似性 信息分布倾斜对哈希网络的影响.利用Pytorch 深度框架进行DPLAH 实验,使用NetVLAD 层 对Resnet18网络模型输出的卷积特征进行聚合,将聚合得到的特征进行哈希编码学习.在CI-FAR-10和NUS-WIDE 数据集上的图像检索实验表明,与使用手工特征和卷积神经网络特征的非深度哈希学习算法的最好结果相比,DPLAH 的平均准确率均值要高出11%,同时,DPLAH 的平均准确率均值比非对称深度监督哈希方法高出2%.关键词:深度哈希学习;卷积神经网络;图像检索;局部聚合描述子向量中图分类号:TP391.4文献标志码:ADeep Priority Local Aggregated HashingLONG Xianzhong 1,覮,CHENG Cheng1,2,LI Yun 1,2(1. School of Computer Science & Technology ,Nanjing University of Posts and Telecommunications ,Nanjing 210023, China ;2. Key Laboratory of Jiangsu Big Data Security and Intelligent Processing ,Nanjing 210023, China )Abstract : The existing deep supervised hashing methods cannot effectively utilize the extracted convolution fea tures, but also ignore the role of the similarity information distribution between data pairs on the hash network, result ing in insufficient discrimination between the learned hash codes. In order to solve this problem, a novel deep super vised hashing method called deep priority locally aggregated hashing (DPLAH) is proposed in this paper, which em beds the vector of locally aggregated descriptors (VLAD) into the hash network, so as to improve the ability of the hashnetwork to express the similar data, and reduce the impact of similarity distribution skew on the hash network by im posing different weights on the data pairs. DPLAH experiment is carried out by using the Pytorch deep framework. Theconvolution features of the Resnet18 network model output are aggregated by using the NetVLAD layer, and the hashcoding is learned by using the aggregated features. The image retrieval experiments on the CIFAR-10 and NUS - WIDE datasets show that the mean average precision (MAP) of DPLAH is11 percentage points higher than that of* 收稿日期:2020-04-26基金项目:国家自然科学基金资助项目(61906098,61772284),National Natural Science Foundation of China(61906098, 61772284);国家重 点研发计划项目(2018YFB 1003702) , National Key Research and Development Program of China (2018YFB1003702)作者简介:龙显忠(1985—),男,河南信阳人,南京邮电大学讲师,工学博士,硕士生导师覮 通信联系人,E-mail : *************.cn第6期龙显忠等:深度优先局部聚合哈希59non-deep hash learning algorithms using manual features and convolution neural network features,and the MAP of DPLAH is2percentage points higher than that of asymmetric deep supervised hashing method.Key words:deep Hash learning;convolutional neural network;image retrieval;vector of locally aggregated de-scriptors(VLAD)随着信息检索技术的不断发展和完善,如今人们可以利用互联网轻易获取感兴趣的数据内容,然而,信息技术的发展同时导致了数据规模的迅猛增长.面对海量的数据以及超大规模的数据集,利用最近邻搜索[1(Nearest Neighbor Search,NN)的检索技术已经无法获得理想的检索效果与可接受的检索时间.因此,近年来,近似最近邻搜索[2(Approximate Nearest Neighbor Search,ANN)变得越来越流行,它通过搜索可能相似的几个数据而不再局限于返回最相似的数据,在牺牲可接受范围的精度下提高了检索效率.作为一种广泛使用的ANN搜索技术,哈希方法(Hashing)[3]将数据转换为紧凑的二进制编码(哈希编码)表示,同时保证相似的数据对生成相似的二进制编码.利用哈希编码来表示原始数据,显著减少了数据的存储和查询开销,从而可以应对大规模数据中的检索问题.因此,哈希方法吸引了越来越多学者的关注.当前哈希方法主要分为两类:数据独立的哈希方法和数据依赖的哈希方法,这两类哈希方法的区别在于哈希函数是否需要训练数据来定义.局部敏感哈希(Locality Sensitive Hashing,LSH)[4]作为数据独立的哈希代表,它利用独立于训练数据的随机投影作为哈希函数•相反,数据依赖哈希的哈希函数需要通过训练数据学习出来,因此,数据依赖的哈希也被称为哈希学习,数据依赖的哈希通常具有更好的性能.近年来,哈希方法的研究主要侧重于哈希学习方面.根据哈希学习过程中是否使用标签,哈希学习方法可以进一步分为:监督哈希学习和无监督哈希学习.典型的无监督哈希学习包括:谱哈希[5(Spectral Hashing,SH);迭代量化哈希[6](Iterative Quantization, ITQ);离散图哈希[7(Discrete Graph Hashing,DGH);有序嵌入哈希[8](Ordinal Embedding Hashing,OEH)等.无监督哈希学习方法仅使用无标签的数据来学习哈希函数,将输入的数据映射为哈希编码的形式.相反,监督哈希学习方法通过利用监督信息来学习哈希函数,由于利用了带有标签的数据,监督哈希方法往往比无监督哈希方法具有更好的准确性,本文的研究主要针对监督哈希学习方法.传统的监督哈希方法包括:核监督哈希[9](Supervised Hashing with Kernels,KSH);潜在因子哈希[10](Latent Factor Hashing,LFH);快速监督哈希[11](Fast Supervised Hashing,FastH);监督离散哈希[1(Super-vised Discrete Hashing,SDH)等.随着深度学习技术的发展[13],利用神经网络提取的特征已经逐渐替代手工特征,推动了深度监督哈希的进步.具有代表性的深度监督哈希方法包括:卷积神经网络哈希[1(Convolutional Neural Networks Hashing,CNNH);深度语义排序哈希[15](Deep Semantic Ranking Based Hash-ing,DSRH);深度成对监督哈希[16](Deep Pairwise-Supervised Hashing,DPSH);深度监督离散哈希[17](Deep Supervised Discrete Hashing,DSDH);深度优先哈希[18](Deep Priority Hashing,DPH)等.通过将特征学习和哈希编码学习(或哈希函数学习)集成到一个端到端网络中,深度监督哈希方法可以显著优于非深度监督哈希方法.到目前为止,大多数现有的深度哈希方法都采用对称策略来学习查询数据和数据集的哈希编码以及深度哈希函数.相反,非对称深度监督哈希[19](Asymmetric Deep Supervised Hashing,ADSH)以非对称的方式处理查询数据和整个数据库数据,解决了对称方式中训练开销较大的问题,仅仅通过查询数据就可以对神经网络进行训练来学习哈希函数,整个数据库的哈希编码可以通过优化直接得到.本文的模型同样利用了ADSH的非对称训练策略.然而,现有的非对称深度监督哈希方法并没有考虑到数据之间的相似性分布对于哈希网络的影响,可能导致结果是:容易在汉明空间中保持相似关系的数据对,往往会被训练得越来越好;相反,那些难以在汉明空间中保持相似关系的数据对,往往在训练后得到的提升并不显著.同时大部分现有的深度监督哈希方法在哈希网络中没有充分有效利用提60湖南大学学报(自然科学版)2021年取到的卷积特征.本文提出了一种新的深度监督哈希方法,称为深度优先局部聚合哈希(Deep Priority Local Aggregated Hashing,DPLAH).DPLAH的贡献主要有三个方面:1)DPLAH采用非对称的方式处理查询数据和数据库数据,同时DPLAH网络会优先学习查询数据和数据库数据之间困难的数据对,从而减轻相似性分布倾斜对哈希网络的影响.2)DPLAH设计了全新的深度哈希网络,具体来说,DPLAH将局部聚合表示融入到哈希网络中,提高了哈希网络对同类数据的表达能力.同时考虑到数据的局部聚合表示对于分类任务的有效性.3)在两个大型数据集上的实验结果表明,DPLAH在实际应用中性能优越.1相关工作本节分别对哈希学习[3]、NetVLAD[20]和Focal Loss[21]进行介绍.DPLAH分别利用NetVLAD和Focal Loss提高哈希网络对同类数据的表达能力及减轻数据之间相似性分布倾斜对于哈希网络的影响. 1.1哈希学习哈希学习[3]的任务是学习查询数据和数据库数据的哈希编码表示,同时要满足原始数据之间的近邻关系与数据哈希编码之间的近邻关系相一致的条件.具体来说,利用机器学习方法将所有数据映射成{0,1}r形式的二进制编码(r表示哈希编码长度),在原空间中不相似的数据点将被映射成不相似)即汉明距离较大)的两个二进制编码,而原空间中相似的两个数据点将被映射成相似(即汉明距离较小)的两个二进制编码.为了便于计算,大部分哈希方法学习{-1,1}r形式的哈希编码,这是因为{-1,1}r形式的哈希编码对之间的内积等于哈希编码的长度减去汉明距离的两倍,同时{-1,1}r形式的哈希编码可以容易转化为{0,1}r形式的二进制编码.图1是哈希学习的示意图.经过特征提取后的高维向量被用来表示原始图像,哈希函数h将每张图像映射成8bits的哈希编码,使原来相似的数据对(图中老虎1和老虎2)之间的哈希编码汉明距离尽可能小,原来不相似的数据对(图中大象和老虎1)之间的哈希编码汉明距离尽可能大.h(大象)=10001010h(老虎1)=01100001h(老虎2)=01100101相似度尽可能小相似度尽可能大图1哈希学习示意图Fig.1Hashing learning diagram1.2NetVLADNetVLAD的提出是用于解决端到端的场景识别问题[20(场景识别被当作一个实例检索任务),它将传统的局部聚合描述子向量(Vector of Locally Aggregated Descriptors,VLAD[22])结构嵌入到CNN网络中,得到了一个新的VLAD层.可以容易地将NetVLAD 使用在任意CNN结构中,利用反向传播算法进行优化,它能够有效地提高对同类别图像的表达能力,并提高分类的性能.NetVLAD的编码步骤为:利用卷积神经网络提取图像的卷积特征;利用NetVLAD层对卷积特征进行聚合操作.图2为NetVLAD层的示意图.在特征提取阶段,NetVLAD会在最后一个卷积层上裁剪卷积特征,并将其视为密集的描述符提取器,最后一个卷积层的输出是H伊W伊D映射,可以将其视为在H伊W空间位置提取的一组D维特征,该方法在实例检索和纹理识别任务[23別中都表现出了很好的效果.NetVLAD layer(KxD)x lVLADvectorh------->图2NetVLAD层示意图⑷Fig.2NetVLAD layer diagram1201NetVLAD在特征聚合阶段,利用一个新的池化层对裁剪的CNN特征进行聚合,这个新的池化层被称为NetVLAD层.NetVLAD的聚合操作公式如下:NV((,k)二移a(x)(血⑺-C((j))(1)i=1式中:血(j)和C)(j)分别表示第i个特征的第j维和第k个聚类中心的第j维;恣&)表示特征您与第k个视觉单词之间的权.NetVLAD特征聚合的输入为:NetVLAD裁剪得到的N个D维的卷积特征,K个聚第6期龙显忠等:深度优先局部聚合哈希61类中心.VLAD的特征分配方式是硬分配,即每个特征只和对应的最近邻聚类中心相关联,这种分配方式会造成较大的量化误差,并且,这种分配方式嵌入到卷积神经网络中无法进行反向传播更新参数.因此,NetVLAD采用软分配的方式进行特征分配,软分配对应的公式如下:-琢II Xi-C*II 2=—e(2)-琢II X-Ck,II2k,如果琢寅+肄,那么对于最接近的聚类中心,龟&)的值为1,其他为0.aS)可以进一步重写为:w j X i+b ka(x i)=—e-)3)w J'X i+b kk,式中:W k=2琢C k;b k=-琢||C k||2.最终的NetVLAD的聚合表示可以写为:N w;x+b kv(j,k)=移—----(x(j)-Ck(j))(4)i=1w j.X i+b k移ek,1.3Focal Loss对于目标检测方法,一般可以分为两种类型:单阶段目标检测和两阶段目标检测,通常情况下,两阶段的目标检测效果要优于单阶段的目标检测.Lin等人[21]揭示了前景和背景的极度不平衡导致了单阶段目标检测的效果无法令人满意,具体而言,容易被分类的背景虽然对应的损失很低,但由于图像中背景的比重很大,对于损失依旧有很大的贡献,从而导致收敛到不够好的一个结果.Lin等人[21]提出了Focal Loss应对这一问题,图3是对应的示意图.使用交叉爛作为目标检测中的分类损失,对于易分类的样本,它的损失虽然很低,但数据的不平衡导致大量易分类的损失之和压倒了难分类的样本损失,最终难分类的样本不能在神经网络中得到有效的训练.Focal Loss的本质是一种加权思想,权重可根据分类正确的概率p得到,利用酌可以对该权重的强度进行调整.针对非对称深度哈希方法,希望难以在汉明空间中保持相似关系的数据对优先训练,具体来说,对于DPLAH的整体训练损失,通过施加权重的方式,相对提高难以在汉明空间中保持相似关系的数据对之间的训练损失.然而深度哈希学习并不是一个分类任务,因此无法像Focal Loss一样根据分类正确的概率设计权重,哈希学习的目的是学到保相似性的哈希编码,本文最终利用数据对哈希编码的相似度作为权重的设计依据具体的权重形式将在模型部分详细介绍.正确分类的概率图3Focal Loss示意图[21】Fig.3Focal Loss diagram12112深度优先局部聚合哈希2.1基本定义DPLAH模型采用非对称的网络设计.Q={0},=1表示n张查询图像,X={X i}m1表示数据库有m张图像;查询图像和数据库图像的标签分别用Z={Z i},=1和Y ={川1表示;i=[Z i1,…,zj1,i=1,…,n;c表示类另数;如果查询图像0属于类别j,j=1,…,c;那么z”=1,否则=0.利用标签信息,可以构造图像对的相似性矩阵S沂{-1,1}"伊”,s”=1表示查询图像q,和数据库中的图像X j语义相似,S j=-1表示查询图像和数据库中的图像X j语义不相似.深度哈希方法的目标是学习查询图像和数据库中图像的哈希编码,查询图像的哈希编码用U沂{-1,1}"",表示,数据库中图像的哈希编码用B沂{-1,1}m伊r表示,其中r表示哈希编码的长度.对于DPLAH模型,它在特征提取部分采用预训练好的Resnet18网络[25].图4为DPLAH网络的结构示意图,利用NetVLAD层聚合Resnet18网络提取到的卷积特征,哈希编码通过VLAD编码得到,由于VLAD编码在分类任务中被广泛使用,于是本文将NetVLAD层的输出作为分类任务的输入,利用图像的标签信息监督NetVLAD层对卷积特征的利用.事实上,任何一种CNN模型都能实现图像特征提取的功能,所以对于选用哪种网络进行特征学习并不是本文的重点.62湖南大学学报(自然科学版)2021年conv1图4DPLAH结构Fig.4DPLAH structure图像标签soft-max1,0,1,1,0□1,0,0,0,11,1,0,1,0---------*----------VLADVLAD core)c)l・>:i>数据库图像的哈希编码2.2DPLAH模型的目标函数为了学习可以保留查询图像与数据库图像之间相似性的哈希编码,一种常见的方法是利用相似性的监督信息S e{-1,1}n伊"、生成的哈希编码长度r,以及查询图像的哈希编码仏和数据库中图像的哈希编码b三者之间的关系[9],即最小化相似性的监督信息与哈希编码对内积之间的L损失.考虑到相似性分布的倾斜问题,本文通过施加权重来调节查询图像和数据库图像之间的损失,其公式可以表示为:min J=移移(1-w)(u T b j-rs)专,B i=1j=1s.t.U沂{-1,1}n伊r,B沂{-1,1}m伊r,W沂R n伊m(5)受FocalLoss启发,希望深度哈希网络优先训练相似性不容易保留图像对,然而Focal Loss利用图像的分类结果对损失进行调整,因此,需要重新进行设计,由于哈希学习的目的是为了保留图像在汉明空间中的相似性关系,本文利用哈希编码的余弦相似度来设计权重,其表达式为:1+。
全同态加密技术的历史、发展和数学理论

全同态加密技术的历史、发展和数学理论一、前言完全同态加密(Fully Homomorphic Encryption,FHE)技术是近年来迅猛发展的一项重要技术,是对外部数据和算法进行加密,保护数据隐私的一种技术。
它可以在加密的数据上进行全部的计算,而不会暴露其本质,为数据隐私保密提供了新的保障方法。
二、历史发展1. 1978年,G.R.Blakleyne在“计算机世界”杂志发表了“多轮密码”算法,这是完全同态加密技术的先声。
2. 2009年,A.Gentry提出了完全同态加密,设计出了完全同态加密系统,也是完全同态加密发展的重要标志。
3. 2016年,通过对完全同态加密技术的实验证明,完全同态加密技术取得了显著的研究成果,突破原来的局限。
4. 2018年至今,完全同态加密技术的应用及其发展逐渐受到誉和,已成为保护数据隐私的重要手段。
三、数学理论完全同态加密技术是基于困难猜测分离问题(Guessable Separation Problem,GSP)以及困难中间性质(Hard Middle Problem,HMP)的数学研究。
GSP问题指的是给定的钥匙只能用有限试探的方式猜出钥匙的明文内容。
HMP问题则是在一定范围内改变钥匙的内容,以及钥匙本身的数据进行破解,也就是给定的一组数据,需要找出中间的一个数字研究,当改变这个数字的大小即可破解钥匙,这就是HMP问题。
有了上述理论研究,完全同态加密就实现了在全加密的状态下,完成对加密数据的算法运算,而不必暴露原有的数据,从而保证了数据的隐私,使完全同态加密技术得以应用于人们的日常生活中。
四、结论完全同态加密技术在近几年发展迅猛,已成为数据隐私保护的有效手段。
它的基础理论是困难猜测分离问题(GSP)与中间性质问题(HMP),使我们能够对加密的数据进行猜测分离和中间计算,保护数据的隐私,更好的服务人们的日常生活。
encrypted

encryptedEncryptedIntroduction:In today's digital age, the security and confidentiality of personal and sensitive data have become a top priority. One of the most effective methods utilized for safeguarding data is encryption. Encryption refers to the process of converting plain text or data into an unreadable format, known as ciphertext. This method ensures that even if unauthorized individuals gain access to the data, they would not be able to comprehend or utilize it without the appropriate decryption key.Understanding Encryption:Encryption works on the principle of using a complex algorithm to scramble the original data into ciphertext. The algorithm is essentially a mathematical function that performs numerous iterations on the data, making it extremely difficult to reverse-engineer and decipher the original information. The only way to access the informationis by using the corresponding decryption key, which reverses the encryption process and transforms the ciphertext back into its original form.Types of Encryption:There are various types of encryption techniques employed today, including symmetric key encryption, asymmetric key encryption, and hashing algorithms.1. Symmetric Key Encryption:Symmetric key encryption, also known as secret key encryption, utilizes the same secret key for both encryption and decryption processes. The key is shared between the sender and receiver, ensuring that both parties can access and understand the encrypted data. However, the challenge lies in securely exchanging the key without intercepting it by unauthorized individuals.2. Asymmetric Key Encryption:Asymmetric key encryption, also referred to as public-key encryption, involves the use of two different keys – public key and private key. The public key is freely available to anyone, while the private key remains confidential and is only knownto the recipient. The sender encrypts the message using the recipient's public key, and the recipient decrypts it using their private key. Asymmetric key encryption eliminates the need for securely exchanging keys, as the private key remains securely with the recipient.3. Hashing Algorithms:Hashing algorithms are a type of encryption that produces a fixed-size string of characters, known as a hash value, from any input data. This hash value is unique to the specific input data. Hashing algorithms are commonly used for data integrity verification and password storage. However, unlike symmetric and asymmetric key encryption, hashing algorithms are one-way, meaning they cannot be reversed to obtain the original data.Applications of Encryption:Encryption is extensively used in various domains to protect confidential data and ensure privacy. Some of the notable applications include:1. Secure Communication:Encryption is employed in securing emails, instant messages, and internet browsing. It ensures that the content transmitted between parties remains confidential and could only be accessed by the intended recipient.2. Data Storage and Cloud Security:Encryption is crucial for safeguarding sensitive data stored on local devices or in cloud storage services. It prevents unauthorized access to personal files, financial information, and other confidential records.3. E-commerce and Online Transactions:Encryption plays a pivotal role in online transactions, such as banking, e-commerce, and online payment systems. It ensures that sensitive financial data, including credit card details and passwords, are protected during transmission.4. Password Protection:Encryption is utilized to store user passwords securely. Password hashing algorithms ensure that even if the password database is compromised, it is nearly impossible for attackers to decipher the original passwords.Challenges of Encryption:While encryption techniques are highly effective, they are not without challenges. Some of the common challenges associated with encryption include:1. Key Management:Encryption requires secure key management techniques to ensure the confidentiality of the keys. Safely storing and sharing keys can be complex and demanding, especially in situations involving large-scale encryption.2. Performance Impact:Encryption introduces a performance overhead due to the computational resources required to perform the encryption and decryption processes. This can be a concern in situations where real-time data processing is required.3. Quantum Computing Threat:The advent of quantum computers poses a potential threat to current encryption methods. Quantum computers have the capability to break some of the existing encryption algorithms, necessitating the development of quantum-resistant encryption techniques.Conclusion:Encryption is a vital component of modern data security, providing a robust defense against unauthorized access and data breaches. By implementing encryption techniques such as symmetric key encryption, asymmetric key encryption, and hashing algorithms, sensitive information can be kept confidential and private. The continued advancements in encryption technologies are essential to stay ahead of potential threats and ensure the protection of critical data in today's digital world.。
Fully Homomorphic Encryption without Modulus Switching from Classical GapSVP17-2-Brakerski

Ciphertext:
������ ∈ ℝ������ 2
real numbers ������������������ 2 ≡ (−1,1]
dec. if ������ < 2
1
Multiplicative Homomorphism:
������1, ������2 ⇒ ������1 ⊗ ������2 ������������������ 2 ∈
2. What does modulus switching really do?
nothing…
- Same as a scaling factor in the tensoring process ( ������1, ������2 ⇒ ������ ⋅ ������1 ⊗ ������2 ������������������ ������ ). - In a “correct” scale, this factor should be 1.
⇒ better performance with less headache
The Scheme:
Secret key:
Security based on ������������������������,������,������
FHE 101 [BV11b]
������ ∈ ℤ������ ������
⋅ 2 ������������������ 2 ������
≠ 1 (������������������ 2)
= ������1 + ������1 + 2������1 ⋅ ������2 + ������2 + 2������2
~������ ⋅ |������ + 2������| ≲ ������ ⋅ ������
一种基于LWE问题的无证书全同态加密体制 - 电子与信息学报201304

第35卷第4期电子与信息学报Vol.35No.4 2013年4月Journal of Electronics & Information Technology Apr. 2013一种基于LWE问题的无证书全同态加密体制光焱*顾纯祥祝跃飞郑永辉费金龙(信息工程大学网络空间安全学院郑州 450002)摘要:全同态加密在云计算等领域具有重要的应用价值,然而,现有全同态加密体制普遍存在公钥尺寸较大的缺陷,严重影响密钥管理与身份认证的效率。
为解决这一问题,该文将无证书公钥加密的思想与全同态加密体制相结合,提出一种基于容错学习(LWE)问题的无证书全同态加密体制,利用前像可采样陷门单向函数建立用户身份信息与公钥之间的联系,无须使用公钥证书进行身份认证;用户私钥由用户自行选定,不存在密钥托管问题。
体制的安全性在随机喻示模型下归约到判定性LWE问题难解性,并包含严格的可证安全证明。
关键词:全同态加密;无证书公钥加密;容错学习问题;前像可采样陷门单向函数中图分类号:TP309 文献标识码:A 文章编号:1009-5896(2013)04-0988-06 DOI: 10.3724/SP.J.1146.2012.01102Certificateless Fully Homomorphic Encryption Based on LWE ProblemGuang Yan Gu Chun-xiang Zhu Yue-fei Zheng Yong-hui Fei Jin-long(Institute of Cyberspace Security, Information Engineering University, Zhengzhou 450002, China)Abstract: Fully homomorphic encryption has important application in cloud computing. However, the existing fully homomorphic encryption schemes share a common flaw that they all use public keys of large scales. And this flaw may cause inefficiency of these schemes in the key and identity management. To solve this problem, a certificateless fully homomorphic encryption scheme is presented based on Learning With Errors (LWE) problem.The scheme builds the connection between the user’s identity and its public key with the trapdoor one-way function with preimage sampling so that the certificates are no longer necessary. The private keys are chosen by the users without key escrow. In the random oracle model, the security of the scheme strictly reduces to hardness of decisional LWE problem.Key words:Fully homomorphic encryption; Certificateless public-key encryption; Learning With Errors (LWE) problem; Trapdoor one-way function with preimage sampling1引言全同态加密又称隐私同态[1],其思想源自RSA 公钥加密所具备的乘法同态特性:将同一公钥加密下的若干密文相乘,乘积解密所得的明文恰好等于原密文各自对应明文的乘积。
密码科技算法

密码科技算法
密码科技算法是一种用于保护数据安全和隐私的技术手段。
它使用特定的数学和计算方法,将原始数据转化为密文,以防止未经授权的访问和篡改。
密码科技算法包括对称加密算法、非对称加密算法和哈希算法等。
对称加密算法使用同一个密钥进行加密和解密,常见的对称加密算法有DES、AES等。
它们适用于需要高效加密和解密的场景,但密钥的传递和管理可能存在一定的安全风险。
非对称加密算法使用一对不同的密钥,分别为公钥和私钥。
公钥可以公开分享给他人,而私钥则保密。
常见的非对称加密算法有RSA、Diffie-Hellman等。
非对称加密算法常用于数字签名、密钥交换等场景,能够提供更好的安全性。
哈希算法将任意长度的输入数据转化为固定长度的输出值,称为哈希值。
常见的哈希算法有MD5、SHA-1、SHA-256等。
哈希算法主要用于数据完整性验证和密码存储等场景,不可逆的特性使得哈希算法在密码学中具有重要作用。
密码科技算法的选择应根据具体的安全需求和使用场景来决定,常见的应用包括网络通信安全、数据存储安全、身份认证等。
同时,在实际应用中还需要注意密钥的安全管理、算法的强度和可靠性等方面的问题,以确保数据的安全性。
一种基于LWE的BGN加密及门限加密方案

一种基于LWE的BGN加密及门限加密方案李菊雁;马春光;袁琪【摘要】The BGN (Boneh-Goh-Nissim) cryptosystem is a cryptosystem that permits arbitrary number of additions and one multiplication of ciphertext without growing the size of ciphertext. The scheme of BGV12 is a fully homomorphic encryption from (G)LWE which needs key switching, modulus switching and other technologies for the multiplicative homomorphism. This paper describes a BGN scheme based on BGV12. Although our constructed scheme only permits one multiplication, it does not need other technologies, so it is more efficient. Comparing with the scheme of GVH10, our scheme has better size of parameter. In addition, we extend our scheme to a threshold encryption scheme, which allows parties to cooperatively decrypt a ciphertext without learning anything but the plaintext, and can be protected from related-key attacks.%BGN加密方案是指允许密文任意次加法和一次乘法运算的加密方案,并且在密文的运算中,密文的规模没有增长.BGV12加密方案是基于(G)LWE的全同态加密方案,为了实现乘法同态,需要用到密钥交换、模转换等技术.该文在BGV12基础上构造了一种BGN加密方案.虽然只能支持密文的一次乘法运算,但不需要其他技术的支持,因而更快捷.与GVH10加密方案相比,有更好的参数规模.此外,将BGN加密方案扩展成一种门限加密方案,该门限加密方案同样允许所有参与者共同解密一个密文而没有泄露明文的任何信息,并且能抵抗密钥泄露攻击.【期刊名称】《电子科技大学学报》【年(卷),期】2018(047)001【总页数】5页(P95-98,111)【关键词】BGN加密;密钥同态;LWE问题;门限加密【作者】李菊雁;马春光;袁琪【作者单位】哈尔滨工程大学计算机科学与技术学院哈尔滨 150001;哈尔滨工程大学计算机科学与技术学院哈尔滨 150001;中国科学院信息工程研究所信息安全国家重点实验室北京西城区 100093;哈尔滨工程大学计算机科学与技术学院哈尔滨 150001;齐齐哈尔大学通信与电子工程学院黑龙江齐齐哈尔 161006【正文语种】中文【中图分类】TN918基于容错学习(learning with error problem, LWE)的密码是一类备受关注的抗量子计算攻击的公钥密码体制[1]。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Efficient Fully Homomorphic Encryption from(Standard)LWEZvika Brakerski Weizmann Institute of Science Vinod Vaikuntanathan University of TorontoAbstract—We present a fully homomorphic encryption scheme that is based solely on the(standard)learning with errors(LWE)assumption.Applying known results on LWE, the security of our scheme is based on the worst-case hardness of“short vector problems”on arbitrary lattices.Our construction improves on previous works in two as-pects:1)We show that“somewhat homomorphic”encryptioncan be based on LWE,using a new re-linearizationtechnique.In contrast,all previous schemes relied oncomplexity assumptions related to ideals in variousrings.2)We deviate from the“squashing paradigm”used inall previous works.We introduce a new dimension-modulus reduction technique,which shortens the ci-phertexts and reduces the decryption complexity of ourscheme,without introducing additional assumptions.Our scheme has very short ciphertexts and we therefore use it to construct an asymptotically efficient LWE-based single-server private information retrieval(PIR)protocol.The communication complexity of our protocol(in the public-key model)is k·polylog(k)+log|DB|bits per single-bit query (here,k is a security parameter).1.I NTRODUCTIONFully-homomorphic encryption is one of the holy grails of modern cryptography.In a nutshell,a fully ho-momorphic encryption scheme is an encryption scheme that allows evaluation of arbitrarily complex programs on encrypted data.The problem was suggested by Rivest,Adleman and Dertouzos[34]back in1978, yet thefirst plausible candidate came thirty years later with Gentry’s breakthrough work in2009[13],[14] (although,there has been partial progress in the mean-while[21],[31],[6],[22]).Gentry’s work showed for thefirst time a plausible construction of fully homomorphic encryption.How-ever,his solution involved new and relatively untested cryptographic assumptions.Our work aims to base fully homomorphic encryption on standard,well-studied cryptographic assumptions.Email:zvika.brakerski@weizmann.ac.il.The author’s research was supported by ISF grant710267,BSF grant710613,and NSF contracts CCF-1018064and CCF-0729011.Email:vinodv@.This research was con-ducted when the author was at Microsoft Research Redmond.The main building block in Gentry’s construc-tion(a so-called“somewhat”homomorphic encryption scheme)was based on the(worst-case,quantum)hard-ness of problems on ideal lattices.1Although lattices have become standard fare in cryptography and lattice problems have been relatively well-studied,ideal lattices are a special breed that we know relatively little about. Ideals are a natural building block to construct fully ho-momorphic encryption in that they natively support both addition and multiplication(whereas lattices are closed under addition only).Indeed,all subsequent construc-tions of fully homomorphic encryption[36],[11],[7] relied on ideals in various rings in an explicit way.Our first contribution is the construction of a“somewhat”homomorphic encryption scheme whose security relies solely on the(worst-case,classical)hardness of standard problems on arbitrary(not necessarily ideal)lattices. Secondly,in order to achieve full homomorphism, Gentry had to go through a so-called“squashing step”which forced him to make an additional very strong hardness assumption–namely,the hardness of the (average-case)sparse subset-sum problem.As if by a strange law of nature,all the subsequent solutions encountered the same difficulty as Gentry did in going from a“somewhat”to a fully homomorphic encryption, and they all countered this difficulty by relying on the same sparse subset-sum assumption.This additional assumption was considered to be the main caveat of Gentry’s solution and removing it has been,perhaps, the main open problem in the design of fully homomor-phic encryption schemes.Our second contribution is to remove the necessity of this additional assumption. Thus,in a nutshell,we construct a fully homomorphic encryption scheme whose security is based solely on the classical hardness of solving standard lattice problems in the worst-case.2Specifically,our scheme is based on the learning with errors(LWE)assumption that is 1Roughly speaking,ideal lattices correspond to a geometric embed-ding of an ideal in a numberfield.See[25]for a precise definition. 2Strictly speaking,under this assumption,our scheme can evaluate polynomial-size circuits with a-priori bounded(but arbitrary)depth.A fully homomorphic encryption scheme independent of the circuit depth can be obtained by making an additional“circular security”assumption(see[8]for details).2011 52nd Annual IEEE Symposium on Foundations of Computer Science 2011 IEEE 52nd Annual Symposium on Foundations of Computer Scienceknown to be at least as hard as solving hard problemsin general lattices.Thus our solution does not rely onlattices directly and is fairly natural to understand andimplement.To achieve our goals,we deviate from two paradigmsthat ruled the design of(a handful of)candidate fullyhomomorphic encryption schemes[13],[36],[11],[7]: 1)We introduce the re-linearization technique,andshow how to use it to obtain a somewhat homo-morphic encryption scheme that does not requirehardness assumptions on ideals.2)We present a dimension-modulus reduction tech-nique,that turns our somewhat homomorphicscheme into a fully homomorphic one,withoutthe need for the artificial squashing step and thesparse subset-sum assumption.We provide a detailed overview of these new techniquesin Sections1.1and1.2below.Interestingly,the ciphertexts of the resulting fullyhomomorphic scheme are very short.This is a desir-able property which we use,in conjunction with othertechniques,to achieve very efficient private informationretrieval protocols.See also Section1.3below.1.1.Re-Linearization:Somewhat Homomorphic En-cryption without IdealsThe starting point of Gentry’s construction is a“somewhat”homomorphic encryption scheme.For aclass of circuits C,a C-homomorphic scheme is onethat allows evaluation of any circuit in the class C.Thesimple,yet striking,observation in Gentry’s work isthat if a(slightly augmented)decryption circuit for a C-homomorphic scheme resides in C,then the scheme can be converted(or“bootstrapped”)into a fully homo-morphic encryption scheme.It turns out that encryption schemes that can evaluatea non-trivial number of addition and multiplicationoperations3are already quite hard to come by(evenwithout requiring that they are bootstrappable).4Gen-try’s solution to this was based on the algebraic notionof ideals in rings.In a very high level,the message isconsidered to be a ring element,and the ciphertext isthe message masked with some“noise”.The novelty ofthis idea is that the noise itself belonged to an ideal3All known scheme,including ours,treat evaluated functions as arithmetic circuits.Hence we use the terminology of“addition and multiplication”gates.The conversion to the boolean model(AND, OR,NOT gates)is immediate.4We must mention here that we are interested only in compact fully homomorphic encryption schemes,namely ones where the ciphertexts do not grow in size with each homomorphic operation.If we do allow such growth in size,a number of solutions are possible.See,e.g.,[35], [17],[26].I.Thus,the ciphertext is of the form m+xI(for some x in the ring).Observe right off the bat that the scheme is born additively homomorphic;in fact,that will be the case with all the schemes we consider in this paper.The ideal I has two main properties:first,a random element in the ideal is assumed to“mask”the message;and second,it is possible to generate a secret trapdoor that“annihilates”the ideal,i.e.,implementing the transformation m+xI→m.Thefirst property guarantees security,while the second enables multiply-ing ciphertexts.Letting c1and c2be encryptions of m1 and m2respectively,c1c2=(m1+xI)(m2+yI)=m1m2+(m1y+m2x+xyI)I=m1m2+zIWhen decrypting,the ideal is annihilated and the prod-uct m1m2survives.Thus,c1c2is indeed an encryption of m1m2,as required.This nifty solution required,as per thefirst property,a hardness assumption on ideals in certain rings.Gentry’s original work relied on hardness assumptions on ideal lattices,while van Dijk,Gentry, Halevi and Vaikuntanathan[11]presented a different instantiation that considered ideals over the integers. Our somewhat homomorphic scheme is based on the hardness of the“learning with errors”(LWE)problem,first presented by Regev[33].The LWE assumption states that if s∈Z n q is an n dimensional“secret”vector, any polynomial number of“noisy”random linear com-binations of the coefficients of s are computationally indistinguishable from uniformly random elements in Z q.Mathematically,a i, a i,s +e ipoly(n)i=1c≈ ai,u ipoly(n)i=1,where a i∈Z n q and u i∈Z q are uniformly random, and the“noise”e i is sampled from a noise distribution that outputs numbers much smaller than q(an example is a discrete Gaussian distribution over Z q with small standard deviation).The LWE assumption does not refer to ideals,and indeed,the LWE problem is at least as hard asfind-ing short vectors in any lattice,as follows from the worst-case to average-case reductions of Regev[33] and Peikert[32].As mentioned earlier,we have a much better understanding of the complexity of lattice problems(thanks to[23],[2],[27]and many others), compared to the corresponding problems on ideal lat-tices.In particular,despite considerable effort,the best known algorithms to solve the LWE problem run intime nearly exponential in the dimension n.5The LWE assumption also turns out to be particularly amenable to the construction of simple,efficient and highly ex-pressive cryptographic schemes(e.g.,[33],[19],[4],[5], [10],[1]and many others).Our construction of a fully homomorphic encryption scheme from LWE is perhaps a very strong testament to its power and elegance. Constructing a(secret-key)encryption scheme whose security is based on the LWE assumption is rather straightforward.To encrypt a bit m∈{0,1}using secret key s∈Z n q,we choose a random vector a∈Z n q and a“noise”e and output the ciphertextc=(a,b= a,s +2e+m)∈Z n q×Z q The key observation in decryption is that the two “masks”–namely,the secret mask a,s and the“even mask”2e–do not interfere with each other.6That is, one can decrypt this ciphertext by annihilating the two masks,one after the other:The decryption algorithm first re-computes the mask a,s and subtracts it from b,resulting in2e+m(mod q).Since e q,2e+m (mod q)=2e+m.Removing the even mask is noweasy–simply compute2e+m modulo2.7As we will see below,the scheme is naturally addi-tive homomorphic,yet multiplication presents a thorny problem.In fact,a recent work of Gentry,Halevi and Vaikuntanathan[18]showed that(a slight variant of)this scheme supports just a single homomorphic multiplication,but at the expense of a huge blowup to the ciphertext which made further advance impossible. To better understand the homomorphic properties of this scheme,let us shift our focus away from the encryption algorithm,on to the decryption algorithm. Given a ciphertext(a,b),consider the symbolic linear function f a,b:Z n q→Z q defined as:f a,b(x)=b− a,x (mod q)=b−ni=1a[i]·x[i]∈Z qwhere x=(x[1],...,x[n])denotes the variables, and(a,b)forms the public coefficients of the linear 5The nearly exponential time is for a large enough error(i.e., one that is a1/poly(n)fraction of the modulus q).For smaller errors,as we will encounter in our scheme,there are better–but not significantly better–algorithms.In particular,if the error is a1/2n fraction of the modulus q,the best known algorithm runs in time approx.2n1− .6We remark that using2e instead of e as in the original formulation of LWE does not adversely impact security,so long as q is odd(since in that case,2is a unit in Z q).7Although the simplified presentation of Gentry’s scheme above seems to deal with just one mask(the“secret mask”),in reality,the additional“even mask”existed in the schemes of[13],[11]as well. Roughly speaking,they needed this to ensure semantic security,as we do.equation.Clearly,decryption of the ciphertext(a,b)is nothing but evaluating this function on the secret key s (and then taking the result modulo2).8 Homomorphic addition and multiplication can now be described in terms of this function f.Adding two ciphertexts corresponds to the addition of two linear functions,which is again another linear function.In particular,f(a+a ,b+b )(x)=f a,b(x)+f(a ,b )(x)is the linear function corresponding to the“homomorphically added”ciphertext(a+a ,b+b ).Similarly,multiplying two such ciphertexts corresponds to a symbolic multi-plication of these linear equationsf(a,b)(x)·f(a ,b)(x)=(b−a[i]x[i])·(b −a [i]x[i])=h0+h i·x[i]+h i,j·x[i]x[j] which results in a degree-2polynomial in the variables x=(x[1],...,x[n]),with coefficients h i,j that can be computed from(a,b)and(a ,b )by opening paren-thesis of the expression above.Decryption,as before, involves evaluating this quadratic expression on the secret key s(and then reducing modulo2).We now run into a serious problem–the decryption algorithm has to know all the coefficients of this quadratic polynomial, which means that the size of the ciphertext just went up from n+1elements to(roughly)n2/2.This is where our re-linearization technique comes into play.Re-linearization is a way to reduce the size of the ciphertext back down to n+1.The main idea is the following:imagine that we publish“encryptions”of all the linear and quadratic terms in the secret key s,namely all the numbers s[i]as well as s[i]s[j],under a new secret key t.Thus,these ciphertexts(for the quadratic terms)look like(a i,j,b i,j)whereb i,j= a i,j,t +2e i,j+s[i]·s[j]≈ a i,j,t +s[i]·s[j].9 Now,the sum h0+h i·s[i]+h i,j·s[i]s[j]can be written(approximately)ash0+h i(b i− a i,t )+i,jh i,j·(b i,j− a i,j,t ),which,lo and behold,is a linear function in t!The bottom-line is that multiplying the two linear functions f(a,b)and f(a ,b )and then re-linearizing the resulting expression results in a linear function(with n+1 8The observation that an LWE-based ciphertext can be interpreted as a linear equation of the secret was also used in[7].9Actually,calling these“encryptions”is inaccurate:s[i]·s[j]∈Z q is not a single bit and therefore the“ciphertext”cannot be decrypted. However,we feel that thinking of these as encryptions may benefit the reader’s intuition.coefficients),whose evaluation on the new secret key t results in the product of the two original messages (upon reducing modulo 2).The resulting ciphertext is simply the coefficients of this linear function,of which there are at most n +1.This ciphertext will decrypt to m ·m using the secret key t .In this semi-formal description,we ignored an im-portant detail which has to do with the fact that the coefficients h i,j are potentially large.Thus,even though (b i,j − a i,j ,t )≈s [i ]s [j ],it may be the case that h i,j ·(b i,j − a i,j ,t )≈h i,j ·s [i ]s [j ].This is handled by considering the binary representation of h i,j ,namelyh i,j = log qτ=02τ·h i,j,τ.If,for each value of τ,we had a pair (a i,j,τ,b i,j,τ)such thatb i,j,τ= a i,j,τ,t +2e i,j,τ+2τs [i ]·s [j ]≈a i,j,τ,t +2τs [i ]·s [j ],then indeedh i,j ·s [i ]s [j ]= log qτ=0h i,j,τ2τs [i ]s [j ]≈log qτ=0h i,j,τ(b i,j,τ− a i,j,τ,t ),since h i,j,τ∈{0,1}.This increases the number of pairs we need to post by a factor of ( log q +1),which is polynomial.This process allows us to do one multiplication with-out increasing the size of the ciphertext,and obtain an encryption of the product under a new secret key.But why stop at two keys s and t ?Posting a “chain”of L secret keys (together with encryptions of quadratic terms of one secret key using the next secret key)allows us to perform up to L levels of multiplications without blowing up the ciphertext size.It is possible to achieve multiplicative depth L = log n (which corresponds to a degree D =n polynomial)for an arbitrary constant <1under reasonable assumptions,but beyond that,the growth of the error in the ciphertext kicks in,and destroys the ciphertext.Handling this requires us to use the machinery of bootstrapping,which we explain in the next section.In conclusion,the above technique allows us to remove the need for “ideal assumptions”and obtain somewhat homomorphic encryption from LWE .1.2.Dimension-Modulus Reduction:Fully Homomor-phic Encryption Without SquashingAs explained above,the “bootstrapping”method for achieving full homomorphism requires a C -homomorphic scheme whose decryption circuit residesin C .All prior somewhat homomorphic schemes fell short in this category and failed to achieve this re-quirement in a natural way.Thus Gentry,followed by all other previous schemes,resorted to “squashing”:a method for reducing the decryption complexity at the expense of making an additional and fairly strong assumption,namely the sparse subset sum assumption.We show how to “upgrade”our somewhat homomor-phic scheme (explained in Section 1.1)into a scheme that enjoys the same amount of homomorphism but has a much smaller decryption circuit.All of this,without making any additional assumptions (beyond LWE)!Our starting point is the somewhat homomorphic scheme from Section 1.1.Recall that a ciphertext in that scheme is of the form (a ,b = a ,s +2e +m )∈Z n q ×Z q ,and decryption is done by computing (b − a ,s mod q )(mod 2).One can verify that this computation,pre-sented as a polynomial in the bits of s ,has degree at least max(n,log q ),which is more than the maxi-mal degree D that our scheme can homomorphically evaluate.The bottom line is that decryption complexity is governed by (n,log q )which are too big for our homomorphism capabilities.Our dimension-modulus reduction idea enbales us to take a ciphertext with parameters (n,log q )as above,and convert it into a ciphertext of the same message,but with parameters (k,log p )which are much smaller than (n,log q ).To give a hint as to the magnitude of improvement,we typically set k to be of size the security parameter and p =poly(k ).We can then setn =k c for essentially any constant c ,and q =2n.We will thus be able to homomorphically evaluate functions of degree roughly D =n =k c · and we can choose c to be large enough so that this is sufficient to evaluate the (k,log p )decryption circuit.To understand dimension-modulus reduction techni-cally,we go back to re-linearization.We showed above that,posting proper public parameters,one can convert a ciphertext (a ,b = a ,s +2e +m ),that corresponds to a secret key s ,into a ciphertext (a ,b = a ,t +2e +m )that corresponds to a secret key t .10The crucial observa-tion is that s and t need not have the same dimension n .Specifically,if we chose t to be of dimension k ,the procedure still works.This brings us down from (n,log q )to (k,log q ),which is a big step but still not sufficient.Having the above observation in mind,we wonder if we can take t to have not only low dimension but also10Inthe previous section,we applied re-linearization to a quadratic function of s ,while here we apply it to the ciphertext (a ,b )that corresponds to a linear function of s .This only makes things easier.small modulus p ,thus completing the transition from (n,log q )to (k,log p ).This is indeed possible using some additional ideas,where the underlying intuition is that Z p can “approximate”Z q by simple scaling,up to a small error.The public parameters for the transition from s to t will be (a i,τ,b i,τ)∈Z k p ×Z p ,whereb i,τ= a i,τ,t +e +p q ·2τ·s [i ] .11Namely,we scale 2τ·s [i ]∈Z q into an element in Z p by multiplying by p/q and rounding.The rounding incurs an additional error of magnitude at most 1/2.It follows that2τ·s [i ]≈qp ·(b i,τ− a i,τ,t ),which enables converting a linear equation in s into a linear equation in t .The result of dimension-modulus reduction,therefore,is a ciphertext (ˆa ,ˆb )∈Z k p ×Z psuch that ˆb − ˆa ,t =m +2ˆe .For security,we needto assume the hardness of LWE with parameters k,p .We can show that in the parameter range we use,this assumption is as hard as the one used for the somewhat homomorphic scheme.12In conclusion,dimension-modulus reduction allows us to achieve a bootstrappable scheme,based on the LWE assumption alone.We refer the reader to Section 3for the formal presentation of the scheme,and the full version of this paper [8]for the detailed analysis.As a nice byproduct of this technique,the ciphertexts of the resulting fully homomorphic scheme become very short!They now consist of (k +1)log p =O (k log k )bits.This is a desirable property which is also helpful in achieving efficient private information retrieval pro-tocols (see below).1.3.Near-Optimal Private Information Retrieval In (single-server)private information retrieval (PIR )protocols,a very large database is maintained by a sender (the sender is also sometimes called the server,or the database).A receiver wishes to obtain a specific entry in the database,without revealing any information about the entry to the server.Typically,we consider databases that are exponential in the security parameter11Asubtle technical point refers to the use of an error term e ,instead of 2e as we did for re-linearization.The reason is roughly that qp·2is non-integer.Therefore we “divide by 2”before performing the dimension-reduction and “multiply back”by 2after.12For the informed reader we mention that while k,p are smaller than n,q and therefore seem to imply lesser security,we are able to use much higher relative noise in our k,p scheme since it does not need to support homomorphic operations.Hence the two assumptions are of roughly the same hardness.and hence we wish that the receiver’s running time and communication complexity are polylogarithmic in the size of the database N (at least log N bits are required to specify an entry in the database).The first polylogarith-mic candidate protocol was presented by Cachin,Micali and Stadler [9]and additional polylograithmic protocols were introduced by Lipmaa [24]and by Gentry and Ramzan [20].Of which,the latter achieves the best communication complexity of O (log 3−o (1)(N )).13The latter two protocols achieve constant amortized commu-nication complexity when retrieving large consecutive blocks of data.See a survey in [30]for more details on these schemes.Fully homomorphic,or even somewhat homomor-phic,encryption is known to imply polylogarithmic PIR protocols.14Most trivially,the receiver can encrypt the index it wants to query,and the database will use that to homomorphically evaluate the database access function,thus retrieving an encryption of the answer and sending it to the receiver.The total communication complexity of this protocol is the sum of lengths of the public key,encryption of the index and output ciphertext.However,the public key is sent only once,it is independent of the database and the query,and it can be used for many queries.Therefore it is customary to analyze such schemes in the public key model where sending the public key does not count towards the communication complexity.Gentry [12]proposes to use his somewhat homomorphic scheme towards this end,which requires O (log 3N )bit communication.15We show how,using our somewhat homomorphic scheme,in addition to new ideas,we can bring down communication complexity to a near optimal log N ·polyloglog N (one cannot do better than log N ).To obtain the best parameters,oneneeds to assume 2Ω(k )-hardness of polynomial-factor approximation for short vector problems in arbitrary dimension k lattices,which is supported by current knowledge.Details follow.A major obstacle in the naive use of somewhat homomorphic encryption for PIR is that homomorphism is obtained with respect to the Boolean representa-13Itis hard to compare the performance of different PIR protocols due to the multitude of parameters.To make things easier to grasp,we compare the protocols on equal grounds:We assume that the database size and the adversary’s running time are exponential in the security parameter and assume the maximal possible hardness of the underlying assumption against known attacks.We also assume that each query retrieves a single bit.We will explicitly mention special properties of individual protocols that are not captured by this comparison.14To be precise,one needs sub-exponentially secure such schemes.15Gentry does not provide a detailed analysis of this scheme,the above is based on our analysis of its performance.tion of the evaluated function.Therefore,the receiverneeds to encrypt the index to the database in a bit-by-bit manner.The query is then composed of log Nciphertexts,which necessitate at least log2N bits of communication.As afirst improvement,we notice thatthe index need not be encrypted under the somewhathomomorphic scheme.Rather,we can encrypt usingany symmetric encryption scheme.The database willreceive,an encrypted symmetric key(under the ho-momorphic scheme),which will enable it to convertsymmetric ciphertexts into homomorphic ciphertextswithout additional communication.The encrypted secretkey can be sent as a part of the public key as it is inde-pendent of the query.This,of course,requires that oursomewhat homomorphic scheme can homomorphicallyevaluate the decryption circuit of the symmetric scheme.Fully homomorphic schemes will certainly be adequatefor this purpose,but known somewhat homomorphicschemes are also sufficient(depending on the symmetricscheme to be used).Using the most communicationefficient symmetric scheme,we bring down the querycomplexity to O(log N).As for the sender’s response,our dimension-modulus reduction technique guaranteesvery short ciphertexts(essentially as short as non-homomorphic LWE based schemes).This translates intolog N·polyloglog N bits per ciphertext,and the commu-nication complexity of our protocol follows.We remark that in terms of retrieving large blocks of consecutive data,one can slightly reduce the overhead to O(log N) bits of communication for every bit of retrieved data. We leave it as an open problem to bring the amortized communication down to a constant.We refer the reader to the full version[8]for more details.Prior to this work,it was not at all known howto achieve even polylogarithmic PIR under the LWEassumption.We stress that even if the size of the publickey does count towards the communication complexity,our protocol still has polylogarithmic communication.1.4.Other Related WorkAside from Gentry’s scheme(and a variant thereofby Smart and Vercauteren[36]and an optimization byStehl´e and Steinfeld[37]),there are two other fullyhomomorphic encryption schemes[11],[7].The inno-vation in both these schemes is the construction of a newsomewhat homomorphic encryption scheme.Both theseworks then invoke Gentry’s squashing and bootstrap-ping transformation to convert it to a fully homomorphicscheme,and thus the security of both these schemesrelies on the sparse subset-sum assumption(plus otherassumptions).Thefirst of these schemes is due to vanDijk,Gentry,Halevi and Vaikuntanathan[11].Their scheme works over the integers and relies on a new assumption which,roughly speaking,states thatfinding a number p given many“noisy”multiples of p is computationally hard.They cannot,however,reduce their assumption to worst-case hardness.The second is a recent work of Brakerski and Vaikuntanathan[7],who construct a somewhat homomorphic encryption scheme based on the ring LWE problem[25]whose security can be reduced to the worst-case hardness of problems on ideal lattices.The efficiency of implementing Gentry’s scheme has also gained much attention.Smart and Vercauteren[36], as well as Gentry and Halevi[16]conduct a study on reducing the complexity of implementing the scheme. In a recent independent work,Gentry and Halevi[15] showed how the sparse subset sum assumption can be replaced by either the(decisional)Diffie-Hellman as-sumption or an ideal lattice assumption,by representing the decryption circuit as an arithmetic circuit with only one level of(high fan-in)multiplications.2.P RELIMINARIESWe will let D denote a distribution over somefinite set S.Then,the notation x$←D means that x is chosen from the distribution D,and x$←S,means that x is chosen from the uniform distribution over S. We consider all logarithms to base2.In this work,we utilize“noise”distributions over integers.The only property of these distributions we use is their magnitude.Hence,we define a B-bounded distribution to be a distribution over the integers where the magnitude of a sample is bounded with high prob-ability.A definition follows.Definition2.1(B-bounded distributions).A distribution ensemble{χn}n∈N,supported over the integers,is called B-bounded if Pre$←χn[|e|>B]≤2− Ω(n).We denote scalars in plain(e.g.x)and vectors in bold lowercase(e.g.v),and matrices in bold uppercase(e.g.A).We will treat all vectors as column vectors.The i norm of a vector is denoted by v i.Inner product is denoted by v,u ,recall that v,u =v T·u.Let v be an n dimensional vector.For all i=1,...,n,the i th element in v is denoted v[i].We use the convention that v[0] 1.2.1.Learning With Errors(LWE)The LWE problem was introduced by Regev[33]as a generalization of“learning parity with noise”.For positive integers n and q≥2,a vector s∈Z n q,and a probability distributionχon Z q,let A s,χbe the distribution obtained by choosing a vector a$←Z n q。