WO2020172898A1 - 一种基于后缀树的可搜索加密系统及方法 - Google Patents
一种基于后缀树的可搜索加密系统及方法 Download PDFInfo
- Publication number
- WO2020172898A1 WO2020172898A1 PCT/CN2019/076958 CN2019076958W WO2020172898A1 WO 2020172898 A1 WO2020172898 A1 WO 2020172898A1 CN 2019076958 W CN2019076958 W CN 2019076958W WO 2020172898 A1 WO2020172898 A1 WO 2020172898A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- search
- client
- key
- suffix tree
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
Definitions
- the present invention relates to the field of Internet technology, in particular to a searchable encryption system and method based on a suffix tree.
- Encryption can ensure the security of the data itself, even if it is leaked, it will not bring serious security and privacy issues.
- encryption operations affect the availability of data: it is difficult for cloud servers to operate on encrypted data, including calculations and searches. Therefore, under the premise of ensuring the security of user data, ensuring the availability of ciphertext data has become an important research content in the fields of cloud computing and cryptography.
- Search and encrypt user-specific files and other information set keywords to correspond to files, encrypt files, construct keywords into corresponding indexes and encrypt them, upload ciphertexts and indexes to cloud server; when searching files, keywords will be calculated
- the search token is sent to the server to allow the server to match the index, and the matching ciphertext file information is returned by the server if the match is successful.
- the search encryption scheme for keyword processing has a relatively fixed search format.
- the keywords of the file are pre-set and cannot meet the needs of various users.
- genetic data in the electronic medical field has simple structure and high similarity, and it is difficult to define its keywords.
- How to solve the above-mentioned problems is a research hotspot in the field of searchable encryption.
- the technical problem to be solved by the present invention is to provide a searchable encryption system and method based on a suffix tree in view of the above-mentioned shortcomings of the prior art, and use the suffix tree structure to realize an efficient search of any substring.
- the technical solution adopted by the present invention is:
- the present invention provides a searchable encryption system based on a suffix tree, using a two-party entity solution, namely, the client and the server, including initialization modules, security Index building module, substring search module and verification and decryption module;
- the initialization module is used to construct an encryption key and a suffix tree
- Construction of the encryption key run by the client to initialize the public and private keys of the client and the keys required for encryption;
- the security index construction module is used for index construction and index encryption
- Build index run by the client to build the search data into a suffix tree and generate index information for the suffix tree, including dictionary structure, ciphertext structure and leaf array structure;
- Index encryption run on the client, responsible for encrypting the keyword index, namely the dictionary structure, the ciphertext array structure, and the leaf array structure, and upload the encrypted security index, including the ciphertext, to the cloud server, which is performed by the cloud server storage;
- the substring search module is used to construct a search token and search
- Build search token run on the client, responsible for calculating search tokens for search requests;
- Search run on the client and server, the client sends a search token, the server searches the encrypted security index based on the token, and returns the search result to the client;
- the verification and decryption module is used for decryption and verification
- Decryption Run on the client, after the client receives the returned result, it decrypts the returned result with its own private key to obtain the plaintext of the search result;
- Verification It runs on the client to verify the decrypted plaintext. If a certain step of verification fails, the plaintext is discarded.
- the present invention also provides a searchable encryption method based on suffix tree, including the following steps:
- Step 1 According to the security parameter ⁇ , output the user's symmetric key K;
- K D is the encryption key of the dictionary structure D
- K C is the key of the ciphertext array C
- K L is the key of the leaf array structure L
- K 1 , K 2 are used to process the dictionary structure D entry value and corresponding The value of the i-th child node child (u, i) of the suffix tree node u
- Subscript numbers ind,..., ind+m-1 and leaf positions leftleaf,...,leftleaf+num-1 are pseudo-randomly permuted;
- output K (K D ,K C ,K L ,K 1 , K 2 , K 3 , K 4 ) as the user's key, ensuring that each key is different;
- Step 2 The client constructs a suffix tree T s for the given data; uses the UKK algorithm to construct the given string s into a suffix tree;
- Enc() is the encryption function
- ind u is the position index in the string s when the substring to be searched first appears
- leftleaf u is the position of the leftmost child of node u
- num u is Is the number of repeated occurrences of the substring
- the method for constructing the ciphertext array C is:
- the method for constructing the leaf array L is: P: ⁇ 0, 1 ⁇ ⁇ ⁇ [n] ⁇ [n];
- the interactive search between client and server is as follows:
- T i′ Enc(F(K 1 , p[1...i′]), F(K 2 , p[1...i′]))
- Step 5 After the server receives the search token Tok, it first finds the initial entry of the dictionary structure, that is, the dictionary item D(F(K 1 , ⁇ )) of the root node u 0 , where ⁇ represents an empty string;
- Step 6 For each search token T i′ , use f 2, 1 (u),..., f 2, d (u) to decrypt the search token in order, the specific method is:
- Step 9 Client execution Execute step 7m times in a loop, the initial value of i" is 1, every time it is executed, i" is increased by 1, when i">m, the agreement is terminated;
- Step 12 Client execution The initial value of i" is 1, the step is executed 12num times in a loop, and the search is terminated when i">num;
- the client If the search result is ⁇ , the client outputs ⁇ as the answer;
- a searchable encryption system and method based on a suffix tree utilizes that each non-leaf node in the suffix tree structure has at least 2 child nodes, and each edge The starting characters are not the same and other characteristics, and a security index with a suffix tree structure that supports substring search is constructed. Combined with cryptographic primitives, the constructed security index is protected to ensure the security of the data during the encrypted upload and search process.
- By retaining the characteristics of the nodes and edges of the suffix tree it simulates traversing the edges of the suffix tree to effectively perform string matching in the encrypted index, and at the same time finds all positions of the substring to be searched in the original data, realizing efficient search for any string .
- the problem of substring search of ciphertext data is solved, allowing users to query ciphertext data without using keywords. It can also ensure that the user's private information is safely stored on the cloud server, and supports an efficient substring search function.
- Figure 1 is a structural block diagram of a searchable encryption system based on a suffix tree provided by an embodiment of the present invention
- FIG. 2 is a flowchart of a searchable encryption method based on a suffix tree provided by an embodiment of the present invention
- FIG. 3 is a flowchart of constructing a security index provided by an embodiment of the present invention.
- FIG. 4 is a schematic diagram of interactive search between a client and a server according to an embodiment of the present invention.
- Fig. 5 is a flowchart of interactive search between a client and a server according to an embodiment of the present invention.
- the initialization module is used to construct an encryption key and a suffix tree
- Construction of the encryption key run by the client to initialize the public and private keys of the client and the keys required for encryption;
- the security index construction module is used for index construction and index encryption
- Build index run by the client to build the search data into a suffix tree and generate index information for the suffix tree, including dictionary structure, ciphertext structure and leaf array structure;
- Index encryption run on the client, responsible for encrypting the keyword index, namely the dictionary structure, the ciphertext array structure, and the leaf array structure, and upload the encrypted security index, including the ciphertext, to the cloud server, which is performed by the cloud server storage;
- the substring search module is used to construct a search token and search
- Build search token run on the client, responsible for calculating search tokens for search requests;
- Search run on the client and server, the client sends a search token, the server searches the encrypted security index based on the token, and returns the search result to the client;
- the verification and decryption module is used for decryption and verification
- Decryption Run on the client. After the client receives the returned result, it uses its private key to decrypt the returned result and obtain the plaintext of the search result;
- Verification It runs on the client to verify the decrypted plaintext. If a certain step of verification fails, the plaintext is discarded.
- a searchable encryption method based on a suffix tree includes the following steps:
- Step 1 According to the security parameter ⁇ , output the user's symmetric key K;
- K D is the encryption key of the dictionary structure D
- K C is the key of the ciphertext array C
- K L is the key of the leaf array structure L
- K 1 , K 2 are used to process the dictionary structure D entry value and corresponding The value of the i-th child node child (u, i) of the suffix tree node u
- Subscript numbers ind,..., ind+m-1 and leaf positions leftleaf,...,leftleaf+num-1 are pseudo-randomly permuted;
- output K (K D ,K C ,K L ,K 1 , K 2 , K 3 , K 4 ) as the user's key, ensuring that each key is different;
- Step 2 The client constructs a suffix tree T s for the given data; uses the UKK algorithm to construct the given string s into a suffix tree;
- Step 3 The client establishes a security index CT according to the suffix tree T s and uploads it to the server.
- Enc() is the encryption function
- ind u is the position index in the string s when the substring to be searched first appears
- leftleaf u is the position of the leftmost child of node u
- num u is Is the number of repeated occurrences of the substring
- the method for constructing the ciphertext array C is:
- the method for constructing the leaf array L is: P: ⁇ 0, 1 ⁇ ⁇ ⁇ [n] ⁇ [n];
- T i Enc(F(K 1 , p[1...i,]), F(K 2 , p[1...i,]))
- Step 5 After the server receives the search token Tok, it first finds the initial entry of the dictionary structure, that is, the dictionary item D(F(K 1 , ⁇ )) of the root node u 0 , where ⁇ represents an empty string;
- Step 6 For each search token T i′ , use f 2, 1 (u),..., f 2, d (u) to decrypt the search token in order, the specific method is:
- Step 9 Client execution Execute step 7m times in a loop, the initial value of i" is 1, every time it is executed, i" is increased by 1, when i">m, the agreement is terminated;
- Step 12 Client execution The initial value of i" is 1, the step is executed 12num times in a loop, and the search is terminated when i">num;
- the client If the search result is ⁇ , the client outputs ⁇ as the answer;
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种基于后缀树的可搜索加密系统及方法,涉及互联网技术领域。该系统包括用于构建加密密钥和后缀树的初始化模块,用于构建索引及索引加密的安全索引构建模块,用于构建搜索令牌和搜索的子字符串搜索模块及用于解密和验证的验证解密模块;该方法首先对给定字符串构建后缀树及加密索引,并将加密索引上传至服务器;当客户端进行字符串搜索时,生成搜索令牌发送至服务器,服务器根据搜索令牌进行搜索,并将搜索结果发送到客户端,完成搜索。本发明的基于后缀树的可搜索加密系统及方法,实现对任意字符串的高效搜索,解决了密文数据的子字符串搜索问题,让用户可以不使用关键字对密文数据进行查询。
Description
本发明涉及互联网技术领域,尤其涉及一种基于后缀树的可搜索加密系统及方法。
随着互联网技术的高速发展,计算机网络技术已经惠及家家户户。2018年全球数字报告显示,互联网用户数已经突破40亿大关。用户数量的不断增加导致数据信息激增,为了节省本地存储空间,并为已有数据做一个备份,云计算将虚拟化技术与网络相结合,把数据存储在远程服务器,并由服务器处理数据。但是云存储服务带来便利的同时,也使得数据存储和处理的安全问题日渐凸显。第三方服务器往往是不可信的,用户不可避免的要面对信息泄露的风险。因此,保护个人和企业数据的安全性与可用性已经成为计算机互联网技术革新的实际需求。
针对不可信云,加密再上传成为企业和个人的一个好的选择,特别是对于敏感数据,加密可以保证数据本身的安全性,即使被泄漏也不会带来严重的安全隐私问题。但加密操作影响了数据的可用性:云服务器很难对加密的数据进行操作,包括计算、搜索等。因此在保证用户数据安全性的前提下,确保密文数据的可用性,就成为了云计算、密码学等领域的重要研究内容。
可搜索加密针对用户的文件等信息,设置关键词对应文件,并对文件加密,将关键词构造成相应索引并加密,将密文和索引上传到云服务器;搜索文件时,将通过关键词计算出的搜索令牌发送给服务器,让服务器进行与索引的匹配,匹配成功服务器返回匹配的密文文件信息。
但是针对关键字进行处理的搜索加密方案,其搜索格式较为固定。文件的关键字是经过预先设定的,无法满足多种多样的用户需求。例如,电子医疗领域里的基因数据,其结构简单、相似性较大,很难定义其关键字。如何解决上述问题,是当前可搜索加密领域的研究热点。
发明内容
本发明要解决的技术问题是针对上述现有技术的不足,提供一种基于后缀树的可搜索加密系统及方法,利用后缀树结构实现任意子字符串的高效搜索。
为解决上述技术问题,本发明所采取的技术方案是:一方面,本发明提供一种基于后缀树的可搜索加密系统,采用两方实体方案,即客户端与服务器端,包括初始化模块、安全索引构建模块、子字符串搜索模块及验证解密模块;
所述初始化模块用于构建加密密钥和后缀树;
构建加密密钥:由客户端运行,初始化客户端的公私钥及加密所需的密钥;
所述安全索引构建模块用于构建索引以及索引加密;
构建索引:由客户端运行,将待搜索数据构建成后缀树并生成后缀树的索引信息,包括字典结构,密文结构和叶子数组结构;
索引加密:运行于客户端,负责对关键字索引即字典结构、密文数组结构和叶子数组结构进行加密操作,并将加密后的安全索引,包括密文,上传至云服务器,由云服务器进行存储;
所述子字符串搜索模块用于构建搜索令牌和搜索;
构建搜索令牌:运行于客户端,负责对搜索请求计算搜索令牌;
搜索:运行于客户端和服务器端,客户端发送搜索令牌,服务器根据令牌搜索加密的安全索引,并将搜索后的结果返回给客户端;
所述验证解密模块用于解密和验证;
解密:运行于客户端,客户端收到返回的结果后,用自己的私钥对返回的结果进行解密,获取搜索结果明文;
验证:运行于客户端,对解密后的明文进行验证,如果某步验证不通过,则丢弃此明文。
另一方面,本发明还提供一种基于后缀树的可搜索加密方法,包括以下步骤:
步骤1、根据安全参数λ,输出用户的对称密钥K;
随机选择7个比特串
其中,K
D为字典结构D的加密密钥,K
C为密文数组C的密钥,K
L为叶子数组结构L的密钥,K
1,K
2用于处理字典结构D入口值和对应后缀树节点u的第i个孩子节点child(u,i)的值,以及用于计算搜索令牌Tok=T
1、...、T
m,K
3,K
4分别用来对待搜索字符串下标数ind,...,ind+m-1以及叶子的位置leftleaf,...,leftleaf+num-1进行伪随机置换;最后,输出K=(K
D,K
C,K
L,K
1,K
2,K
3,K
4)作为用户的密钥,保证每个密钥各不相同;
步骤2、客户端对给定数据构建后缀树T
s;利用UKK算法将给定的字符串s构建成后缀树;
步骤3、客户端根据后缀树T
s建立安全索引CT并上传至服务器,其中CT由字典结构D、密文数组C和叶子数组L组成,表示为CT=(D,C,L);
所述字典结构D对后缀树T
s的每一个节点u建立一条包括key和value的条目,表示为D=(key,value),其中,key存储搜索的入口,键值value由搜索结构和待返回的密文结构组成;找到搜索入口,即能返回对应的value,用户进行解密操作;所述字典结构D采用
进行构造,
为后缀树的根节点到节点u的父亲节点上所有边上的字符串的连接,再加上节点u的父亲节点到它本身边上的第一个字符ω;
所述字典结构D的具体构建步骤如下:
(2)、构造value值的搜索结构;对于节点u的每个孩子节点,计算
若节点u的孩子节点个数deg(u)<d,d为叶子节点个数,则添加随机项补足:
选择随机序列P:{0,1}
λ×[d]→[d],将f
2,1(u),...,f
2,d(u)的顺序随机化,最终构造value值的搜索结构为f
2,P[1](u),...,f
2,P[d](u);
(3)、对于后缀树T
s的每个节点u,构造待返回的密文结构,如下公式所示:
X
u=Enc(K
D,(ind
u,leftleaf
u,num
u,len
u,f
1(u),f
2,P[1](u),...,f
2,P[d](u)))
最终构造的value值总体为Value
u=(f
2,P[1](u),...,f
2,P[d](u),X
u);
(4)、构建字典结构D里的2n-N个虚拟入口;对每个虚拟入口来说,选择随机的
存储搜索密钥key=f
1(u),键值value=(f
2,1(u),...,f
2,d(u),X
u=Enc(K
D,0));
所述密文数组C的构建方法为:
所述叶子数组L的构建方法为:P:{0,1}
λ×[n]→[n];
客户端与服务器之间的交互搜索如下:
步骤4、在用户搜索时,选取待搜索字符串p=p
1...p
m∈∑
s.len,其中,s.len为待搜索字符串长度,并计算搜索令牌上传至服务器;
步骤4-1、获取加密数据结构所需的密钥K
enc={K
1,K
2};
步骤4-2、计算搜索令牌Tok=T
1,...,T
m;对于i′=1,...,m,计算每一个伪随机函数f(i′)的值:
f
1(i′)=F(K
1,p[1...i′])
f
2(i′)=F(K
2,p[1...i′])
T
i′=Enc(F(K
1,p[1...i′]),F(K
2,p[1...i′]))
并将搜索令牌T
i′上传至服务器;
步骤5、服务器接收到搜索令牌Tok后,先找到字典结构的初始入口,即根节点u
0的字典项D(F(K
1,∈)),其中,∈表示空字符串;
步骤6、对于每个搜索令牌T
i′,使用f
2,1(u),...,f
2,d(u)对搜索令牌按顺序进行解密,具体方法为:
步骤6-1、设定字母a,b,并令a=1,b=1;
步骤6-2、令i″=a,j″=b,且当1≤i″≤m,1≤j″≤d时,执行如下操作:
Y←Dec(f
2,j″,T
i″),将Y与字典结构D的入口key值对比:若Y=f
1(u′),则更新数据到字典项D(F(K
1,f
1(u′))),value值为:f
2,P[1](u′),K,f
2,P[d](u′),X
u′=Enc(K
D,X
u′),并令a=a+1,跳转到步骤3-2;若Y≠f
1(u′),则令b=b+1,跳转到步骤6-3;
步骤6-3、服务器将搜索结果X=Enc(K
D,(ind,leftleaf,num,len,f
1,f
2,P[1],...,f
2,P[d]))发送给客户端;
步骤7、用户运行解密操作,令W=Dec(K
D,X
u),若W=⊥,则解密失败,输出⊥并中 止搜索协议,若W≠⊥,将W展开为(ind,leftleaf,num,len,f
1,f
2,P[1],...,f
2,P[d]),检验f
1=F(K
1,p[1...i″])是否成立,如果等式不成立,则返回值出错,输出⊥并中止搜索协议;如果等式成立,验证在a=i′+1,...,m且b=1,...,d时,Dec(f
2,b,T
a)=⊥是否成立,若成立,则表明p[1...i″]是能在字典D中搜索到最长的匹配前缀;解出ind,选取一个随机序列π
1:[m]→[m];将ind,...,ind+m-1置换,使
用户发送随机序列(x
1,...x
m)给服务器;
步骤8、服务器根据(x
1,...x
m)搜索密文数组C,令C
i″=C[x
i′]i″=1,...,m,并发送(C
1,...C
m)给用户;
若Y=⊥,输出⊥并中止查询协议,否则,使搜索结果为(p
i′,j″);
若j″≠ind+i″-1,输出⊥;
当j″=ind+i″-1时,如果p′
1,...,p′
m≠p,用户输出Φ作为答案然后结束协议;如果p′
1,...,p′
m=p,i″=1,...,num,用户选择随机序列π
2:[num]→[num],使
用户发送随机序列(y
1,...y
num)给服务器;
步骤10、如果i″=m,跳转到步骤8,否则,将i″加1,跳转到步骤7;
步骤11、服务器端设置L
i″=L[y
i″],i″=1,...,num,并将(L
1,...L
num)发送给客户端;
如果搜索结果为⊥,客户端输出⊥作为答案;
如果搜索结果为(a
i″,j″),且j″≠leftleaf+i″-1,则客户端输出⊥作为答案,如果j″=leftleaf+i″-1,则客户端输出A={a
1,...a
num}作为答案。
采用上述技术方案所产生的有益效果在于:本发明提供的一种基于后缀树的可搜索加密系统及方法,利用后缀树结构中每个非叶子节点至少有2个孩子节点,及每条边的起始字符 不相同等特性,构建具有后缀树结构、支持子字符串搜索的安全索引。并结合密码学原语,对构建的安全索引进行保护,保证数据在加密上传和搜索过程中的安全。通过保留后缀树节点和边的特点,模拟遍历后缀树边来有效的在加密索引中执行字符串匹配,同时找到待搜索子字符串在原始数据中的所有位置,实现对任意字符串的高效搜索。解决了密文数据的子字符串搜索问题,让用户可以不使用关键字对密文数据进行查询。还可以保证用户的隐私信息安全存储在云服务器上,并支持高效的子字符串搜索功能。
图1为本发明实施例提供的一种基于后缀树的可搜索加密系统的结构框图;
图2为本发明实施例提供的一种基于后缀树的可搜索加密方法的流程图;
图3为本发明实施例提供的构建安全索引的流程图;
图4为本发明实施例提供的客户端与服务器之间进行交互搜索的示意图;
图5为本发明实施例提供的客户端与服务器之间进行交互搜索的流程图。
下面结合附图和实施例,对本发明的具体实施方式作进一步详细描述。以下实施例用于说明本发明,但不用来限制本发明的范围。
一种基于后缀树的可搜索加密系统,采用两方实体方案,即客户端与服务器端,如图1所示,包括初始化模块、安全索引构建模块、子字符串搜索模块及验证解密模块;
所述初始化模块用于构建加密密钥和后缀树;
构建加密密钥:由客户端运行,初始化客户端的公私钥及加密所需的密钥;
所述安全索引构建模块用于构建索引以及索引加密;
构建索引:由客户端运行,将待搜索数据构建成后缀树并生成后缀树的索引信息,包括字典结构,密文结构和叶子数组结构;
索引加密:运行于客户端,负责对关键字索引即字典结构、密文数组结构和叶子数组结构进行加密操作,并将加密后的安全索引,包括密文,上传至云服务器,由云服务器进行存储;
所述子字符串搜索模块用于构建搜索令牌和搜索;
构建搜索令牌:运行于客户端,负责对搜索请求计算搜索令牌;
搜索:运行于客户端和服务器端,客户端发送搜索令牌,服务器根据令牌搜索加密的安全索引,并将搜索后的结果返回给客户端;
所述验证解密模块用于解密和验证;
解密:运行于客户端,客户端收到返回的结果后,用自己的私钥对返回的结果进行解密, 获取搜索结果明文;
验证:运行于客户端,对解密后的明文进行验证,如果某步验证不通过,则丢弃此明文。
一种基于后缀树的可搜索加密方法,如图2所示,包括以下步骤:
步骤1、根据安全参数λ,输出用户的对称密钥K;
随机选择7个比特串
其中,K
D为字典结构D的加密密钥,K
C为密文数组C的密钥,K
L为叶子数组结构L的密钥,K
1,K
2用于处理字典结构D入口值和对应后缀树节点u的第i个孩子节点child(u,i)的值,以及用于计算搜索令牌Tok=T
1、...、T
m,K
3,K
4分别用来对待搜索字符串下标数ind,...,ind+m-1以及叶子的位置leftleaf,...,leftleaf+num-1进行伪随机置换;最后,输出K=(K
D,K
C,K
L,K
1,K
2,K
3,K
4)作为用户的密钥,保证每个密钥各不相同;
步骤2、客户端对给定数据构建后缀树T
s;利用UKK算法将给定字符串s构建成后缀树;
步骤3、客户端根据后缀树T
s建立安全索引CT并上传至服务器,具体方法如图3所示,其中CT由字典结构D、密文数组C和叶子数组L组成,表示为CT=(D,C,L);
所述字典结构D对后缀树T
s的每一个节点u建立一条包括key和value的条目,表示为D=(key,value),其中,key存储搜索的入口,键值value由搜索结构和待返回的密文结构组成;找到搜索入口,即能返回对应的value,用户进行解密操作;所述字典结构D采用
进行构造,
为后缀树的根节点到节点u的父亲节点上所有边上的字符串的连接,再加上节点u的父亲节点到它本身边上的第一个字符ω;
所述字典结构D的具体构建步骤如下:
(2)、构造value值的搜索结构;对于节点u的每个孩子节点,计算
若节点u的孩子节点个数deg(u)<d,d为叶子节点个数,则添加随机项补足:
选择随机序列P:{0,1}
λ×[d]→[d],将f
2,1(u),...,f
2,d(u)的顺序随机化,最终构造value值的搜索结构为f
2,P[1](u),...,f
2,P[d](u);
(3)、对于后缀树T
s的每个节点u,构造待返回的密文结构,如下公式所示:
X
u=Enc(K
D,(ind
u,leftleaf
u,num
u,len
u,f
1(u),f
2,P[1](u),...,f
2,P[d](u)))
最终构造的value值总体为Value
u=(f
2,P[1](u),...,f
2,P[d](u),X
u);
(4)、构建字典结构D里的2n-N个虚拟入口;对每个虚拟入口来说,选择随机的
存储搜索密钥key=f
1(u),键值value=(f
2,1(u),...,f
2,d(u),X
u=Enc(K
D,0));
所述密文数组C的构建方法为:
所述叶子数组L的构建方法为:P:{0,1}
λ×[n]→[n];
客户端与服务器之间的交互搜索如图4和图5所示,具体为:
步骤4、在用户搜索时,选取待搜索字符串p=p
1...p
m∈∑
s.len,其中,s.len为待搜索字符串长度,并计算搜索令牌上传至服务器;
步骤4-1、获取加密数据结构所需的密钥K
enc={K
1,K
2};
步骤4-2、计算搜索令牌Tok=T
1,...,T
m;对于i′=1,...,m,计算每一个伪随机函数f(i′)的值:
f
1(i′)=F(K
1,p[1...i,])
f
2(i′)=F(K
2,p[1...i,])
T
i,=Enc(F(K
1,p[1...i,]),F(K
2,p[1...i,]))
并将搜索令牌T
i′上传至服务器;
步骤5、服务器接收到搜索令牌Tok后,先找到字典结构的初始入口,即根节点u
0的字典项D(F(K
1,∈)),其中,∈表示空字符串;
步骤6、对于每个搜索令牌T
i′,使用f
2,1(u),...,f
2,d(u)对搜索令牌按顺序进行解密,具体方法为:
步骤6-1、设定字母a,b,并令a=1,b=1;
步骤6-2、令i″=a,j″=b,且当1≤i″≤m,1≤j″≤d时,执行如下操作:
Y←Dec(f
2,j″,T
i″),将Y与字典结构D的入口key值对比:若Y=f
1(u′),则更新数据到字典项D(F(K
1,f
1(u′))),value值为:f
2,P[1](u′),...,f
2,P[d](u′),X
u′=Enc(K
D,X
u′),并令a=a+1,跳转到步骤3-2;若Y≠f
1(u′),则令b=b+1,跳转到步骤6-3;
步骤6-3、服务器将搜索结果X=Enc(K
D,(ind,leftleaf,num,len,f
1,f
2,P[1],...,f
2,P[d]))发送给客户端;
步骤7、用户运行解密操作,令W=Dec(K
D,X
u),若W=⊥,则解密失败,输出⊥并中止搜索协议,若W≠⊥,将W展开为(ind,leftleaf,num,lenf
1,f
2,P[1],...,f
2,P[d]),检验f
1=F(K
1,p[1...i″])是否成立,如果等式不成立,则返回值出错,输出⊥并中止搜索协议;如果等式成立,验证在a=i′+1,...,m且b=1,...,d时,Dec(f
2,b,T
a)=⊥是否成立,若成立,则表明p[1...i″]是能在字典D中搜索到最长的匹配前缀,解出ind,选取一个随机序列π
1:[m]→[m];将ind,...,ind+m-1置换,使
用户发送(x
1,...x
m)给服务器;
步骤8、服务器根据(x
1,...x
m)搜索密文数组C,令C
i″=C[x
i′],i″=1,...,m,并发送(C
1,...C
m)给用户;
若Y=⊥,输出⊥并中止查询协议,否则,使搜索结果为(p
i′,j″),若j″≠ind+i″-1,输出⊥;若j″=ind+i″-1,如果p′
1,...,p′
m≠p,用户输出Φ作为答案然后结束协议;如果 p′
1,...,p′
m=p,i″=1,...,num,用户选择随机序列π
2:[num]→[num],使
用户发送(y
1,...y
num)给服务器;
步骤10、如果i″=m,跳转到步骤8,否则,将i″加1,跳转到步骤7;
步骤11、服务器端设置L
i″=L[y
i″],i″=1,...,num,并将(L
1,...L
num)发送给客户端;
如果搜索结果为⊥,则客户端输出⊥作为答案;
如果搜索结果为(a
i″,j″),且j″≠leftleaf+i″-1,则客户端输出⊥作为答案,如果j″=leftleaf+i″-1,则客户端输出A={a
1,...a
num}作为答案。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明权利要求所限定的范围。
Claims (7)
- 一种基于后缀树的可搜索加密系统,采用两方实体方案,即客户端与服务器端,其特征在于:包括初始化模块、安全索引构建模块、子字符串搜索模块及验证解密模块;所述初始化模块用于构建加密密钥和后缀树;构建加密密钥:由客户端运行,初始化客户端的公私钥及加密所需的密钥;所述安全索引构建模块用于构建索引以及索引加密;构建索引:由客户端运行,将待搜索数据构建成后缀树并生成后缀树的索引信息,包括字典结构,密文结构和叶子数组结构;索引加密:运行于客户端,负责对关键字索引即字典结构、密文数组结构和叶子数组结构进行加密操作,并将加密后的安全索引,包括密文,上传至云服务器,由云服务器进行存储;所述子字符串搜索模块用于构建搜索令牌和搜索;构建搜索令牌:运行于客户端,负责对搜索请求计算搜索令牌;搜索:运行于客户端和服务器端,客户端发送搜索令牌,服务器根据令牌搜索加密的安全索引,并将搜索后的结果返回给客户端;所述验证解密模块用于解密和验证;解密:运行于客户端,客户端收到返回的结果后,用自己的私钥对返回的结果进行解密,获取搜索结果明文;验证:运行于客户端,对解密后的明文进行验证,如果某步验证不通过,则丢弃此明文。
- 一种基于后缀树的可搜索加密方法,其特征在于:包括以下步骤:步骤1、根据安全参数λ,输出用户的对称密钥K;随机选择7个比特串 其中,K D为字典结构D的加密密钥,K C为密文数组C的密钥,K L为叶子数组结构L的密钥,K 1,K 2用于处理字典结构D入口值和对应后缀树节点u的第i个孩子节点child(u,i)的值,以及用于计算搜索令牌Tok=T 1、...、T m,K 3,K 4分别用来对待搜索字符串下标数ind,...,ind+m-1以及叶子的位置leftleaf,...,leftleaf+num-1进行伪随机置换;最后,输出K=(K D,K C,K L,K 1,K 2,K 3,K 4)作为用户的密钥,保证每个密钥各不相同;步骤2、客户端对给定数据构建后缀树T s;利用UKK算法将给定的字符串s构建成后缀树;步骤3、客户端根据后缀树T s建立安全索引CT并上传至服务器,其中CT由字典结构D、密文数组C和叶子数组L组成,表示为CT=(D,C,L);所述字典结构D对后缀树T s的每一个节点u建立一条包括key和value的条目,表示为D=(key,value),其中,key存储搜索的入口,键值value由搜索结构和待返回的密文结构组成;找到搜索入口,即能返回对应的value,用户进行解密操作;所述字典结构D采用 进行构造, 为后缀树的根节点到节点u的父亲节点上所有边上的字符串的连接,再加上节点u的父亲节点到它本身边上的第一个字符ω;客户端与服务器之间的交互搜索如下:步骤4、在用户搜索时,选取待搜索字符串p=p 1…p m∈∑ s.len,其中,s.len为待搜索字符串长度,并计算搜索令牌上传至服务器;步骤5、服务器接收到搜索令牌Tok后,先找到字典结构的初始入口,即根节点u 0的字典项D(F(K 1,∈)),其中,∈表示空字符串;步骤6、对于每个搜索令牌T i′,使用伪随机函数f(i′)按搜索令牌顺序进行解密;步骤7、用户运行解密操作,若解密失败,输出⊥并中止搜索协议,否则验证解密操作是否成立,若不成立,则输出⊥并中止搜索协议;否则,用户发送随机序列(x 1,...x m)给服务器;步骤8、服务器根据(x 1,...x m)搜索密文数组C,令C i″=C[x i″],i″=1,...,m,并发送(C 1,...C m)给用户;若Y=⊥,输出⊥并中止查询协议,否则,使搜索结果为(p i′,j″),若j″≠ind+i″-1,输出⊥;当j″=ind+i″-1时,如果p′ 1,…,p′ m≠p,用户输出Φ作为答案然后结束协议;如果p′ 1,...,p′ m=p,i″=1,...,num,用户选择随机序列π 2:[num]→[num],使 用户发送随机序列(y 1,...y num)给服务器;步骤10、如果i″=m,跳转到步骤8,否则,将i″加1,跳转到步骤7;步骤11、服务器端设置L i″=L[y i″],i″=1,...,num,并将(L 1,...L num)发送给客户端;如果搜索结果为⊥,客户端输出⊥作为答案;如果搜索结果为(a i″,j″),且j″≠leftleaf+i″-1,则客户端输出⊥作为答案,如果j″=leftleaf+i″-1,则客户端输出A={a 1,...a num}作为答案。
- 根据权利要求2所述的一种基于后缀树的可搜索加密方法,其特征在于:步骤3所述字典结构D的具体构建方法为:(2)、构造value值的搜索结构;对于节点u的每个孩子节点,计算 若节点u的孩子节点个数deg(u)<d,d为叶子节点个数,则添加随机项补足: 选择随机序列P:{0,1} λ×[d]→[d],将f 2,1(u),...,f 2,d(u)的顺序随机化,最终构造value值的搜索结构为f 2,P[1](u),...,f 2,P[d](u);(3)、对于后缀树T s的每个节点u,构造待返回的密文结构,如下公式所示:X u=Enc(K D,(ind u,leftleaf u,num u,len u,f 1(u),f 2,P[1](u),...,f 2,P[d](u)))最终构造的value值总体为Value u=(f 2,P[1](u),...,f 2,P[d](u),X u);
- 根据权利要求4述的一种基于后缀树的可搜索加密方法,其特征在于:所述步骤4的具体方法为:步骤4-1、获取加密数据结构所需的密钥K enc={K 1,K 2};步骤4-2、计算搜索令牌Tok=T 1,...,T m;对于i′=1,...,m,计算每一个伪随机函数f(i′)的值:f 1(i′)=F(K 1,p[1...i′])f 2(i′)=F(K 2,p[1...i′])T i′=Enc(F(K 1,p[1...i′]),F(K 2,p[1...i′]))并将搜索令牌T i′上传至服务器。
- 根据权利要求5述的一种基于后缀树的可搜索加密方法,其特征在于:所述步骤6的具体方法为:步骤6-1、设定字母a,b,并令a=1,b=1;步骤6-2、令i″=a,j″=b,且当1≤i″≤m,1≤j″≤d时,执行如下操作:Y←Dec(f 2,j″,T i″),将Y与字典结构D的入口key值对比:若Y=f 1(u′),则更新数据到字典项D(F(K 1,f 1(u′))),value值为:f 2,P[1](u′),K,f 2,P[d](u′),X u′=Enc(K D,X u′),并令a=a+1,跳转到步骤3-2;若Y≠f 1(u′),则令b=b+1,跳转到步骤6-3;步骤6-3、服务器将搜索结果X=Enc(K D,(ind,leftleaf,num,len,f 1,f 2,P[1],...,f 2,P[d]))发送给客户端。
- 根据权利要求6述的一种基于后缀树的可搜索加密方法,其特征在于:所述步骤7的 具体方法为:用户运行解密操作,令W=Dec(K D,X u),若W=⊥,则解密失败,输出⊥并中止搜索协议,若W≠⊥,将W展开为(ind,leftleaf,num,len,f 1,f 2,P[1],...,f 2,P[d]),检验f 1=F(K 1,p[1...i″])是否成立,如果等式不成立,则返回值出错,输出⊥并中止搜索协议;如果等式成立,验证在a=i′+1,...,m且b=1,...,d时,Dec(f 2,b,T a)=⊥是否成立,若成立,则表明p[1...i″]是能在字典D中搜索到最长的匹配前缀;解出ind,选取一个随机序列π 1:[m]→[m];将ind,...,ind+m-1置换,使 用户发送(x 1,...x m)给服务器。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910151513.5 | 2019-02-28 | ||
| CN201910151513.5A CN109815723A (zh) | 2019-02-28 | 2019-02-28 | 一种基于后缀树的可搜索加密系统及方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020172898A1 true WO2020172898A1 (zh) | 2020-09-03 |
Family
ID=66607870
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/076958 Ceased WO2020172898A1 (zh) | 2019-02-28 | 2019-03-05 | 一种基于后缀树的可搜索加密系统及方法 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109815723A (zh) |
| WO (1) | WO2020172898A1 (zh) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110689349B (zh) * | 2019-10-08 | 2023-07-11 | 深圳前海微众银行股份有限公司 | 一种区块链中的交易哈希值存储和搜索方法及装置 |
| WO2022077244A1 (en) * | 2020-10-14 | 2022-04-21 | Microsoft Technology Licensing, Llc. | A look-ahead strategy for trie-based beam search in generative retrieval |
| CN112765421B (zh) * | 2021-01-13 | 2024-01-02 | 中山大学 | 一种数据检索方法及装置、终端设备 |
| CN112800088B (zh) * | 2021-01-19 | 2023-09-19 | 东北大学 | 基于双向安全索引的数据库密文检索系统及方法 |
| CN112836222B (zh) * | 2021-01-25 | 2022-12-13 | 北京航空航天大学 | 面向智能推荐场景的安全搜索方法及装置 |
| CN115179515B (zh) * | 2022-05-31 | 2023-04-18 | 海天机械(广东)有限公司 | 一种用于注塑机快速切换模具数据的系统及方法 |
| CN115758417B (zh) * | 2022-11-22 | 2024-09-06 | 中金金融认证中心有限公司 | 数据处理方法、电子设备及存储介质 |
| CN115834203B (zh) * | 2022-11-23 | 2024-11-19 | 抖音视界有限公司 | 一种数据处理方法、装置、电子设备及存储介质 |
| CN117349894B (zh) * | 2023-12-01 | 2024-03-01 | 山东省计算中心(国家超级计算济南中心) | 一种基于填充字典加密的图结构最短路径查询方法 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103607405A (zh) * | 2013-11-27 | 2014-02-26 | 东北大学 | 一种面向云存储的密文搜索认证方法 |
| US20170091475A1 (en) * | 2015-09-30 | 2017-03-30 | Robert Bosch Gmbh | Method and System for Range Search on Encrypted Data |
| CN108388807A (zh) * | 2018-02-28 | 2018-08-10 | 华南理工大学 | 一种支持偏好搜索和逻辑搜索的高效可验证的多关键字排序可搜索加密方法 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8972415B2 (en) * | 2012-04-30 | 2015-03-03 | Hewlett-Packard Development Company, L.P. | Similarity search initialization |
| CN104052740A (zh) * | 2014-05-22 | 2014-09-17 | 西安理工大学 | 云存储中可验证的基于词典的可搜索加密方法 |
| CN106776791B (zh) * | 2016-11-23 | 2019-12-10 | 深圳大学 | 一种基于云服务的模式串匹配验证方法及装置 |
-
2019
- 2019-02-28 CN CN201910151513.5A patent/CN109815723A/zh active Pending
- 2019-03-05 WO PCT/CN2019/076958 patent/WO2020172898A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103607405A (zh) * | 2013-11-27 | 2014-02-26 | 东北大学 | 一种面向云存储的密文搜索认证方法 |
| US20170091475A1 (en) * | 2015-09-30 | 2017-03-30 | Robert Bosch Gmbh | Method and System for Range Search on Encrypted Data |
| CN108388807A (zh) * | 2018-02-28 | 2018-08-10 | 华南理工大学 | 一种支持偏好搜索和逻辑搜索的高效可验证的多关键字排序可搜索加密方法 |
Non-Patent Citations (1)
| Title |
|---|
| CHASE, MELISSA ET AL.: "Substring-Searchable Symmetric Encryption", PROCEEDINGS ON PRIVACY ENHANCING TECHNOLOGIES, 31 December 2015 (2015-12-31), ISSN: 2299-0984, DOI: 第263-281页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109815723A (zh) | 2019-05-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020172898A1 (zh) | 一种基于后缀树的可搜索加密系统及方法 | |
| CN111026788B (zh) | 一种混合云中基于同态加密的多关键词密文排序检索方法 | |
| CN106815350B (zh) | 一种云环境中动态的密文多关键词模糊搜索方法 | |
| CN107948146B (zh) | 一种混合云中基于属性加密的连接关键词检索方法 | |
| Pasupuleti et al. | An efficient and secure privacy-preserving approach for outsourced data of resource constrained mobile devices in cloud computing | |
| CN104038349B (zh) | 一种基于kp‑abe的有效可验证的公钥可搜索加密方法 | |
| WO2022099495A1 (zh) | 云计算环境中的密文搜索方法及系统、设备 | |
| CN112332979B (zh) | 云计算环境中的密文搜索方法及系统、设备 | |
| CN103607405B (zh) | 一种面向云存储的密文搜索认证方法 | |
| CN106708921A (zh) | 对加密数据的多对数范围查询 | |
| CN105681280A (zh) | 一种云环境中基于中文的可搜索加密方法 | |
| CN106599719A (zh) | 支持高效密钥管理的密文检索方法 | |
| CN110727951A (zh) | 具有隐私保护的轻量级外包文件多关键词检索方法及系统 | |
| Chi et al. | An Efficient Searchable Public‐Key Authenticated Encryption for Cloud‐Assisted Medical Internet of Things | |
| CN103970889A (zh) | 一种中英文关键词模糊搜索的安全云盘 | |
| CN108650268B (zh) | 一种实现多级访问的可搜索加密方法及系统 | |
| CN114884650A (zh) | 一种基于安全倒排索引的可搜索加密方法 | |
| CN107203723B (zh) | 基于散列表方法的多公共云上的文件存储及其检索方法 | |
| CN112328626B (zh) | 面向云环境的支持模糊关键词排序的可搜索加密方法 | |
| Wang et al. | Enabling secure cross-modal search over encrypted data via federated learning | |
| CN107294701B (zh) | 具有高效密钥管理的多维密文区间查询装置及查询方法 | |
| CN117786751A (zh) | 一种对称可搜索加密方法、装置、设备及介质 | |
| Wang et al. | Towards secure and effective utilization over encrypted cloud data | |
| CN108829714A (zh) | 一种密文数据多关键词的模糊搜索方法 | |
| Guo et al. | Privacy preserving weighted similarity search scheme for encrypted data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19917384 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19917384 Country of ref document: EP Kind code of ref document: A1 |