Information management method and device and computer readable storage medium
By splitting the public and private keys between multiple nodes on the server, and using threshold encryption technology, the key leakage or loss caused by hardware security module failure is solved, achieving higher security and reliability.
Patent Information
- Application Number
- CN202311175039.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
The existing information management methods can easily lead to key leakage or loss when the hardware security module fails, and have low security and reliability.
Using threshold encryption technology, multiple nodes on the server generate public key shards and private key shards, public key shards can be shared, and private key shards are independently saved by each node. The private key can be restored through at least t private key shards to avoid the occurrence of a complete private key.
Improve the security and reliability of information management, avoiding the risks of single point of failure and private key leakage.
Smart Images

Figure CN119602939A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of information security technology, and in particular to an information management method, device and computer-readable storage medium. Background Art
[0002] Currently, information such as user accounts and passwords is often encrypted to ensure its security, and its encryption key is kept in a key management system.
[0003] Typically, a key management system uses a symmetric encryption key to encrypt plaintext to obtain ciphertext, and then uses a hardware security module to store the symmetric encryption key. The generated ciphertext is stored in a database. Among them, a hardware security module (HSM) is a dedicated encryption device that can store digital keys, encryption keys, and other confidential information.
[0004] However, the current information management method may lead to key leakage or loss once the HSM fails, and its security and reliability are still low and need to be improved. Summary of the invention
[0005] The embodiments of this specification provide an information management method, device, and computer-readable storage medium to solve the problems of low security and reliability of current information management solutions.
[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0007] In a first aspect, an information management method is provided, which is applied to a server, wherein the server includes n second nodes, and the method includes:
[0008] The n second nodes generate private key fragments and public key fragments respectively;
[0009] The n second nodes respectively share the public key fragments generated by themselves with other second nodes;
[0010] The n second nodes respectively save the private key fragments generated by themselves locally, wherein the private key used for threshold decryption can be restored through at least t private key fragments, t is a first threshold value, t<n.
[0011] In a second aspect, an information management server is provided, the server comprising n second nodes:
[0012] The n second nodes are respectively used to generate private key shards and public key shards, share the public key shards generated by themselves with other second nodes, and save the private key shards generated by themselves locally, wherein the private key used for threshold decryption can be restored through at least t private key shards, t is the first threshold value, t<n.
[0013] According to a third aspect, an electronic device is provided, including:
[0014] processor;
[0015] a memory for storing instructions executable by the processor;
[0016] The processor is configured to execute the instructions to implement the method as described in the first aspect.
[0017] According to a fourth aspect, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method described in the first aspect.
[0018] In an embodiment of the present specification, n second nodes on the server side generate public key shards and private key shards respectively, wherein the public key shards can be shared with other second nodes, while the private key shards are independently stored by these n second nodes. The private key used for threshold decryption can be restored through at least t private key shards, but the complete private key will not appear in the whole process. Therefore, there is no risk of single point failure and private key leakage, and the security and reliability are high. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 It is a flowchart of an information management method provided in an embodiment of this specification.
[0021] Figure 2 It is a flowchart of an information management method provided by another embodiment of this specification.
[0022] Figure 3 yes Figure 2 A detailed flowchart of step 105 in the flowchart shown.
[0023] Figure 4 It is a flowchart of storing ciphertext in an information management method provided in an embodiment of this specification.
[0024] Figure 5 It is a schematic diagram of a decryption process in an information management method provided in an embodiment of this specification.
[0025] Figure 6It is a schematic diagram of a threshold encryption and decryption process provided in an embodiment of this specification.
[0026] Fig. 7A This is a schematic diagram of an electronic wallet transaction account registration process provided in an embodiment of this specification.
[0027] Figure 7B The present invention is a schematic diagram of an electronic wallet transaction account verification process provided in an embodiment of the present invention.
[0028] Figure 8 It is a schematic diagram of a deployment architecture of an information management system provided in an embodiment of this specification.
[0029] Fig. 9 It is a detailed deployment architecture diagram of an information management system provided in an embodiment of this specification.
[0030] Fig.10 yes Fig. 9 A schematic diagram of the structure of the components included in the information management system shown.
[0031] Fig.11 It is a schematic diagram of the structure of an electronic device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0033] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of this specification can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.
[0034] In order to solve the problem of low security and reliability of current information management solutions, this specification proposes an information management method, device and computer-readable storage medium.
[0035] An information management method proposed in this specification is an information management method based on threshold encryption technology. Threshold encryption is a distributed encryption and decryption technology, and its key is divided into a public key and a private key. In an information management method proposed in this specification, a public key and a private key are jointly generated by multiple participants (hereinafter referred to as n second nodes). Among them, the public key is used to encrypt the target information, and the private key includes multiple private key fragments, and these multiple private key fragments are kept by multiple participants respectively. When decrypting, it is not necessary for all participants to participate in the decryption. It is only necessary that the number of participants involved in the decryption is greater than or equal to the first threshold value (set to t) to decrypt. However, if the number of participants involved in the decryption is less than t, it cannot be decrypted. Since the private key is divided into private key fragments and stored in different participants, this makes it impossible for the entire process to have a complete private key, so there is no single point of failure. If a participant fails, it will not cause the loss of the private key, and the security and reliability are high.
[0036] An information management method provided by an embodiment of this specification is described below with reference to the accompanying drawings.
[0037] An information management method provided by an embodiment of the present specification may be applied to a server, which may include n second nodes, such as Figure 1 As shown, the method may include:
[0038] Step 101: The n second nodes generate private key fragments and public key fragments respectively.
[0039] Since an information management method provided in the embodiment of this specification is based on threshold encryption technology, in step 101, the n second nodes can generate private key fragments and public key fragments based on threshold encryption technology. Threshold encryption technology can use symmetric encryption algorithms for encryption and decryption, and can also use asymmetric encryption algorithms for encryption and decryption. In the embodiment of this specification, in order to avoid the appearance of a complete decryption key, an asymmetric encryption algorithm is used to implement threshold encryption. The asymmetric encryption algorithm here includes but is not limited to a public key encryption algorithm based on integer factorization difficulty (Rivest-Shamir-Adleman, RSA), a digital signature algorithm (Digital Signature Algorithm, DSA) and one of elliptic curve cryptography (Elliptic Curve Cryptography, ECC).
[0040] Compared with traditional algorithms such as RSA and DSA, ECC provides higher security and shorter key length. By utilizing the discrete logarithm difficulty on the elliptic curve, ECC can achieve a smaller key length under the same encryption strength, thereby providing more efficient encryption and faster data processing speed. Therefore, as an example, the n second nodes can generate private key shards and public key shards based on ECC respectively. Specifically, the n second nodes can generate private key shards and public key shards based on a preset elliptic curve respectively. Among them, the preset elliptic curve is determined based on ECC.
[0041] More specifically, the n second nodes respectively generate private key shards and public key shards based on a preset elliptic curve, which may include: the n second nodes respectively generate a random number within a specified value range as a private key shard; the n second nodes respectively determine their own public key shards based on the private key shards generated by themselves and the generator of the preset elliptic curve. The value of the random number is generally large, or the lower limit of the specified value range is large, generally thousands or tens of thousands.
[0042] Step 102: The n second nodes respectively share the public key fragments generated by themselves with other second nodes.
[0043] The purpose of the n second nodes respectively sharing the public key fragments generated by themselves with other second nodes is to enable the n second nodes to respectively generate and publish the public keys for threshold encryption according to the n public key fragments. In one implementation, the n public key fragments are combined or concatenated to obtain a public key. The public key is used to encrypt the target information.
[0044] Step 103: The n second nodes respectively save the private key fragments generated by themselves locally.
[0045] Among them, the private key used for threshold decryption can be restored through at least t private key fragments, t is the first threshold value, t<n. That is, threshold decryption can be achieved through at least t private key fragments.
[0046] In order to further ensure the security of the private key shards, the n second nodes may respectively save the private key shards generated by themselves into their respective hardware security modules (HSM).
[0047] At present, the complete private key appears in the process of generating the key for secondary encryption of its registration information or authentication information on the server side of many electronic wallets. This increases the risk of private key leakage. However, an information management method provided in the embodiment of this specification is provided, in which n second nodes of the server side respectively generate public key fragments and private key fragments, wherein the public key fragments can be shared with other second nodes, and the private key fragments are independently stored by these n second nodes. The private key used for threshold decryption can be restored through at least t private key fragments, but the complete private key will not appear in the whole process, so there is no risk of single point failure and private key leakage, and the security and reliability are high.
[0048] Optional, such as Figure 2 As shown, the information management method provided in this specification may further include one or more of the following steps after the above step 103:
[0049] Step 104: The n second nodes respectively generate public keys for threshold encryption according to the public key shards and make them public.
[0050] Step 105, the n second nodes respectively process the private key fragments generated by themselves according to the preset secret sharing protocol to obtain secret information and send it to other second nodes, wherein the secret information is used by the other second nodes to generate decryption parameters, and the decryption parameters are used to implement threshold decryption.
[0051] In order to achieve the purpose of decryption through at least t second nodes among n second nodes, each second node can split the private key into pieces based on a preset secret sharing protocol to calculate the secret information, and send it to other second nodes to generate decryption parameters.
[0052] The preset secret sharing protocol may include but is not limited to Shamir's Secret Sharing Protocol. Shamir's Secret Sharing Protocol is a protocol that divides secret information into multiple parts and distributes them to different participants (second nodes). The secret can only be restored when a sufficient number of participants (second nodes) cooperate. Shamir's Secret Sharing Protocol and threshold encryption are closely related concepts and can be used in combination with each other.
[0053] In threshold encryption, the Shamir secret sharing protocol can be used to split and restore the key to achieve threshold decryption. In the Shamir secret sharing protocol, a randomly generated t-1 degree polynomial is used to split the key part of the secret. Its form is usually as follows:
[0054] P(x)=s+a1x+a2x 2 +…+a t-1 x t-1
[0055] Where P(x) is a t-1 degree polynomial, s is the secret value (i.e., the private key shard generated in step 101), a1, a2, …, a t-1 are t-1 randomly selected coefficients, and x is a variable. This polynomial is called the secret sharing polynomial.
[0056] In the first step of the Shamir secret sharing protocol, in order to split the secret (private key shard) into t parts, the participants are assigned different x values (usually 1 to t, i.e., the ID of the participant or the second node). Based on the x values assigned to each participant, each participant calculates P(x) and obtains a partial value (i.e., the secret information mentioned in step 105). These partial values are distributed to different participants for subsequent protocol operations.
[0057] When at least t participants (second nodes) cooperate, they can use Lagrange interpolation to combine their respective partial values to recover the secret value S. Lagrange interpolation will use the various points of P(x) to accurately reconstruct the polynomial, thus being able to recover the original secret.
[0058] It should be noted that by choosing different random coefficients a1, a2, …, a t-1 To generate different polynomials P(x), it can be ensured that even if less than t partial values are known, no information about the secret can be obtained, thus ensuring the security of the secret.
[0059] After receiving the secret information shared by other second nodes, a second node can calculate the decryption parameters in combination with the private key fragments generated by itself, and the second node can use the decryption parameters to implement threshold decryption.
[0060] Specifically, the decryption parameters can be expressed as:
[0061]
[0062]
[0063] Among them, F i (j) represents the secret information shared by the second node i to the second node j, and p represents the order of the preset elliptic curve.
[0064] Through the above decryption parameter b j and u j , you can restore the private key shard S:
[0065]
[0066] On this basis, in order to further ensure the security of the private key shards and decryption parameters, the n second nodes can respectively save the private key shards and decryption parameters generated by themselves into their respective HSMs.
[0067] A Hardware Security Module (HSM) is a dedicated cryptographic device that can store digital keys, encryption keys, and other confidential information. It uses physical isolation and strong encryption technology to ensure security and provide highly reliable key storage capabilities.
[0068] The information management method provided in this specification combines the Shamir secret sharing protocol so that the complete private key will not appear during the joint generation of the public key and the private key by each second node, thereby reducing the risk of private key leakage.
[0069] Optionally, the server further includes a first node. Figure 2 The method may further include:
[0070] Step 106: The first node encrypts the target information according to the public key.
[0071] Among them, the target information is any information that needs to be encrypted and stored to ensure its security. As an example, the target information can be the specified information of an electronic account, such as the authentication information of an electronic wallet, which can include account information and password information, etc., wherein the password information can be a password in the conventional sense, or it can be the user's biometric information (such as facial image, fingerprint, etc.). Among them, an electronic wallet is a system for electronic payment, which stores monetary value through various devices such as smart phones, computers or other electronic devices, and allows users to transfer in real time during transactions. When the target information is the specified information of an electronic account, the above-mentioned multiple participants (i.e., the n second nodes mentioned below) can be multiple nodes of the service end corresponding to the electronic account. The following will be explained through specific examples, which will not be repeated here.
[0072] The target information can be decrypted by at least t decryption parameters generated by the second nodes. The private key cannot be generated and restored by less than t decryption parameters generated by the second nodes.
[0073] Generally, threshold encryption has certain requirements on the type and / or length of the target information to be encrypted. For example, the threshold encryption algorithm based on the preset elliptic curve used in this specification requires first mapping the target information to be encrypted to the cyclic subgroup corresponding to the generator G of the elliptic curve. However, in reality, a lot of information to be encrypted does not meet the above requirements. This limits the scope of application of threshold encryption technology.
[0074] In order to solve the above problem, this specification provides an information management method. When the type and / or length of the target information meets the encryption requirements of the elliptic curve encryption algorithm, the target information is directly encrypted according to the public key generated above to obtain a ciphertext; when the type and / or length of the target information does not meet the encryption requirements of the elliptic curve encryption algorithm, the ciphertext is obtained by using the public key generated above. Figure 3 Encryption is performed according to the encryption process shown.
[0075] like Figure 3 As shown, the first node encrypts the target information according to the public key, which may include:
[0076] Step 301: The first node generates a random number within a specified numerical range, and determines a point KP in a subgroup according to the random number and a cyclic subgroup of a preset elliptic curve.
[0077] Specifically, the first node may generate a random positive integer r in the range of [1, the order of the preset elliptic curve], and multiply r by the generator G of the preset elliptic curve to obtain a point KP in the cyclic subgroup corresponding to the generator (Generator, G). The generator (Generator) refers to a special point on the preset elliptic curve, and all other points on the preset elliptic curve can be obtained by performing repeated operations on this point. The generator G plays a role similar to a public key in elliptic curve cryptography and can be used to generate public key points. The cyclic subgroup (Cyclic Subgroup) refers to a set of points on the preset elliptic curve generated by the generator G. By performing repeated point operations on the generator, other points in the cyclic subgroup can be obtained. The points in the cyclic subgroup have a cyclic property, that is, the generator G can be returned to by continuous point operations. This cyclic property is an important feature in elliptic curve cryptography and is used to implement various cryptographic algorithms. The point KP may refer to the result obtained by performing point multiplication (Point Multiplication) on the generator G in the cyclic subgroup, where the factor of the multiplication is a certain integer K. The point KP is also called a public key point on the elliptic curve and is used to encrypt messages or verify signatures.
[0078] Step 302: The first node determines a hash value of the target coordinates of the point KP.
[0079] The target coordinates may be at least one of the horizontal coordinate and the vertical coordinate of the point KP. The hash value key of the target coordinates of the point KP may be calculated using a hash function.
[0080] Step 303: The first node uses the hash value as a key of a first encryption algorithm to encrypt the target information to obtain a first ciphertext, wherein the first encryption algorithm is a symmetric encryption algorithm.
[0081] Specifically, the first encryption algorithm may include but is not limited to the Salsa20 algorithm. Salsa20 is a symmetric encryption algorithm used to encrypt data streams or data blocks. Its principle is to generate a pseudo-random byte stream. Then this pseudo-random byte stream and the data to be encrypted are XORed byte by byte. This process is the encryption process. Due to the characteristics of XOR, for example, Axor B=C, then A xor C=B and B xor C=A. Therefore, when decrypting, as long as the same pseudo-random byte stream is used to XOR the ciphertext byte by byte, it can be decrypted. Among them, this pseudo-random byte stream is the key.
[0082] The hash value key of the target coordinates of point KP is used as the key of the first encryption algorithm to encrypt the target information, and the obtained first ciphertext can be expressed as enc.
[0083] Step 304: The first node encrypts the target coordinates of the point KP using the public key to obtain a second ciphertext.
[0084] As described above, point KP meets the requirements of the threshold encryption algorithm based on elliptic curves for the type and / or length of information to be encrypted. The horizontal and vertical coordinates of point KP are encrypted using the public key for threshold encryption generated above to obtain the second ciphertext: (C1, C2).
[0085] Optionally, the first node merges the first ciphertext and the second ciphertext to obtain a third ciphertext: (C1, C2, enc). At this point, the encryption of the target information is completed.
[0086] It can be understood that when encrypting target information, a symmetric encryption algorithm (such as the Salsa20 algorithm) is introduced so that the threshold encryption algorithm can adapt to target information of various types and lengths. At the same time, because a layer of encryption algorithm is added, security is further improved.
[0087] Furthermore, the storage security of the ciphertext of the target information encrypted by threshold encryption technology (such as the third ciphertext) also needs to be taken seriously. Although the ciphertext can be stored by redundant backup, the ciphertext is stored completely in each node, which poses a risk of leakage. In order to solve this problem, this manual stores the target information encrypted by threshold encryption in fragments to further improve the security of the target information. Specifically, Figure 4 As shown, an information management method provided in this specification may also include:
[0088] S107: The first node divides the third ciphertext into n ciphertext fragments.
[0089] S108, the first node sends n-w+1 ciphertext fragments to the n second nodes respectively in a preset order, where w is a second threshold value, w<n.
[0090] S109, the n second nodes save the received ciphertext fragments.
[0091] The preset order includes a positive order (clockwise) or a reverse order (counterclockwise). Assume that the n ciphertext fragments obtained by segmenting the third ciphertext are represented in positive order as: A1, A2, A3, ..., A n , then A1 to A w Send to the second node 1, A2 to A w+1 Send to the second node 2, A3 to A w+2 Send to the second node 3, and so on.
[0092] For another example, assume that the number of second nodes is 5 (i.e., n=5). Set the second threshold value to 3 (i.e., w=3). The third ciphertext is A. Then A is first divided into 5 fragments: A1, A2, A3, A4, A5. Then send 3 fragments (5-3+1) of the ciphertext fragments to each second node in a counterclockwise order (reverse order). The fragments received by each second node (P1-P5) are shown in Table 1 below:
[0093] Table 1
[0094] P1 P2 P3 P4 P5 <![CDATA[A1]]> <![CDATA[A2]]> <![CDATA[A3]]> <![CDATA[A4]]> <![CDATA[A5]]> <![CDATA[A5]]> <![CDATA[A1]]> <![CDATA[A2]]> <![CDATA[A3]]> <![CDATA[A4]]> <![CDATA[A4]]> <![CDATA[A5]]> <![CDATA[A1]]> <![CDATA[A2]]> <![CDATA[A3]]>
[0095] As can be seen from the above table, if any two second nodes fail and cause data loss, the complete ciphertext can still be recovered. At the same time, if any two participant nodes are attacked, the complete ciphertext will not be leaked. Therefore, by sharding the ciphertext of the target information, the risk of ciphertext loss or leakage can be reduced, thereby further improving the security of the target information.
[0096] On this basis, optionally, an information management method provided in this specification may also include: when a preset condition is met, decrypting the second ciphertext and the first ciphertext in the third ciphertext to obtain the target information.
[0097] As an example, if the target information includes account information and password information of an electronic account, then when the first node receives the specified information of a user registering or modifying the electronic account, the n second nodes respectively generate private key fragments and public key fragments (step 101), and the first node encrypts the target information according to the public key. On this basis, the preset condition includes: receiving an authentication request for the electronic account.
[0098] Specifically, Figure 5 As shown, decrypting the second ciphertext and the first ciphertext in the third ciphertext to obtain the target information may include:
[0099] Step 501: The first node requests ciphertext fragmentation from the n second nodes.
[0100] Step 502: When the first node receives at least w ciphertext fragments returned by the second node, the first node recovers the third ciphertext according to the requested ciphertext fragments.
[0101] Step 503: The first node sends the second ciphertext in the third ciphertext to the n second nodes respectively.
[0102] Step 504: The n second nodes decrypt the second ciphertext according to the decryption parameters stored in themselves, obtain decrypted fragments and send them to the first node.
[0103] Step 505: The first node aggregates the received decrypted fragments to obtain the target coordinates.
[0104] That is, the target coordinates of point KP are obtained.
[0105] Step 506: The first node determines a hash value of the target coordinates, and uses the hash value as a key to decrypt the first ciphertext in the third ciphertext to obtain the target information.
[0106] It can be understood that the decryption process is the reverse process of the encryption process, so the description is relatively simple. Figure 6 FIG. 1 shows a schematic diagram of threshold encryption and decryption provided by an embodiment of this specification. Figure 6 As shown, the threshold encryption and decryption process is roughly as follows: first, n second nodes (participants) agree on a first threshold value t, and use the public key fragments y1, y2, y3, etc. generated by themselves to generate a public key PK; then the public key PK is used to encrypt the plaintext m to be encrypted (such as the target coordinates of the point KP in the above text) to obtain the ciphertext E(m); during decryption, at least t second nodes among the n second nodes use their own stored private key fragments to decrypt the ciphertext E(m) to obtain decrypted fragments. For example, the second node 1 uses the private key fragment x1 to decrypt the ciphertext E(m) to obtain the decrypted fragment D1, the second node 2 uses the private key fragment x2 to decrypt the ciphertext E(m) to obtain the decrypted fragment D2, the second node 3 uses the private key fragment x3 to decrypt the ciphertext E(m) to obtain the decrypted fragment D3, and so on; the decrypted fragment D1, the decrypted fragment D2, the decrypted fragment D3, etc. (at least t decrypted fragments) are aggregated to obtain the plaintext m.
[0107] The above is an introduction to an information management method provided in this specification. The following is an explanation of the process of applying an information management method provided in this specification to the management of designated information of an electronic wallet, which includes account registration (such as Fig. 7A The method can be applied to scenarios such as mobile payment and online payment based on electronic wallets.
[0108] Fig. 7A A schematic diagram of the process of registering an electronic wallet transaction account is shown. Fig. 7A As shown, in the registration process, an electronic wallet client 71 and an electronic wallet server 72 are involved, wherein the electronic wallet server 72 includes a first node 721 and n second nodes 722. The process may include:
[0109] Step 701: the electronic wallet client 71 initiates an electronic wallet registration request to the first node 721, and the request carries registration information that has been hashed.
[0110] In actual applications, users can register an account and set a password through the electronic wallet client 71, and then the electronic wallet client 71 and the electronic wallet server 72 agree on a hash encryption algorithm and salt. After that, the electronic wallet client 71 hashes the account information and password information and submits it to the first node 721 of the electronic wallet server 72 as registration information.
[0111] Step 702, after receiving the encrypted registration information, the electronic wallet server 72 generates public key shards and private key shards through n second nodes 722 respectively, shares the public key shards with other second nodes to generate a public key for threshold encryption and makes it public, and stores the private key shards in a dispersed manner in the local HSM module.
[0112] Optionally, the n second nodes 722 can also process the private key shards generated by themselves according to the preset secret sharing protocol to obtain secret information and send it to other second nodes, wherein the secret information is used by the other second nodes to generate decryption parameters, and the decryption parameters are used to implement threshold decryption. Accordingly, the n second nodes 722 can respectively save the private key shards and decryption parameters generated by themselves into their respective HSMs.
[0113] In the process of the n second nodes 722 jointly generating the public key and the private key, no complete private key appears, and the private key fragments are not transmitted to each other, thereby reducing the possibility of private key leakage and improving security.
[0114] Step 703: The first node 721 uses a public key and a symmetric encryption algorithm to perform secondary encryption on the registration information.
[0115] For the specific encryption process, please refer to the above Figure 3 The description is not repeated here.
[0116] Step 704, split the ciphertext obtained by the secondary encryption into n fragments, and then send n-w+1 fragments to each second node 722 for storage.
[0117] Optionally, the second node 722 may also store the public key together.
[0118] Step 705: The first node 721 deletes the sensitive data temporarily generated during the registration process and responds to the registration request of the client.
[0119] For example, sensitive data temporarily generated during the registration process includes registration information before secondary encryption.
[0120] Understandably, Fig. 7A In the electronic wallet transaction account registration process shown, in the process of n second nodes 722 jointly generating public keys and private keys, no complete private key appears, and private key fragments are not transmitted to each other, which reduces the possibility of private key leakage and improves security; in addition, storing the ciphertext fragments of the twice-encrypted registration information can further improve the security of the registration information.
[0121] Figure 7B A schematic diagram of an electronic wallet transaction account verification process is shown. Fig. 7A ,like Figure 7B As shown, in the verification process, an electronic wallet client 71 and an electronic wallet server 72 are involved, wherein the electronic wallet server 72 includes a first node 721 and n second nodes 722. The process may include:
[0122] Step 706: the electronic wallet client 71 initiates a transaction request to the first node 721 in the electronic wallet server 72, and provides the account information and password information that have been hashed.
[0123] Step 707: The first node 71 requests the second node 722 for ciphertext fragments of the registration information according to the account information.
[0124] Step 708: After receiving at least w ciphertext fragments returned by the second node 722, the first node 721 recovers the complete ciphertext.
[0125] Step 709 : The first node 721 sends the complete ciphertext to n second nodes 722 .
[0126] Step 710 , n second nodes 722 calculate decrypted fragments based on the complete ciphertext and decryption parameters and return them to the first node 721 .
[0127] In step 711, the first node 721 aggregates the decrypted fragments from at least t second nodes 722 to obtain the password information in the registration information; and compares the password information with the password information submitted by the user. If the two are consistent, it is determined that the authentication is passed, otherwise, it is determined that the authentication is not passed.
[0128] It can be understood that after the authentication is passed, the corresponding transaction can be released, otherwise the transaction will be blocked.
[0129] Step 712: The first node 721 deletes the temporarily generated sensitive data.
[0130] For example, the password information submitted by the user in step 706 and the registration information aggregated in step 711 are deleted.
[0131] Understandably, Figure 7B In the electronic wallet transaction account verification process shown, the complete private key does not appear, and the private key fragments are not transmitted to each other, which reduces the possibility of private key leakage and improves security. In addition, temporarily generated sensitive data will not be stored, thereby further improving the security of the password information of the electronic wallet account.
[0132] The above is an application of an information management method provided in this specification to the management of designated information of an electronic wallet. The following introduces an implementation architecture of an information management method provided in an embodiment of the present application.
[0133] like Figure 8 As shown, an information management system provided in this specification may include: a first node 821 located at a server end 82 and n second nodes 822 .
[0134] The n second nodes 822 are used to generate private key shards and public key shards, share the public key shards generated by themselves with other second nodes, and save the private key shards generated by themselves locally, wherein the private key used for threshold decryption can be restored through at least t private key shards, t is the first threshold value, t<n. That is, the n second nodes are interconnected to form a threshold encryption network.
[0135] Optionally, the n second nodes 822 are also used to process the private key fragments generated by themselves according to a preset secret sharing protocol to obtain secret information and send it to other second nodes, wherein the secret information is used by the other second nodes to generate decryption parameters, and the decryption parameters are used to implement threshold decryption.
[0136] Optionally, the n second nodes 822 are further used to generate and publish public keys for threshold encryption according to the n public key fragments respectively.
[0137] Optionally, the first node 821 is used to encrypt the target information according to the public key.
[0138] Optionally, the first node 821 is specifically used to: when the type and / or length of the target information meets the encryption requirements of the elliptic curve encryption algorithm, directly encrypt the target information according to the public key generated above to obtain a ciphertext.
[0139] Optionally, the first node 821 is specifically used to: when the type and / or length of the target information does not meet the encryption requirements of the elliptic curve encryption algorithm, generate a random number within a specified numerical range, and determine the point KP in the subgroup according to the random number and a cyclic subgroup of a preset elliptic curve; determine the hash value of the target coordinates of the point KP; use the hash value as the key of the first encryption algorithm to encrypt the target information to obtain a first ciphertext, wherein the first encryption algorithm is a symmetric encryption algorithm; use the public key to encrypt the target coordinates of the point KP to obtain a second ciphertext; and merge the first ciphertext and the second ciphertext to obtain a third ciphertext.
[0140] Optionally, the first node 821 is further used to: divide the third ciphertext into n ciphertext fragments; send n-w+1 ciphertext fragments to the n second nodes respectively in a preset order, where w is a second threshold value, w<n. Correspondingly, the n second nodes are further used to: save the received ciphertext fragments.
[0141] Optionally, the first node 821 is also used to: request ciphertext fragments from the n second nodes; upon receiving ciphertext fragments returned by at least w second nodes, restore the third ciphertext based on the ciphertext fragments obtained by the request; send the second ciphertext in the third ciphertext to the n second nodes respectively, so that the n second nodes respectively decrypt the second ciphertext according to the decryption parameters stored in themselves, obtain decrypted fragments and send them to the first node; aggregate the received decrypted fragments to obtain the target coordinates; determine the hash value of the target coordinates, and use the hash value as the key to decrypt the first ciphertext in the third ciphertext to obtain the target information.
[0142] An information management system provided by an embodiment of the present specification generates public key shards and private key shards by n second nodes on the server side, respectively, wherein the public key shards can be shared with other second nodes, while the private key shards are independently stored by these n second nodes. The private key used for threshold decryption can be restored through at least t private key shards, but the complete private key will not appear in the whole process, so there is no risk of single point failure and private key leakage, and the security and reliability are high.
[0143] Fig. 9The detailed deployment architecture diagram of an information management system provided in this specification is shown in the scenario of managing designated information of an electronic account. Fig. 9 As shown, in the scenario of designated information management of an electronic account, an information management system provided in this specification may include: an electronic account client 81 and an electronic account server 82, wherein the electronic account server 82 includes a first node 821 and n second nodes 822.
[0144] Optional, such as Fig. 9 As shown, the electronic account service end 82 also includes a business service end 823 for implementing business services for the electronic account. This part has little to do with the information management method proposed in this specification, and therefore, will not be described in detail.
[0145] The electronic account client 81 is generally deployed in the user device, and a hash encryption module is provided in the electronic account client 81. The hash encryption module is used for the electronic account server 82 to jointly determine the hash algorithm and the salt, and then hash the registration information or authentication information (account information and password information) when submitting the information to the server.
[0146] The second node 822 is mainly responsible for the joint generation of public and private keys, private key segmentation, and storage of encrypted information. Fig. 9 As shown, the second node 822 includes a threshold encryption module and a storage module.
[0147] Specifically, Fig.10 As shown, the second node 822 includes an information management device 21, and the information management device 21 includes a threshold encryption module 211 and a storage module 212, wherein the threshold encryption module 211 includes the following components: a public and private key generation unit 2111, a decryption unit 2112 and an HSM module 2113.
[0148] Specifically, Fig.10 As shown, the first node 821 includes an information management device 11, and the information management device 11 includes an information processing module 111, wherein the information processing module 111 includes the following components: a message assembler 1111, an encryption unit 1112, an information verification unit 1113 and a ciphertext processing unit 1114.
[0149] To ensure security, the communication between different components is encrypted based on SSL (Secure Sockets Layer) and / or TLS (Transport Layer Security).
[0150] The public-private key generation unit 2111 is used to generate public key fragments and private key fragments, share the public key fragments generated by itself with other second nodes, and save the private key fragments generated by itself locally, wherein the private key used for threshold decryption can be restored through at least t private key fragments, t is the first threshold value, t<n.
[0151] Optionally, the public-private key generation unit 2111 is further used to generate a public key for threshold encryption according to the public key fragments and make it public.
[0152] Optionally, the public-private key generation unit 2111 is also used to process the private key fragments generated by itself according to a preset secret sharing protocol to obtain secret information and send it to other second nodes, wherein the secret information is used by the other second nodes to generate decryption parameters, and the decryption parameters are used to implement threshold decryption.
[0153] The HSM module 2113 is used to store the private key fragments and decryption parameters.
[0154] The encryption unit 1112 is used to encrypt the target information according to the public key, wherein the target information includes the designated information of the electronic account, and the designated information includes the account information and the password information.
[0155] More specifically, the encryption unit 1112 is used to generate a random number within a specified numerical range, determine a point KP in a subgroup based on the random number and a cyclic subgroup of a preset elliptic curve; determine a hash value of the target coordinates of the point KP; use the hash value as a key of a first encryption algorithm to encrypt the target information to obtain a first ciphertext, wherein the first encryption algorithm is a symmetric encryption algorithm (such as the Salsa20 algorithm); use the public key to encrypt the target coordinates of the point KP to obtain a second ciphertext; and merge the first ciphertext and the second ciphertext to obtain a third ciphertext.
[0156] The ciphertext processing unit 1114 is used to divide the third ciphertext into n ciphertext fragments; send n-w+1 ciphertext fragments to the n second nodes respectively in a preset order, where w is a second threshold value and w<n; so that the n second nodes save the received ciphertext fragments. And, it is used to combine the received ciphertext fragments.
[0157] The decryption unit 2112 is used to decrypt the second ciphertext and the first ciphertext in the third ciphertext to obtain the target information when a preset condition is met.
[0158] Specifically, the decryption unit 2112 is used to request ciphertext fragments from the n second nodes; when receiving ciphertext fragments returned by at least w second nodes, restore the third ciphertext according to the requested ciphertext fragments; send the second ciphertext in the third ciphertext to the n second nodes respectively, so that the n second nodes respectively decrypt the second ciphertext according to the decryption parameters stored by themselves, obtain the decrypted fragments and send them to the first node.
[0159] The message combiner 1111 is used to aggregate the received decrypted fragments to obtain the target coordinates; determine the hash value of the target coordinates, and use the hash value as a key to decrypt the first ciphertext in the third ciphertext to obtain the target information.
[0160] The information verification unit 1113 is used to verify whether the account information and password information currently received from the client are consistent with the account information and password information in the decrypted target information during the electronic account verification process. If they are consistent, the verification passes; if not, the verification fails.
[0161] An information management system provided by an embodiment of the present specification, on the one hand, public key shards and private key shards are generated by n second nodes of the server respectively, wherein the public key shards can be shared with other second nodes, while the private key shards are independently stored by these n second nodes, and the private key used for threshold decryption can be restored through at least t private key shards, but the complete private key will not appear in the whole process, so there is no risk of single point failure and private key leakage, and the security and reliability are high; on the other hand, the Shamir secret sharing protocol is combined, so that the complete private key will not appear during the joint generation of public keys and private keys by each second node, thereby reducing the risk of private key leakage; further, when encrypting the target information, a symmetric encryption algorithm (such as the Salsa20 algorithm) is introduced, so that the threshold encryption algorithm can adapt to target information of various types and lengths. At the same time, because a layer of encryption algorithm is added, the security is further improved; further, by storing the ciphertext of the target information in slices, the risk of ciphertext loss or leakage can be reduced, thereby further improving the security of the target information.
[0162] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0163] Fig.11This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Fig.11 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0164] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0165] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0166] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an information management device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0167] Generate private key shards and public key shards;
[0168] Share the public key shards generated by itself with other second nodes;
[0169] The private key fragments generated by itself are saved locally, wherein the private key used for threshold decryption can be restored through at least t private key fragments, where t is the first threshold value, and t<n.
[0170] The above is as in this manual Fig.11The method performed by the information management device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0171] The electronic device may also perform Figure 1 The method and the information management device are implemented in Figure 1 The functions in the illustrated embodiments will not be described in detail in this specification.
[0172] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0173] The embodiments of this specification also provide a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, are specifically used to perform the following operations:
[0174] Generate private key shards and public key shards;
[0175] Share the public key shards generated by itself with other second nodes;
[0176] The private key fragments generated by itself are saved locally, wherein the private key used for threshold decryption can be restored through at least t private key fragments, where t is the first threshold value, and t<n.
[0177] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
[0178] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0179] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0180] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0181] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. An information management method, applied to a server, the server comprising n second nodes, the method comprising: The n second nodes generate private key fragments and public key fragments respectively; The n second nodes respectively share the public key fragments generated by themselves with other second nodes; The n second nodes respectively save the private key fragments generated by themselves locally, wherein the private key used for threshold decryption can be restored through at least t private key fragments, t is a first threshold value, and t<n.
2. According to the method of claim 1, the n second nodes respectively generate private key fragments and public key fragments, comprising: The n second nodes respectively generate private key fragments and public key fragments based on a preset elliptic curve.
3. The method according to claim 2, wherein the n second nodes generate private key shards and public key shards based on a preset elliptic curve, respectively, comprising: The n second nodes each generate a random number within a specified value range as a private key shard; The n second nodes respectively determine their own public key shards according to the private key shards generated by themselves and the generators of the preset elliptic curve.
4. The method according to any one of claims 1 to 3, further comprising: The n second nodes respectively generate public keys for threshold encryption according to the public key fragments and make them public.
5. According to the method of claim 4, the server further comprises a first node, and the method further comprises: The first node encrypts the target information according to the public key.
6. The method according to claim 5, further comprising: The n second nodes respectively process the private key fragments generated by themselves according to the preset secret sharing protocol to obtain secret information and send it to other second nodes, wherein the secret information is used by the other second nodes to generate decryption parameters, and the decryption parameters are used to implement threshold decryption.
7. The method according to claim 6, wherein: The n second nodes respectively save the private key fragments generated by themselves locally, including: The n second nodes respectively save the private key fragments and decryption parameters generated by themselves into their respective hardware security modules HSM.
8. The method according to claim 6, wherein: The target information can be decrypted using at least t decryption parameters generated by the second nodes.
9. The method according to claim 6, wherein the threshold encryption is based on elliptic curve threshold encryption, wherein: The first node encrypts the target information according to the public key, including: The first node generates a random number within a specified numerical range, and determines a point KP in the subgroup according to the random number and a cyclic subgroup of a preset elliptic curve; The first node determines a hash value of a target coordinate of the point KP; The first node encrypts the target information using the hash value as a key of a first encryption algorithm to obtain a first ciphertext, wherein the first encryption algorithm is a symmetric encryption algorithm; The first node encrypts the target coordinates of the point KP using the public key to obtain a second ciphertext.
10. The method according to claim 9, further comprising: The first node combines the first ciphertext and the second ciphertext to obtain a third ciphertext; The first node divides the third ciphertext into n ciphertext fragments; The first node sends n-w+1 ciphertext fragments to the n second nodes respectively in a preset order, where w is a second threshold value, w<n; The n second nodes save the received ciphertext fragments.
11. The method according to claim 10, further comprising: When a preset condition is met, the second ciphertext and the first ciphertext in the third ciphertext are decrypted to obtain the target information.
12. The method according to claim 11, wherein: The decrypting the second ciphertext and the first ciphertext in the third ciphertext to obtain the target information includes: The first node requests ciphertext fragmentation from the n second nodes; When the first node receives at least w ciphertext fragments returned by the second node, the first node recovers the third ciphertext according to the ciphertext fragments obtained by the request; The first node sends the second ciphertext in the third ciphertext to the n second nodes respectively; The n second nodes decrypt the second ciphertext respectively according to the decryption parameters stored in themselves, obtain decrypted fragments and send them to the first node; The first node aggregates the received decrypted fragments to obtain the target coordinates; The first node determines a hash value of the target coordinates, and uses the hash value as a key to decrypt a first ciphertext in the third ciphertext to obtain the target information.
13. The method according to any one of claims 6 to 12, wherein: The preset secret sharing protocol includes the Shamir secret sharing protocol.
14. The method according to any one of claims 9 to 12, wherein: The first encryption algorithm includes the Salsa20 algorithm.
15. The method according to any one of claims 1-3, 5-12, wherein: The target information includes designated information of an electronic account, and the designated information includes account information and password information.
16. According to the method described in claim 11 or 12, if the target information includes account information and password information of an electronic account, then when the first node receives the specified information for the user to register or modify the electronic account, the n second nodes respectively generate private key fragments and public key fragments, and the first node encrypts the target information according to the public key.
17. The method according to claim 16, wherein: The preset conditions include: An authentication request for the electronic account is received.
18. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 17.
19. A computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 17.