CN111526155A - System for protecting user privacy in social network and optimal path matching method - Google Patents

System for protecting user privacy in social network and optimal path matching method Download PDF

Info

Publication number
CN111526155A
CN111526155A CN202010363822.1A CN202010363822A CN111526155A CN 111526155 A CN111526155 A CN 111526155A CN 202010363822 A CN202010363822 A CN 202010363822A CN 111526155 A CN111526155 A CN 111526155A
Authority
CN
China
Prior art keywords
user
vertex
server
information
query
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.)
Granted
Application number
CN202010363822.1A
Other languages
Chinese (zh)
Other versions
CN111526155B (en
Inventor
张明武
陈誉
丁勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN202010363822.1A priority Critical patent/CN111526155B/en
Publication of CN111526155A publication Critical patent/CN111526155A/en
Application granted granted Critical
Publication of CN111526155B publication Critical patent/CN111526155B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Bioethics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Medical Informatics (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明涉及一种社交网络中保护用户隐私的系统及最优路径匹配方法。该方法包括:可信中心生成系统参数和密钥,并将系统参数发送至服务器和用户;用户进行注册;服务器进行注册;用户构造顶点信息和权值信息,并将在构造顶点信息和权值信息过程中生成的密文信息发送至服务器;服务器用于根据顶点信息和权值信息构造社交图;用户中的查询用户上传起终点标识至服务器;服务器根据社交图和起终点标识,生成路径序列和权值序列;服务器发送权值序列至查询用户,以使查询用户确定密文位置;查询用户根据密文位置采用不经意传输方式从路径序列中确定最优路径。本发明能够保证在路径查询时用户隐私不被泄露,同时查询速度快、处理准确高效。

Figure 202010363822

The invention relates to a system for protecting user privacy in a social network and an optimal path matching method. The method includes: the trusted center generates system parameters and keys, and sends the system parameters to the server and the user; the user registers; the server registers; the user constructs vertex information and weight information, and will configure the vertex information and weight information in the construction of the vertex information and weight information. The ciphertext information generated in the information process is sent to the server; the server is used to construct a social graph according to the vertex information and weight information; the query user in the user uploads the origin and destination identifiers to the server; the server generates a path sequence according to the social graph and the origin and destination identifiers and weight sequence; the server sends the weight sequence to the query user, so that the query user can determine the ciphertext position; the query user determines the optimal path from the path sequence by inadvertent transmission according to the ciphertext position. The invention can ensure that the user's privacy is not leaked during the route query, and meanwhile, the query speed is fast, and the processing is accurate and efficient.

Figure 202010363822

Description

一种社交网络中保护用户隐私的系统及最优路径匹配方法A system and optimal path matching method for protecting user privacy in social network

技术领域technical field

本发明涉及社交网络技术领域,特别是涉及一种社交网络中保护用户隐私的系统及最优路径匹配方法。The invention relates to the technical field of social networks, in particular to a system for protecting user privacy in a social network and an optimal path matching method.

背景技术Background technique

为了实现各种智能服务,例如推荐服务、共享服务、查询服务,在线社交网络需要利用用户的个人属性信息进行信息关联查询和匹配,以获得社交网络中的最优推荐。但是这些用户属性信息蕴含着很多用户的个人隐私,例如用户年龄、性别、工作单位、居住地点等敏感信息。恶意攻击者通过监听等手段可以获得、分析这些数据并用于非法操作。因此,如何保护社交网络中用户的隐私是一个重要课题。In order to realize various intelligent services, such as recommendation services, sharing services, and query services, online social networks need to use the user's personal attribute information to perform information correlation query and matching to obtain the optimal recommendation in the social network. However, these user attribute information contains many users' personal privacy, such as user age, gender, work unit, place of residence and other sensitive information. Malicious attackers can obtain and analyze these data and use them for illegal operations through monitoring and other means. Therefore, how to protect the privacy of users in social networks is an important topic.

在社交网络中,所有用户上传自己的隐私信息到云服务器。用户提供源点信息和终点信息可以查询到两个坐标之间的传播路径,其中最优传播路径表示用户传播的代价越小、传播越有效。通过最优传播路径,用户可以快速、高效地将某条消息传播给目标用户。为了保护隐私,用户信息通常被加密后再上传,而用户之间的传播代价(定义为权值)需要在外包环境下进行比较。因而整个过程应当保证服务器无法得知用户的敏感数据,系统用户除了传播路径得不到任何信息。目前也出现了一些解决上述问题的方法,例如基于同态加密算法的路径查询方法;同态性质使得对加密后得到的密文实施某种操作等同于对被加密的明文实施另一种操作得到的密文。但是已有的路径查询方案首先顶点间的权值信息定义不足够准确,没有考虑顶点之间的相互作用,无法明确表达路径查询的目的;其次查询速度与顶点数量呈正相关,无法保证大型社交网络的查询的实用性或者需要在准确性和高效性上做出权衡。In a social network, all users upload their private information to a cloud server. The user can query the propagation path between the two coordinates by providing the source point information and the end point information. The optimal propagation path means that the user's propagation cost is smaller and the propagation is more effective. Through the optimal propagation path, users can quickly and efficiently propagate a message to target users. To protect privacy, user information is usually encrypted before uploading, and the propagation cost (defined as weight) between users needs to be compared in an outsourcing environment. Therefore, the whole process should ensure that the server cannot know the user's sensitive data, and the system user cannot obtain any information except the propagation path. There are also some methods to solve the above problems, such as the path query method based on the homomorphic encryption algorithm; ciphertext. However, in the existing path query schemes, firstly, the definition of weight information between vertices is not accurate enough, and the interaction between vertices is not considered, so the purpose of path query cannot be clearly expressed; secondly, the query speed is positively correlated with the number of vertices, which cannot guarantee large-scale social networks. The utility of the query may require a trade-off between accuracy and efficiency.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种社交网络中保护用户隐私的系统及最优路径匹配方法,能够保证大型社交网络的任意两个顶点的传播路径能够被快速地查询和查询速度不依赖于用户的数量,提高隐私保护安全性。The purpose of the present invention is to provide a system for protecting user privacy in a social network and an optimal path matching method, which can ensure that the propagation paths of any two vertices of a large social network can be quickly queried and the query speed does not depend on the number of users , to improve privacy protection security.

为实现上述目的,本发明提供了如下方案:For achieving the above object, the present invention provides the following scheme:

一种社交网络中保护用户隐私的系统,包括:可信中心、服务器和用户,所述可信中心用于生成系统参数和密钥,并将所述参数发送至所述服务器;所述用户注册后构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器,所述服务器在注册后用于根据所述顶点信息和所述权值信息构造社交图,所述用户中的查询用户用于提供自己和目标用户的身份标识,所述服务器用于查询所有的传播路径和对应的权值,通过不经意传输的方式,为所述查询用户提供最优路径。A system for protecting user privacy in a social network, comprising: a trusted center, a server and a user, the trusted center is used to generate system parameters and keys, and send the parameters to the server; the user registers Post-construct vertex information and weight information, and send the ciphertext information generated in the process of constructing the vertex information and the weight information to the server, and the server is used for registering according to the vertex information and The weight information constructs a social graph, the query user among the users is used to provide the identities of himself and the target user, the server is used to query all the propagation paths and the corresponding weights, and through inadvertent transmission, it is The query user provides the optimal path.

一种社交网络中保护用户隐私的最优路径匹配方法,包括:An optimal path matching method for protecting user privacy in a social network, comprising:

可信中心生成系统参数和密钥,并将所述系统参数发送至服务器和用户;The trusted center generates system parameters and keys, and sends the system parameters to the server and the user;

所述用户进行注册;the user registers;

所述服务器进行注册;the server is registered;

所述用户构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器;The user constructs vertex information and weight information, and sends the ciphertext information generated in the process of constructing the vertex information and the weight information to the server;

所述服务器用于根据所述顶点信息和所述权值信息构造社交图;The server is configured to construct a social graph according to the vertex information and the weight information;

所述用户中的查询用户上传起终点标识至所述服务器;The query user among the users uploads the origination destination identifier to the server;

所述服务器根据所述社交图和所述起终点标识,生成路径序列和权值序列;The server generates a path sequence and a weight sequence according to the social graph and the starting and ending point identifiers;

所述服务器发送所述权值序列至所述查询用户,以使所述查询用户确定密文位置;The server sends the weight sequence to the query user, so that the query user determines the location of the ciphertext;

所述查询用户根据所述密文位置采用不经意传输方式从所述路径序列中确定最优路径。The query user determines the optimal path from the path sequence in an inadvertent transmission mode according to the ciphertext position.

可选的,所述可信中心生成系统参数和密钥,并将所述系统参数发送至服务器和用户,具体包括:Optionally, the trusted center generates system parameters and keys, and sends the system parameters to the server and the user, specifically including:

获取安全参数κ;Obtain the safety parameter κ;

根据所述安全参数,计算加密算法的主公钥mpk和主密钥msk,其中,mpk=(gmsk,g,p),

Figure BDA0002476024190000021
p是大素数且满足|p|=κ,
Figure BDA0002476024190000022
是[1,p-1]内的任意整数,g是
Figure BDA0002476024190000031
的一个生成元;选择随机数R,其中|R|<|p|/3;According to the security parameters, calculate the master public key mpk and master key msk of the encryption algorithm, where mpk=(g msk , g, p),
Figure BDA0002476024190000021
p is a large prime number satisfying |p|=κ,
Figure BDA0002476024190000022
is any integer in [1,p-1], and g is
Figure BDA0002476024190000031
A generator of ; choose a random number R, where |R|<|p|/3;

获取密钥对(sk1,sk2),所述密钥对包括第一密钥sk1和第二密钥sk2,其中,

Figure BDA0002476024190000032
sk1+sk2=msk mod(p-1);Obtain a key pair (sk 1 , sk 2 ), the key pair includes a first key sk 1 and a second key sk 2 , wherein,
Figure BDA0002476024190000032
sk 1 +sk 2 =msk mod(p-1);

随机获取n个用户密钥向量

Figure BDA0002476024190000033
其中,
Figure BDA0002476024190000034
Randomly obtain n user key vectors
Figure BDA0002476024190000033
in,
Figure BDA0002476024190000034

发布参数信息,所述参数信息包括所述主公钥、所述生成元、所述素数和所述随机数。Publish parameter information, where the parameter information includes the master public key, the generator, the prime number and the random number.

可选的,所述用户进行注册,具体包括:Optionally, the user performs registration, which specifically includes:

发送第一注册请求;send the first registration request;

可信中心根据所述第一注册请求从整数序列中随机选择一个整数作为当前用户的身份标识IDi,并将所述密钥向量

Figure BDA0002476024190000038
返回至所述当前用户;The trusted center randomly selects an integer from the integer sequence as the current user's identity ID i according to the first registration request, and uses the key vector
Figure BDA0002476024190000038
return to the current user;

向与所述当前用户连接的所有用户发送所述身份标识IDiSend the identification ID i to all users connected with the current user;

所述查询用户获得所述身份标识IDi后发送第二注册请求;After the inquiring user obtains the identity identifier ID i , a second registration request is sent;

所述可信中心根据所述第二注册请求向所述查询用户返回所述第一密钥sk1The trusted center returns the first key sk 1 to the query user according to the second registration request.

可选的,所述服务器进行注册,具体包括:Optionally, the server performs registration, which specifically includes:

发送第三注册请求;send a third registration request;

所述可信中心根据所述第三注册请求向所述服务器返回所述第二密钥sk2The trusted center returns the second key sk 2 to the server according to the third registration request.

可选的,所述用户构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器,具体包括:Optionally, the user constructs vertex information and weight information, and sends the ciphertext information generated in the process of constructing the vertex information and the weight information to the server, specifically including:

获取当前用户USERi的属性信息;Get the attribute information of the current user USER i ;

将属性信息通过one-hot编码二值化,使得每一维属性对应的二元值中只有一个比特的值为1;所述用户将个人的所有离散型属性转化为长度为w的属性向量

Figure BDA0002476024190000035
The attribute information is binarized by one-hot encoding, so that only one bit in the binary value corresponding to each dimension attribute has a value of 1; the user converts all discrete attributes of the individual into attribute vectors of length w
Figure BDA0002476024190000035

所述用户USERi根据所述密钥向量

Figure BDA0002476024190000036
加密所述属性向量
Figure BDA0002476024190000037
得到在社交网络中的顶点信息vi;The user USER i according to the key vector
Figure BDA0002476024190000036
encrypt the attribute vector
Figure BDA0002476024190000037
get the vertex information vi in the social network;

对于每个连接用户USERj,所述当前用户USERi向所述可信中心发送申请;For each connected user USER j , the current user USER i sends an application to the trusted center;

所述可信中心根据所述申请,返回权值密钥;The trusted center returns the weight key according to the application;

利用加密同态性质和所述权值密钥,计算权值密文,并将所述权值密文发送至服务器;Using the encryption homomorphism property and the weight key, calculate the weight ciphertext, and send the weight ciphertext to the server;

所述服务器整合密文,得到权值信息。The server integrates the ciphertext to obtain weight information.

可选的,所述服务器根据所述社交图和所述起终点标识,生成路径序列和权值序列,具体包括:Optionally, the server generates a path sequence and a weight sequence according to the social graph and the starting and ending point identifiers, specifically including:

在所述社交图中确定起点标识对应的顶点vs的所有的连接顶点,并定义为第一层起始顶点集S1;找到终点标识对应的顶点vt的所有的连接顶点并定义为第一层终止顶点集T1In the social graph, determine all the connected vertices of the vertex v s corresponding to the starting point identifier, and define it as the first layer starting vertex set S 1 ; find all the connecting vertices of the vertex v t corresponding to the end point identifier and define it as the first layer A layer of termination vertex set T 1 ;

确定所述第一层起始顶点集S1和所述第一层终止顶点集T1的共同顶点,记为vu,其中vu∈{S1∩T1},根据所述社交图查询顶点vs和vu以及vu和vt之间的权值,分别记为Es,u和Eu,t,将Es,u·Eu,t加入到权值序列

Figure BDA0002476024190000041
中,同时查询顶点vu对应的身份标识IDu,将IDu加入到路径序列
Figure BDA0002476024190000042
中;Determine the common vertex of the first layer start vertex set S 1 and the first layer end vertex set T 1 , denoted as v u , where v u ∈ {S 1 ∩ T 1 }, query according to the social graph The weights between vertices v s and v u and v u and v t are denoted as Es ,u and Eu,t respectively. Add Es ,u ·E u,t to the weight sequence
Figure BDA0002476024190000041
, at the same time query the ID u corresponding to the vertex v u , and add the ID u to the path sequence
Figure BDA0002476024190000042
middle;

根据所述社交图确定所述第一层起始顶点集S1的每个顶点vi的所有连接顶点vj,并定义为第二层起始顶点集S2,同时将vi→vj加入到前置顶点集P1Determine all connected vertices v j of each vertex v i of the first-layer starting vertex set S 1 according to the social graph, and define it as the second-layer starting vertex set S 2 , while changing v i →v j Add to the preceding vertex set P 1 ;

确定所述第二层起始顶点集S2和所述第一层终止顶点集T1的共同顶点,更新记为vu,其中vu∈{S2∩T1},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,根据所述社交图依次查询顶点vs和vi、vi和vu以及vu和vt之间的权值并分别记为Es,i、Ei,u以及Eu,t,将Es,i·Ei,u·Eu,t加入到权值序列

Figure BDA0002476024190000043
中,同时查询顶点vi和vu对应的身份标识IDi和IDu,将IDi·R+IDu加入到路径序列
Figure BDA0002476024190000044
中;Determine the common vertex of the second layer start vertex set S 2 and the first layer end vertex set T 1 , and update it as v u , where v u ∈ {S 2 ∩ T 1 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and record it as v i , query the weights between vertices v s and v i , v i and v u , and v u and v t in turn according to the social graph and denoted as E s,i , E i,u and E u,t respectively, add Es ,i ·E i,u ·E u,t to the weight sequence
Figure BDA0002476024190000043
, simultaneously query the identities ID i and ID u corresponding to the vertices v i and v u , and add ID i R+ID u to the path sequence
Figure BDA0002476024190000044
middle;

根据所述社交图确定所述第一层终止顶点集T1的每个顶点vi′的所有连接顶点vj′,并定义为第二层终止顶点集T2,同时将vi′→vj′加入到后置顶点集P2Determine all connected vertices v j' of each vertex v i' of the first-level termination vertex set T 1 according to the social graph, and define it as the second-level termination vertex set T 2 , while changing v i' →v j' is added to the post-vertex set P 2 ;

确定所述第二层起始顶点集S2和所述第二层终止顶点集T2的共同顶点,更新记为vu,其中vu∈{S2∩T2},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,在所述后置顶点集P2中找出vu的后置顶点并记为vi′,根据所述社交图依次查询顶点vs和vi、vi和vu、vu和vi′以及vi′和vu之间的权值并分别记为Es,i、Ei,u、Eu,i′以及Ei′,t,将Es,i·Ei,u·Eu,i′·Ei′,t加入到

Figure BDA0002476024190000045
中,同时查询顶点vi、vi′以及vu对应的身份标识IDi、IDi′以及IDu,将IDi·R2+IDu·R+IDi′加入到
Figure BDA00024760241900000512
中,得到路径序列
Figure BDA0002476024190000051
和权值序列
Figure BDA0002476024190000052
Determine the common vertex of the second-level starting vertex set S 2 and the second-level ending vertex set T 2 , and update it as v u , where v u ∈ {S 2 ∩ T 2 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and denote it as v i , find the post-vertex of v u in the post-vertex set P 2 and denote it as vi ' , according to the social graph Query the weights between vertices v s and v i , v i and v u , v u and v i ', and v i ' and v u in turn, and denote them as E s,i , E i,u , E u, i′ and E i′,t , add Es ,i ·E i,u ·E u,i′ ·E i′,t to
Figure BDA0002476024190000045
, simultaneously query the identities ID i , ID i ' and ID u corresponding to the vertices v i , v i ' and v u , and add ID i · R 2 +ID u · R+ID i' to the
Figure BDA00024760241900000512
, get the path sequence
Figure BDA0002476024190000051
and weight sequence
Figure BDA0002476024190000052

可选的,所述服务器发送所述权值序列至所述查询用户,以使所述查询用户确定密文位置,具体包括:Optionally, the server sends the weight sequence to the querying user, so that the querying user determines the location of the ciphertext, specifically including:

根据第二密钥sk2解密所述权值序列

Figure BDA0002476024190000053
的每个元素得到第一解密权值序列
Figure BDA0002476024190000054
并发送给所述查询用户;Decrypt the weight sequence according to the second key sk 2
Figure BDA0002476024190000053
Each element of gets the first decryption weight sequence
Figure BDA0002476024190000054
and send it to the query user;

所述查询用户根据所述第一密钥sk1解密所述第一权值序列

Figure BDA0002476024190000055
的每个元素,得到第二解密权值序列
Figure BDA0002476024190000056
The query user decrypts the first weight sequence according to the first key sk 1
Figure BDA0002476024190000055
For each element of , the second decryption weight sequence is obtained
Figure BDA0002476024190000056

根据所述第二解密权值序列

Figure BDA0002476024190000057
得到密文位置。According to the second decryption weight sequence
Figure BDA0002476024190000057
Get the ciphertext location.

可选的,所述查询用户根据所述密文位置采用不经意传输方式从所述路径序列中确定最优路径,具体包括:Optionally, the query user determines the optimal path from the path sequence in an inadvertent transmission mode according to the position of the ciphertext, specifically including:

服务器向所述查询用户发送q个随机整数Ci

Figure BDA0002476024190000058
i=1,2,…,q,其中q为序列
Figure BDA0002476024190000059
中元素的个数,
Figure BDA00024760241900000510
The server sends q random integers C i to the query user,
Figure BDA0002476024190000058
i=1,2,...,q, where q is the sequence
Figure BDA0002476024190000059
the number of elements in ,
Figure BDA00024760241900000510

所述查询用户生成密钥

Figure BDA00024760241900000511
计算q个公钥,并将各所述公钥发送至所述服务器,其中密文位置对应的所述公钥由密钥k生成,其余各所述公钥根据此所述公钥与所述整数Ci生成;The query user generates a key
Figure BDA00024760241900000511
Calculate q public keys, and send each public key to the server, where the public key corresponding to the ciphertext position is generated by the key k, and the other public keys are based on this public key and the Integer C i is generated;

所述服务器检查各所述公钥,得到检查结果;The server checks each of the public keys, and obtains a check result;

所述服务器根据检查结果,利用所述公钥加密路径序列,并将所述路径序列发送至所述查询用户;The server encrypts the path sequence with the public key according to the check result, and sends the path sequence to the query user;

所述查询用户根据密钥k解密所述路径序列中对应所述密文位置下的路径密文,通过不经意传输方式所述查询用户能确定社交网络最优路径。The query user decrypts the path ciphertext corresponding to the ciphertext position in the path sequence according to the key k, and the query user can determine the optimal path of the social network by inadvertent transmission.

根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

(1)本发明具有很高的安全性,所有过程都是利用ElGamal加密系统实现。即使服务器拥有完整的图信息,例如顶点信息和权值信息,只要用户与服务器之间不存在合谋,服务器和外部攻击者无法获得任何隐私信息。同时,用户无法从向量内积得到的权值密钥中恢复出连接用户的用户密钥。因此,本发明具有很高的隐私保护安全性。(1) The present invention has high security, and all processes are realized by using the ElGamal encryption system. Even if the server has complete graph information, such as vertex information and weight information, as long as there is no collusion between the user and the server, the server and external attackers cannot obtain any private information. At the same time, the user cannot recover the user key of the connected user from the weight key obtained by the inner product of the vector. Therefore, the present invention has high privacy protection security.

(2)利用不经意传输的方式,由于离散对数困难假设,服务器不知道用户想要查询的路径的具体内容,即无法判定出密文b的具体位置;因为服务器验证传输中公钥的正确性,用户也只能得到一条路径,即除了k无法伪造或者判定出其他密文所需要的密钥。(2) Using the inadvertent transmission method, due to the difficult assumption of discrete logarithms, the server does not know the specific content of the path the user wants to query, that is, the specific location of the ciphertext b cannot be determined; because the server verifies the correctness of the public key in the transmission , the user can only get one path, that is, the key required for other ciphertexts cannot be forged or determined except for k.

(3)本发明提出了一种社交网络中保护用户隐私的最优路径匹配方法,在保证安全性的前提下,通过使用源点和终点的双向广度优先搜索的数据结构,服务器操作速度快,处理高效,同时过程中的参数都可以预生成从而降低实际运行时间。(3) The present invention proposes an optimal path matching method for protecting user privacy in a social network. On the premise of ensuring security, by using the data structure of the bidirectional breadth-first search of the source point and the destination point, the server operation speed is fast, The processing is efficient, and the parameters in the process can be pre-generated to reduce the actual running time.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings required in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative labor.

图1为本发明社交网络中保护用户隐私的系统组成示意图;1 is a schematic diagram of a system composition for protecting user privacy in a social network of the present invention;

图2为本发明社交网络中保护用户隐私的系统内部数据传输示意图;2 is a schematic diagram of data transmission within the system for protecting user privacy in the social network of the present invention;

图3为本发明社交网络中保护用户隐私的最优路径匹配方法流程图;3 is a flowchart of an optimal path matching method for protecting user privacy in the social network of the present invention;

图4为本发明实施例的方法中实体注册的流程图;4 is a flowchart of entity registration in a method according to an embodiment of the present invention;

图5为本发明实施例的方法中不经意传输的流程图。FIG. 5 is a flowchart of inadvertent transmission in a method according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明的目的是提供一种社交网络中保护用户隐私的系统及最优路径匹配方法,能够保证大型社交网络的任意两个顶点的传播路径能够被快速地查询和查询速度不依赖于用户的数量,提高隐私保护安全性。The purpose of the present invention is to provide a system for protecting user privacy in a social network and an optimal path matching method, which can ensure that the propagation paths of any two vertices of a large social network can be quickly queried and the query speed does not depend on the number of users , to improve privacy protection security.

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more clearly understood, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

图1为本发明社交网络中保护用户隐私的系统组成示意图。如图1所示,一种社交网络中保护用户隐私的系统包括:可信中心1、服务器2、用户3。图2为本发明社交网络中保护用户隐私的系统内部数据传输示意图。如图2所示,该系统包括可信中心(TA),服务器(CS)和用户(USER)。可信中心1用于生成系统参数和密钥,并将参数发送至服务器2;用户3注册后构造顶点信息和权值信息,并将在构造顶点信息和权值信息过程中生成的密文信息发送至服务器2,服务器2在注册后用于根据顶点信息和权值信息构造社交图,用户3中的查询用户用于提供自己和目标用户的身份标识,服务器2用于查询所有的传播路径和对应的权值,通过不经意传输的方式,为查询用户提供最优路径。假设系统内有n位用户USERi(i=1,2,…,n)。可信中心1分配和计算系统参数:用户3的身份标识ID、用户密钥

Figure BDA0002476024190000077
查询密钥(sk1,sk2)、权值密钥f、查询密钥(sk1,sk2),USERi将个人的敏感信息通过加密上传到服务器2,服务器2通过计算并整合构建出一张由密文组成的社交图G=(V,E),用户3中的查询用户RU提供自身和目标用户的身份标识(IDs,IDt),服务器2查询出所有的传播路径
Figure BDA0002476024190000078
和对应的权值
Figure BDA0002476024190000079
查询用户解密权值序列得到最优传播路径的下标,通过多对一不经意传输OT1 q的方式,查询用户可以获取最优传播路径。FIG. 1 is a schematic diagram of the composition of a system for protecting user privacy in a social network according to the present invention. As shown in FIG. 1 , a system for protecting user privacy in a social network includes: a trusted center 1 , a server 2 , and a user 3 . FIG. 2 is a schematic diagram of data transmission within the system for protecting user privacy in the social network of the present invention. As shown in Figure 2, the system includes a trusted center (TA), a server (CS) and a user (USER). Trusted center 1 is used to generate system parameters and keys, and send the parameters to server 2; after user 3 registers, it constructs vertex information and weight information, and uses the ciphertext information generated in the process of constructing vertex information and weight information. Send to server 2. After registration, server 2 is used to construct a social graph based on vertex information and weight information. The query user in user 3 is used to provide the identity of himself and the target user. Server 2 is used to query all propagation paths and The corresponding weights are transmitted inadvertently to provide the optimal path for query users. Suppose there are n users USER i (i=1,2,...,n) in the system. Trusted center 1 allocates and calculates system parameters: user 3's identity ID, user key
Figure BDA0002476024190000077
Query key (sk 1 , sk 2 ), weight key f, and query key (sk 1 , sk 2 ), USER i uploads personal sensitive information to server 2 through encryption, and server 2 constructs a A social graph G=(V, E) composed of ciphertext, the query user RU in user 3 provides the identities (ID s , ID t ) of itself and the target user, and server 2 queries all propagation paths
Figure BDA0002476024190000078
and the corresponding weights
Figure BDA0002476024190000079
The query user decrypts the weight sequence to obtain the subscript of the optimal propagation path, and the query user can obtain the optimal propagation path by inadvertently transmitting OT 1 q by many-to-one.

图3为本发明社交网络中保护用户隐私的最优路径匹配方法流程图。如图3所示,一种社交网络中保护用户隐私的最优路径匹配方法包括:FIG. 3 is a flowchart of an optimal path matching method for protecting user privacy in a social network according to the present invention. As shown in Figure 3, an optimal path matching method for protecting user privacy in a social network includes:

步骤101:可信中心生成系统参数和密钥,并将所述系统参数发送至服务器和用户,具体包括:Step 101: The trusted center generates system parameters and keys, and sends the system parameters to the server and the user, specifically including:

获取安全参数κ。Obtain the safety parameter κ.

根据所述安全参数,计算加密算法的主公钥mpk和主密钥msk,其中,mpk=(gmsk,g,p),

Figure BDA0002476024190000071
p是大素数且满足|p|=κ,
Figure BDA0002476024190000072
代表[1,p-1]内的任意整数,g是
Figure BDA0002476024190000073
的一个生成元,选择随机数R,其中|R|<|p|/3。According to the security parameters, calculate the master public key mpk and master key msk of the encryption algorithm, where mpk=(g msk , g, p),
Figure BDA0002476024190000071
p is a large prime number satisfying |p|=κ,
Figure BDA0002476024190000072
represents any integer in [1,p-1], g is
Figure BDA0002476024190000073
A generator of , choose a random number R, where |R|<|p|/3.

获取密钥对(sk1,sk2),所述密钥对包括第一密钥sk1和第二密钥sk2,其中,

Figure BDA0002476024190000074
sk1+sk2=msk mod(p-1)。Obtain a key pair (sk 1 , sk 2 ), the key pair includes a first key sk 1 and a second key sk 2 , wherein,
Figure BDA0002476024190000074
sk 1 +sk 2 =msk mod(p-1).

随机获取n个用户密钥向量

Figure BDA0002476024190000075
其中,
Figure BDA0002476024190000076
Randomly obtain n user key vectors
Figure BDA0002476024190000075
in,
Figure BDA0002476024190000076

发布参数(mpk,g,p,R),即用于加密的公钥、生成元、素数模数信息以及用于整合路径的系统随机数信息。Publish parameters (mpk, g, p, R), that is, the public key used for encryption, the generator element, the prime number modulus information, and the system random number information used for the integration path.

步骤102:所述用户进行注册,具体包括:Step 102: The user performs registration, which specifically includes:

发送第一注册请求。Send the first registration request.

可信中心根据所述第一注册请求从整数序列中随机选择一个整数作为当前用户的身份标识IDi,并将所述密钥向量

Figure BDA0002476024190000081
返回至所述当前用户。The trusted center randomly selects an integer from the integer sequence as the current user's identity ID i according to the first registration request, and uses the key vector
Figure BDA0002476024190000081
Return to the current user.

向与所述当前用户连接的所有用户发送所述身份标识IDiThe identity identifier ID i is sent to all users connected to the current user.

所述查询用户获得所述身份标识IDi后发送第二注册请求。The inquiring user sends a second registration request after obtaining the identity identifier ID i .

所述可信中心根据所述第二注册请求向所述查询用户返回所述第一密钥sk1The trusted center returns the first key sk 1 to the query user according to the second registration request.

步骤103:所述服务器进行注册,具体包括:Step 103: The server performs registration, which specifically includes:

发送第三注册请求。A third registration request is sent.

所述可信中心根据所述第三注册请求向所述服务器返回所述第二密钥sk2The trusted center returns the second key sk 2 to the server according to the third registration request.

步骤104:所述用户构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器,具体包括:Step 104: The user constructs vertex information and weight information, and sends the ciphertext information generated in the process of constructing the vertex information and the weight information to the server, specifically including:

获取当前用户USERi的属性信息。Get the attribute information of the current user USER i .

将属性信息通过one-hot编码二值化,使得每一维属性对应的二元值中只有一个比特的值为1;所述用户能够将个人的所有离散型属性转化为长度为w的属性向量

Figure BDA0002476024190000082
The attribute information is binarized by one-hot encoding, so that only one bit in the binary value corresponding to each dimension attribute has a value of 1; the user can convert all discrete attributes of the individual into attribute vectors of length w
Figure BDA0002476024190000082

所述用户USERi根据所述密钥向量

Figure BDA0002476024190000083
加密所述属性向量
Figure BDA0002476024190000084
得到在社交网络中的顶点信息vi;其中:The user USER i according to the key vector
Figure BDA0002476024190000083
encrypt the attribute vector
Figure BDA0002476024190000084
Get the vertex information vi in the social network; where:

Figure BDA0002476024190000085
Figure BDA0002476024190000085

对于每个连接用户USERj,所述当前用户USERi向所述可信中心发送申请。For each connected user USER j , the current user USER i sends an application to the trusted center.

所述可信中心根据所述申请,返回权值密钥,具体为

Figure BDA0002476024190000086
The trusted center returns the weight key according to the application, specifically:
Figure BDA0002476024190000086

利用加密同态性质和所述权值密钥,计算权值密文,并将所述权值密文发送至服务器;其中权值密文

Figure BDA0002476024190000091
采用下式计算:Using the encryption homomorphism property and the weight key, calculate the weight ciphertext, and send the weight ciphertext to the server; wherein the weight ciphertext
Figure BDA0002476024190000091
Calculated using the following formula:

Figure BDA0002476024190000092
Figure BDA0002476024190000092

其中ranki,j为USERi和USERj之间的预定义的整数亲密值。where rank i,j is a predefined integer intimacy value between USER i and USER j .

所述服务器整合密文,得到权值信息。具体权值信息为:

Figure BDA0002476024190000093
其中权值ei,j定义为:
Figure BDA0002476024190000094
The server integrates the ciphertext to obtain weight information. The specific weight information is:
Figure BDA0002476024190000093
The weights e i,j are defined as:
Figure BDA0002476024190000094

步骤105:所述服务器用于根据所述顶点信息和所述权值信息构造社交图;根据所述顶点信息和所述权值信息构造社交图G=(V,E),其中:V={vi|i∈[1,n]},E={Ei,j|i,j∈[1,n],USERi和USERj有连接}。Step 105: The server is configured to construct a social graph according to the vertex information and the weight information; construct a social graph G=(V, E) according to the vertex information and the weight information, where: V={ v i |i∈[1,n]}, E={E i,j |i,j∈[1,n], USER i and USER j are connected}.

步骤106:所述用户中的查询用户上传起终点标识至所述服务器。Step 106: The query user among the users uploads the origin and destination identifiers to the server.

步骤107:所述服务器根据所述社交图和所述起终点标识,生成路径序列和权值序列,具体包括:Step 107: The server generates a path sequence and a weight sequence according to the social graph and the starting and ending point identifiers, specifically including:

在所述社交图中确定起点标识对应的顶点vs的所有的连接顶点,并定义为第一层起始顶点集S1;找到终点标识对应的顶点vt的所有的连接顶点并定义为第一层终止顶点集T1In the social graph, determine all the connected vertices of the vertex v s corresponding to the starting point identifier, and define it as the first layer starting vertex set S 1 ; find all the connecting vertices of the vertex v t corresponding to the end point identifier and define it as the first layer A layer terminates vertex set T 1 .

确定所述第一层起始顶点集S1和所述第一层终止顶点集T1的共同顶点记为vu,其中vu∈{S1∩T1},根据所述社交图查询顶点vs和vu以及vu和vt之间的权值,分别记为Es,u和Eu,t,将Es,u·Eu,t加入到权值序列

Figure BDA0002476024190000095
中,同时查询顶点vu对应的身份标识IDu,将IDu加入到路径序列
Figure BDA0002476024190000098
中。Determine the common vertex of the first layer start vertex set S 1 and the first layer end vertex set T 1 as v u , where v u ∈{S 1 ∩T 1 }, and query the vertex according to the social graph The weights between v s and v u and v u and v t are denoted as Es ,u and E u,t respectively. Add Es ,u ·E u,t to the weight sequence
Figure BDA0002476024190000095
, at the same time query the ID u corresponding to the vertex v u , and add the ID u to the path sequence
Figure BDA0002476024190000098
middle.

根据所述社交图确定所述第一层起始顶点集S1的每个顶点vi的所有连接顶点vj,并定义为第二层起始顶点集S2,同时将vi→vj加入到前置顶点集P1Determine all connected vertices v j of each vertex v i of the first-layer starting vertex set S 1 according to the social graph, and define it as the second-layer starting vertex set S 2 , while changing v i →v j Add to the preceding vertex set P 1 .

确定所述第二层起始顶点集S2和所述第一层终止顶点集T1的共同顶点,更新记为vu,其中vu∈{S2∩T1},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,根据所述社交图依次查询顶点vs和vi、vi和vu以及vu和vt之间的权值并分别记为Es,i、Ei,u以及Eu,t,将Es,i·Ei,u·Eu,t加入到权值序列

Figure BDA0002476024190000096
中,同时查询顶点vi和vu对应的身份标识IDi和IDu,将IDi·R+IDu加入到路径序列
Figure BDA0002476024190000097
中。Determine the common vertex of the second layer start vertex set S 2 and the first layer end vertex set T 1 , and update it as v u , where v u ∈ {S 2 ∩ T 1 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and record it as v i , query the weights between vertices v s and v i , v i and v u , and v u and v t in turn according to the social graph and denoted as E s,i , E i,u and E u,t respectively, add Es ,i ·E i,u ·E u,t to the weight sequence
Figure BDA0002476024190000096
, simultaneously query the identities ID i and ID u corresponding to the vertices v i and v u , and add ID i R+ID u to the path sequence
Figure BDA0002476024190000097
middle.

根据所述社交图确定所述第一层终止顶点集T1的每个顶点vi′的所有连接顶点vj′,并定义为第二层终止顶点集T2,同时将vi′→vj′加入到后置顶点集P2Determine all connected vertices v j' of each vertex v i' of the first-level termination vertex set T 1 according to the social graph, and define it as the second-level termination vertex set T 2 , while changing v i' →v j' is added to the post-vertex set P 2 .

确定所述第二层起始顶点集S2和所述第二层终止顶点集T2的共同顶点,更新记为vu,其中vu∈{S2∩T2},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,在所述后置顶点集P2中找出vu的后置顶点并记为vi′,根据所述社交图依次查询顶点vs和vi、vi和vu、vu和vi′以及vi′和vu之间的权值并分别记为Es,i、Ei,u、Eu,i′以及Ei′,t,将Es,i·Ei,u·Eu,i′·Ei′,t加入到

Figure BDA00024760241900001016
中,同时查询顶点vi、vi′以及vu对应的身份标识IDi、IDi′以及IDu,将IDi·R2+IDu·R+IDi′加入到
Figure BDA0002476024190000101
中,得到路径序列
Figure BDA0002476024190000102
和权值序列
Figure BDA0002476024190000103
Determine the common vertex of the second-level starting vertex set S 2 and the second-level ending vertex set T 2 , and update it as v u , where v u ∈ {S 2 ∩ T 2 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and denote it as v i , find the post-vertex of v u in the post-vertex set P 2 and denote it as vi ' , according to the social graph Query the weights between vertices v s and v i , v i and v u , v u and v i ', and v i ' and v u in turn, and denote them as E s,i , E i,u , E u, i′ and E i′,t , add Es ,i ·E i,u ·E u,i′ ·E i′,t to
Figure BDA00024760241900001016
, simultaneously query the identities ID i , ID i ' and ID u corresponding to the vertices v i , v i ' and v u , and add ID i · R 2 +ID u · R+ID i' to the
Figure BDA0002476024190000101
, get the path sequence
Figure BDA0002476024190000102
and weight sequence
Figure BDA0002476024190000103

步骤108:所述服务器发送所述权值序列至所述查询用户,以使所述查询用户确定密文位置,具体包括:Step 108: The server sends the weight sequence to the querying user, so that the querying user can determine the location of the ciphertext, which specifically includes:

根据第二密钥sk2解密所述权值序列

Figure BDA0002476024190000104
的每个元素得到第一解密权值序列
Figure BDA0002476024190000105
并发送给所述查询用户。Decrypt the weight sequence according to the second key sk 2
Figure BDA0002476024190000104
Each element of gets the first decryption weight sequence
Figure BDA0002476024190000105
and sent to the query user.

所述查询用户根据所述第一密钥sk1解密所述第一权值序列

Figure BDA0002476024190000106
的每个元素,得到第二解密权值序列
Figure BDA0002476024190000107
The query user decrypts the first weight sequence according to the first key sk 1
Figure BDA0002476024190000106
For each element of , the second decryption weight sequence is obtained
Figure BDA0002476024190000107

根据所述第二解密权值序列

Figure BDA0002476024190000108
得到密文位置。According to the second decryption weight sequence
Figure BDA0002476024190000108
Get the ciphertext location.

用第二密钥sk2解密权值序列

Figure BDA0002476024190000109
的每个元素得到
Figure BDA00024760241900001010
并发送给查询用户:Decrypt the sequence of weights with the second key sk 2
Figure BDA0002476024190000109
Each element of gets
Figure BDA00024760241900001010
and send to the querying user:

Figure BDA00024760241900001011
Figure BDA00024760241900001011

查询用户用第一密钥sk1解密权值序列

Figure BDA00024760241900001012
的每个元素:The query user decrypts the weight sequence with the first key sk 1
Figure BDA00024760241900001012
Each element of :

Figure BDA00024760241900001013
Figure BDA00024760241900001013

即最终解密的w″i为每一条路径的总权值,通过排序算法,例如冒泡算法,RU可以挑选出最小值的下标,即所述密文位置

Figure BDA00024760241900001014
That is, the final decrypted w" i is the total weight of each path. Through a sorting algorithm, such as a bubble algorithm, RU can select the subscript of the minimum value, that is, the position of the ciphertext.
Figure BDA00024760241900001014

步骤109:所述查询用户根据所述密文位置采用不经意传输方式从所述路径序列中确定最优路径,具体包括:Step 109: The query user determines the optimal path from the path sequence in an inadvertent transmission mode according to the ciphertext position, which specifically includes:

服务器向所述查询用户发送q个随机整数Ci

Figure BDA00024760241900001015
其中q为序列
Figure BDA0002476024190000111
中元素的个数,即
Figure BDA0002476024190000112
The server sends q random integers C i to the query user,
Figure BDA00024760241900001015
where q is the sequence
Figure BDA0002476024190000111
the number of elements in
Figure BDA0002476024190000112

所述查询用户计算q个公钥,并将各所述公钥β12,…,βq发送至所述服务器;其中,选择随机数

Figure BDA0002476024190000113
计算出第b个所述公钥βb,而其他所述公钥分两个方向逐步由相邻下标的所述公钥与所述随机整数计算而得,形成链式结构:The querying user calculates q public keys, and sends each of the public keys β 1 , β 2 , . . . , β q to the server; wherein a random number is selected
Figure BDA0002476024190000113
The b-th public key β b is calculated, and the other public keys are gradually calculated in two directions from the public keys of adjacent subscripts and the random integers, forming a chain structure:

βi=Cii+1 mod p,i=1,2,…,b-1β i =C ii+1 mod p,i=1,2,...,b-1

βb=gk mod pβ b =g k mod p

βj=Cj-1j-1 mod p,j=b+1,b+2,…,qβ j =C j-1j-1 mod p,j=b+1,b+2,...,q

所述服务器检查各所述公钥,即检查Ci=βi·βi+1 mod p,得到检查结果。The server checks each of the public keys, that is, checks C ii ·β i+1 mod p, and obtains a check result.

所述服务器根据检查结果,利用所述公钥加密路径序列,并将所述路径序列发送至所述查询用户;服务器用βi加密mi并发送给RU:

Figure BDA0002476024190000114
The server encrypts the path sequence with the public key according to the inspection result, and sends the path sequence to the query user; the server encrypts m i with β i and sends it to the RU:
Figure BDA0002476024190000114

所述查询用户根据密钥k解密所述路径序列中对应所述密文位置下的路径密文,通过不经意传输方式所述查询用户能确定社交网络最优路径。即所述查询用户利用密钥k解密第b份密文cb获取最优路径

Figure BDA0002476024190000115
并通过迭代计算最终得到最优路径中的每个顶点标识IDi=(mb-(mb mod R))/R。The query user decrypts the path ciphertext corresponding to the ciphertext position in the path sequence according to the key k, and the query user can determine the optimal path of the social network by inadvertent transmission. That is, the query user uses the key k to decrypt the b-th ciphertext c b to obtain the optimal path
Figure BDA0002476024190000115
And through the iterative calculation, the ID i =(m b -(m b mod R))/R of each vertex in the optimal path is finally obtained.

实施例1:Example 1:

本发明提供一种社交网络中保护用户隐私的最优路径匹配方法,包括以下步骤:The present invention provides an optimal path matching method for protecting user privacy in a social network, comprising the following steps:

步骤1:系统参数生成。Step 1: System parameter generation.

步骤1.1:可信中心(TA)选择安全参数κ,计算ElGamal加密算法的主公钥(mpk=gmsk,g,p)和主密钥

Figure BDA0002476024190000116
其中p是个大素数且满足|p|=κ,g是
Figure BDA0002476024190000117
的一个生成元。选择随机数R,其中|R|<|p|/3。Step 1.1: The trusted center (TA) selects the security parameter κ, and calculates the master public key (mpk=g msk , g, p) and master key of the ElGamal encryption algorithm
Figure BDA0002476024190000116
where p is a large prime number satisfying |p|=κ, and g is
Figure BDA0002476024190000117
a generator of . Choose a random number R, where |R| < |p|/3.

步骤1.2:TA选择一对密钥(sk1,sk2),其中

Figure BDA0002476024190000118
使得sk1+sk2=msk mod(p-1)。Step 1.2: TA chooses a pair of keys (sk 1 , sk 2 ), where
Figure BDA0002476024190000118
Let sk 1 +sk 2 =msk mod(p-1).

步骤1.3:TA随机选择n个用户密钥向量

Figure BDA0002476024190000119
Step 1.3: TA randomly selects n user key vectors
Figure BDA0002476024190000119

步骤1.4:TA发布参数(mpk,g,p,R)。Step 1.4: TA publishes parameters (mpk, g, p, R).

实体注册过程涉及图4。The entity registration process refers to Figure 4.

步骤2:实体注册。Step 2: Entity registration.

步骤2.1:用户USERi(i=1,2,…,n)注册。Step 2.1: User USER i (i=1,2,...,n) registers.

步骤2.1.1:用户USERi(i=1,2,…,n)发送注册请求。Step 2.1.1: User USER i (i=1,2,...,n) sends a registration request.

步骤2.1.2:TA从整数序列{1,2,…,n}中随机选择一个整数作为此用户的身份标识IDi,并将

Figure BDA0002476024190000121
返回给此用户。Step 2.1.2: TA randomly selects an integer from the integer sequence {1,2,...,n} as the user's identity ID i , and uses
Figure BDA0002476024190000121
Return to this user.

步骤2.1.3:用户USERi向他所有连接的用户发送自己的身份标识IDiStep 2.1.3: User USER i sends his identity ID i to all his connected users.

步骤2.1.4:查询用户RU发送注册请求。Step 2.1.4: The query user RU sends a registration request.

步骤2.1.5:TA向RU返回密钥sk1Step 2.1.5: The TA returns the key sk 1 to the RU.

步骤2.2:服务器CS注册。Step 2.2: Server CS registration.

步骤2.2.1:服务器CS发送注册请求。Step 2.2.1: The server CS sends a registration request.

步骤2.2.2:TA向CS返回密钥sk2Step 2.2.2: The TA returns the key sk 2 to the CS.

步骤3:社交图构建。Step 3: Social graph construction.

步骤3.1:顶点信息构造。Step 3.1: Vertex information construction.

步骤3.1.1:用户USERi将自己的属性信息通过one-hot编码二值化,即每维属性对应的二元值中只有一个比特的值为1。其中:Step 3.1.1: The user USER i binarizes his attribute information through one-hot encoding, that is, only one bit in the binary value corresponding to each dimension attribute has a value of 1. in:

性别为男时:sexi=10;性别为女时:sexi=01。When the gender is male: sex i =10; when the gender is female: sex i =01.

年龄为0-20时:agei=100;年龄为21-50时:agei=010;年龄为50以上时:agei=001。When the age is 0-20: age i = 100; when the age is 21-50: age i = 010; when the age is 50 or more: age i = 001.

从而使得用户的所有离散型属性被转化为每个元素为二元值的属性向量

Figure BDA0002476024190000122
其中w表示用户的属性向量的长度。So that all discrete attributes of the user are converted into attribute vectors with each element as a binary value
Figure BDA0002476024190000122
where w represents the length of the user's attribute vector.

步骤3.1.2:USERi用密钥

Figure BDA0002476024190000123
加密属性向量
Figure BDA0002476024190000124
形成顶点
Figure BDA0002476024190000125
Step 3.1.2: USER i with the key
Figure BDA0002476024190000123
encrypted attribute vector
Figure BDA0002476024190000124
form vertex
Figure BDA0002476024190000125

Figure BDA0002476024190000126
Figure BDA0002476024190000126

Figure BDA0002476024190000127
Figure BDA0002476024190000127

步骤3.2:权值信息构造。Step 3.2: Construction of weight information.

步骤3.2.1:对于每个连接用户USERj,用户USERi向TA发送申请

Figure BDA0002476024190000131
Step 3.2.1: For each connected user USER j , user USER i sends an application to TA
Figure BDA0002476024190000131

步骤3.2.2:TA查询IDj所对应的用户密钥向量

Figure BDA0002476024190000132
计算并返回权值密钥fj,i:Step 3.2.2: TA queries the user key vector corresponding to ID j
Figure BDA0002476024190000132
Compute and return the weight key f j,i :

Figure BDA0002476024190000133
Figure BDA0002476024190000133

步骤3.2.3:USERi利用ElGamal同态性质计算权值密文

Figure BDA0002476024190000134
并发送给服务器CS:Step 3.2.3: USER i uses the ElGamal homomorphism to calculate the weight ciphertext
Figure BDA0002476024190000134
and send to server CS:

Figure BDA0002476024190000135
Figure BDA0002476024190000135

其中ranki,j为USERi和USERj之间的预定义的整数亲密值。where rank i,j is a predefined integer intimacy value between USER i and USER j .

步骤3.2.4:CS整合密文并形成权值为:Step 3.2.4: CS integrates the ciphertext and forms the weights as:

Figure BDA0002476024190000136
Figure BDA0002476024190000136

其中权值ei,j定义为:The weights e i,j are defined as:

Figure BDA0002476024190000137
Figure BDA0002476024190000137

这表明两个用户越亲密,消息传播越快捷,使得用户间的权值越小。This shows that the closer the two users are, the faster the message spreads, making the weight between users smaller.

步骤3.3:根据顶点和边可以构造社交图G=(V,E)。Step 3.3: According to the vertices and edges, the social graph G=(V, E) can be constructed.

其中:V={vi|i∈[1,n]},E={Ei,j|i,j∈[1,n],USERi和USERj有连接}。Where: V={v i |i∈[1,n]}, E={E i,j |i,j∈[1,n], USER i and USER j are connected}.

步骤4:路径查询。Step 4: Path query.

步骤4.1:查询用户RU上传起终点对应的标识(IDs,IDt)到服务器CS。Step 4.1: query the user RU to upload the identifiers (ID s , ID t ) corresponding to the origin and destination to the server CS.

步骤4.2:CS生成路径序列

Figure BDA0002476024190000138
和权值序列
Figure BDA0002476024190000139
Step 4.2: CS Generate Path Sequence
Figure BDA0002476024190000138
and weight sequence
Figure BDA0002476024190000139

步骤4.2.1:CS在图G中找到起点vs的所有的连接顶点,并定义为第一层起始顶点集S1;找到终点vt的所有的连接顶点并定义为第一层终止顶点集T1。其中不包括vs和vtStep 4.2.1: CS finds all connected vertices of the starting point v s in the graph G, and defines it as the first-level starting vertex set S 1 ; finds all the connecting vertices of the end point v t and defines it as the first-level termination vertex Set T1 . which excludes v s and v t .

步骤4.2.2:CS挑选出S1和T1中的共同顶点vu∈{S1∩T1},查询顶点vs和vu以及vu和vt之间的权值,并将Es,u·Eu,t加入到

Figure BDA0002476024190000141
中,将vu对应的身份标识IDu加入到
Figure BDA0002476024190000142
中。Step 4.2.2: CS picks out the common vertex v u ∈ {S 1 ∩ T 1 } in S 1 and T 1 , queries the weights between vertices v s and v u and v u and v t , and assigns E s,u ·E u,t is added to
Figure BDA0002476024190000141
, add the ID u corresponding to v u to the
Figure BDA0002476024190000142
middle.

其中:in:

Figure BDA0002476024190000143
Figure BDA0002476024190000143

使用ElGamal加密系统的同态性质将两条连接边的权值聚合到一起。The weights of the two connected edges are aggregated together using the homomorphic property of the ElGamal encryption system.

步骤4.2.3:CS在图G中找到S1的每个顶点vi的所有连接顶点vj,并定义为第二层起始顶点集S2同时将vi→vj加入到前置顶点集P1;其中不包括vs和vtStep 4.2.3: CS finds all connected vertices v j of each vertex v i of S 1 in graph G, and defines it as the second-level starting vertex set S 2 while adding v i → v j to the preceding vertices Set P 1 ; which excludes v s and v t .

步骤4.2.4:CS挑选出S2和T1中的共同顶点vu∈{S2∩T1},在P1中找出vu的前置顶点为vi,查询顶点vs和vi、vi和vu以及vu和vt之间的权值,并将Es,i·Ei,u·Eu,t加入到

Figure BDA0002476024190000144
中,同时查询顶点vi和vu对应的身份标识IDi和IDu,将IDi·R+IDu加入到
Figure BDA0002476024190000145
中。Step 4.2.4: CS picks out the common vertex v u ∈ {S 2 ∩ T 1 } in S 2 and T 1 , finds the preceding vertex of v u in P 1 as v i , and queries vertices v s and v weights between i , vi and v u , and v u and v t , and add Es ,i ·E i,u ·E u,t to
Figure BDA0002476024190000144
, simultaneously query the identities ID i and ID u corresponding to the vertices v i and v u , and add ID i R+ID u to the
Figure BDA0002476024190000145
middle.

其中:in:

Figure BDA0002476024190000146
Figure BDA0002476024190000146

步骤4.2.5:CS在图G中找到T1的每个顶点vi′的所有连接顶点vj′,并定义为第二层终止顶点集T2同时将vi′→vj′加入到后置顶点集P2;其中不包括vs和vtStep 4.2.5: CS finds all connected vertices v j' of each vertex v i' of T 1 in the graph G, and defines it as the second-level termination vertex set T 2 while adding v i' → v j' to Post-vertex set P 2 ; which excludes v s and v t .

步骤4.2.6:CS挑选出S2和T2中的共同顶点vu∈{S2∩T2},在P1中找出vu的前置顶点为vi,在P2中找出vu的后置顶点为vi′,根据所述社交图依次查询顶点vs和vi、vi和vu、vu和vi′以及vi′和vu之间的权值,将Es,i·Ei,u·Eu,i′·Ei′,t加入到

Figure BDA0002476024190000151
中,同时查询顶点vi、vi′以及vu对应的身份标识IDi、IDi′以及IDu,将IDi·R2+IDu·R+IDi′加入到
Figure BDA0002476024190000152
中。Step 4.2.6: CS picks out the common vertex v u ∈ {S 2 ∩ T 2 } in S 2 and T 2 , finds the pre-vertex of v u in P 1 as v i , and finds out in P 2 The post vertex of v u is v i′ , according to the social graph, query the weights between vertices v s and v i , v i and v u , v u and v i ′, and v i ′ and v u in turn, Add E s,i ·E i,u ·E u,i′ ·E i′,t to
Figure BDA0002476024190000151
, simultaneously query the identities ID i , ID i ' and ID u corresponding to the vertices v i , v i ' and v u , and add ID i · R 2 +ID u · R+ID i' to the
Figure BDA0002476024190000152
middle.

其中:in:

Figure BDA0002476024190000153
Figure BDA0002476024190000153

步骤4.3:RU挑选出最优路径在路径序列中的下标b。Step 4.3: RU selects the subscript b of the optimal path in the path sequence.

步骤4.3.1:CS用密钥sk2解密权值序列

Figure BDA0002476024190000154
的每个元素得到
Figure BDA0002476024190000155
并发送给RU:Step 4.3.1: CS decrypts weight sequence with key sk 2
Figure BDA0002476024190000154
Each element of gets
Figure BDA0002476024190000155
and send to RU:

Figure BDA0002476024190000156
Figure BDA0002476024190000156

步骤4.3.2:RU用密钥sk1解密权值序列

Figure BDA0002476024190000157
的每个元素:Step 4.3.2: RU decrypts weight sequence with key sk 1
Figure BDA0002476024190000157
Each element of :

Figure BDA0002476024190000158
Figure BDA0002476024190000158

即最终解密的w″i为每一条路径的总权值,通过排序算法,例如冒泡算法,RU可以挑选出最小值对应的下标为

Figure BDA0002476024190000159
That is, the final decrypted w" i is the total weight of each path. Through a sorting algorithm, such as the bubble algorithm, RU can select the subscript corresponding to the minimum value as
Figure BDA0002476024190000159

不经意传输过程涉及图5。The inadvertent transmission process refers to Figure 5.

步骤4.4:RU不经意获取最优路径mbStep 4.4: RU inadvertently obtains the optimal path m b .

步骤4.4.1:CS向RU发送q个随机整数

Figure BDA00024760241900001510
其中q为序列
Figure BDA00024760241900001511
中元素的个数,即
Figure BDA00024760241900001512
Step 4.4.1: CS sends q random integers to RU
Figure BDA00024760241900001510
where q is the sequence
Figure BDA00024760241900001511
the number of elements in
Figure BDA00024760241900001512

步骤4.4.2:RU选择随机数

Figure BDA00024760241900001513
计算β12,…,βq并发送给CS:Step 4.4.2: RU chooses random number
Figure BDA00024760241900001513
Calculate β 1 , β 2 ,…,β q and send to CS:

βi=Cii+1 mod p,i=1,2,…,b-1β i =C ii+1 mod p,i=1,2,...,b-1

βb=gk mod pβ b =g k mod p

βj=Cj-1j-1 mod p,j=b+1,b+2,…,qβ j =C j-1j-1 mod p,j=b+1,b+2,...,q

步骤4.4.3:CS检查Ci=βi·βi+1 mod p。Step 4.4.3: CS checks C ii ·β i+1 mod p.

步骤4.4.4:CS用βi加密mi并发送给RU:

Figure BDA00024760241900001514
Step 4.4.4: CS encrypts m i with β i and sends to RU:
Figure BDA00024760241900001514

步骤4.4.5:RU利用密钥k解密第b份密文cb获取最优路径

Figure BDA0002476024190000161
并通过迭代计算最终得到最优路径中的每个顶点标识IDi=(mb-(mb mod R))/R。Step 4.4.5: RU uses the key k to decrypt the b-th ciphertext c b to obtain the optimal path
Figure BDA0002476024190000161
And through the iterative calculation, the ID i =(m b -(m b mod R))/R of each vertex in the optimal path is finally obtained.

本发明基于ElGamal同态加密和不经意传输OT1 q方法实现了一种社交网络中保护用户隐私的最优路径匹配方案,该方案实现了抗外部攻击和内部攻击。Based on the ElGamal homomorphic encryption and the inadvertent transmission OT 1 q method, the invention realizes an optimal path matching scheme for protecting user privacy in a social network, and the scheme realizes resistance to external attacks and internal attacks.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。In this paper, specific examples are used to illustrate the principles and implementations of the present invention. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present invention; meanwhile, for those skilled in the art, according to the present invention There will be changes in the specific implementation and application scope. In conclusion, the contents of this specification should not be construed as limiting the present invention.

Claims (9)

1.一种社交网络中保护用户隐私的系统,其特征在于,包括:可信中心、服务器和用户,所述可信中心用于生成系统参数和密钥,并将所述参数发送至所述服务器;所述用户注册后构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器,所述服务器在注册后用于根据所述顶点信息和所述权值信息构造社交图,所述用户中的查询用户用于提供自己和目标用户的身份标识,所述服务器用于查询所有的传播路径和对应的权值,通过不经意传输的方式,为所述查询用户提供最优路径。1. a system for protecting user privacy in a social network, comprising: a trusted center, a server and a user, the trusted center is used to generate system parameters and keys, and send the parameters to the server; the user constructs vertex information and weight information after registration, and sends the ciphertext information generated in the process of constructing the vertex information and the weight information to the server, and the server is used for A social graph is constructed according to the vertex information and the weight information, the query user among the users is used to provide the identities of himself and the target user, the server is used to query all propagation paths and corresponding weights, The optimal path is provided for the querying user in an inadvertently transmitted manner. 2.一种社交网络中保护用户隐私的最优路径匹配方法,其特征在于,包括:2. An optimal path matching method for protecting user privacy in a social network, characterized in that, comprising: 可信中心生成系统参数和密钥,并将所述系统参数发送至服务器和用户;The trusted center generates system parameters and keys, and sends the system parameters to the server and the user; 所述用户进行注册;the user registers; 所述服务器进行注册;the server is registered; 所述用户构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器;The user constructs vertex information and weight information, and sends the ciphertext information generated in the process of constructing the vertex information and the weight information to the server; 所述服务器用于根据所述顶点信息和所述权值信息构造社交图;The server is configured to construct a social graph according to the vertex information and the weight information; 所述用户中的查询用户上传起终点标识至所述服务器;The query user among the users uploads the origination destination identifier to the server; 所述服务器根据所述社交图和所述起终点标识,生成路径序列和权值序列;The server generates a path sequence and a weight sequence according to the social graph and the starting and ending point identifiers; 所述服务器发送所述权值序列至所述查询用户,以使所述查询用户确定密文位置;The server sends the weight sequence to the query user, so that the query user determines the location of the ciphertext; 所述查询用户根据所述密文位置采用不经意传输方式从所述路径序列中确定最优路径。The query user determines the optimal path from the path sequence in an inadvertent transmission mode according to the ciphertext position. 3.根据权利要求1所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述可信中心生成系统参数和密钥,并将所述系统参数发送至服务器和用户,具体包括:3. The optimal path matching method for protecting user privacy in the social network according to claim 1, wherein the trusted center generates system parameters and a key, and sends the system parameters to the server and the user, Specifically include: 获取安全参数κ;Obtain the safety parameter κ; 根据所述安全参数,计算加密算法的主公钥mpk和主密钥msk,其中,mpk=(gmsk,g,p),
Figure FDA0002476024180000011
p是大素数且满足|p|=κ,
Figure FDA0002476024180000012
是[1,p-1]内的任意整数,g是
Figure FDA0002476024180000013
的一个生成元,选择随机数R,其中|R|<|p|/3;
According to the security parameters, calculate the master public key mpk and master key msk of the encryption algorithm, where mpk=(g msk , g, p),
Figure FDA0002476024180000011
p is a large prime number satisfying |p|=κ,
Figure FDA0002476024180000012
is any integer in [1,p-1], and g is
Figure FDA0002476024180000013
A generator of , choose a random number R, where |R|<|p|/3;
获取密钥对(sk1,sk2),所述密钥对包括第一密钥sk1和第二密钥sk2,其中,sk1,
Figure FDA0002476024180000021
sk1+sk2=msk mod(p-1);
Obtain a key pair (sk 1 , sk 2 ), the key pair includes a first key sk 1 and a second key sk 2 , where sk 1 ,
Figure FDA0002476024180000021
sk 1 +sk 2 =msk mod(p-1);
随机获取n个用户密钥向量
Figure FDA0002476024180000022
其中,
Figure FDA0002476024180000023
Randomly obtain n user key vectors
Figure FDA0002476024180000022
in,
Figure FDA0002476024180000023
发布参数信息,所述参数信息包括所述主公钥、所述生成元、所述素数和所述随机数。Publish parameter information, where the parameter information includes the master public key, the generator, the prime number and the random number.
4.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述用户进行注册,具体包括:4. The optimal path matching method for protecting user privacy in a social network according to claim 3, wherein the user registers, specifically comprising: 发送第一注册请求;send the first registration request; 可信中心根据所述第一注册请求从整数序列中随机选择一个整数作为当前用户的身份标识IDi,并将所述密钥向量
Figure FDA0002476024180000024
返回至所述当前用户;
The trusted center randomly selects an integer from the integer sequence as the current user's identity ID i according to the first registration request, and uses the key vector
Figure FDA0002476024180000024
return to the current user;
向与所述当前用户连接的所有用户发送所述身份标识IDiSend the identification ID i to all users connected with the current user; 所述查询用户获得所述身份标识IDi后发送第二注册请求;After the inquiring user obtains the identity identifier ID i , a second registration request is sent; 所述可信中心根据所述第二注册请求向所述查询用户返回所述第一密钥sk1The trusted center returns the first key sk 1 to the query user according to the second registration request.
5.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述服务器进行注册,具体包括:5. The optimal path matching method for protecting user privacy in a social network according to claim 3, wherein the server performs registration, specifically comprising: 发送第三注册请求;send a third registration request; 所述可信中心根据所述第三注册请求向所述服务器返回所述第二密钥sk2The trusted center returns the second key sk 2 to the server according to the third registration request. 6.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述用户构造顶点信息和权值信息,并将在构造所述顶点信息和所述权值信息过程中生成的密文信息发送至所述服务器,具体包括:6. The optimal path matching method for protecting user privacy in a social network according to claim 3, wherein the user constructs vertex information and weight information, and will construct the vertex information and the weight information when constructing the vertex information and the weight information. The ciphertext information generated in the information process is sent to the server, which specifically includes: 获取当前用户USERi的属性信息;Get the attribute information of the current user USER i ; 将属性信息通过one-hot编码二值化,使得每一维属性对应的二元值中只有一个比特的值为1;所述用户能够将个人的所有离散型属性转化为长度为w的属性向量
Figure FDA0002476024180000025
The attribute information is binarized by one-hot encoding, so that only one bit in the binary value corresponding to each dimension attribute has a value of 1; the user can convert all discrete attributes of the individual into attribute vectors of length w
Figure FDA0002476024180000025
所述用户USERi根据所述密钥向量
Figure FDA0002476024180000026
加密所述属性向量
Figure FDA0002476024180000027
得到在社交网络中的顶点信息vi
The user USER i according to the key vector
Figure FDA0002476024180000026
encrypt the attribute vector
Figure FDA0002476024180000027
get the vertex information vi in the social network;
对于每个连接用户USERj,所述当前用户USERi向所述可信中心发送申请;For each connected user USER j , the current user USER i sends an application to the trusted center; 所述可信中心根据所述申请,返回权值密钥;The trusted center returns the weight key according to the application; 利用加密同态性质和所述权值密钥,计算权值密文,并将所述权值密文发送至服务器;Using the encryption homomorphism property and the weight key, calculate the weight ciphertext, and send the weight ciphertext to the server; 所述服务器整合密文,得到权值信息。The server integrates the ciphertext to obtain weight information.
7.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述服务器根据所述社交图和所述起终点标识,生成路径序列
Figure FDA0002476024180000031
和权值序列
Figure FDA0002476024180000032
具体包括:
7. The optimal path matching method for protecting user privacy in a social network according to claim 3, wherein the server generates a path sequence according to the social graph and the starting and ending point identifiers
Figure FDA0002476024180000031
and weight sequence
Figure FDA0002476024180000032
Specifically include:
在所述社交图中确定起点标识对应的顶点vs的所有的连接顶点,并定义为第一层起始顶点集S1;找到终点标识对应的顶点vt的所有的连接顶点并定义为第一层终止顶点集T1In the social graph, determine all the connected vertices of the vertex v s corresponding to the starting point identifier, and define it as the first layer starting vertex set S 1 ; find all the connecting vertices of the vertex v t corresponding to the end point identifier and define it as the first layer A layer of termination vertex set T 1 ; 确定所述第一层起始顶点集S1和所述第一层终止顶点集T1的共同顶点,记为vu,其中vu∈{S1∩T1},根据所述社交图查询顶点vs和vu以及vu和vt之间的权值,分别记为Es,u和Eu,t,将将Es,u·Eu,t加入到
Figure FDA0002476024180000033
中,同时查询顶点vu对应的身份标识IDu,将IDu加入到
Figure FDA0002476024180000034
中;
Determine the common vertex of the first layer start vertex set S 1 and the first layer end vertex set T 1 , denoted as v u , where v u ∈ {S 1 ∩ T 1 }, query according to the social graph The weights between vertices v s and v u and v u and v t are denoted as E s,u and E u,t , respectively. Es ,u ·E u,t will be added to the
Figure FDA0002476024180000033
, at the same time query the ID u corresponding to the vertex v u , and add the ID u to the
Figure FDA0002476024180000034
middle;
根据所述社交图确定所述第一层起始顶点集S1的每个顶点vi的所有连接顶点vj,并定义为第二层起始顶点集S2,同时将vi→vj加入到前置顶点集P1Determine all connected vertices v j of each vertex v i of the first-layer starting vertex set S 1 according to the social graph, and define it as the second-layer starting vertex set S 2 , while changing v i →v j Add to the preceding vertex set P 1 ; 确定所述第二层起始顶点集S2和所述第一层终止顶点集T1的共同顶点,更新记为vu,其中vu∈{S2∩T1},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,根据所述社交图依次查询顶点vs和vi、vi和vu以及vu和vt之间的权值并分别记为Es,i、Ei,u以及Eu,t,将Es,i·Ei,u·Eu,t加入到
Figure FDA0002476024180000035
中,同时查询顶点vi和vu对应的身份标识IDi和IDu,将IDi·R+IDu加入到
Figure FDA0002476024180000036
中;
Determine the common vertex of the second layer start vertex set S 2 and the first layer end vertex set T 1 , and update it as v u , where v u ∈ {S 2 ∩ T 1 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and record it as v i , query the weights between vertices v s and v i , v i and v u , and v u and v t in turn according to the social graph and denoted as E s,i , E i,u and E u,t respectively, add E s,i ·E i,u ·E u,t to
Figure FDA0002476024180000035
, simultaneously query the identities ID i and ID u corresponding to the vertices v i and v u , and add ID i R+ID u to the
Figure FDA0002476024180000036
middle;
根据所述社交图确定所述第一层终止顶点集T1的每个顶点vi′的所有连接顶点vj′,并定义为第二层终止顶点集T2,同时将vi′→vj′加入到后置顶点集P2Determine all connected vertices v j' of each vertex v i' of the first-level termination vertex set T 1 according to the social graph, and define it as the second-level termination vertex set T 2 , while changing v i' →v j' is added to the post-vertex set P 2 ; 确定所述第二层起始顶点集S2和所述第二层终止顶点集T2的共同顶点,更新记为vu,其中vu∈{S2∩T2},同时在所述前置顶点集P1中找出vu的前置顶点并记为vi,在所述后置顶点集P2中找出vu的后置顶点并记为vi′,根据所述社交图依次查询顶点vs和vi、vi和vu、vu和vi′以及vi′和vu之间的权值并分别记为Es,i、Ei,u、Eu,i′以及Ei′,t,将Es,i·Ei,u·Eu,i′·Ei′,t加入到
Figure FDA0002476024180000037
中,同时查询顶点vi、vi′以及vu对应的身份标识IDi、IDi′以及IDu,将IDi·R2+IDu·R+IDi′加入到
Figure FDA0002476024180000038
中,得到路径序列
Figure FDA0002476024180000041
和权值序列
Figure FDA0002476024180000042
Determine the common vertex of the second-level starting vertex set S 2 and the second-level ending vertex set T 2 , and update it as v u , where v u ∈ {S 2 ∩ T 2 }, and at the same time before the Find the pre-vertex of v u in the vertex set P 1 and denote it as v i , find the post-vertex of v u in the post-vertex set P 2 and denote it as vi ' , according to the social graph Query the weights between vertices v s and v i , v i and v u , v u and v i' , and v i' and v u in turn, and denote them as Es ,i , E i,u , E u, i′ and E i′,t , add Es ,i ·E i,u ·E u,i′ ·E i′,t to
Figure FDA0002476024180000037
, simultaneously query the identities ID i , ID i ' and ID u corresponding to the vertices v i , v i' and v u , and add ID i · R 2 +ID u · R+ID i' to the
Figure FDA0002476024180000038
, get the path sequence
Figure FDA0002476024180000041
and weight sequence
Figure FDA0002476024180000042
8.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述服务器发送所述权值序列至所述查询用户,以使所述查询用户确定密文位置,具体包括:8 . The optimal path matching method for protecting user privacy in a social network according to claim 3 , wherein the server sends the weight sequence to the query user, so that the query user can determine the ciphertext. 9 . location, including: 根据第二密钥sk2解密所述权值序列
Figure FDA0002476024180000043
的每个元素得到第一解密权值序列
Figure FDA0002476024180000044
并发送给所述查询用户;
Decrypt the weight sequence according to the second key sk 2
Figure FDA0002476024180000043
Each element of gets the first decryption weight sequence
Figure FDA0002476024180000044
and send it to the query user;
所述查询用户根据所述第一密钥sk1解密所述第一权值序列
Figure FDA0002476024180000045
的每个元素,得到第二解密权值序列
Figure FDA0002476024180000046
The query user decrypts the first weight sequence according to the first key sk 1
Figure FDA0002476024180000045
For each element of , the second decryption weight sequence is obtained
Figure FDA0002476024180000046
根据所述第二解密权值序列
Figure FDA0002476024180000047
得到密文位置。
According to the second decryption weight sequence
Figure FDA0002476024180000047
Get the ciphertext location.
9.根据权利要求3所述的社交网络中保护用户隐私的最优路径匹配方法,其特征在于,所述查询用户根据所述密文位置采用不经意传输方式从所述路径序列中确定最优路径,具体包括:9 . The optimal path matching method for protecting user privacy in a social network according to claim 3 , wherein the query user determines the optimal path from the path sequence by inadvertent transmission according to the ciphertext position. 10 . , including: 服务器向所述查询用户发送q个随机整数Ci
Figure FDA0002476024180000048
其中q为序列
Figure FDA0002476024180000049
中元素的个数,
Figure FDA00024760241800000410
The server sends q random integers C i to the query user,
Figure FDA0002476024180000048
where q is the sequence
Figure FDA0002476024180000049
the number of elements in ,
Figure FDA00024760241800000410
所述查询用户生成密钥
Figure FDA00024760241800000411
计算q个公钥,并将各所述公钥发送至所述服务器,其中密文位置对应的所述公钥由密钥k生成,其余各所述公钥根据此所述公钥与所述整数Ci生成;
The query user generates a key
Figure FDA00024760241800000411
Calculate q public keys, and send each public key to the server, where the public key corresponding to the ciphertext position is generated by the key k, and the other public keys are based on this public key and the Integer C i is generated;
所述服务器检查各所述公钥,得到检查结果;The server checks each of the public keys, and obtains a check result; 所述服务器根据检查结果,利用所述公钥加密路径序列,并将所述路径序列发送至所述查询用户;The server encrypts the path sequence with the public key according to the check result, and sends the path sequence to the query user; 所述查询用户根据密钥k解密所述路径序列中对应所述密文位置下的路径密文,通过不经意传输方式所述查询用户能确定社交网络最优路径。The querying user decrypts the path ciphertext corresponding to the ciphertext position in the path sequence according to the key k, and the querying user can determine the optimal path of the social network by inadvertent transmission.
CN202010363822.1A 2020-04-30 2020-04-30 A system and optimal path matching method for protecting user privacy in social network Expired - Fee Related CN111526155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010363822.1A CN111526155B (en) 2020-04-30 2020-04-30 A system and optimal path matching method for protecting user privacy in social network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010363822.1A CN111526155B (en) 2020-04-30 2020-04-30 A system and optimal path matching method for protecting user privacy in social network

Publications (2)

Publication Number Publication Date
CN111526155A true CN111526155A (en) 2020-08-11
CN111526155B CN111526155B (en) 2022-09-09

Family

ID=71908523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010363822.1A Expired - Fee Related CN111526155B (en) 2020-04-30 2020-04-30 A system and optimal path matching method for protecting user privacy in social network

Country Status (1)

Country Link
CN (1) CN111526155B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492586A (en) * 2020-11-23 2021-03-12 中国联合网络通信集团有限公司 Encryption transmission scheme optimization method and device
CN112989386A (en) * 2021-03-31 2021-06-18 苏州黑云智能科技有限公司 Blacklist sharing method and system based on accidental transmission
CN113536366A (en) * 2021-06-09 2021-10-22 湖北工业大学 Privacy protection tracing system and method for close contacts of infectious disease patients

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100014657A1 (en) * 2008-07-16 2010-01-21 Florian Kerschbaum Privacy preserving social network analysis
CN107347096A (en) * 2017-07-07 2017-11-14 安徽大学 Location privacy protection method based on cloud server
CN109728904A (en) * 2018-12-28 2019-05-07 沈阳航空航天大学 A kind of spatial network querying method for protecting privacy
CN110569413A (en) * 2019-08-16 2019-12-13 湖北工业大学 An indexing system and method for protecting member privacy in a social network
CN110933050A (en) * 2019-11-18 2020-03-27 湖北工业大学 Privacy protection position sharing system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100014657A1 (en) * 2008-07-16 2010-01-21 Florian Kerschbaum Privacy preserving social network analysis
CN107347096A (en) * 2017-07-07 2017-11-14 安徽大学 Location privacy protection method based on cloud server
CN109728904A (en) * 2018-12-28 2019-05-07 沈阳航空航天大学 A kind of spatial network querying method for protecting privacy
CN110569413A (en) * 2019-08-16 2019-12-13 湖北工业大学 An indexing system and method for protecting member privacy in a social network
CN110933050A (en) * 2019-11-18 2020-03-27 湖北工业大学 Privacy protection position sharing system and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GAO, CHONG-ZHI, ET AL.: ""Cloud-assisted privacy-preserving profile-matching scheme under multiple keys in mobile social network."", 《CLUSTER COMPUTING 》 *
XU, JIAN, ET AL.: ""SPCSS: social network based privacy-preserving criminal suspects sensing."", 《IEEE TRANSACTIONS ON COMPUTATIONAL SOCIAL SYSTEMS》 *
ZHANG, LEI, ET AL.: ""Privacy preserving in cloud environment for obstructed shortest path query."", 《WIRELESS PERSONAL COMMUNICATIONS》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492586A (en) * 2020-11-23 2021-03-12 中国联合网络通信集团有限公司 Encryption transmission scheme optimization method and device
CN112492586B (en) * 2020-11-23 2023-05-23 中国联合网络通信集团有限公司 Encryption transmission scheme optimization method and device
CN112989386A (en) * 2021-03-31 2021-06-18 苏州黑云智能科技有限公司 Blacklist sharing method and system based on accidental transmission
CN112989386B (en) * 2021-03-31 2023-09-22 苏州黑云智能科技有限公司 Blacklist sharing method and system based on careless transmission
CN113536366A (en) * 2021-06-09 2021-10-22 湖北工业大学 Privacy protection tracing system and method for close contacts of infectious disease patients
CN113536366B (en) * 2021-06-09 2022-07-05 湖北工业大学 A privacy protection traceability system and method for close contacts of infectious disease patients

Also Published As

Publication number Publication date
CN111526155B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN109981641B (en) Block chain technology-based safe publishing and subscribing system and publishing and subscribing method
Li et al. Full verifiability for outsourced decryption in attribute based encryption
CN111526155B (en) A system and optimal path matching method for protecting user privacy in social network
CN105323061B (en) It is a kind of can keyword search outsourcing key generate and decryption attribute based system and decryption method
CN110730064A (en) Data fusion method based on privacy protection in crowd sensing network
Sun et al. Attribute-hiding predicate encryption with equality test in cloud computing
Samanthula et al. Privacy-Preserving and Efficient Friend Recommendation in Online Social Networks.
Li et al. PROS: A privacy-preserving route-sharing service via vehicular fog computing
Badr et al. Blockchain-based ride-sharing system with accurate matching and privacy-preservation
Zhang et al. A trajectory privacy-preserving scheme based on transition matrix and caching for IIoT
CN113905047A (en) A privacy protection method and system for spatial crowdsourcing task assignment
Alornyo et al. Encrypted traffic analytic using identity based encryption with equality test for cloud computing
Zhu et al. Efficient weight-based private matching for proximity-based mobile social networks
Qin et al. Simultaneous authentication and secrecy in identity-based data upload to cloud
Chen et al. PP-OCQ: A distributed privacy-preserving optimal closeness query scheme for social networks
Thapa et al. Asymmetric social proximity based private matching protocols for online social networks
WO2021031801A1 (en) Indexing system and method for protecting user privacy in social network
JP2002026892A (en) Key sharing method, private key generating method, common key generating method, encryption communication method, private key generator, common key generator, encryption communication system and recording medium
WO2022213577A1 (en) Method and apparatus for querying spatial text
CN113204788B (en) Fine granularity attribute matching privacy protection method
Hayata et al. Generic construction of adaptively secure anonymous key-policy attribute-based encryption from public-key searchable encryption
CN109257167B (en) Resource allocation method for protecting privacy in fog calculation
Shi et al. A Novel Privacy-Preserving Multi-Attribute Reverse Auction Scheme with Bidder Anonymity Using Multi-Server Homomorphic Computation.
Magkos et al. Towards secure and practical location privacy through private equality testing
Li et al. Privacy-preserving data aggregation for big data in financial institutions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220909

CF01 Termination of patent right due to non-payment of annual fee