WO2022174419A1 - 一种根密钥保护方法和系统 - Google Patents

一种根密钥保护方法和系统 Download PDF

Info

Publication number
WO2022174419A1
WO2022174419A1 PCT/CN2021/077072 CN2021077072W WO2022174419A1 WO 2022174419 A1 WO2022174419 A1 WO 2022174419A1 CN 2021077072 W CN2021077072 W CN 2021077072W WO 2022174419 A1 WO2022174419 A1 WO 2022174419A1
Authority
WO
WIPO (PCT)
Prior art keywords
key material
node
key
information
nodes
Prior art date
Application number
PCT/CN2021/077072
Other languages
English (en)
French (fr)
Inventor
欧锻灏
蒋刚林
王宏磊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/077072 priority Critical patent/WO2022174419A1/zh
Priority to CN202180003923.0A priority patent/CN115226416B/zh
Publication of WO2022174419A1 publication Critical patent/WO2022174419A1/zh

Links

Images

Classifications

    • 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

Definitions

  • the present application relates to the field of communications, and more particularly, to a root key protection method and system.
  • the root key encrypts the master key
  • the master key encrypts the work key
  • the work key encrypts business-sensitive data.
  • the root key is located at the bottom of the key hierarchy and has no key to encrypt it, so it determines the security of the entire cryptosystem. Secure two-party computation (2PC) can effectively protect the root key.
  • the successful execution of secure two-party computation requires both nodes participating in the computation to be available at the same time, and the failure of either node will cause the two-party computation to fail.
  • the smooth execution of the two-party calculation is ensured by adding redundant computing nodes (or the main-standby method, that is, adding a backup node to the main node of the two-party calculation), and on the basis of the two-node calculation At least two more nodes are required to be fault-tolerant if any node fails.
  • this method cannot tolerate the failure of any two nodes in multiple nodes (the number of nodes is greater than 3), so how to improve the reliability of the 2PC-based key protection method is an urgent problem to be solved.
  • the present application provides a root key protection method and system, which enables, in the protection of the root key based on secure two-party computation, to tolerate failure of any two nodes in a plurality of nodes (the number of nodes is greater than 3), or If any one of the three fault-tolerant nodes fails, the reliability of the key protection method based on secure two-party computation is effectively improved.
  • a root key protection method is provided, applied in a system including n nodes, the n nodes include a first master node, a second master node and at least one auxiliary node, the n nodes
  • Each node in is stored with first association relationship information, the first association relationship information is used to indicate the binary label corresponding to each node in the n nodes, n is an integer greater than 2, 2 k ⁇ n, k is the number of bits of the binary label, each bit of the first binary label corresponding to the first master node is 0, and each bit of the second binary label corresponding to the second master node are all 1, the binary labels corresponding to any two secondary nodes are different, and the binary label corresponding to each secondary node includes at least one number 0 and at least one number 1, the method includes: the first secondary node is sent from the first primary node.
  • the first secondary node receives second information from the second primary node, the second information includes a part of the second key material, the second key material is all the key material used by the second master node, the second information is determined based on the third binary label; the first secondary node generates the first secondary node according to the first information and the second information Three key material, wherein the XOR result of the key material in the same column of the first key material and the second key material is the same, the second key material and the third key material The XOR result of the key material in the same column in the first key material is the same, and the XOR result of the key material in the same column in the first key material and the third key material is the same; the first secondary node will One of the third key materials is used as input to the secure two-party computation.
  • the nodes participating in the two-party computation are classified by using binary labels, so that the nodes participating in the two-party computation can be divided into master nodes and auxiliary nodes in the process of negotiating keys, wherein the master node is responsible for all nodes.
  • the secondary node is responsible for the generation of the key required by itself, and makes the XOR result of the key material in the same column in the key material of any two nodes the same, that is, the root key is the same.
  • this method can tolerate the failure of any two nodes in multiple nodes (the number of nodes is greater than 3), and on the basis of 2 nodes participating in the two-party computing, only one node can be added.
  • this method deploys multiple copies of key material on redundant nodes, which effectively improves the reliability of the (2, n) threshold-based root key protection method based on two-party computation, and ensures that the same node is protected.
  • the key material on the server cannot recover the root key, which ensures security.
  • the first key material is k random numbers generated by the first master node.
  • the second key material is determined by the second master node according to a first random number and first auxiliary information
  • the first auxiliary information is The first master node is determined according to the first key material.
  • the first master node enables the second master node to determine the second key material according to the first random number and the first auxiliary information by generating the first auxiliary information, which cannot be obtained only based on the second key material
  • the first key material, and the root key cannot be recovered, further improves the security of the root key protection method based on the two-party computation with the (2, n) threshold.
  • the first information includes a part of the first key material including: the first information includes k values corresponding to the third binary label , the value of the third binary label bit corresponding to 1 in the k values is 0, and the value of the third binary label bit corresponding to the k values is 0. A value at the corresponding position in the key material.
  • the first key material is (R 0 , R 1 )
  • the binary label corresponding to the first key material is “0, 0”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (R 0 , 0).
  • the second information includes a part of the second key material including: the second information includes k values corresponding to the third binary label , the value of the third binary label bit corresponding to 0 in the k values is 0, and the value of the third binary label bit corresponding to the k values is 1. The value of the corresponding position in the secondary key material.
  • the second key material is (R 2 , R 3 )
  • the binary label corresponding to the second key material is “1, 1”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (0, R 3 ).
  • the first secondary node uses the first information and the second information to generate the third key material, such as (R 0 , R 3 ), to ensure that the same column in the key material of any two nodes is
  • the XOR result of the key material is the same, that is, the reliability of the root key protection method based on the two-party calculation of the threshold (2, n), and the first key material and the second key material cannot be recovered from the third key material. Key material to ensure security.
  • the first auxiliary node using one of the third key materials as the input of the secure two-party computation includes: the first auxiliary node The node obtains the available two-party node identifier sent by the available two-party node specifying module, where the available two-party node identifier includes a first identifier and a second identifier; the first auxiliary node determines that the first identifier is the first auxiliary node the node identifier of the node, the first auxiliary node determines the first input key material according to the third key material, and the first input key material is one of the third key materials, The first secondary node uses the first input key material as an input for secure two-party computation.
  • the available two-party node identifiers sent by the two-party node specifying module can assist in the failure of any two nodes (or any one of the three nodes) in the fault-tolerant multiple nodes (the number of nodes is greater than 3).
  • the designation of available nodes in the process of failure) can better cope with the occurrence of failures.
  • a root key generation network device is provided, the network device is included in a system of n nodes, the n nodes include a first master node, a second master node and at least one secondary node, Each of the n nodes stores first association relationship information, and the first association relationship information is used to indicate a binary label corresponding to each of the n nodes, where n is an integer greater than 2, 2 k ⁇ n, k is the number of bits of the binary label, each bit of the first binary label corresponding to the first master node is 0, and the second binary label corresponding to the second master node is 0.
  • the network device includes: a receiving unit, the receiving unit is configured to receive first information from the first master node, the first information includes a part of the first key material, the first key material is the the key material used by the first master node, the first information is determined based on the third binary label corresponding to the first slave node; the receiving unit is configured to receive the second information from the second master node, the second information includes a portion of second key material that is used by the second master node, the second information is determined based on the third binary tag a processing unit, the processing unit is configured to generate a third key material according to the first information and the second information, wherein the first key material and the second key material are the same
  • the XOR result of the key material in the column is the same, the XOR result of the key material in the same column
  • the nodes participating in the two-party computation are classified by using binary labels, so that the nodes participating in the two-party computation can be divided into master nodes and auxiliary nodes in the process of negotiating keys, wherein the master node is responsible for all nodes.
  • the secondary node is responsible for the generation of the key required by itself, and makes the XOR result of the key material in the same column in the key material of any two nodes the same, that is, the root key is the same.
  • this method can tolerate the failure of any two nodes in multiple nodes (the number of nodes is greater than 3), and on the basis of 2 nodes participating in the two-party computing, only one node can be added.
  • this method deploys multiple copies of key material on redundant nodes, which effectively improves the reliability of the (2, n) threshold-based root key protection method based on two-party computation, and ensures that the same node is protected.
  • the key material on the server cannot recover the root key, which ensures security.
  • the first key material is k random numbers generated by the first master node.
  • the second key material is determined by the second master node according to a first random number and first auxiliary information
  • the first auxiliary information is The first master node is determined according to the first key material.
  • the first master node enables the second master node to determine the second key material according to the first random number and the first auxiliary information by generating the first auxiliary information, which cannot be obtained only based on the second key material
  • the first key material, and the root key cannot be recovered, further improves the security of the root key protection method based on the two-party computation with the (2, n) threshold.
  • the first information including a part of the first key material includes: the first information includes k values corresponding to the third binary label , the value of the third binary label bit corresponding to 1 in the k values is 0, and the value of the third binary label bit corresponding to the k values is 0. A value at the corresponding position in the key material.
  • the first key material is (R 0 , R 1 )
  • the binary label corresponding to the first key material is “0, 0”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (R 0 , 0).
  • the second information includes a part of the second key material including: the second information includes k values corresponding to the third binary label , the value of the third binary label bit corresponding to 0 in the k values is 0, and the value of the third binary label bit corresponding to the k values is 1. The value of the corresponding position in the secondary key material.
  • the second key material is (R 2 , R 3 )
  • the binary label corresponding to the second key material is “1, 1”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (0, R 3 ).
  • the first secondary node uses the first information and the second information to generate the third key material, such as (R 0 , R 3 ), to ensure that the same column in the key material of any two nodes is
  • the XOR result of the key material is the same, that is, the reliability of the root key protection method based on the two-party calculation of the threshold (2, n), and the first key material and the second key material cannot be recovered from the third key material. Key material to ensure security.
  • the processing unit being configured to use one of the third key materials as the input of the secure two-party computation includes: the receiving unit obtains The available two-party node identification sent by the two-party node specifying module, the available two-party node identification includes a first identification and a second identification; the processing unit is configured to determine that the first identification is the first auxiliary node. node identification, the processing unit is configured to determine a first input key material according to the third key material, the first input key material is one of the third key materials, and the The processing unit is configured to use the first input key material as an input for secure two-party computation.
  • the available two-party node identifiers sent by the two-party node specifying module can assist in the failure of any two nodes (or any one of the three nodes) in the fault-tolerant multiple nodes (the number of nodes is greater than 3).
  • the designation of available nodes in the process of failure) can better cope with the occurrence of failures.
  • a root key protection system including n nodes participating in key calculation, a binary label distribution server, and a two-party node specification module; the binary label distribution server is used to generate a binary label according to n, n is an integer greater than 2, 2 k ⁇ n, k is the number of bits of the binary label, assign the binary label to the n nodes, send the first association information to the n nodes, and the The first association relationship information is used to indicate a binary label corresponding to each of the n nodes, a first master node, a second master node, and at least one auxiliary node, wherein the first master node corresponding to the first master node.
  • each bit of the binary label is 0, each bit of the second binary label corresponding to the second primary node is 1, the binary labels corresponding to any two secondary nodes are different, and each secondary node is different.
  • the corresponding binary label includes at least one number 0 and at least one number 1; the first master node is used to determine the first key material, the number of columns of the first key material is k, and the first key The material is used as the input for the first master node to perform secure two-party computation; the second master node is used to determine the second key material, the number of columns of the second key material is k, the second The key material is used as the input for the second master node to perform secure two-party computation; the first slave node is used to receive the first information and the second information, and determine the first and second information according to the first information and the second information.
  • the number of columns of the third key material is k
  • the third key material is used as the input for the first auxiliary node to perform secure two-party computation
  • the first auxiliary node is the one of the at least one secondary node
  • the first information is determined and sent by the first primary node according to the third binary label corresponding to the first secondary node, and the first information includes the part of the first key material
  • the second information is determined and sent by the second master node according to the third binary label corresponding to the first slave node
  • the second information includes the first A part of the second key material
  • the XOR result of the key material in the same column of the first key material and the second key material is the same, the second key material and the third key material
  • the XOR results of the key materials in the same column in the first key material are the same, the XOR results of the key materials in the same column in the first key material and the third key material are the same;
  • the first indication information is used to indicate two nodes that can be used to perform
  • the system further includes a root key splitting module, the root key splitting module is configured to determine k random numbers as the first key material, The second key material is determined according to the first root key and the first key material, the first key material is sent to the first master node, and the second key material is sent to the second master node Secondary key material.
  • the root key splitting module is set to assist the generation of the respective key materials of the nodes participating in the two-party computation, which further improves the encryption based on the secure two-party computation. reliability of key protection methods.
  • the first master node is configured to determine k random numbers as the first key material, and determine the first assistant according to the first key material information, the first auxiliary information is used by the second master node to determine the second key material and send the first auxiliary information to the second master node.
  • the second master node is configured to receive the first auxiliary information, and determine the second key according to the first random number and the first auxiliary information Material.
  • the first master node enables the second master node to determine the second key material according to the first random number and the first auxiliary information by generating the first auxiliary information, which cannot be obtained only based on the second key material
  • the first key material, and the root key cannot be recovered, further improves the security of the root key protection method based on the two-party computation with the (2, n) threshold.
  • the first information including a part of the first key material includes: the first information includes k corresponding to the third binary label values, the value of the third binary label bit corresponding to the k values is 0, and the value of the third binary label bit corresponding to the k values is 0. the value of the corresponding position in the first key material.
  • the first key material is (R 0 , R 1 )
  • the binary label corresponding to the first key material is “0, 0”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (R 0 , 0).
  • the second information includes a part of the second key material including: the second information includes k corresponding to the third binary label values, the value of the third binary label bit corresponding to the k values is 0, and the value of the third binary label bit corresponding to the k values is 1. the value of the corresponding position in the second key material.
  • the second key material is (R 2 , R 3 )
  • the binary label corresponding to the second key material is “1, 1”
  • the binary label corresponding to the first information is "0, 1”
  • the first information is (0, R 3 ).
  • the first secondary node uses the first information and the second information to generate the third key material, such as (R 0 , R 3 ), to ensure that the same column in the key material of any two nodes is
  • the XOR result of the key material is the same, that is, the reliability of the root key protection method based on the two-party calculation of the threshold (2, n), and the first key material and the second key material cannot be recovered from the third key material. Key material to ensure security.
  • the first master node receives the second indication information, and the first master node determines that the second indication information includes the first master node The first master node determines the first column number according to the second indication information, and uses the first input key material in the first key material corresponding to the first column number as the execution security Input for two-party computation.
  • the available two-party node identifiers sent by the two-party node specifying module can assist in the failure of any two nodes (or any one of the three nodes) in the fault-tolerant multiple nodes (the number of nodes is greater than 3).
  • the designation of available nodes in the process of failure) can better cope with the occurrence of failures.
  • the second master node receives the second indication information, and the second master node determines that the second indication information includes the information of the second master node. identification, the second master node determines the first column number according to the second indication information, and uses the second input key material in the second key material corresponding to the first column number as the execution security two input to the square calculation.
  • the first secondary node receives the second indication information, and the first secondary node determines that the second indication information includes the first secondary node The first secondary node determines the first column number according to the second indication information, and uses the third input key material in the third key material corresponding to the first column number as the execution security Input for two-party computation.
  • a communication device in a fourth aspect, includes various units for implementing the first aspect or any possible implementation manner of the first aspect.
  • the communication device may be a network device or a baseband chip.
  • a communication system in a fifth aspect, includes various devices for implementing the third aspect or any possible implementation manner of the third aspect, wherein the communication system may be composed of network devices.
  • a communication device including a transceiver component and a processor, so that the communication device executes the first aspect or the method in any possible implementation manner of the first aspect.
  • the communication device may be a network device or a baseband chip. If the communication device is a network device, the transceiver component may be a transceiver, and if the communication device is a baseband chip, the transceiver component may be an input/output circuit of the baseband chip.
  • a communication system is provided.
  • the communication system is composed of each communication device of the third aspect, and each communication system device includes a transceiver component and a processor.
  • the communication device may be a network device or a baseband chip. If the communication device is a network device, the transceiver component may be a transceiver, and if the communication device is a baseband chip, the transceiver component may be an input/output circuit of the baseband chip.
  • a computer program product comprising: computer program code, when the computer program code is executed by a communication device, the communication device is made to perform the above-mentioned first aspect or any of the first aspects.
  • a computer program product comprising: computer program code, when the computer program code is executed by a communication device, the communication device is made to perform the third aspect or any of the third aspects.
  • a communication device involves a method.
  • a tenth aspect provides a computer-readable medium, the computer-readable medium stores program code, the program code comprising instructions for executing the method in the first aspect or any possible implementation manner of the first aspect .
  • a computer-readable medium stores program codes, the program codes comprising instructions for executing the third aspect or the method involved in any communication device of the third aspect .
  • a twelfth aspect provides a chip system, comprising: a processor for calling and running a computer program from a memory, so that a communication device installed with the chip system executes the first aspect or any one of the first aspects method in one possible implementation.
  • a thirteenth aspect provides an apparatus for wireless communication, comprising: a unit for implementing the method in the first aspect or any possible implementation manner of the first aspect.
  • this application by using binary labels to classify the nodes participating in the two-party calculation, it enables the nodes participating in the two-party calculation to participate in the key generation in the process of negotiating the key, and the encryption of any two nodes.
  • the XOR result of the key material of the same column in the key material is the same, that is, the root key is the same.
  • this method can tolerate the failure of any two nodes in multiple nodes (the number of nodes is greater than 3), and on the basis of 2 nodes participating in the two-party computing, only one node can be added.
  • this method deploys multiple copies of key material on redundant nodes, which effectively improves the reliability of the (2, n) threshold-based root key protection method based on two-party computation, and ensures that the same node is protected.
  • the key material on the server cannot recover the root key, which ensures security.
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application
  • FIG. 2 is a schematic diagram of another scenario where an embodiment of the present application is applied.
  • Fig. 3 is the scene schematic diagram of the key protection method based on 2PC of the (2,n) threshold of the present application;
  • FIG. 4 is a schematic interaction diagram of an example of a root key protection method according to an embodiment of the present application.
  • FIG. 5 is another schematic interaction diagram of the root key protection method according to the embodiment of the present application.
  • FIG. 6 is a schematic block diagram of an example of a network device according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of another example of a network device according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of an example of a root key protection system according to an embodiment of the present application.
  • GSM global system of mobile communication
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • GPRS general packet radio service
  • long term evolution long term evolution
  • LTE long term evolution
  • LTE frequency division duplex frequency division duplex
  • TDD time division duplex
  • UMTS universal mobile telecommunication system
  • WiMAX worldwide interoperability for microwave access
  • the terminal equipment in the embodiments of the present application may also be referred to as user equipment (user equipment, UE), access terminal, terminal equipment unit (subscriber unit), terminal equipment station, mobile station, mobile station (mobile station, MS), A remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, terminal device proxy or terminal device device.
  • Terminal devices may include various wireless communication capable handheld devices, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem. May also include subscriber units, cellular phones, smart phones, wireless data cards, personal digital assistant (PDA) computers, tablet computers, wireless modems, handheld devices ), laptop computer (laptop computer), machine type communication (MTC) terminal, station (station, ST) in wireless local area networks (WLAN).
  • PDA personal digital assistant
  • MTC machine type communication
  • station station, ST
  • WLAN wireless local area networks
  • the network device in this embodiment of the present application may be a device for communicating with a terminal device, and the network device may be a global system of mobile communication (GSM) system or a code division multiple access (code division multiple access, CDMA)
  • GSM global system of mobile communication
  • CDMA code division multiple access
  • the base station (base transceiver station, BTS) in the LTE system can also be the base station (nodeB, NB) in the wideband code division multiple access (WCDMA) system, or the evolutionary base station (evolutional base station) in the LTE system.
  • nodeB eNB or eNodeB
  • it can also be a wireless controller in a cloud radio access network (CRAN) scenario
  • the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, and 5G
  • the network equipment in the network or the network equipment in the future evolved PLMN network, etc., are not limited in the embodiments of the present application.
  • 1-out-2 inadvertent transmission In the 1-out-2 inadvertent transmission protocol, Alice sends two messages (m1, m2) to Bob each time, Bob provides an input, and obtains the output according to the input Information, after the agreement ends, Bob gets the piece of information he wants (m1 or m2), and other remaining information cannot be obtained, and Alice does not know which information Bob finally gets.
  • Secure Multi-Party Computation In the absence of a trusted third party, how to securely compute a contract function.
  • the goal of multi-party computing is for a group of computing participants, each participant has its own input data, and does not trust other participants and any third party. Under this premise, how to cooperate with each other while protecting their private input data Complete the calculation task of a contracted function function.
  • 2PC Secure two-party computation
  • 2PC is a sub-problem of MPC that allows two parties to jointly compute arbitrary functions on their respective input data without sharing their input data with each other. Inadvertently transmitting OT is an important technology of 2PC.
  • Three-layer key hierarchy the root key encrypts the master key, the master key encrypts the work key, and the work key encrypts business-sensitive data.
  • Root key In the three-layer key hierarchy, the root key is located at the bottom of the key hierarchy, which determines the security of the entire cryptosystem.
  • the master key In a three-layer key hierarchy, the master key is the data object directly encrypted by the root key.
  • Boolean circuit Compile the safe calculation function of the two parties into the form of a Boolean circuit. According to the calculation model theory, any safe calculation function can be converted into the form of the corresponding Boolean circuit.
  • Obfuscation circuit First compile the security function of the two parties involved in the calculation into the form of a Boolean circuit, and then encrypt and scramble the truth table of the Boolean circuit, so as to achieve the normal output of the circuit without revealing the private information of both parties involved in the calculation.
  • 2PC-based key protection randomly generate two key materials, and use the XOR result of the two key materials as the key. These two key materials are used as the private input of the two computing participants of 2PC. The two participants jointly calculate the encryption/decryption algorithm on their private input data, and finally obtain the encryption result or decryption result. During the calculation process, neither party cannot. Recover the key or obtain two key materials at the same time.
  • n computing nodes the XOR result of two copies of key material in any two nodes is equal to the key. That is, any two nodes have two copies of key material, which can be used as the input of 2PC-based key protection to perform two-party calculations to calculate the encryption and decryption results. In other words, if any n-2 nodes fail, the two-party computation algorithm can be executed as long as there are two nodes available.
  • FIG. 1 is a schematic diagram of an application scenario 100 of an embodiment of the present application.
  • Fig. 1 shows the implementation method of root key protection based on 2PC in the scenario of random negotiation of the root key. In general, it can be divided into the following steps:
  • Step S110 randomly generate two sets of key materials R0 and R1, and use the XOR result of the two sets of key materials as the root key;
  • Step S120 save the key materials R0 and R1 in two nodes, namely node 1 and node 2;
  • Step S130 The two-party nodes use their respective key materials as the secret input for the two-party calculation, and jointly calculate an agreed encryption and decryption function.
  • FIG. 2 is a schematic diagram of another scenario 200 to which an embodiment of the present application is applied.
  • FIG. 2 shows the implementation method of root key protection based on 2PC in the scenario of known root key. In general, it can be divided into the following steps:
  • Step S210 Divide the known root key into two pieces of key material R0 and R1, and the division principle is that the XOR result of the two pieces of key material is equal to the root key;
  • Step S220 save the key materials R0 and R1 in two nodes, namely node 1 and node 2;
  • Step S230 The two-party nodes use their respective key materials as the secret input for the two-party calculation, and jointly calculate an agreed encryption and decryption function.
  • FIG. 3 is a schematic diagram of yet another scenario 300 of the 2PC-based key protection method with a (2, n) threshold of the present application, where n>2.
  • the network elements/nodes involved in this scenario are as follows:
  • Binary label assignment server 310 assigns binary labels to all nodes, and designates the node assigned the binary labels of all 0s and all 1s as the master negotiating node. Then, the binary labels corresponding to all nodes and the main negotiated node information are distributed to each node for storage.
  • the process of assigning labels by the binary label assigning server 310 may be:
  • Step a1 Obtain n node identifiers NodeID0, NodeID1, . . . , NodeIDn from n nodes.
  • Step a3 Assign the 2 ⁇ k binary labels to n nodes, and designate the node assigned with all 0 and all 1 labels as the main negotiating node (for example, assign all 0 labels to NodeID0, and assign all 1 labels to NodeIDn) , nodes assigned to other labels are designated as non-main negotiating nodes.
  • Step a4 Distribute the binary label information corresponding to all nodes to each node, and each node will store the binary label information corresponding to all nodes.
  • the binary label distribution server 310 sends the master negotiation node information to each node, and each node stores the master negotiation node information.
  • the binary label assignment server 310 agrees with all nodes that the node assigned with all 0 labels and the node with all 1 labels are the main negotiating nodes. It should be understood that at this time, the binary label is not required.
  • the distribution server 310 sends the master negotiating node information.
  • the binary label assignment server 310 determines that the integer k is 2, generates a binary label list, and then assigns it to 3 nodes.
  • the relationship between the label list and the node is shown in Table 1.
  • node 1 and node 3 are the main negotiating nodes
  • node 2 is the non-main negotiating node
  • no nodes are allocated for the binary label "1,0”. It should be understood that the binary label of node 2 can also be "1,0", and no node is assigned to the binary label "0,1”.
  • the applicable scenario of the binary label server 310 is, for example, when the all-zero label node and/or the all-one label node cannot work normally, the binary label server 310 can re-allocate binary labels to all nodes, and re-determine the main negotiating node and the non-identical label. Master negotiating node.
  • Available two-party node specification module 320 responsible for acquiring any two available node information from the n nodes and sending it to the corresponding two nodes, so as to instruct the two available nodes to select the corresponding key material as the secret input for the two-party calculation and Performs a two-party computation algorithm.
  • the available two-party node specifying module 320 can be applied, for example, when the two nodes responsible for performing the two-party computation cannot perform the two-party computing, the two-party node specifying module 320 can be used to re-designate the nodes that can perform the two-party computing.
  • Root key splitting module 330 responsible for splitting the known root key into two sets of key materials through XOR operation, so that the XOR of each column (key materials with the same position/same number of columns) corresponding to the two sets of key materials. or the result is equal to the root key. It is also responsible for sending the generated first key material group to all 0 label nodes for storage, and the second key material group to all 1 label nodes for storage.
  • the root key splitting module 330 can be applied, for example, when the root key negotiation between the all-zero label node and the all-one label node is unsuccessful, the root key splitting module 330 can generate two sets of key materials according to the known root key, The two sets of key materials are distributed to all 0 label nodes and all 1 label nodes respectively.
  • the main negotiating node (the label is all 0) 340 responsible for receiving and storing the binary labels of all nodes and the information of the main negotiating node sent by the binary label distribution server 310 .
  • it is responsible for randomly generating the key material corresponding to the binary label of all 0s, and sending the auxiliary calculation information of the key material to the main negotiation node (the label is all 1) 350, wherein the auxiliary calculation information of the key material is not leaked Any key material of the master negotiation node (label all 0s) 340; in the scenario where the root key is known, the master negotiation node (label all 0) 340 is responsible for receiving the first key material group of the root key splitting module 330 as the full set of key materials.
  • the key material corresponding to the 0 binary label responsible for receiving and authenticating key material requests from other non-master negotiating nodes, and assigning the corresponding key material to the column whose value is 0 in the binary labels of non-master negotiating nodes. It is also responsible for receiving the information of the two available nodes sent by the available two-party node specifying module 320, and if the available node identification in the information contains its own identification, the key material of the i-th column determined by the available two-party node specifying module is used as the two nodes.
  • the main negotiating node (the label is all 1) 350 responsible for receiving and storing the binary labels of all nodes and the information of the main negotiating node sent by the binary label distribution server 310 .
  • the present application realizes that any two nodes in n (n>2) computing nodes can execute the encryption and decryption functions agreed upon by the two-party computing, without affecting the Security of the root key.
  • the present application provides a binary label distribution server to assign corresponding binary labels to all nodes, and store the identifiers and corresponding binary labels of all nodes in each node. superior.
  • all nodes obtain the corresponding key material according to their own binary labels.
  • the two-party computing node Before performing the two-party computation, the two-party computing node selects the key material of the corresponding column according to the binary label corresponding to the two-party computing node, as the secret input for the two-party computation.
  • the root key protection method proposed by the present application will be described in detail below with reference to FIGS. 4-8 .
  • FIG. 4 is a schematic interaction diagram of an example of a key protection method 400 according to an embodiment of the present application.
  • the method is a root key protection method based on two-party computation with a threshold of (2, n), where n>2, which can be implemented in the scenario of negotiating a random root key, including the following steps:
  • Step S410 The binary label assignment server generates a binary label, and assigns the binary label to all nodes participating in the calculation.
  • the specific process is as follows:
  • Step a The binary label distribution server obtains the identification information of all nodes participating in the calculation.
  • the n nodes participating in the calculation send node identification information to the binary label distribution server, where the node identification information includes the identification of the respective node;
  • the node identifiers corresponding to the n nodes participating in the calculation are configured in the binary label distribution server.
  • Step b The binary label assignment server generates binary labels according to the number n, and then assigns binary labels to all n nodes participating in the calculation, and designates the main negotiating node;
  • the binary label distribution server allocates binary labels to n nodes (NodeID 0 to NodeID n-1 ) respectively, and the number 2 k of binary labels (lable 0 to lable 2 k -1 ) should satisfy n ⁇ 2 k , where k is the number of bits of each binary label.
  • the binary label assignment server needs to assign binary labels to these 3 nodes, and there are 4 binary labels that can be assigned: Lable 0 ⁇ 0, 0 ⁇ , Lable 1 ⁇ 0, 1 ⁇ , Lable 2 ⁇ 1, 0 ⁇ , Lable 3 ⁇ 1, 1 ⁇ .
  • the binary label assignment server needs to assign binary labels to these 5 nodes, and the assignable binary labels are 8: Lable 0 ⁇ 0, 0, 0 ⁇ , Lable 1 ⁇ 0, 0, 1 ⁇ , Lable 2 ⁇ 0, 1, 0 ⁇ , Lable 3 ⁇ 0, 1, 1 ⁇ , Lable 4 ⁇ 1, 0, 0 ⁇ , Lable 5 ⁇ 1, 0, 1 ⁇ , Lable 6 ⁇ 1, 1, 0 ⁇ , Lable 7 ⁇ 1, 1, 1 ⁇ .
  • the binary label distribution server designates the main negotiation node, and the binary labels of the main negotiation node are all 0 labels (binary bits are all 0) and all 1 labels (binary bits are all 1).
  • the binary label assignment server designates NodeID 0 and NodeID 2 as the main negotiating nodes, and assigns the all-zero label Lable 0 ⁇ 0, 0 ⁇ to the node NodeID 0 , and assigns all 1s to the node NodeID 0 .
  • the label Lable 3 ⁇ 1, 1 ⁇ is assigned to the node NodeID 2 .
  • the binary label assignment server designates NodeID 0 and NodeID 4 as the main negotiating nodes, and assigns the all-zero label Lable 0 ⁇ 0, 0, 0 ⁇ to the node NodeID 0 , and assigns the all-zero label Lable 0 ⁇ 0, 0, 0 ⁇ to the node NodeID 0
  • the all-one label Lable 7 ⁇ 1, 1, 1 ⁇ is assigned to node NodeID 4 .
  • the binary label assignment server designates NodeID 0 and NodeID n-1 as the main negotiating node, assigns the all-zero label to the node NodeID 0 , and assigns the all-one label to the node NodeID n- 1 .
  • the binary label distributes all or part of the remaining labels to other non-master negotiating nodes.
  • Step c Send the node identifiers and corresponding binary labels of all nodes, and the information of the main negotiating node to all nodes participating in the calculation for storage.
  • the following will give specific examples:
  • the binary label of the above NodeID 1 may also be (1, 0).
  • the binary labels of node NodeID 1 to node NodeID 3 may be any 3 of the binary labels that can be allocated in step b, taking (2, 5) as an example, except for the all-zero label and the all-one label. That is, any three of the six binary labels from Lable 1 to Lable 6 can be used as binary labels for nodes NodeID 1 to NodeID 3 .
  • the above examples are for ease of understanding and do not constitute any limitation.
  • Step S420 The main negotiating node #1 generates k-column random numbers as the key material #1, and calculates the auxiliary calculation information of the key material #1 according to the key material #1.
  • Step S421 The master negotiation node #1 sends the auxiliary calculation information of the key material #1 to the master negotiation node #2.
  • NodeID 0 sends key material auxiliary information A 10 to NodeID 2 .
  • NodeID 0 sends the key material auxiliary information ⁇ A 10 , A 20 ⁇ to NodeID 4 .
  • Step S430 The main negotiation node #2 determines the key material #2 according to the auxiliary calculation information of the key material #1.
  • step S440 the non-master negotiation node sends key material request information #A to the master negotiation node #2, and the key material request information #A is used to request key material #3.
  • step S441 non-main negotiating node #3 (there may be multiple non-main negotiating nodes here, taking non-main negotiating node #3 as an example for illustration, other non-main negotiating nodes have the same Function) Send key material request message #B to master negotiation node #1, and key material request message #B is used to request key material #4.
  • step S450 the master negotiation node #2 authenticates the identity of the non-master negotiation node. If authentication fails, the request is rejected; if authentication is successful, key material #3 is determined from key material #2.
  • step S451 the master negotiation node #1 authenticates the identity of the non-master negotiation node. If authentication fails, the request is rejected; if authentication is successful, key material #4 is determined from key material #1.
  • step S450 and step S451 if the authentication is successful, the master negotiation node #2 (NodeID n-1 ) establishes a set of key material Kset i1 with an empty value, and the master negotiation node #1 (NodeID 0 ) establishes a set of values Empty key material Kset i0 .
  • the master negotiation node #2 (NodeID n-1 ) and the master negotiation node #1 (NodeID 0 ) directly respectively establish a set of null key material Kset i1 and a set of null values The key material Kset i0 .
  • the main negotiation node #2 (NodeID n-1 ) obtains all the columns whose value is 1 in the binary label corresponding to NodeID i (counted as CS1 column), and uses all the corresponding CS1 columns in the local key material KSet n-1 .
  • the key material is assigned to the CS1 column corresponding to the key material group Kset i1 .
  • the main negotiation node #1 (NodeID 0 ) obtains all the columns whose value is 0 in the binary label corresponding to NodeID i (counted as CS0 column), and assigns the key material of all CS0 columns corresponding to the local key material KSet 0 .
  • the CS0 column corresponds to the key material group Kset i0 .
  • Step S460 the master negotiation node #2 sends the key material #3 to the non-master negotiation node #3.
  • Step S461 the master negotiation node #1 sends the key material #4 to the non-master negotiation node #3.
  • the binary label of NodeID 0 is (0, 0), and the corresponding key material #1 is ⁇ R 00 , R 10 ⁇ ; the binary label of NodeID 2 is (1, 1), and the corresponding key material #2 is ⁇ R 01 , R 11 ⁇ .
  • NodeID 1 The binary label of NodeID 1 is (0, 1), NodeID 0 sends key material #4 ⁇ R 00 , null ⁇ ("null” here means no assignment) to NodeID 1 , NodeID 2 sends key material #3 ⁇ null, R 11 ⁇ ("null” here means no assignment) is sent to NodeID 1 .
  • the binary label of NodeID 0 is (0, 0, 0), and the corresponding key material #1 is ⁇ R 00 , R 10 , R 20 ⁇ ; the binary label of NodeID 4 is (1, 1, 1), corresponding to the key material #2 is ⁇ R 01 , R 11 , R 21 ⁇ .
  • NodeID 1 The binary label of NodeID 1 is ⁇ 0, 0, 1 ⁇ , NodeID 0 sends key material #4 ⁇ R 00 , R 10 , null ⁇ (“null” here means no assignment) to NodeID 1 , NodeID 4 will Key material #3 ⁇ null, null, R 21 ⁇ ("null” here means no assignment) is sent to NodeID 1 ;
  • NodeID 2 The binary label of NodeID 2 is ⁇ 0, 1, 0 ⁇ , NodeID 0 sends key material #4 ⁇ R 00 , null, R 20 ⁇ ("null” here means no assignment) to NodeID 2 , NodeID 4 will Key material #3 ⁇ null, R 11 , null ⁇ ("null” here means no assignment) is sent to NodeID 2 ;
  • NodeID 3 The binary label of NodeID 3 is ⁇ 0, 1, 1 ⁇ , NodeID 0 sends key material #4 ⁇ R 00 , empty, empty ⁇ ("empty” here means no assignment) to NodeID 3 , and NodeID 4 will encrypt Key material #3 ⁇ null, R 11 , R 21 ⁇ ("null” here means no assignment) is sent to NodeID 1 .
  • Step S470 the non-master negotiation node #3 determines the key material #5 according to the key material #3 and the key material #4.
  • NodeID 1 The binary label of NodeID 1 is (0, 1), then NodeID 1 concatenates the key material #4 ⁇ R 00 , empty ⁇ sent by NodeID 0 and the key material #3 ⁇ empty, R 11 ⁇ sent by NodeID 2 Obtain the key material #5 ⁇ R 00 , R 11 ⁇ of NodeID 1 .
  • NodeID 1 The binary label of NodeID 1 is ⁇ 0, 0, 1 ⁇ , then NodeID 1 combines the key material #4 ⁇ R 00 , R 10 , null ⁇ sent by NodeID 0 and the key material #3 ⁇ null ⁇ sent by NodeID 4 , empty, R 21 ⁇ splicing to obtain the key material #5 ⁇ R 00 , R 10 , R 21 ⁇ of NodeID 1 ;
  • NodeID 2 The binary label of NodeID 2 is ⁇ 0, 1, 0 ⁇ , then NodeID 2 combines the key material #4 ⁇ R 00 , null, R 20 ⁇ sent by NodeID 0 and the key material #3 ⁇ null from NodeID 4 , R 11 , empty ⁇ splicing to obtain the key material #5 ⁇ R 00 , R 11 , R 20 ⁇ of NodeID 2 ;
  • NodeID 3 The binary label of NodeID 3 is ⁇ 0, 1, 1 ⁇ , then NodeID 3 combines the key material # 4 ⁇ R 00 , null, null ⁇ sent by NodeID 0 and the key material #3 ⁇ null, R 11 , R 21 ⁇ are concatenated to obtain the key material #5 ⁇ R 00 , R 11 , R 21 ⁇ of NodeID 3 .
  • each node can notify other nodes that it can perform secure two-party computation by sending broadcast information at a fixed frequency, and use the order of smaller values (or larger values) according to their corresponding binary labels.
  • the first two bits of the order) are used as nodes for secure two-party calculation, such as "0,0" and "0,1", when a node does not send broadcast information in a fixed period, it is considered that the node is unavailable, Then the node is skipped, and the node in the latter order acts as one of the nodes that perform secure two-party computation.
  • the available two-party node specification module is used to determine the identification information of the two available nodes and the number of columns corresponding to the key material used by the two available nodes, and send the information and the number of columns to all nodes.
  • a two-party node specifying module can arbitrarily specify one of the k columns as the number of columns corresponding to the key material used by the two available nodes.
  • Steps S490 to S492 two available nodes (hereinafter referred to as designated node #1 and designated node #2) designated by the two-party nodes, designated node #1 (designated node #2) according to the locally stored node and binary label information , determine the binary label information of the specified node #2 (specified node #1), and the specified node #1 (specified node #2) will perform the XOR operation on its own binary label and the binary label of the specified node #2 (specified node #1) , the key material corresponding to the column when the result is 1 (or the result is 0) is used as the input side of the two-party calculation.
  • the password corresponding to the column is The key material is used as the input side of the two-party computation.
  • FIG. 5 is another schematic interaction diagram of the key protection method according to the embodiment of the present application.
  • the method is a root key protection method based on two-party computation with a threshold of (2, n), where n>2, which can be implemented in a known root key scenario, including the following steps:
  • Step S510 is similar to step S410 and will not be repeated here.
  • Step S520 the root key splitting module splits the known root key #1 into two sets of key materials, and the XOR result of the two sets of key materials in the same column is the root key #1.
  • Step S521 the root key splitting module sends the first group of key materials to the master negotiation node #1.
  • Step S522 the root key splitting module sends the second group of key materials to the master negotiation node #2.
  • Step S530 the master negotiation node #1 stores the first group of key materials, and determines it as the key material #1.
  • Step S531 the master negotiation node #2 stores the second group of key materials, and determines it as the key material #2.
  • step S520 taking (2, 3) as an example,
  • steps S1140 to S1160 taking (2, 5) as an example,
  • Steps S540 to S592 are respectively similar to steps S440 to S492, and will not be repeated here.
  • FIG. 6 is a schematic block diagram of an example of a network device according to an embodiment of the present application.
  • a network device 600 is included in a system of n nodes, the n nodes including a first master node, a second master node, and at least one slave node, each of the n nodes First association relationship information is stored, and the first association relationship information is used to indicate the binary label corresponding to each node in the n nodes, where n is an integer greater than 2, 2 k ⁇ n, and k is the binary label
  • the number of bits of the label, each bit of the first binary label corresponding to the first master node is 0, and each bit of the second binary label corresponding to the second master node is 1, any
  • the binary labels corresponding to the two secondary nodes are different, and the binary labels corresponding to each secondary node include at least one number 0 and at least one number 1, the network device is the first secondary node, and the network device 600 includes:
  • a receiving unit 610 the receiving unit 610 is configured to receive first information from the first master node, the first information includes a part of the first key material, and the first key material is used by the first master node the key material, the first information is determined based on the third binary label corresponding to the first secondary node;
  • the receiving unit 610 is further configured to receive second information from the second master node, where the second information includes a part of second key material, and the second key material is a key used by the second master node material, the second information is determined based on the third binary tag;
  • the processing unit 620 is configured to generate a third key material according to the first information and the second information, wherein the first key material and the second key material are the same.
  • the XOR result of the key material in the column is the same, the XOR result of the key material in the same column in the second key material and the third key material is the same, the first key material and the third key material have the same XOR result.
  • the XOR results of the key materials in the same column in the three key materials are the same;
  • the processing unit 620 is further configured to use one of the third key materials as an input for secure two-party computation.
  • the first key material is k random numbers generated by the first master node.
  • the second key material is determined by the second master node according to a first random number and first auxiliary information
  • the first auxiliary information is determined by the first master node according to The first key material is determined.
  • the first information includes a part of the first key material including:
  • the first information includes k values corresponding to the third binary label, the value of the third binary label corresponding to the third binary label bit of the k values is 0, and the value of the k values is 0.
  • the value of the corresponding third binary label bit being 0 is the value of the corresponding position in the first key material.
  • the second information includes a part of the second key material including:
  • the second information includes k values corresponding to the third binary label, the value of the third binary label corresponding to 0 in the k values is 0, and the value of the k values is 0.
  • the value of the corresponding third binary label bit being 1 is the value of the corresponding position in the second key material.
  • the processing unit 620 is further configured to use one of the third key materials as the input of the secure two-party computation, including:
  • the receiving unit 610 obtains the available two-party node identifiers sent by the available two-party node specifying module, and the available two-party node identifiers include a first identifier and a second identifier;
  • the processing unit 620 is configured to determine that the first identifier is the node identifier of the first secondary node, and the processing unit is configured to determine the first input key material according to the third key material, the first The input key material is one of the third key materials, and the processing unit is configured to use the first input key material as an input for secure two-party computation.
  • FIG. 7 is a schematic block diagram of another example of a network device according to an embodiment of the present application.
  • the network device 700 includes a transceiver 710 and a processor 720 .
  • the processor 720 is configured to support the network device to perform the corresponding functions of the network device 600 in the above method.
  • the network device 700 may further include a memory 730 , where the memory 730 is coupled to the processor 720 and stores necessary program instructions and data of the network device 700 .
  • the processor 720 is specifically configured to execute the instructions stored in the memory 730, and when the instructions are executed, the network device 700 executes the method performed by the network device 600 in the foregoing methods.
  • the network device 600 shown in FIG. 6 may be implemented by the network device 700 shown in FIG. 7 .
  • the receiving unit 610 shown in FIG. 6 may be implemented by the transceiver 710
  • the processing unit 620 may be implemented by the processor 720 .
  • the processor may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), dedicated integrated Circuit (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU central processing unit
  • DSP digital signal processors
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • FPGA field programmable gate array
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory Fetch memory
  • direct memory bus random access memory direct rambus RAM, DR RAM
  • FIG. 8 is a schematic block diagram of an example of a root key protection system according to an embodiment of the present application.
  • the root key protection system 800 includes: a binary label distribution server 810, and a node 820 participating in the key calculation, wherein the node 820 participating in the key calculation includes a first master node 821 (the binary label is all 0s) , the second master node 822 (the binary label is all 1), the first secondary node 823 (the binary label includes at least one digit "0" and at least one digit "1"), the two-party node designation module 830 can be used, and the root key is protected
  • the system 800 may also include a root key splitting module 840.
  • the binary label distribution server 810 is configured to generate a binary label according to the number n of nodes participating in the key calculation, where n is an integer greater than 2, 2 k ⁇ n, k is the number of digits of the binary label, and the binary label is Labels are allocated to the n nodes, and first association information is sent to the n nodes, where the first association information is used to indicate the binary label corresponding to each of the n nodes, the first main node 821 , the second master node 822 and at least one slave node, wherein each bit of the first binary label corresponding to the first master node 821 is 0, and the second master node 822 corresponding to the second Each bit of the binary label is 1, the binary labels corresponding to any two secondary nodes are different, and the binary label corresponding to each secondary node includes at least one number 0 and at least one number 1;
  • the first master node 821 is used to determine the first key material, the number of columns of the first key material is k, and the first key material is used as the first master node 821 to perform two-way security. input to the calculation;
  • the second master node 822 is used to determine the second key material, the number of columns of the second key material is k, and the second key material is used to perform the two-way security as the second master node 822 input to the calculation;
  • the first secondary node 823 is configured to receive the first information and the second information, and determine the third key material according to the first information and the second information.
  • the number of columns of the third key material is k, so the third key material is used as an input for the first secondary node 823 to perform secure two-party computation, and the first secondary node 823 is one of the at least one secondary node,
  • the first information is determined and sent by the first master node 821 according to the third binary label corresponding to the first secondary node 823, and the first information includes a part of the first key material
  • the second information is determined and sent by the second master node 822 according to the third binary label, the second information includes a part of the second key material,
  • the XOR result of the key material in the same column of the first key material and the second key material is the same, and the second key material and the key material in the third key material in the same column
  • the XOR result is the same, and the XOR result of the key material in the same column in the first key material and the third key material is the same;
  • the available two-party node specifying module 830 is configured to receive first indication information, where the first indication information is used to indicate two nodes that can be used to perform secure two-party computation, and send the two nodes to the two nodes according to the first indication information.
  • the node that can be used to perform secure two-party computation sends second indication information, where the second indication information is used to instruct the two nodes that can be used to perform secure two-party computation to perform secure two-party computation and the corresponding key material used. the number of the first column of .
  • the system further includes a root key splitting module 840, and the root key splitting module 840 is configured to determine k random numbers as the first key material, according to the first root key key and the first key material to determine the second key material, send the first key material to the first master node 821, and send the second key to the second master node 822 Material.
  • the first master node is configured to determine k random numbers as the first key material, and determine first auxiliary information according to the first key material, and the first auxiliary information The information is used by the second master node 822 to determine second key material and to send the first auxiliary information to the second master node 822 .
  • the second master node 822 is configured to receive the first auxiliary information, and determine the second key material according to the first random number and the first auxiliary information.
  • the first information includes k values corresponding to the third binary label, and among the k values, the corresponding third binary label bit is a value of 1 is 0, and the value of the third binary label bit corresponding to the k values being 0 is the value of the corresponding position in the first key material.
  • the second information includes k values corresponding to the third binary label, and among the k values, the corresponding third binary label bit is a value of 0 is 0, the value of the third binary label bit corresponding to the k values being 1 is the value of the corresponding position in the second key material.
  • the first master node 821 receives the second indication information, and the first master node 821 determines that the second indication information includes the identifier of the first master node 821, so The first master node 821 determines the first column number according to the second indication information, and uses the first input key material in the first key material corresponding to the first column number as performing secure two-party computation input of.
  • the second master node 822 receives the second indication information, and the second master node 822 determines that the second indication information includes the identifier of the second master node 822, the The second master node 822 determines the first column number according to the second indication information, and uses the second input key material in the second key material corresponding to the first column number as the second input key material for performing secure two-party computation enter.
  • the first secondary node 823 receives the second indication information, and the first secondary node 823 determines that the second indication information includes the identifier of the first secondary node 823, so The first secondary node 823 determines the first column number according to the second indication information, and uses the third input key material in the third key material corresponding to the first column number as the execution of secure two-party computation input of.
  • the above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above-described embodiments may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital versatile disc (DVD)), or semiconductor media.
  • the semiconductor medium may be a solid state drive.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a wireless access network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

本申请提供了一种根密钥保护方法和系统,使能在基于安全两方计算中,容错3个以上节点中的任意两个节点发生故障,并且在2个节点参与计算的基础上,只增加一个节点就能容错任意一个节点发生故障,该方法在冗余节点上部署多份密钥材料,提高了根密钥保护方法的可靠性,并且保证了同一节点上的密钥材料无法恢复出根密钥,保证了安全性。该根密钥保护方法通过使用二进制标签对参与安全两方计算的节点进行分类,使能将参与安全两方计算的节点在协商密钥的过程中分为主节点和辅节点,其中主节点负责所有节点的密钥的生成,辅节点负责生成自身所需密钥,并且使得任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即根密钥相同。

Description

一种根密钥保护方法和系统 技术领域
本申请涉及通信领域,并且更具体地,涉及一种根密钥保护方法和系统。
背景技术
在三层密钥分层体系中,根密钥加密主密钥,主密钥加密工作密钥,工作密钥加密业务敏感数据。根密钥位于密钥分层的最底层,已经无密钥对其进行加密,因此其决定了整个密码系统的安全性。安全两方计算(secure two-party computation,2PC)可实现对根密钥的有效保护。
安全两方计算的成功执行需要参与计算的两方节点同时可用,任意一个节点出现故障,都将使两方计算失败。在确保安全性的基础上,目前通过增加冗余的计算节点(或称主备方式,即为两方计算的主节点增加备用节点)保障两方计算的顺利执行,并且在两个节点的基础上至少需要再增加两个节点来容错任意一个节点发生故障。然而这种方式并不能容错多个节点(节点数量大于3)中的任意两个节点发生故障,因此如何提高基于2PC的密钥保护方法的可靠性是一个亟待解决的问题。
发明内容
本申请提供一种根密钥保护方法和系统,使能在基于安全两方计算的对根密钥的保护中,容错多个节点(节点数量大于3)中的任意两个节点发生故障,或者容错三个节点中的任意一个节点发生故障,有效地提高基于安全两方计算的密钥保护方法的可靠性。
第一方面,提供了一种根密钥保护方法,应用在包括n个节点的系统中,所述n个节点包括第一主节点、第二主节点和至少一个辅节点,所述n个节点中的每个节点存储有第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1,所述方法包括:第一辅节点从第一主节点接收第一信息,所述第一信息包括第一密钥材料的一部分,所述第一密钥材料是所述第一主节点使用的密钥材料,所述第一信息是基于所述第一辅节点对应的第三二进制标签确定的;第一辅节点从第二主节点接收第二信息,所述第二信息包括第二密钥材料的一部分,所述第二密钥材料是所述第二主节点使用的密钥材料,所述第二信息是基于所述第三二进制标签确定的;所述第一辅节点根据所述第一信息和所述第二信息,生成第三密钥材料,其中,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;所述第一辅节点将所述第三密钥材料中的一个密 钥材料作为安全两方计算的输入。
本申请实施例需要说明的是,在协商密钥的时候,才有主辅节点之分,在后续的执行多方计算加解密过程中,所有节点是平等节点,功能相同。
本申请实施例中,通过使用二进制标签对参与两方计算的节点进行分类,使能将参与两方计算的节点在协商密钥的过程中分为主节点和辅节点,其中主节点负责所有节点的密钥的生成,辅节点负责自身所需密钥的生成,并且使得任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即根密钥相同。在基于安全两方计算中,该方法能容错多个节点(节点数量大于3)中的任意两个节点发生故障,并且在2个节点参与两方计算的基础上,可以只增加一个节点就可以容错任意一个节点发生故障,该方法在冗余节点上部署多份密钥材料,有效提高了(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且保证了同一节点上的密钥材料无法恢复出根密钥,保证了安全性。
结合第一方面,在第一方面的某些实现方式中,所述第一密钥材料为所述第一主节点生成的k个随机数。
结合第一方面,在第一方面的某些实现方式中,所述第二密钥材料为所述第二主节点根据第一随机数和第一辅助信息确定的,所述第一辅助信息是所述第一主节点根据所述第一密钥材料确定的。
本申请实施例中,第一主节点通过生成第一辅助信息,使能第二主节点根据第一随机数和第一辅助信息确定第二密钥材料,只根据该第二密钥材料无法获知第一密钥材料,并且无法恢复出根密钥,进一步提高了(2,n)阈值的基于两方计算的根密钥保护方法的安全性。
结合第一方面,在第一方面的某些实现方式中,所述第一信息包括第一密钥材料的一部分包括:所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
本申请实施例中,假设第一密钥材料为(R 0,R 1),该第一密钥材料对应的二进制标签为“0,0”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(R 0,0)。
结合第一方面,在第一方面的某些实现方式中,所述第二信息包括第二密钥材料的一部分包括:所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
本申请实施例中,假设第二密钥材料为(R 2,R 3),该第二密钥材料对应的二进制标签为“1,1”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(0,R 3)。
本申请实施例中,第一辅节点通过利用第一信息和第二信息生成第三密钥材料,例如(R 0,R 3),保证了任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且从第三密钥材料中无法恢复出第一密钥材料和第二密钥材料,保证了安全性。
结合第一方面,在第一方面的某些实现方式中,所述第一辅节点将所述第三密钥材料 中的一个密钥材料作为安全两方计算的输入包括:所述第一辅节点获取可用两方节点指定模块发送的可用两方节点标识,所述可用两方节点标识包括第一标识和第二标识;所述第一辅节点确定所述第一标识为所述第一辅节点的节点标识,所述第一辅节点根据所述第三密钥材料确定第一输入密钥材料,所述第一输入密钥材料是所述第三密钥材料的其中一个密钥材料,所述第一辅节点将所述第一输入密钥材料作为安全两方计算的输入。
本申请实施例中,可用两方节点指定模块发送的可用两方节点标识,可以辅助在容错多个节点(节点数量大于3)中的任意两个节点发生故障(或者三个节点中任意一个节点发生故障)的过程中可用节点的指定,更好的应对故障的发生。
第二方面,提供了一种根密钥生成网络设备,所述网络设备被包括在n个节点的系统中,所述n个节点包括第一主节点、第二主节点和至少一个辅节点,所述n个节点中的每个节点存储有第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1,所述网络设备为第一辅节点,所述网络设备包括:接收单元,所述接收单元用于从第一主节点接收第一信息,所述第一信息包括第一密钥材料的一部分,所述第一密钥材料是所述第一主节点使用的密钥材料,所述第一信息是基于所述第一辅节点对应的第三二进制标签确定的;所述接收单元用于从第二主节点接收第二信息,所述第二信息包括第二密钥材料的一部分,所述第二密钥材料是所述第二主节点使用的密钥材料,所述第二信息是基于所述第三二进制标签确定的;处理单元,所述处理单元用于根据所述第一信息和所述第二信息,生成第三密钥材料,其中,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;所述处理单元用于将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入。
本申请实施例需要说明的是,在协商密钥的时候,才有主辅节点之分,在后续的执行多方计算加解密过程中,所有节点是平等节点,功能相同。
本申请实施例中,通过使用二进制标签对参与两方计算的节点进行分类,使能将参与两方计算的节点在协商密钥的过程中分为主节点和辅节点,其中主节点负责所有节点的密钥的生成,辅节点负责自身所需密钥的生成,并且使得任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即根密钥相同。在基于安全两方计算中,该方法能容错多个节点(节点数量大于3)中的任意两个节点发生故障,并且在2个节点参与两方计算的基础上,可以只增加一个节点就可以容错任意一个节点发生故障,该方法在冗余节点上部署多份密钥材料,有效提高了(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且保证了同一节点上的密钥材料无法恢复出根密钥,保证了安全性。
结合第二方面,在第二方面的某些实现方式中,所述第一密钥材料为所述第一主节点生成的k个随机数。
结合第二方面,在第二方面的某些实现方式中,所述第二密钥材料为所述第二主节点根据第一随机数和第一辅助信息确定的,所述第一辅助信息是所述第一主节点根据所述第 一密钥材料确定的。
本申请实施例中,第一主节点通过生成第一辅助信息,使能第二主节点根据第一随机数和第一辅助信息确定第二密钥材料,只根据该第二密钥材料无法获知第一密钥材料,并且无法恢复出根密钥,进一步提高了(2,n)阈值的基于两方计算的根密钥保护方法的安全性。
结合第二方面,在第二方面的某些实现方式中,所述第一信息包括第一密钥材料的一部分包括:所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
本申请实施例中,假设第一密钥材料为(R 0,R 1),该第一密钥材料对应的二进制标签为“0,0”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(R 0,0)。
结合第二方面,在第二方面的某些实现方式中,所述第二信息包括第二密钥材料的一部分包括:所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
本申请实施例中,假设第二密钥材料为(R 2,R 3),该第二密钥材料对应的二进制标签为“1,1”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(0,R 3)。
本申请实施例中,第一辅节点通过利用第一信息和第二信息生成第三密钥材料,例如(R 0,R 3),保证了任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且从第三密钥材料中无法恢复出第一密钥材料和第二密钥材料,保证了安全性。
结合第二方面,在第二方面的某些实现方式中,所述处理单元用于将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入包括:所述接收单元获取可用两方节点指定模块发送的可用两方节点标识,所述可用两方节点标识包括第一标识和第二标识;所述处理单元用于确定所述第一标识为所述第一辅节点的节点标识,所述处理单元用于根据所述第三密钥材料确定第一输入密钥材料,所述第一输入密钥材料是所述第三密钥材料的其中一个密钥材料,所述处理单元用于将所述第一输入密钥材料作为安全两方计算的输入。
本申请实施例中,可用两方节点指定模块发送的可用两方节点标识,可以辅助在容错多个节点(节点数量大于3)中的任意两个节点发生故障(或者三个节点中任意一个节点发生故障)的过程中可用节点的指定,更好的应对故障的发生。
第三方面,提供了一种根密钥保护系统,包括n个参与密钥计算的节点、二进制标签分配服务器、可用两方节点指定模块;所述二进制标签分配服务器用于根据n生成二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,将所述二进制标签分配给所述n个节点,向所述n个节点发送第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签、第一主节点、第二主节点和至少一个辅节点,其中,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节 点对应的二进制标签中包括至少一个数字0和至少一个数字1;所述第一主节点用于确定第一密钥材料,所述第一密钥材料的列数为k,所述第一密钥材料用于作为所述第一主节点执行安全两方计算的输入;所述第二主节点用于确定第二密钥材料,所述第二密钥材料的列数为k,所述第二密钥材料用于作为所述第二主节点执行安全两方计算的输入;第一辅节点用于接收第一信息和第二信息,并根据所述第一信息和所述第二信息确定第三密钥材料,所述第三密钥材料的列数为k,所述第三密钥材料用于作为所述第一辅节点执行安全两方计算的输入,所述第一辅节点为所述至少一个辅节点中的一个,其中,所述第一信息是所述第一主节点根据所述第一辅节点对应的第三二进制标签确定并发送的,所述第一信息包括所述第一密钥材料的一部分,所述第二信息是所述第二主节点根据所述第一辅节点对应的第三二进制标签确定并发送的,所述第二信息包括所述第二密钥材料的一部分,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;所述可用两方节点指定模块用于接收第一指示信息,所述第一指示信息用于指示两个可用于执行安全两方计算的节点,根据所述第一指示信息向所述两个可用于执行安全两方计算的节点发送第二指示信息,所述第二指示信息用于指示所述两个可用于执行安全两方计算的节点执行安全两方计算以及使用的密钥材料所对应的第一列数。
本申请实施例中,由于任意两个节点的密钥材料的相同列的异或结果相同,使能在基于安全两方计算的对根密钥的保护中,容错多个节点(节点数量大于3)中的任意两个节点发生故障,或者容错三个节点中的任意一个节点发生故障,有效地提高基于安全两方计算的密钥保护方法的可靠性,并且保证了同一节点上的密钥材料无法恢复出根密钥,保证了安全性。
结合第三方面,在第三方面的某些实现方式中,所述系统还包括根密钥分割模块,所述根密钥分割模块用于确定k个随机数作为所述第一密钥材料,根据第一根密钥和所述第一密钥材料确定所述第二密钥材料,向所述第一主节点发送所述第一密钥材料,向所述第二主节点发送所述第二密钥材料。
本申请实施例中,当两个主协商节点协商不成功时,通过设置根密钥分割模块,辅助参与两方计算的节点的各自密钥材料的生成,进一步提高了基于安全两方计算的密钥保护方法的可靠性。
结合第三方面,在第三方面的某些实现方式中,所述第一主节点用于确定k个随机数作为所述第一密钥材料,根据所述第一密钥材料确定第一辅助信息,所述第一辅助信息用于所述第二主节点确定第二密钥材料,并向所述第二主节点发送所述第一辅助信息。
结合第三方面,在第三方面的某些实现方式中,所述第二主节点用于接收所述第一辅助信息,并根据第一随机数和所述第一辅助信息确定第二密钥材料。
本申请实施例中,第一主节点通过生成第一辅助信息,使能第二主节点根据第一随机数和第一辅助信息确定第二密钥材料,只根据该第二密钥材料无法获知第一密钥材料,并且无法恢复出根密钥,进一步提高了(2,n)阈值的基于两方计算的根密钥保护方法的安全性。
结合第三方面,在第三方面的某些实现方式中,所述第一信息包括所述第一密钥材料 的一部分包括:所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
本申请实施例中,假设第一密钥材料为(R 0,R 1),该第一密钥材料对应的二进制标签为“0,0”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(R 0,0)。
结合第三方面,在第三方面的某些实现方式中,所述第二信息包括所述第二密钥材料的一部分包括:所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
本申请实施例中,假设第二密钥材料为(R 2,R 3),该第二密钥材料对应的二进制标签为“1,1”,第一信息对应的二进制标签(即第三二进制标签)为“0,1”,那么第一信息为(0,R 3)。
本申请实施例中,第一辅节点通过利用第一信息和第二信息生成第三密钥材料,例如(R 0,R 3),保证了任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且从第三密钥材料中无法恢复出第一密钥材料和第二密钥材料,保证了安全性。
结合第三方面,在第三方面的某些实现方式中,所述第一主节点接收所述第二指示信息,所述第一主节点确定所述第二指示信息包括所述第一主节点的标识,所述第一主节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第一密钥材料中的第一输入密钥材料作为执行安全两方计算的输入。
本申请实施例中,可用两方节点指定模块发送的可用两方节点标识,可以辅助在容错多个节点(节点数量大于3)中的任意两个节点发生故障(或者三个节点中任意一个节点发生故障)的过程中可用节点的指定,更好的应对故障的发生。
结合第三方面,在第三方面的某些实现方式中,所述第二主节点接收所述第二指示信息,所述第二主节点确定所述第二指示信息包括所述二主节点的标识,所述第二主节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第二密钥材料中的第二输入密钥材料作为执行安全两方计算的输入。
结合第三方面,在第三方面的某些实现方式中,所述第一辅节点接收所述第二指示信息,所述第一辅节点确定所述第二指示信息包括所述第一辅节点的标识,所述第一辅节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第三密钥材料中的第三输入密钥材料作为执行安全两方计算的输入。
第四方面,提供了一种通信设备,所述通信设备包括用于执行第一方面或第一方面任一种可能实现方式的各个单元,该通信设备可以为网络设备或基带芯片。
第五方面,提供了一种通信系统,所述通信系统包括用于执行第三方面或第三方面任一种可能实现方式的各个设备,其中,该通信系统可以由网络设备组成。
第六方面,提供了一种通信设备,包括收发组件和处理器,使得该通信设备执行第一方面或第一方面任一种可能实现方式中的方法。其中,该通信设备可以是网络设备或基带芯片。若该通信设备为网络设备,该收发组件可以为收发机,若该通信设备为基带芯片, 该收发组件可以为基带芯片的输入/输出电路。
第七方面,提供了一种通信系统,该通信系统由第三方面的各个通信设备构成,每个通信系设备包括收发组件和处理器。其中,通信设备可以是网络设备或基带芯片。若通信设备为网络设备,该收发组件可以为收发机,若通信设备为基带芯片,该收发组件可以为基带芯片的输入/输出电路。
第八方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被通信设备运行时,使得所述通信设备执行上述第一方面或第一方面任一种可能实现方式中的方法。
第九方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被通信设备运行时,使得所述通信设备执行上述第三方面或第三方面任一种通信设备涉及的方法。
第十方面,提供了一种计算机可读介质,所述计算机可读介质存储有程序代码,所述程序代码包括用于执行第一方面或第一方面任一种可能实现方式中的方法的指令。
第十一方面,提供了一种计算机可读介质,所述计算机可读介质存储有程序代码,所述程序代码包括用于执行第三方面或第三方面任一种通信设备涉及的方法的指令。
第十二方面,提供了一种芯片系统,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片系统的通信装置执行如上述第一方面或第一方面任一种可能实现方式中的方法。
第十三方面,提供了一种无线通信的装置,包括:用于实现如上述第一方面或第一方面任一种可能实现方式中的方法的单元。
在本申请中,通过使用二进制标签对参与两方计算的节点进行分类,使能将参与两方计算的节点在协商密钥的过程中都参与了密钥的生成,并且任意两个节点的密钥材料中的相同列的密钥材料的异或结果相同,即根密钥相同。在基于安全两方计算中,该方法能容错多个节点(节点数量大于3)中的任意两个节点发生故障,并且在2个节点参与两方计算的基础上,可以只增加一个节点就可以容错任意一个节点发生故障,该方法在冗余节点上部署多份密钥材料,有效提高了(2,n)阈值的基于两方计算的根密钥保护方法的可靠性,并且保证了同一节点上的密钥材料无法恢复出根密钥,保证了安全性。
附图说明
图1是本申请的实施例应用的场景示意图;
图2是本申请的实施例应用的另一场景示意图;
图3是本申请的(2,n)阈值的基于2PC的密钥保护方法的场景示意图;
图4是本申请的实施例的根密钥保护方法的一例示意性交互图;
图5是本申请的实施例的根密钥保护方法的另一例示意性交互图;
图6是根据本申请实施例的网络设备的一例的示意性框图;
图7是根据本申请实施例的网络设备的又一例的示意性框图;
图8是根据本申请实施例的根密钥保护系统的一例的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
还应理解,申请实施例中的“第一”或“第二”或“第三”仅为了区分,不应对本申请构成任何限定。
本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(global system of mobile communication,GSM)系统、码分多址(code division multiple access,CDMA)系统、宽带码分多址(wideband code division multiple access,WCDMA)系统、通用分组无线业务(general packet radio service,GPRS)、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、第五代(5th generation,5G)系统或新无线(new radio,NR)等。
本申请实施例中的终端设备,也可以称为用户设备(user equipment,UE)、接入终端、终端设备单元(subscriber unit)、终端设备站、移动站、移动台(mobile station,MS)、远方站、远程终端、移动设备、用户终端、终端(terminal)、无线通信设备、终端设备代理或终端设备装置。终端设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其它处理设备。还可以包括用户单元、蜂窝电话(cellular phone)、智能手机(smart phone)、无线数据卡、个人数字助理(personal digital assistant,PDA)电脑、平板型电脑、无线调制解调器(modem)、手持设备(handset)、膝上型电脑(laptop computer)、机器类型通信(machine type communication,MTC)终端、无线局域网(wireless local area networks,WLAN)中的站点(station,ST)。可以是蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站以及下一代通信系统,例如,5G网络中的终端设备或者未来演进的PLMN网络中的终端设备等。
本申请实施例中的网络设备可以是用于与终端设备通信的设备,该网络设备可以是全球移动通讯(global system of mobile communication,GSM)系统或码分多址(code division multiple access,CDMA)中的基站(base transceiver station,BTS),也可以是宽带码分多址(wideband code division multiple access,WCDMA)系统中的基站(nodeB,NB),还可以是LTE系统中的演进型基站(evolutional nodeB,eNB或eNodeB),还可以是云无线接入网络(cloud radio access network,CRAN)场景下的无线控制器,或者该网络设备可以为中继站、接入点、车载设备、可穿戴设备以及5G网络中的网络设备或者未来演进的PLMN网络中的网络设备等,本申请实施例并不限定。
为了便于理解,以下将对本申请实施例所涉及的基本概念作简单介绍。
1-out-2不经意传输(OT):在1-out-2不经意传输协议中,爱丽丝每次发两条信息(m1、m2)给鲍勃,鲍勃提供一个输入,并根据输入获得输出信息,在协议结束后,鲍勃得到了自己想要的那条信息(m1或者m2),其它剩余的信息不能得到,而爱丽丝并不知道鲍勃最终得到的是哪条信息。
安全多方计算(Secure Multi-Party Computation,MPC):针对无可信第三方的情况下,如何安全地计算一个约定函数的问题。多方计算的目标就是对一组计算的参与者,每个参与者拥有自己的输入数据,并且不信任其它参与者和任何第三方,在这种前提下,如何在保护各自私密输入数据下共同合作完成一个约定功能函数的计算任务。
安全两方计算(secure two-party computation,2PC):2PC是MPC的子问题,2PC允许两方共同在各自的输入数据上计算任意函数,而无需与对方共享其输入数据。不经意传输OT是2PC的一个重要技术。
三层密钥分层体系:根密钥加密主密钥,主密钥加密工作密钥,工作密钥加密业务敏感数据。
根密钥:在三层密钥分层体系中,根密钥位于密钥分层的最底层,决定了整个密码系统的安全性。
主密钥:在三层密钥分层体系中,主密钥是直接被根密钥加密的数据对象。
布尔电路:将两方参与的安全计算函数编译成布尔电路的形式。根据计算模型理论,任何安全计算函数都可转换成对应布尔电路的形式。
混淆电路:首先将两方参与计算的安全函数编译成布尔电路的形式,然后将布尔电路的真值表加密打乱,从而实现电路的正常输出而又不泄露参与计算的双方私有信息。
基于2PC的密钥保护:随机生成两份密钥材料,将两份密钥材料的异或结果作为密钥。这两份密钥材料分别作为2PC两方计算参与者的私密输入,两方参与者在各自私密的输入数据上共同计算加密/解密算法,最终得到加密结果或者解密结果,计算过程中任何一方无法恢复出密钥或者同时获取两份密钥材料。
(2,n)阈值的基于2PC的密钥保护:n个计算节点,任意两个节点中存在两份密钥材料的异或结果等于密钥。即任意两个节点存在两份密钥材料可作为基于2PC的密钥保护的输入,进行两方计算计算加解密结果。换句话说,任意n-2个节点发生故障,只要存在有两个节点可用,便可以执行两方计算算法。
下面将结合附图,对本申请中的技术方案进行描述。
图1是本申请的实施例应用场景100示意图。
图1示出了随机协商根密钥场景下,基于2PC的根密钥保护实现方法。总的来说,可分为以下步骤进行:
步骤S110:随机生成两份密钥材料R0和R1,将这两份密钥材料的异或结果作为根密钥;
步骤S120:将密钥材料R0和R1分别保存在两方节点,即节点1和节点2;
步骤S130:两方节点将各自的密钥材料作为两方计算的秘密输入,共同合作计算一个约定的加解密函数。
图2是本申请的实施例应用的另一场景200示意图。
图2示出了已知根密钥场景下,基于2PC的根密钥保护实现方法。总的来说,可分为下步骤进行:
步骤S210:将已知根密钥分割成两份密钥材料R0和R1,分割原则为两份密钥材料的异或结果等于根密钥;
步骤S220:将密钥材料R0和R1分别保存在两方节点,即节点1和节点2;
步骤S230:两方节点将各自的密钥材料作为两方计算的秘密输入,共同合作计算一个约定的加解密函数。
图3是本申请的(2,n)阈值的基于2PC的密钥保护方法的又一场景300示意图,其中,n>2。该场景涉及的网元/节点有以下几种:
二进制标签分配服务器310:该二进制标签分配服务器310为所有节点分配二进制标签,并将分配到全0和全1的二进制标签的节点指定为主协商节点。然后,将所有节点对应的二进制标签和主协商节点信息分发到每个节点上存储。
具体地,该二进制标签分配服务器310的分配标签的过程可以是:
步骤a1:从n个节点获取n个节点标识NodeID0,NodeID1,…,NodeIDn。
步骤a2:根据数量n确定整数k,使得2^k>=n,然后生成位数为k的二进制标签,标签数量为2^k个,分别为{Label0,Label1,…,Lable2^(k-1)}。
步骤a3:将该2^k个二进制标签分配给n个节点,将分配到全0和全1的标签的节点指定为主协商节点(例如为NodeID0分配全0标签,为NodeIDn分配全1标签),分配到其它标签的节点指定为非主协商节点。
步骤a4:将所有节点对应的二进制标签信息分发到每个节点上,每个节点都会存储该所有节点对应的二进制标签信息。
在一种可能的实施方式中,该二进制标签分配服务器310将主协商节点信息发送到每个节点上,每个节点都会存储该主协商节点信息。
在一种可能的实施方式中,该二进制标签分配服务器310与所有节点约定为:分配到全0标签的节点和全1标签的节点为主协商节点,应理解,此时则不需该二进制标签分配服务器310发送主协商节点信息。
例如,节点数量n=3时,该二进制标签分配服务器310确定整数k为2,生成二进制标签列表,然后分配给3个节点,分配到全0和全1的标签的节点指定为主协商节点,标签列表和节点的关系例如表1。
表1
二进制标签序列 二进制标签 节点 节点类型
Label0 0,0 节点1 主协商节点
Label1 0,1 节点2 非主协商节点
Label2 1,0
Label3 1,1 节点3 主协商节点
从表1中可以看出,节点1和节点3为主协商节点,节点2为非主协商节点,不为二进制标签“1,0”分配节点。应理解,节点2的二进制标签也可以为“1,0”,不为二进制标签“0,1”分配节点。
二进制标签服务器310可应用的场景为,例如,当全0标签节点和/或全1标签节点不能正常工作时,二进制标签服务器310可重新对所有节点进行二进制标签分配,重新确定主协商节点和非主协商节点。
可用两方节点指定模块320:负责从n个节点中获取任意两个可用节点信息并发送给对应的两个节点,以指导两个可用节点选择对应的密钥材料作为两方计算的秘密输入并执行两方计算算法。
可用两方节点指定模块320可应用于,例如,当负责进行两方计算的两个节点不能进 行两方计算时,可用两方节点指定模块320重新指定可以进行两方计算的节点。
根密钥分割模块330:负责将已知根密钥通过异或操作分割成两组密钥材料,使得两组密钥材料对应的每一列(相同位置/相同列数的密钥材料)的异或结果等于根密钥。还负责将生成的第一密钥材料组分发给全0标签节点存储,第二密钥材料组分发给全1标签节点存储。
根密钥分割模块330可应用于,例如,当全0标签节点和全1标签节点协商根密钥不成功时,根密钥分割模块330可根据已知根密钥生成两组密钥材料,并将两组密钥材料分别分发给全0标签节点和全1标签节点。
主协商节点(标签全0)340:负责接收和存储二进制标签分配服务器310发送的所有节点的二进制标签和主协商节点信息。在随机协商根密钥场景,负责随机生成全0二进制标签对应的密钥材料,并将密钥材料辅助计算信息发送给主协商节点(标签全1)350,其中密钥材料辅助计算信息不泄露主协商节点(标签全0)340的任一密钥材料;在已知根密钥场景,主协商节点(标签全0)340负责接收根密钥分割模块330的第一密钥材料组作为全0二进制标签对应的密钥材料。负责接收和认证其他非主协商节点的密钥材料请求,并为非主协商节点的二进制标签中值为0的列分配对应的密钥材料。还负责接收可用两方节点指定模块320发送的两个可用节点的信息,如果该信息中的可用节点标识包含自身标识,则将可用两方节点指定模块确定的第i列的密钥材料作为两方计算算法的秘密输入(i为主协商节点的二进制标签中的位数,例如i=0,1,…,k-1),并执行两方计算算法。
主协商节点(标签全1)350:负责接收和存储二进制标签分配服务器310发送的所有节点的二进制标签和主协商节点信息。在随机协商根密钥场景,接收主协商节点(标签全0)340的密钥材料辅助计算信息,根据密钥材料辅助计算信息计算得到主协商节点(标签全1)350对应的密钥材料。在已知根密钥场景,负责接收根密钥分割模块发送的第二密钥材料组作为主协商节点(标签全1)350对应的密钥材料。负责接收和认证其他非主协商节点的密钥材料请求,并为非主协商节点的二进制标签中值为1的列分配对应的密钥材料。如果该信息中的可用节点标识包含自身标识,则将可用两方节点指定模块确定的第i列的密钥材料作为两方计算算法的秘密输入(i为主协商节点的二进制标签中的位数,例如i=0,1,…,k-1),并执行两方计算算法。
非主协商节点(其他标签)360:负责接收和存储二进制标签分配服务器310发送的所有节点的二进制标签和主协商节点信息。负责向主协商节点(标签全0)340和主协商节点(标签全1)350请求获取对应的密钥材料。如果该信息中的可用节点标识包含自身标识,则将可用两方节点指定模块确定的第i列的密钥材料作为两方计算算法的秘密输入(i为主协商节点的二进制标签中的位数,例如i=0,1,…,k-1),并执行两方计算算法。
为了提高基于两方计算的根密钥保护方法的可靠性,本申请通过设计实现n(n>2)个计算节点中任意两个节点都可以执行两方计算约定的加解密函数,而且不影响根密钥的安全性。为了在密钥协商过程中协商出所有节点各自的密钥材料,本申请提供一个二进制标签分配服务器为所有节点分配对应的二进制标签,并将所有节点的标识和对应的二进制标签存储在每个节点上。在协商密钥材料时,所有节点根据自身的二进制标签获取对应的密钥材料。在执行两方计算前,两方计算节点根据两方计算节点对应的二进制标签选择对 应列的密钥材料,作为两方计算的秘密输入。以下将结合图4-图8详细描述本申请提出的根密钥保护方法。
图4是本申请的实施例的密钥保护方法400的一例示意性交互图。该方法为(2,n)阈值的基于两方计算的根密钥保护方法,其中n>2,可在协商随机根密钥场景下实施,包括如下步骤:
步骤S410:二进制标签分配服务器生成二进制标签,并对所有参与计算的节点进行二进制标签的分配。具体过程如下:
步骤a:二进制标签分配服务器获取所有参与计算的节点的标识信息。
在一种可能的实施方式中,参与计算的n个节点向二进制标签分配服务器发送节点标识信息,该节点标识信息包括各自节点的标识;
在一种可能的实施方式中,将参与计算的n个节点对应的节点标识配置在二进制标签分配服务器中。
步骤b:二进制标签分配服务器根据数量n生成二进制标签,然后向所有参与计算的n个节点分配二进制标签,并指定主协商节点;
在该步骤中,二进制标签分配服务器分别为n个节点(NodeID 0~NodeID n-1)分配二进制标签,二进制标签(lable 0~lable 2 k -1)的个数2 k应满足n≤2 k,其中k为每个二进制标签的位数,下面将举例进行具体说明:
(1)以(2,3)阈值的基于两方计算为例,2表示执行两方计算,3表示参与计算的节点的个数(NodeID 0~NodeID 2)。二进制标签分配服务器需要为这3个节点分配二进制标签,可分配的二进制标签为4个:Lable 0{0,0},Lable 1{0,1},Lable 2{1,0},Lable 3{1,1}。
(2)以(2,5)阈值的基于两方计算为例,2表示执行两方计算,5表示参与计算的节点的个数(NodeID 0~NodeID 4)。二进制标签分配服务器需要为这5个节点分配二进制标签,可分配的二进制标签为8个:Lable 0{0,0,0},Lable 1{0,0,1},Lable 2{0,1,0},Lable 3{0,1,1},Lable 4{1,0,0},Lable 5{1,0,1},Lable 6{1,1,0},Lable 7{1,1,1}。
在该步骤中,二进制标签分配服务器指定主协商节点,主协商节点的二进制标签为全0标签(二进制位都是0)和全1标签(二进制位都是1),下面将举例进行具体说明:
(1)以(2,3)为例,二进制标签分配服务器将NodeID 0和NodeID 2指定为主协商节点,并将全0标签Lable 0{0,0}分配给节点NodeID 0,并将全1标签Lable 3{1,1}分配给节点NodeID 2
(2)以(2,5)为例,二进制标签分配服务器将NodeID 0和NodeID 4指定为主协商节点,并将全0标签Lable 0{0,0,0}分配给节点NodeID 0,并将全1标签Lable 7{1,1,1}分配给节点NodeID 4
(3)以(2,n)为例,二进制标签分配服务器将NodeID 0和NodeID n-1指定为主协商节点,将全0标签分配给节点NodeID 0,将全1标签分配给节点NodeID n-1
在该步骤中,二进制标签将剩余的标签中的全部或者部分分配给其他非主协商节点。
步骤c:将所有节点的节点标识和对应的二进制标签,以及主协商节点信息发送给所有参与计算的节点存储。下面将举例进行具体说明:
以(2,3)为例中,所有节点存储的信息如表2所示:
表2
Figure PCTCN2021077072-appb-000001
可以理解的是,上述NodeID 1的二进制标签还可以为(1,0)。
以(2,5)为例中,所有节点存储的信息如表3所示:
表3
Figure PCTCN2021077072-appb-000002
Figure PCTCN2021077072-appb-000003
可以理解的是,节点NodeID 1~节点NodeID 3的二进制标签可以是步骤b中,以(2,5)为例中的可分配的除了全0标签和全1标签以外的二进制标签中的任意3个,即Lable 1~Lable 6这6个二进制标签中的任意3个都可作为节点NodeID 1~节点NodeID 3的二进制标签,上述举例只是为了便于理解,对此不构成任何限定。
步骤S420:主协商节点#1生成k列随机数作为密钥材料#1,并根据密钥材料#1计算密钥材料#1的辅助计算信息。
在该步骤中,全0标签节点NodeID 0(主协商节点#1)生成k个随机数作为节点NodeID 0的k列密钥材料,得到密钥材料组KSet 0={R 00,R 10,...,R (i-1)0,R i0,…,R (k-1)0}并进行本地存储。NodeID 0在本地计算密钥材料辅助信息A i0=R i0 xor R (i-1)0,其中i=1,2,…k-1,符号“xor”表示“异或”,得到Aset={A 10,…,A i0,...,A (k-1)0},其中Aset不泄露节点NodeID 0密钥材料组KSet 0的任何信息。
以(2,3)为例中,
NodeID 0生成密钥材料KSet 0={R 00,R 10},计算密钥材料辅助信息A 10=R 10 xor R 00,故Aset=A 10
以(2,5)为例中,
NodeID 0生成密钥材料KSet 0={R 00,R 10,R 20},计算密钥材料辅助信息A 10=R 10 xor R 00,A 20=R 20 xor R 10,故Aset={A 10,A 20}。
步骤S421:主协商节点#1将密钥材料#1的辅助计算信息发送给主协商节点#2。
在该步骤中,NodeID 0(主协商节点#1)将Aset={A 10,…,A i0,...,A (k-1)0}发送给NodeID n-1(主协商节点#2)。
以(2,3)为例中,
NodeID 0将密钥材料辅助信息A 10发送给NodeID 2
以(2,5)为例中,
NodeID 0将密钥材料辅助信息{A 10,A 20}发送给NodeID 4
步骤S430:主协商节点#2根据密钥材料#1的辅助计算信息确定密钥材料#2。
在该步骤中,主协商节点#2(全1标签)NodeID n-1生成一个随机数R 01。NodeID n-1根据R 01和密钥材料辅助信息Aset计算另一组密钥材料KSet n-1={R 01,R 11,...,R (i-1)1,R i1,…,R (k-1)1}并进行本地储存,其中R i1=A i0 xor R (i-1)1,i=1,2,…k-1。
其中,密钥材料#1和密钥材料#2的相同列的密钥的异或结果是随机协商的根密钥,即,RK=R 00 xor R 01=R 10 xor R 11=R 20 xor R 21=…=R (k-1)0 xor R (k-1)1,异或结果即是随机协商出的密钥RK。
在一种可能的实施方式中,步骤S440:非主协商节点向主协商节点#2发送密钥材料请求信息#A,密钥材料请求信息#A用于请求密钥材料#3。
在一种可能的实施方式中,步骤S441:非主协商节点#3(此处可以有多个非主协商 节点,以非主协商节点#3为例进行说明,其它非主协商节点具有相同的功能)向主协商节点#1发送密钥材料请求信息#B,密钥材料请求信息#B用于请求密钥材料#4。
在步骤S440和步骤S441中,NodeID i(i=1,2,…,n-2)向NodeID 0和NodeID n-1请求密钥材料#3和密钥材料#4,密钥材料#3是密钥材料#1的一部分,密钥材料#4是密钥材料#2的一部分,密钥材料#3和密钥材料#4用于NodeID i生成密钥材料#5。
在一种可能的实施方式中,步骤S450:主协商节点#2认证非主协商节点的身份。如果认证失败,则拒绝请求;如果认证成功,则根据密钥材料#2确定密钥材料#3。
在一种可能的实施方式中,步骤S451:主协商节点#1认证非主协商节点的身份。如果认证失败,则拒绝请求;如果认证成功,则根据密钥材料#1确定密钥材料#4。
在步骤S450中和步骤S451中,如果认证成功,主协商节点#2(NodeID n-1)建立一组值为空的密钥材料Kset i1,主协商节点#1(NodeID 0)建立一组值为空的密钥材料Kset i0
在一种可能的实施方式中,主协商节点#2(NodeID n-1)和主协商节点#1(NodeID 0)直接分别建立一组值为空的密钥材料Kset i1和一组值为空的密钥材料Kset i0
其中,主协商节点#2(NodeID n-1)获取NodeID i对应的二进制标签中值为1的所有列(计作CS1列),将本地密钥材料KSet n-1中对应的所有CS1列的密钥材料赋值给密钥材料组Kset i1对应的CS1列。将赋值后的密钥材料组Kset i1(密钥材料#3)返回给非主协商节点NodeID i
其中,主协商节点#1(NodeID 0)获取NodeID i对应的二进制标签中值为0的所有列(计作CS0列),将本地密钥材料KSet 0中对应的所有CS0列的密钥材料赋值给密钥材料组Kset i0对应CS0列。将赋值后的密钥材料组Kset i0(密钥材料#4)返回给非主协商节点NodeID i
步骤S460,主协商节点#2向非主协商节点#3发送密钥材料#3。
步骤S461,主协商节点#1向非主协商节点#3发送密钥材料#4。
在步骤S450~步骤S461中,以(2,3)为例中,
NodeID 0二进制标签为(0,0),对应密钥材料#1为{R 00,R 10};NodeID 2的二进制标签为(1,1),对应密钥材料#2为{R 01,R 11}。
NodeID 1的二进制标签为(0,1),NodeID 0将密钥材料#4{R 00,空}(此处的“空”代表不赋值)发送给NodeID 1,NodeID 2将密钥材料#3{空,R 11}(此处的“空”代表不赋值)发送给NodeID 1
在步骤S450~步骤S461中,以(2,5)为例中,
NodeID 0的二进制标签为(0,0,0),对应密钥材料#1为{R 00,R 10,R 20};NodeID 4的二进制标签为(1,1,1),对应密钥材料#2为{R 01,R 11,R 21}。
NodeID 1的二进制标签为{0,0,1},NodeID 0将密钥材料#4{R 00,R 10,空}(此处的“空”代表不赋值)发送给NodeID 1,NodeID 4将密钥材料#3{空,空,R 21}(此处的“空”代表不赋值)发送给NodeID 1
NodeID 2的二进制标签为{0,1,0},NodeID 0将密钥材料#4{R 00,空,R 20}(此处的“空”代表不赋值)发送给NodeID 2,NodeID 4将密钥材料#3{空,R 11,空}(此处的“空”代表不赋值)发送给NodeID 2
NodeID 3的二进制标签为{0,1,1},NodeID 0将密钥材料#4{R 00,空,空}(此处的“空” 代表不赋值)发送给NodeID 3,NodeID 4将密钥材料#3{空,R 11,R 21}(此处的“空”代表不赋值)发送给NodeID 1
应理解,当上述节点的二进制标签可以为其他值,上述仅为便于理解举例说明,对此不构成任何限定,当二进制标签另取它值时,密钥材料#3和密钥材料#4的确定和发送方式与此类似,此处不再赘述。
步骤S470,非主协商节点#3根据密钥材料#3和密钥材料#4确定密钥材料#5。
以(2,3)为例中,
NodeID 1的二进制标签为(0,1),则NodeID 1将NodeID 0发来的密钥材料#4{R 00,空}和NodeID 2发来的密钥材料#3{空,R 11}拼接得到NodeID 1的密钥材料#5{R 00,R 11}。
以(2,5)为例中,
NodeID 1的二进制标签为{0,0,1},则NodeID 1将NodeID 0发来的密钥材料#4{R 00,R 10,空}和NodeID 4发来的密钥材料#3{空,空,R 21}拼接得到NodeID 1的密钥材料#5{R 00,R 10,R 21};
NodeID 2的二进制标签为{0,1,0},则NodeID 2将NodeID 0发来的密钥材料#4{R 00,空,R 20}和NodeID 4发来的密钥材料#3{空,R 11,空}拼接得到NodeID 2的密钥材料#5{R 00,R 11,R 20};
NodeID 3的二进制标签为{0,1,1},则NodeID 3将NodeID 0发来的密钥材料#4{R 00,空,空}和NodeID 4发来的密钥材料#3{空,R 11,R 21}拼接得到NodeID 3的密钥材料#5{R 00,R 11,R 21}。
应理解,当上述节点的二进制标签可以为其他值,上述仅为便于理解举例说明,对此不构成任何限定,当二进制标签另取它值时,密钥材料#5的确定方式与此类似,此处不再赘述。
步骤S480~步骤S482,确定两个可用的进行安全两方计算的节点。
在一种可能的实施方式中,各个节点可自行按照固定的频率通过发送广播信息告知其它节点自己可进行安全两方计算,并根据自身对应的二进制标签使用数值较小的顺序(或数值较大的顺序)的前两位作为进行安全两方计算的节点,例如“0,0”和“0,1”,当某个节点在固定的周期中没有发送广播信息,则认为该节点不可用,则跳过该节点,顺序在后的节点自行作为进行安全两方计算的节点的其中一个。
在一种可能的实施方式中,使用可用两方节点指定模块确定两个可用节点标识信息,以及两个可用节点所使用的密钥材料所对应的列数,并将该信息和该列数发送给所有节点。
在一种可能的实施方式中,可用两方节点指定模块任意指定k列中的一列作为两个可用节点所使用的密钥材料所对应的列数。
步骤S490~步骤S492,可用两方节点指定的两个可用节点(以下称为指定节点#1和指定节点#2),指定节点#1(指定节点#2)根据本地存储的节点和二进制标签信息,确定指定节点#2(指定节点#1)的二进制标签信息,指定节点#1(指定节点#2)将自身的二进制标签和指定节点#2(指定节点#1)的二进制标签进行异或运算,得到的结果为1(或者结果为0)时的列对应的密钥材料作为两方计算的输入方。
在一种可能的实现方式中,在从指定节点#1和指定节点#2的二进制标签中的首列开 始遍历进行异或运算时,在首次得到结果为1时,则将该列对应的密钥材料作为两方计算的输入方。
以(2,3)为例中,若指定节点为NodeID 0(0,0)和NodeID 1(0,1),则将NodeID 0的第二列对应的密钥材料和NodeID 1的第二列对应的密钥材料作为两方计算的输入方。
以(2,5)为例中,若指定节点为NodeID 1{0,0,1}和NodeID 3{0,1,1},则将NodeID 1第二列对应的密钥材料和NodeID 3第二列对应的密钥材料作为两方计算的输入方。
图5是本申请的实施例的密钥保护方法的另一例示意性交互图。该方法为(2,n)阈值的基于两方计算的根密钥保护方法,其中n>2,可在已知根密钥场景下实施,包括如下步骤:
步骤S510与步骤S410类似,此处不再赘述。
步骤S520,根密钥分割模块将已知根密钥#1分割成两组密钥材料,这两组密钥材料相同列的异或结果为根密钥#1。
在该步骤中,根密钥分割模块随机生成k个随机数作为第一组密钥材料KSet 0={R 00,R 10,...,R (i-1)0,R i0,…,R (k-1)0}并进行本地存储。
根密钥分割模块将已知根密钥RK与第一组密钥材料的每一列密钥材料逐一进行异或,即R i1=RK xor R i0,i=0,1,..,k-1。k列异或结果作为第二组密钥材料KSet n-1={R 01,R 11,...,R (i-1)1,R i1,…,R (k-1)1}。
步骤S521,根密钥分割模块将第一组密钥材料发送给主协商节点#1。
步骤S522,根密钥分割模块将第二组密钥材料发送给主协商节点#2。
步骤S530,主协商节点#1将第一组密钥材料进行存储,并确定为密钥材料#1。
步骤S531,主协商节点#2将第二组密钥材料进行存储,并确定为密钥材料#2。
步骤S520中,以(2,3)为例中,
根密钥分割模块生成2个随机数{R 00,R 10},作为NodeID 0的第一组密钥材料为KSet 0={R 00,R 10},根据第一组密钥材料确定NodeID 2的第二组密钥材料为KSet 2={R 01,R 11},其中R 01=RK xor R 00,R 11=RK xor R 10
步骤S1140~步骤S1160中,以(2,5)为例中,
根密钥分割模块生成3个随机数{R 00,R 10,R 20},作为NodeID 0的第一组密钥材料为KSet 0={R 00,R 10,R 20},根据第一组密钥材料确定NodeID 4的密钥材料为KSet 2={R 01,R 11,R 21},其中R 01=RK xor R 00,R 11=RK xor R 10,R 21=RK xor R 20
步骤S540~步骤S592分别与步骤S440~步骤S492类似,此处不再赘述。
图6是根据本申请实施例的网络设备的一例的示意性框图。如图6所示,网络设备600被包括在n个节点的系统中,所述n个节点包括第一主节点、第二主节点和至少一个辅节点,所述n个节点中的每个节点存储有第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1,所述网络设备为第一辅节点,所述网络设备600包括:
接收单元610,所述接收单元610用于从第一主节点接收第一信息,所述第一信息包 括第一密钥材料的一部分,所述第一密钥材料是所述第一主节点使用的密钥材料,所述第一信息是基于所述第一辅节点对应的第三二进制标签确定的;
所述接收单元610还用于从第二主节点接收第二信息,所述第二信息包括第二密钥材料的一部分,所述第二密钥材料是所述第二主节点使用的密钥材料,所述第二信息是基于所述第三二进制标签确定的;
处理单元620,所述处理单元620用于根据所述第一信息和所述第二信息,生成第三密钥材料,其中,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;
所述处理单元620还用于将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入。
在一种可能的实施方式中,所述第一密钥材料为所述第一主节点生成的k个随机数。
在一种可能的实施方式中,所述第二密钥材料为所述第二主节点根据第一随机数和第一辅助信息确定的,所述第一辅助信息是所述第一主节点根据所述第一密钥材料确定的。
在一种可能的实施方式中,所述第一信息包括第一密钥材料的一部分包括:
所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
在一种可能的实施方式中,所述第二信息包括第二密钥材料的一部分包括:
所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
在一种可能的实施方式中,所述处理单元620还用于将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入包括:
所述接收单元610获取可用两方节点指定模块发送的可用两方节点标识,所述可用两方节点标识包括第一标识和第二标识;
所述处理单元620用于确定所述第一标识为所述第一辅节点的节点标识,所述处理单元用于根据所述第三密钥材料确定第一输入密钥材料,所述第一输入密钥材料是所述第三密钥材料的其中一个密钥材料,所述处理单元用于将所述第一输入密钥材料作为安全两方计算的输入。
图7是根据本申请实施例的网络设备的另一例的示意性框图。如图7所示,所述网络设备700包括收发机710以及处理器720。所述处理器720被配置为支持网络设备执行上述方法中网络设备600相应的功能。可选的,所述网络设备700还可以包括存储器730,所述存储器730用于与处理器720耦合,保存网络设备700必要的程序指令和数据。处理器720具体用于执行存储器730中存储的指令,当指令被执行时,所述网络设备700执行上述方法中网络设备600所执行的方法。
需要说明的是,图6中所示的网络设备600可以通过图7中所示的网络设备700来实现。例如,图6中所示接收单元610可以由收发机710实现,处理单元620可以由处理器720实现。
应理解,本申请实施例中,该处理器可以为中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
图8为根据本申请实施例的根密钥保护系统的一例示意性框图。如图8所述,根密钥保护系统800包括:二进制标签分配服务器810,参与密钥计算的节点820,其中,参与密钥计算的节点820包括第一主节点821(二进制标签为全0),第二主节点822(二进制标签为全1),第一辅节点823(二进制标签包括至少一个数字“0”和至少一个数字“1”),可用两方节点指定模块830,根密钥保护系统800还可以包括:根密钥分割模块840。
其中,所述二进制标签分配服务器810用于根据参与密钥计算的节点数量n生成二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,将所述二进制标签分配给所述n个节点,向所述n个节点发送第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签、第一主节点821、第二主节点822和至少一个辅节点,其中,所述第一主节点821对应的第一二进制标签的每一位都是0,所述第二主节点822对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1;
所述第一主节点821用于确定第一密钥材料,所述第一密钥材料的列数为k,所述第一密钥材料用于作为所述第一主节点821执行安全两方计算的输入;
所述第二主节点822用于确定第二密钥材料,所述第二密钥材料的列数为k,所述第二密钥材料用于作为所述第二主节点822执行安全两方计算的输入;
第一辅节点823用于接收第一信息和第二信息,并根据所述第一信息和所述第二信息确定第三密钥材料,所述第三密钥材料的列数为k,所述第三密钥材料用于作为所述第一辅节点823执行安全两方计算的输入,所述第一辅节点823为所述至少一个辅节点中的一个,
其中,
所述第一信息是所述第一主节点821根据所述第一辅节点823对应的第三二进制标签 确定并发送的,所述第一信息包括所述第一密钥材料的一部分,
所述第二信息是所述第二主节点822根据所述第三二进制标签确定并发送的,所述第二信息包括所述第二密钥材料的一部分,
所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;
所述可用两方节点指定模块830用于接收第一指示信息,所述第一指示信息用于指示两个可用于执行安全两方计算的节点,根据所述第一指示信息向所述两个可用于执行安全两方计算的节点发送第二指示信息,所述第二指示信息用于指示所述两个可用于执行安全两方计算的节点执行安全两方计算以及使用的密钥材料所对应的第一列数。
在一种可能的实施方式中,所述系统还包括根密钥分割模块840,所述根密钥分割模块840用于确定k个随机数作为所述第一密钥材料,根据第一根密钥和所述第一密钥材料确定所述第二密钥材料,向所述第一主节点821发送所述第一密钥材料,向所述第二主节点822发送所述第二密钥材料。
在一种可能的实施方式中,所述第一主节点用于确定k个随机数作为所述第一密钥材料,根据所述第一密钥材料确定第一辅助信息,所述第一辅助信息用于所述第二主节点822确定第二密钥材料,并向所述第二主节点822发送所述第一辅助信息。
在一种可能的实施方式中,所述第二主节点822用于接收所述第一辅助信息,并根据第一随机数和所述第一辅助信息确定第二密钥材料。
在一种可能的实施方式中,所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
在一种可能的实施方式中,所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
在一种可能的实施方式中,所述第一主节点821接收所述第二指示信息,所述第一主节点821确定所述第二指示信息包括所述第一主节点821的标识,所述第一主节点821根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第一密钥材料中的第一输入密钥材料作为执行安全两方计算的输入。
在一种可能的实施方式中,所述第二主节点822接收所述第二指示信息,所述第二主节点822确定所述第二指示信息包括所述二主节点822的标识,所述第二主节点822根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第二密钥材料中的第二输入密钥材料作为执行安全两方计算的输入。
在一种可能的实施方式中,所述第一辅节点823接收所述第二指示信息,所述第一辅节点823确定所述第二指示信息包括所述第一辅节点823的标识,所述第一辅节点823根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第三密钥材料中的第三输入密钥材料作为执行安全两方计算的输入。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机 程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质。半导体介质可以是固态硬盘。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者无线接入网设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟 悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (25)

  1. 一种根密钥保护方法,其特征在于,应用在包括n个节点的系统中,所述n个节点包括第一主节点、第二主节点和至少一个辅节点,所述n个节点中的每个节点存储有第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1,所述方法包括:
    第一辅节点从第一主节点接收第一信息,所述第一信息包括第一密钥材料的一部分,所述第一密钥材料是所述第一主节点使用的密钥材料,所述第一信息是基于所述第一辅节点对应的第三二进制标签确定的;
    第一辅节点从第二主节点接收第二信息,所述第二信息包括第二密钥材料的一部分,所述第二密钥材料是所述第二主节点使用的密钥材料,所述第二信息是基于所述第三二进制标签确定的;
    所述第一辅节点根据所述第一信息和所述第二信息,生成第三密钥材料,其中,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;
    所述第一辅节点将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入。
  2. 如权利要求1所述的方法,其特征在于,所述第一密钥材料为所述第一主节点生成的k个随机数。
  3. 如权利要求2所述的方法,其特征在于,所述第二密钥材料为所述第二主节点根据第一随机数和第一辅助信息确定的,所述第一辅助信息是所述第一主节点根据所述第一密钥材料确定的。
  4. 如权利要求1-3中任一项所述的方法,其特征在于,所述第一信息包括第一密钥材料的一部分包括:
    所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
  5. 如权利要求4所述的方法,其特征在于,所述第二信息包括第二密钥材料的一部分包括:
    所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
  6. 如权利要求1-5中任一项所述的方法,其特征在于,所述第一辅节点将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入包括:
    所述第一辅节点获取可用两方节点指定模块发送的可用两方节点标识,所述可用两方节点标识包括第一标识和第二标识;
    所述第一辅节点确定所述第一标识为所述第一辅节点的节点标识,所述第一辅节点根据所述第三密钥材料确定第一输入密钥材料,所述第一输入密钥材料是所述第三密钥材料的其中一个密钥材料,所述第一辅节点将所述第一输入密钥材料作为安全两方计算的输入。
  7. 一种根密钥生成网络设备,其特征在于,所述网络设备被包括在n个节点的系统中,所述n个节点包括第一主节点、第二主节点和至少一个辅节点,所述n个节点中的每个节点存储有第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1,所述网络设备为第一辅节点,所述网络设备包括:
    接收单元,所述接收单元用于从第一主节点接收第一信息,所述第一信息包括第一密钥材料的一部分,所述第一密钥材料是所述第一主节点使用的密钥材料,所述第一信息是基于所述第一辅节点对应的第三二进制标签确定的;
    所述接收单元用于从第二主节点接收第二信息,所述第二信息包括第二密钥材料的一部分,所述第二密钥材料是所述第二主节点使用的密钥材料,所述第二信息是基于所述第三二进制标签确定的;
    处理单元,所述处理单元用于根据所述第一信息和所述第二信息,生成第三密钥材料,其中,所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;
    所述处理单元用于将所述第三密钥材料中的一个密钥材料作为安全两方计算的输入。
  8. 如权利要求7所述的网络设备,其特征在于,所述第一密钥材料为所述第一主节点生成的k个随机数。
  9. 如权利要求8所述的网络设备,其特征在于,所述第二密钥材料为所述第二主节点根据第一随机数和第一辅助信息确定的,所述第一辅助信息是所述第一主节点根据所述第一密钥材料确定的。
  10. 如权利要求7-9中任一项所述的网络设备,其特征在于,所述第一信息包括第一密钥材料的一部分包括:
    所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
  11. 如权利要求10所述的网络设备,其特征在于,所述第二信息包括第二密钥材料的一部分包括:
    所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
  12. 如权利要求7-11中任一项所述的网络设备,其特征在于,所述处理单元用于将 所述第三密钥材料中的一个密钥材料作为安全两方计算的输入包括:
    所述接收单元获取可用两方节点指定模块发送的可用两方节点标识,所述可用两方节点标识包括第一标识和第二标识;
    所述处理单元用于确定所述第一标识为所述第一辅节点的节点标识,所述处理单元用于根据所述第三密钥材料确定第一输入密钥材料,所述第一输入密钥材料是所述第三密钥材料的其中一个密钥材料,所述处理单元用于将所述第一输入密钥材料作为安全两方计算的输入。
  13. 一种根密钥保护系统,其特征在于,包括n个参与密钥计算的节点、二进制标签分配服务器、可用两方节点指定模块;
    所述二进制标签分配服务器用于根据n生成二进制标签,n为大于2的整数,2 k≥n,k为所述二进制标签的位数,将所述二进制标签分配给所述n个节点,向所述n个节点发送第一关联关系信息,所述第一关联关系信息用于指示所述n个节点中的每个节点对应的二进制标签、第一主节点、第二主节点和至少一个辅节点,其中,所述第一主节点对应的第一二进制标签的每一位都是0,所述第二主节点对应的第二二进制标签的每一位都是1,任意两个辅节点对应的二进制标签不同,且每个辅节点对应的二进制标签中包括至少一个数字0和至少一个数字1;
    所述第一主节点用于确定第一密钥材料,所述第一密钥材料的列数为k,所述第一密钥材料用于作为所述第一主节点执行安全两方计算的输入;
    所述第二主节点用于确定第二密钥材料,所述第二密钥材料的列数为k,所述第二密钥材料用于作为所述第二主节点执行安全两方计算的输入;
    第一辅节点用于接收第一信息和第二信息,并根据所述第一信息和所述第二信息确定第三密钥材料,所述第三密钥材料的列数为k,所述第三密钥材料用于作为所述第一辅节点执行安全两方计算的输入,所述第一辅节点为所述至少一个辅节点中的一个,
    其中,
    所述第一信息是所述第一主节点根据所述第一辅节点对应的第三二进制标签确定并发送的,所述第一信息包括所述第一密钥材料的一部分,
    所述第二信息是所述第二主节点根据所述第三二进制标签确定并发送的,所述第二信息包括所述第二密钥材料的一部分,
    所述第一密钥材料和所述第二密钥材料中相同列的密钥材料的异或结果相同,所述第二密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同,所述第一密钥材料和所述第三密钥材料中相同列的密钥材料的异或结果相同;
    所述可用两方节点指定模块用于接收第一指示信息,所述第一指示信息用于指示两个可用于执行安全两方计算的节点,根据所述第一指示信息向所述两个可用于执行安全两方计算的节点发送第二指示信息,所述第二指示信息用于指示所述两个可用于执行安全两方计算的节点执行安全两方计算以及使用的密钥材料所对应的第一列数。
  14. 如权利要求13所述的系统,所述系统还包括根密钥分割模块,
    所述根密钥分割模块用于确定k个随机数作为所述第一密钥材料,根据第一根密钥和所述第一密钥材料确定所述第二密钥材料,向所述第一主节点发送所述第一密钥材料,向所述第二主节点发送所述第二密钥材料。
  15. 如权利要求13或14所述的系统,所述第一主节点用于确定k个随机数作为所述第一密钥材料,根据所述第一密钥材料确定第一辅助信息,所述第一辅助信息用于所述第二主节点确定第二密钥材料,并向所述第二主节点发送所述第一辅助信息。
  16. 如权利要求15所述的系统,所述第二主节点用于接收所述第一辅助信息,并根据第一随机数和所述第一辅助信息确定第二密钥材料。
  17. 如权利要求13-16中任一项所述的系统,其特征在于,所述第一信息包括所述第一密钥材料的一部分包括:
    所述第一信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为1的值为0,所述k个值中对应的所述第三二进制标签位为0的值为所述第一密钥材料中对应位置的值。
  18. 如权利要求17所述的系统,其特征在于,所述第二信息包括所述第二密钥材料的一部分包括:
    所述第二信息包括对应所述第三二进制标签的k个值,所述k个值中对应的所述第三二进制标签位为0的值为0,所述k个值中对应的所述第三二进制标签位为1的值为所述第二密钥材料中对应位置的值。
  19. 如权利要求13-18中任一项所述的系统,所述第一主节点接收所述第二指示信息,所述第一主节点确定所述第二指示信息包括所述第一主节点的标识,所述第一主节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第一密钥材料中的第一输入密钥材料作为执行安全两方计算的输入。
  20. 如权利要求13-19中任一项所述的系统,所述第二主节点接收所述第二指示信息,所述第二主节点确定所述第二指示信息包括所述二主节点的标识,所述第二主节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第二密钥材料中的第二输入密钥材料作为执行安全两方计算的输入。
  21. 如权利要求13-20中任一项所述的系统,所述第一辅节点接收所述第二指示信息,所述第一辅节点确定所述第二指示信息包括所述第一辅节点的标识,所述第一辅节点根据所述第二指示信息确定所述第一列数,并将所述第一列数对应的第三密钥材料中的第三输入密钥材料作为执行安全两方计算的输入。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序运行时,
    使得装置执行如权利要求1至6中任意一项所述的方法。
  23. 一种芯片系统,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,
    使得安装有所述芯片系统的通信装置执行如权利要求1至6中任意一项所述的方法。
  24. 一种无线通信的装置,其特征在于,包括:
    用于实现权利要求1至6中任一项所述的方法的单元。
  25. 一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被网络设备运行时,使得所述终端设备执行如权利要求1至6中任意一项所述的方法。
PCT/CN2021/077072 2021-02-20 2021-02-20 一种根密钥保护方法和系统 WO2022174419A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/077072 WO2022174419A1 (zh) 2021-02-20 2021-02-20 一种根密钥保护方法和系统
CN202180003923.0A CN115226416B (zh) 2021-02-20 2021-02-20 一种根密钥保护方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/077072 WO2022174419A1 (zh) 2021-02-20 2021-02-20 一种根密钥保护方法和系统

Publications (1)

Publication Number Publication Date
WO2022174419A1 true WO2022174419A1 (zh) 2022-08-25

Family

ID=82931946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077072 WO2022174419A1 (zh) 2021-02-20 2021-02-20 一种根密钥保护方法和系统

Country Status (2)

Country Link
CN (1) CN115226416B (zh)
WO (1) WO2022174419A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115549907B (zh) * 2022-11-24 2023-03-24 北京智芯微电子科技有限公司 根密钥管理系统、备份方法、恢复方法、装置及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478548A (zh) * 2009-01-22 2009-07-08 上海交通大学 数据传输的加密和完整性校验方法
CN102160324A (zh) * 2008-09-19 2011-08-17 皇家飞利浦电子股份有限公司 用于在网络中安全通信的方法、用于其的通信设备、网络及计算机程序
CN102356597A (zh) * 2009-03-19 2012-02-15 皇家飞利浦电子股份有限公司 用于在网络中安全通信的方法、及其通信设备、网络和计算机程序
US20150229620A1 (en) * 2012-09-13 2015-08-13 Nec Corporation Key management in machine type communication system
CN110383755A (zh) * 2017-01-05 2019-10-25 皇家飞利浦有限公司 网络设备和可信第三方设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2017002788A (es) * 2014-09-04 2017-05-30 Koninklijke Philips Nv Sistema criptografico dispuesto para intercambio de claves.
CN106534050A (zh) * 2015-09-11 2017-03-22 中移(杭州)信息技术有限公司 一种实现虚拟专用网络密钥协商的方法和装置
CN105681034B (zh) * 2016-02-24 2019-03-05 山东超越数控电子有限公司 一种基于数字标签的文档保密管理方法及系统
CN110545252B (zh) * 2018-05-29 2021-10-22 华为技术有限公司 一种认证和信息保护的方法、终端、控制功能实体及应用服务器
CN112118568B (zh) * 2019-06-21 2022-02-25 华为技术有限公司 一种设备身份鉴权的方法及设备
CN111262699A (zh) * 2020-03-03 2020-06-09 成都量安区块链科技有限公司 一种量子安全的密钥服务方法与系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102160324A (zh) * 2008-09-19 2011-08-17 皇家飞利浦电子股份有限公司 用于在网络中安全通信的方法、用于其的通信设备、网络及计算机程序
CN101478548A (zh) * 2009-01-22 2009-07-08 上海交通大学 数据传输的加密和完整性校验方法
CN102356597A (zh) * 2009-03-19 2012-02-15 皇家飞利浦电子股份有限公司 用于在网络中安全通信的方法、及其通信设备、网络和计算机程序
US20150229620A1 (en) * 2012-09-13 2015-08-13 Nec Corporation Key management in machine type communication system
CN110383755A (zh) * 2017-01-05 2019-10-25 皇家飞利浦有限公司 网络设备和可信第三方设备

Also Published As

Publication number Publication date
CN115226416B (zh) 2024-05-03
CN115226416A (zh) 2022-10-21

Similar Documents

Publication Publication Date Title
JP6943978B2 (ja) 通信方法および関連する装置
CN110830989B (zh) 一种通信方法和装置
CN109413645B (zh) 接入认证的方法和装置
US11778458B2 (en) Network access authentication method and device
US11246033B2 (en) Authentication method, and related device and system
TWI812678B (zh) 終端訊息的傳遞方法及相關產品
US11108548B2 (en) Authentication method, server, terminal, and gateway
WO2018219181A1 (zh) 确定终端设备的标识的方法和装置
WO2013118096A1 (en) Method, apparatus and computer program for facilitating secure d2d discovery information
US11432140B2 (en) Multicast service processing method and access point
US20230344626A1 (en) Network connection management method and apparatus, readable medium, program product, and electronic device
WO2021244447A1 (zh) 信息保护方法、系统及通信装置
WO2021031768A1 (zh) 一种安全加密的方法及装置
WO2019019853A1 (zh) 处理数据的方法、终端设备和网络设备
US20230179400A1 (en) Key management method and communication apparatus
CN113239403A (zh) 一种数据共享方法及装置
WO2022174419A1 (zh) 一种根密钥保护方法和系统
US11751160B2 (en) Method and apparatus for mobility registration
US20190149326A1 (en) Key obtaining method and apparatus
CN108702303B (zh) 一种为无线承载进行安全配置方法和设备
WO2021073382A1 (zh) 注册方法及装置
CN114342472A (zh) 对amf重新分配时的注册请求中的nas容器的处理
CN112423300A (zh) 无线网络接入认证方法及装置
WO2022237671A1 (zh) 组寻呼的方法和装置
WO2023131044A1 (zh) 认证与安全方法、装置及存储介质

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: 21926137

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: 21926137

Country of ref document: EP

Kind code of ref document: A1