Blockchain collective signature method and signature machine
Through the blockchain collective signature method and the two-call design between the signature machine and the browser plug-in, the problem of poor integration between the signature machine and the browser plug-in is solved, the multi-person joint management and security audit records of private keys are realized, and the security and convenience of asset management are improved.
Patent Information
- Application Number
- CN202210886529.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The security design requirements of the signature machine cannot be well integrated with the browser plug-in, resulting in insecure and inconvenient private key management.
Through the blockchain collective signature method, two calls are designed between the signature machine and the browser plug-in. The first call is made by multiple component holders to confirm the preset information and restore the secret value, export the blockchain private key, and the second call is made to compare the signature request to ensure that the signature information is jointly confirmed by multiple people.
It achieves the secure integration of the signature machine and the browser plug-in, ensures that the private key is jointly managed by multiple people, provides audit records, reduces the risk of private key loss or leakage, and improves the security and convenience of asset management.
Smart Images

Figure CN116155484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain collective signature method, a signature machine, a computer device, and a computer-readable storage medium. Background Art
[0002] Asymmetric encryption algorithms and public-private key pairs are widely used on blockchains. Private keys can be used to prove ownership of on-chain addresses, and thus, ownership of the assets associated with those addresses. Therefore, secure private key management is crucial in blockchain applications. Even on some public blockchains, private keys are the sole proof of ownership. Unlike a bank account, where a user can reset their bank card password with proof of ID, if they forget their bank card password, on blockchains, especially some public blockchains, once a private key is lost, the associated assets cannot be recovered. Therefore, secure private key management is crucial.
[0003] The signature machine manages the private keys of important assets. In order to safely manage private keys (blockchain private keys), the signature machine has security design requirements.
[0004] At the same time, the blockchain ecosystem widely uses browser plug-ins to authenticate identity.
[0005] However, the security design requirements of signature machines and browser plug-ins cannot be well integrated. Summary of the Invention
[0006] The purpose of this application is to provide a blockchain collective signature method, signature machine, computer device and computer-readable storage medium to solve the following technical problem: the security design requirements of the signature machine and the browser plug-in cannot be well integrated.
[0007] One aspect of an embodiment of the present application provides a blockchain collective signature method, which is applied to a signature machine. The method includes: accepting a call from a browser plug-in to receive a first signature request, wherein the first signature request includes preset information; providing the preset information to multiple component holders for confirmation; obtaining multiple components from the multiple component holders, and restoring a secret value based on the multiple components; deriving a blockchain private key based on the secret value; accepting a call from the browser plug-in again to receive a second signature request; and when the second signature request matches the preset information, signing the second signature request using the blockchain private key.
[0008] Optionally, the signature machine includes a service interface; the accepting the call of the browser plug-in and receiving the first signature request includes: receiving the first signature request from the browser plug-in through the service interface, the first signature request including the preset information, and the preset information is the first information to be signed.
[0009] Optionally, providing the preset information to multiple component holders for confirmation includes: displaying the preset information to the multiple component holders for confirmation; and receiving confirmation information of the multiple component holders for the preset information.
[0010] Optionally, obtaining multiple components from the multiple component holders and recovering the secret value based on the multiple components includes: if the preset information is legal, receiving the multiple components input by the multiple component holders; recovering the first-level key based on the multiple components; and recovering subsequent keys based on the first-level key.
[0011] Optionally, recovering a subsequent key based on the first-level key includes: recovering a second-level key based on the first-level key; and recovering a third-level key based on the second-level key, wherein the third-level key is the secret value.
[0012] Optionally, recovering the second-level key based on the first-level key includes: pre-saving first pre-stored information, wherein the first pre-stored information is obtained by encrypting the second-level key using a first encryption algorithm in combination with a first grouping pattern and first additional information, and the first pre-stored information includes a first ciphertext and first integrity protection additional information; using the recovered first-level key as the key, using the first encryption algorithm in combination with the first grouping pattern and the first additional information, to decrypt the second-level key from the first pre-stored information.
[0013] Optionally, recovering the third-level key based on the second-level key includes: pre-saving the second pre-stored information, wherein the second pre-stored information is obtained by encrypting the third-level key using a second encryption algorithm in combination with a second grouping pattern and second additional information, and the second pre-stored information includes a second ciphertext and second integrity protection additional information; using the recovered second-level key as the key, using the second encryption algorithm in combination with the second grouping pattern and the second additional information, to decrypt the third-level key from the second pre-stored information.
[0014] Optionally, deriving the blockchain private key according to the secret value includes: deriving the blockchain private key according to the secret value using a hierarchical deterministic wallet specification.
[0015] Optionally, the accepting the call of the browser plug-in again and receiving the second signature request includes: receiving the second signature request from the browser plug-in through the service interface, where the second signature request includes second information to be signed.
[0016] Optionally, when the second signature request is consistent with the preset information, the second signature request is signed using the blockchain private key, including: comparing whether the second information to be signed is consistent with the preset information; if the second information to be signed is consistent with the preset information and the preset information is valid, the second signature information is signed using the blockchain private key. After the signing is completed, if the number of signatures has reached a preset limit, the preset information is invalid; if the second information to be signed is inconsistent with the preset information, or the preset information is invalid, the second signature request is rejected.
[0017] Optionally, both the preset information and the second information to be signed include a one-time secure random number or a timestamp, and the one-time secure random number or timestamp is not within the comparison range.
[0018] Optionally, the blockchain collective signature method further includes: initializing the signature machine.
[0019] Optionally, the blockchain collective signature method further includes: recording the preset information and confirmation information of the preset information as an audit basis; and / or reporting the preset information and confirmation information of the preset information as an audit basis by sending an email or calling a workflow.
[0020] One aspect of an embodiment of the present application provides a blockchain collective signature method, which is applied to a signature machine and a browser plug-in. The method includes: the browser plug-in calls the signature machine and sends a first signature request to the signature machine, where the first signature request includes preset information; the signature machine provides the preset information to multiple component holders for confirmation; the signature machine obtains multiple components from the multiple component holders and restores a secret value based on the multiple components; the signature machine derives a blockchain private key based on the secret value; the browser plug-in calls the signature machine again and sends a second signature request to the signature machine; when the second signature request is consistent with the preset information, the signature machine uses the blockchain private key to sign the second signature request.
[0021] One aspect of an embodiment of the present application further provides a signature machine, including: a first calling module, used to accept a call from a browser plug-in and receive a first signature request, wherein the first signature request includes preset information; a confirmation module, used to provide the preset information to multiple component holders for confirmation; a recovery module, used to obtain multiple components from the multiple component holders and recover a secret value based on the multiple components; an export module, used to export a blockchain private key based on the secret value; a second calling module, used to accept a call from the browser plug-in again and receive a second signature request; a signature module, used to sign the second signature request using the blockchain private key when the second signature request is consistent with the preset information.
[0022] One aspect of an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned blockchain collective signature method are implemented.
[0023] One aspect of an embodiment of the present application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned blockchain collective signature method are implemented.
[0024] The blockchain collective signature method, signature machine, computer device and computer-readable storage medium provided in the embodiments of the present application can connect the signature machine and the browser plug-in. Through the two-call design, the browser plug-in can adapt to the security design requirements of the signature machine, thereby better integrating the signature machine and the browser plug-in. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The overall architecture diagram of the blockchain collective signature method according to the first embodiment of the present application is schematically shown;
[0026] Figure 2 The flowchart of the blockchain collective signature method according to the first embodiment of the present application is schematically shown;
[0027] Figure 3 for Figure 2 Sub-step diagram of step S200;
[0028] Figure 4 for Figure 2 Step S202 sub-step diagram;
[0029] Figure 5 for Figure 2 Sub-step diagram of step S204;
[0030] Figure 6 for Figure 5 Sub-step diagram of step S504;
[0031] Figure 7 for Figure 6 The sub-step diagram of step S600;
[0032] Figure 8 for Figure 6 Step S602 sub-step diagram;
[0033] Figure 9 for Figure 2 Sub-step diagram of step S206;
[0034] Figure 10 for Figure 2 Sub-step diagram of step S208;
[0035] Figure 11 for Figure 2 The sub-step diagram of step S210;
[0036] Figure 12 Schematically shows a flowchart of initialization in the blockchain collective signature method according to the first embodiment of the present application;
[0037] Figure 13 Schematically shows a flowchart of an email or process record in a blockchain collective signature method according to the first embodiment of the present application;
[0038] Figure 14 Schematically shows another flow chart of the blockchain collective signature method according to the first embodiment of the present application;
[0039] Figure 15 A specific example diagram of the blockchain collective signature method of this application is schematically shown;
[0040] Figure 16 Another specific example diagram of the blockchain collective signature method of the present application is schematically shown;
[0041] Figure 17 Schematically shows a block diagram of a signature machine according to the second embodiment of the present application; and
[0042] Figure 18 The following schematically shows a hardware architecture diagram of a computer device suitable for implementing a blockchain collective signature method according to the third embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of this application more clear, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] It should be noted that the descriptions of "first", "second", etc. in the embodiments of the present application are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0045] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed. They are only used to facilitate the description of this application and to distinguish each step. Therefore, they cannot be understood as limitations on this application.
[0046] The following is an explanation of the terms involved in this application:
[0047] Shamir's Secret Sharing (SSS) is a cryptographic algorithm typically using parameters n and t (t not greater than n). Using the SSS algorithm, a secret value s can be securely split into n components, and the secret value can be recovered by gathering any t of the components. Furthermore, any component less than t will not result in partial or complete disclosure of the secret value s. One method of implementing SSS is to split the secret value byte by byte on GF256. For example, if the secret value is 128 bits, it is divided into 16 bytes, and each byte is split. During recovery, each byte must be recovered and then reassembled into the secret value. There are also implementations that split the entire secret value as a large integer; however, such implementations may have security vulnerabilities if not handled with care.
[0048] GF256: A type of Galois field with 256 elements, ranging from 0 to 255, which corresponds to the value range of a single unsigned integer in a computer byte. This makes it suitable for processing single-byte data and is therefore often used in cryptography. Galois fields have unique addition and multiplication algorithms. In the case of GF256, addition is performed using the bitwise exclusive-or operation (XOR), which can also be considered binary addition without a carry. Multiplication typically requires interpreting a byte as a univariate polynomial of degree up to seven, with each bit representing a coefficient. The multiplication algorithm for GF256 involves multiplying two polynomials (using bitwise exclusive-or when combining like terms). The resulting polynomial is then divided by a predefined modulus polynomial, and the remainder polynomial is taken as the multiplication result.
[0049] Plug-in, browser plug-in: A technical component that can be called by web programs to perform specific functions by implementing the interface of a specific web browser.
[0050] Signature Machine: A technical facility that implements the Shamir Secret Splitting Algorithm. It securely receives the components split by the SSS algorithm, recovers the secret value, and then derives the blockchain's private key to complete the required signature. This typically requires both hardened systems and network security measures, and can also utilize hardware-level confidential computing capabilities as needed to maximize the security of the secret value.
[0051] Components and Component Holders: The SSS algorithm divides the secret value into multiple components and assigns them to designated personnel for management, in conjunction with appropriate management systems. These people can be called component holders.
[0052] The following text first combines the relevant technologies of this application to generally introduce the blockchain collective signature scheme of this application and the In order to achieve the technical effects achieved, multiple embodiments are provided below to implement the block collective signature scheme described below.
[0053] The secure management of private keys is crucial. One approach is to split a secret value into SSS (Secure Sequence Numbers) (SSS) segments, with multiple people holding the segments. Losing or leaking even a small amount of the segment does not result in loss or disclosure of the secret, thus protecting the private key.
[0054] At the same time, the blockchain ecosystem widely uses browser plug-ins to complete various account interactions, including using browser plug-ins to sign specific messages off-chain to authenticate one's identity to certain platforms, usually to prove that one holds the private key corresponding to a certain address, so that after the identity is authenticated, one can use certain services of the corresponding platform.
[0055] The use of secret-splitting algorithms (such as SSS) to manage secrets hasn't yet been well integrated with browser plugin authentication scenarios. Browser plugins themselves can't directly support multiple people sharing secrets through SSS. Even if browser plugins could be modified to support SSS, they still face a host of other security challenges, including audit logging, insider protection, and malicious plugin protection.
[0056] This lack leads to the following consequences: either sacrificing security and importing private keys into browser plug-ins to complete the signatures required by the platform; or sacrificing convenience or functionality and leaving related functions incomplete.
[0057] In view of these shortcomings, the purpose of the present invention and the technical effects that can be achieved are explained.
[0058] To overcome the above limitations, the embodiment of the present application connects the browser plug-in with a signature machine platform that supports the secret splitting algorithm, ensuring that each signature requires collective confirmation by multiple people, ensuring the integrity of audit records, and adapting to the use scenarios of the browser plug-in. In particular, to meet the security requirements of the signature machine, the present invention creatively proposes a security solution with two signature calls: for the information that the browser plug-in requires to be signed, the first call is simply submitted to the signature machine as preset information. After each component holder confirms the preset information one by one, they jointly restore the secret value and then derive the private key required for the signature; after this step, it often exceeds the time expected by the browser, so the browser plug-in needs to issue a signature request again; this time, the signature machine can directly compare the signature request with the preset information, and complete the signature if they match. This ensures that all signature information is jointly confirmed by multiple people.
[0059] This method has been proven effective through field testing. Compared with the background technology, this solution has the following advantages:
[0060] (1) It can maintain the security performance of the signature machine technology, that is, the private key is jointly managed by multiple people, the use of assets requires joint confirmation by multiple people and audit records can be left. The relevant security technology is not background technology;
[0061] (2) Ability to connect to common industry interfaces (i.e., browser plug-ins) without requiring excessive technical development;
[0062] (3) Since the technology used does not need to sacrifice security performance in order to adapt to the industry's general interface, the present invention can ensure that the team's assets are always under collective management, so that no one needs to bear the burden of managing large assets in order to adapt to the needs of the industry's general interface, nor bear the losses caused by the possible loss or leakage of private keys. This greatly reduces the psychological pressure of team members and reliably guarantees the security of assets, achieving extremely beneficial technical and social effects.
[0063] The following will provide multiple embodiments, each of which can be used to implement the above-described Blockchain Collective signature scheme For ease of understanding, the following description will be given using a signature machine and a browser plug-in as the execution entities.
[0064] Example 1
[0065] Figure 1 The overall architecture diagram of the blockchain collective signature method according to the first embodiment of the present application is schematically shown.
[0066] like Figure 1 As shown, the overall architecture of the embodiment of the present application includes a signature machine 10, a browser 20, a plug-in 21 running in the browser (browser plug-in 21), and multiple component holders.
[0067] The following example illustrates the scenarios in which the blockchain collective signature method of the browser plug-in is required. This scenario is only an example and does not limit the embodiments of this application.
[0068] In an exemplary embodiment of this application, if you need to use the private key (blockchain private key) managed by the signature machine 10 to sign and authenticate your identity, log in to a platform called OpenSky. The OpenSky platform requires users to sign the following text:
[0069] This is the OpenSky platform. I sign this message to authenticate my blockchain address as A. Secure random number: B
[0070] Here, A is the blockchain address corresponding to the private key managed by the signature machine. B is a random number generated by the platform (OpenSky). After verifying the signature, the platform will also check the validity of B to prevent someone from replaying someone else's signature information to impersonate their identity (i.e., a replay attack).
[0071] The reason for using a signature machine is that the private key involved is already managed in the signature machine and cannot be exported outside the signature machine for security reasons.
[0072] Signature machines manage the private keys of important assets. Lost or stolen private keys are irreversible. To prevent private key loss and prevent moral hazard (such as insider theft), it's important to ensure that these keys are managed by multiple people. For example, a signature machine could be managed by five administrators, with any three of them able to recover the private key and sign transactions or other information.
[0073] Figure 2The figure schematically shows a flowchart of the blockchain collective signature method according to the first embodiment of the present application.
[0074] like Figure 2 As shown, the blockchain signature machine security design method in the embodiment of the present application is applied to the signature machine and may include steps S200 to S210, wherein:
[0075] Step S200: accepting the call of the browser plug-in and receiving a first signature request, wherein the first signature request includes preset information.
[0076] As an example, the signature machine 10 can be a software service, provided through a service interface (network interface). It is generally recommended to use dedicated server hardware, deployed in the user organization's intranet security environment, with strict access control and further protection by a firewall. Signature requests are generally transmitted over the network, typically via HTTPS, but other transmission protocols are also acceptable. This is a peripheral technical facility and is not part of the present invention.
[0077] As an example, Figure 3 As shown, the step S200 may include step S300. In which: step S300, a first signature request is received from a browser plug-in through a service interface, the first signature request includes preset information, and the preset information is the first information to be signed.
[0078] For example, the first signature request primarily involves passing in the message to be signed as pre-defined information. This pre-defined information could be a piece of text (e.g., "This is the OpenSky platform. I sign this message to authenticate my blockchain address as A. Secure random number: B"), a transfer message, or a smart contract call message. Regardless of the type of service, the signature machine presents the data to be signed (the first information to be signed).
[0079] Please return Figure 2 , step S202, providing the preset information to multiple component holders for confirmation.
[0080] As an example, Figure 4 As shown, the step S202 may include steps S400 to S402, wherein: step S400, displaying the preset information to the multiple component holders for confirmation; step S402, receiving confirmation information of the multiple component holders for the preset information.
[0081] In the embodiments of this application, the purpose of confirming preset information is to ensure asset security. Therefore, the present invention does not limit the specific method of presenting preset information to component holders or the details of how component holders confirm it. However, for example, the preset information can simply be displayed to component holders. For transfer messages or smart contract call messages, appropriate formatting can be performed to highlight key information, such as the transfer amount, payment address, contract call method and parameters, to facilitate component holders' confirmation of the business significance of the operation.
[0082] This embodiment of the application does not restrict the identity of the component holder. Component holders are arbitrarily designated by the organization using the signature machine and are generally members of a business team. For greater security, multiple teams can be assigned to jointly hold components, such as a business team plus a risk control team, an internal control team, and a finance team. This approach prevents a single team from controlling the first-level key. External personnel can also be invited to participate. All decisions are made by the using organization.
[0083] The embodiment of the present application does not limit the method of holding the weight, and it is possible and recommended to use some secure password management software (including desktop software or mobile app) or hardware.
[0084] In the design of the embodiments of this application, if multiple component holders collude or if a component holder's components are leaked, they can only recover the first-level key; they cannot recover the signature private key itself without the signature machine. Therefore, the embodiments of this application do not limit the component holders or the component holding method. Of course, in actual use, specific circumstances will need to be considered, such as the identity of the component holders, system access restrictions, and the use of password management software or hardware.
[0085] Please return Figure 2 , step S204, obtaining multiple components from the multiple component holders, and recovering the secret value based on the multiple components.
[0086] As an example, Figure 5 As shown, step S204 may include steps S500 to S504, wherein: step S500, if the preset information is valid, receiving multiple components input by the multiple component holders; step S502, recovering the first-level key based on the multiple components; step S504, recovering subsequent keys based on the first-level key.
[0087] As an example, the first-level key is divided into n components using a secret splitting algorithm, and any t components can be used to recover the first-level key, and any components less than t can not be used to recover the first-level key; recovering the first-level key based on the multiple components includes: recovering the first-level key based on greater than or equal to t components using a secret splitting algorithm; comparing the first-level key with pre-stored integrity information to ensure that the first-level key is correctly recovered.
[0088] As an example, Figure 6 As shown, step S504 may include steps S600 to S602, wherein: step S600, recovering the second-level key based on the first-level key; step S602, recovering the third-level key based on the second-level key, wherein the third-level key is the secret value used to derive the blockchain private key.
[0089] It should be noted that the secret value can be a key of a level following the first level key, such as the second level key, Third level key, fourth level key, etc. Figure 6 The third-level key is used as an example, but the present application is not limited thereto.
[0090] Figure 5 and Figure 6 This paper describes the multi-level key system in the signature machine, which can be a two-level key system, a three-level key system, a four-level key system, etc. This multi-level key system ensures that the component holder cannot directly recover the blockchain private key, ensuring the security of assets.
[0091] As an example, Figure 7 As shown, step S600 may include steps S700 to S702. In step S700, first pre-stored information is pre-saved, wherein the first pre-stored information is obtained by encrypting the second-level key using a first encryption algorithm (e.g., symmetric encryption algorithm SM4 or AES) in combination with a first grouping mode (e.g., GCM) and first additional information (aad), and the first pre-stored information includes a first ciphertext and first integrity protection additional information; and in step S702, the recovered first-level key is used as a key, and the first encryption algorithm is used in combination with the first grouping mode and the first additional information to decrypt the second-level key from the first pre-stored information.
[0092] Figure 7 This approach ensures the integrity of the second-level key.
[0093] In an exemplary embodiment of the present application, the first encryption algorithm may be a symmetric encryption algorithm (such as AES or SM4); GCM, namely Galois / Counter Mode (Galois Counter Mode), can perform integrity verification on encrypted messages.
[0094] In an exemplary embodiment of the present application, the second-level key Key2 itself is a 128-bit, 192-bit, or 256-bit random number generated by a secure random number generator (the embodiment of the present application does not limit its length). It can be encrypted using a symmetric encryption algorithm (such as AES or SM4) in combination with a grouping mode with ciphertext integrity protection (such as GCM) to obtain Key2Encrypted, which includes the encrypted ciphertext (cipher) and integrity protection additional information (tag). The so-called integrity protection is to calculate an additional information (tag) (optionally, some additional information (aad) can be introduced during the encryption calculation) so as to verify that Key2Encrypted has not been tampered with during decryption (optionally, by providing the same additional information (aad)).
[0095] This Key2Encrypted is the pre-saved information. Using the first-level key Key1 as the key, using the same symmetric encryption algorithm, grouping mode, and additional information (aad), the second-level key Key2 can be decrypted from Key2Encrypted.
[0096] It should be noted that the above is only an example and does not limit the scope of this application. AAD is optional and tag is required when using GCM.
[0097] As an example, Figure 8 As shown, step S602 may include steps S800 to S802. In particular, in step S800, the second pre-stored information is pre-saved, wherein the second pre-stored information is obtained by encrypting the third-level key using a second encryption algorithm in combination with a second grouping pattern and second additional information, and the second pre-stored information includes a second ciphertext and second integrity protection additional information; and in step S802, the third-level key is decrypted from the second pre-stored information using the recovered second-level key as a key, the second encryption algorithm in combination with the second grouping pattern and the second additional information.
[0098] Figure 8 This approach ensures the integrity of the third-level key.
[0099] Please return Figure 2 , step S206, deriving the blockchain private key based on the secret value.
[0100] As an example, Figure 9 As shown, the step S206 may include step S900, using a hierarchical deterministic wallet specification to derive the blockchain private key according to the secret value.
[0101] For example, a component might be 128 bits (16 bytes) of data, encoded in HEX or Base64. Private keys used on blockchains are typically large 256-bit integers. Some blockchains may have different specifications. Derivation of blockchain private keys can be performed using a so-called hierarchical deterministic wallet specification, calculated from a seed (e.g., a secret value, a key level subsequent to the first-level key), or other methods are possible.
[0102] Please return Figure 2 , step S208, accept the call of the browser plug-in again and receive the second signature request.
[0103] As an example, Figure 10 As shown, the step S208 may include step S1002, receiving a second signature request from the browser plug-in through the service interface, where the second signature request includes second information to be signed.
[0104] In an exemplary embodiment of this application, the second signature request can be a modified browser plug-in that re-initiates the signing process to the platform (signature machine). The message to be signed (information to be signed) received from the platform (signature machine) may be different from the first one, primarily due to a change in the one-time random number or timestamp used to prevent replay attacks. For example, suppose the first signature request is for the following text:
[0105] This is the OpenSky platform. I sign this message to authenticate my blockchain address as A. Secure random number: B
[0106] The second signature request may be a request to sign the following text:
[0107] This is the OpenSky platform. I sign this message to authenticate my blockchain address as A. Secure random number: C
[0108] Please return Figure 2 , step S210, when the second signature request is consistent with the preset information, the second signature request is signed using the blockchain private key.
[0109] As an example, Figure 11As shown, the step S210 may include steps S1102 to S1106. Among them: step S1102, compare whether the second information to be signed is consistent with the preset information; step S1104, if the second information to be signed is consistent with the preset information, and the preset information is valid, then use the blockchain private key to sign the second signature information. After the signature is completed, if the number of signatures has reached the preset limit, the preset information will be invalid; step S1106, if the second information to be signed is inconsistent with the preset information, or the preset information has expired, then reject the second signature request. The so-called consistency here refers to a complete match of other information except the one-time random number or timestamp. For the above example, the second signature request is required to have the following form:
[0110] This is the OpenSky platform. I sign this message to authenticate my blockchain address as A. Secure random number:
[0111] This part of the content can completely match the content of the first signature request except for the one-time random number or timestamp.
[0112] As an example, the preset information and the second information to be signed both include a one-time secure random number or a timestamp, and the one-time secure random number or timestamp is not within the comparison range.
[0113] In an exemplary embodiment of this application, the number of signatures depends on business needs. Generally speaking, the default number is 1, meaning that the preset information becomes invalid after signing. However, special application scenarios may require re-signing similar information multiple times. In such cases, a higher limit can be set to achieve multiple signatures with one authorization, improving convenience.
[0114] Figure 12 The figure schematically shows a flowchart of initialization in the blockchain collective signature method according to the first embodiment of the present application.
[0115] like Figure 12 As shown, according to the first embodiment of the present application, the blockchain collective signature method may also include step S1202, initializing the signature machine.
[0116] As an example, initializing the signature machine includes setting the signature machine to a default state.
[0117] Figure 13 The figure schematically shows a flowchart of email or process records in the blockchain collective signature method according to the first embodiment of the present application.
[0118] like Figure 13As shown, the blockchain collective signature method according to the first embodiment of the present application may also include: step S1302, recording the preset information and the confirmation information of the preset information as an audit basis; and / or step S1304, reporting the preset information and the confirmation information of the preset information as an audit basis by sending an email or calling a workflow.
[0119] Figure 14 Another flowchart of the blockchain collective signature method according to the first embodiment of the present application is schematically shown. As an example, the blockchain collective signature method according to the embodiment of the present application is applied to a signature machine and a browser plug-in, and the method includes steps S1400 to S1410.
[0120] In step S1400, the browser plug-in calls the signature machine and sends a first signature request to the signature machine, where the first signature request includes preset information.
[0121] Step S1402: the signature machine provides the preset information to multiple component holders for confirmation.
[0122] Step S1404: the signature machine obtains multiple components from the multiple component holders, and recovers the secret value based on the multiple components.
[0123] Step S1406: The signature machine derives the blockchain private key based on the secret value.
[0124] In step S1408, the browser plug-in calls the signature machine again and sends a second signature request to the signature machine.
[0125] Step S1410: When the second signature request matches the preset information, the signature machine signs the second signature request using the blockchain private key.
[0126] Figure 15 A specific example diagram of the blockchain collective signature method of this application is schematically shown.
[0127] As an example, the blockchain collective signature method of an embodiment of the present application is applied to a signature machine and a browser plug-in, and the method includes steps S1500 to S1514.
[0128] Step S1500: Initialize the signature machine and browser plug-in.
[0129] As an example, initializing the signature machine and the browser plug-in includes: setting the signature machine and the browser plug-in to a default state.
[0130] Step S1502: The browser plug-in sends a first signature request to the signature machine through the service interface of the signature machine (the first call to the service interface of the signature machine). The first signature request includes preset information.
[0131] Step S1504: The signature machine receives the first signature request through the service interface and provides the preset information in the first signature request to the component holder for confirmation.
[0132] Step S1506: The signing machine receives the component holder's explicit confirmation information regarding the preset information, and receives the component input by the component holder.
[0133] In step S1508, the signature machine recovers the secret value based on the components and derives the blockchain private key based on the secret value.
[0134] Step S1510: The browser plug-in sends a second signature request to the signature machine through the signature machine's service interface (a second call to the signature machine's service interface).
[0135] In step S1512, the signature machine compares the information contained in the second signature request with the preset information to see if they are consistent. If they are consistent and the preset information is valid, the blockchain private key is used to complete the signature; otherwise, it is rejected.
[0136] In step S1504, the signature machine records necessary information or sends necessary emails as audit basis and notifies relevant personnel.
[0137] For example, if a unit holder is a member of a business department team, relevant personnel may include: finance, compliance, risk control, internal control, etc. Necessary information can be determined based on management needs, such as the payment address and amount of transfer operations; the address, method, and parameters of contract calls; the full text of text signatures, etc. These examples are merely illustrative and do not limit the scope of protection of this application. Generally speaking, the relevant personnel, necessary information, and related emails will depend on the management standards and measures, as well as the processes and compliance requirements of the organization deploying this application.
[0138] Figure 16 Another specific example diagram of the blockchain collective signature method of the present application is schematically shown.
[0139] As an example, the blockchain collective signature method of the embodiment of the present application is applied to a signature machine and a browser plug-in, and the method includes the following steps S1 to S7. Among them:
[0140] S1: Initialize the signature machine and browser plug-in;
[0141] S2: The browser plug-in calls the signature machine and provides the required preset information;
[0142] S3: Multiple quantity holders confirm the preset information one by one; if the preset information is valid, enter the quantity they hold;
[0143] S4: After collecting enough shares, the signature machine recovers the secret value and then derives the private key;
[0144] S5: The browser plug-in calls the signature machine again to request a signature;
[0145] S6: The signature machine compares the signature request with the preset information to see if they are consistent. If they are consistent and the preset information is valid, the signature is completed; otherwise, it is rejected;
[0146] S7: The signature machine records necessary information or sends necessary emails as audit basis, and notifies relevant personnel.
[0147] These steps are merely exemplary.
[0148] Steps S3, S4, and S7 are all security designs of the signature machine itself.
[0149] In steps S2 and S6, the pre-set and signature request may contain a timestamp or other one-time random number (nonce) at the time. This is provided by the signature machine (platform) or browser plug-in to prevent replay attacks (a method of reusing legitimate information from the past or elsewhere for illegal purposes). This timestamp or one-time random number is not included in the comparison.
[0150] Compared with the background technology, the embodiments of the present application have the following advantages:
[0151] (1) Breaking through conventional technology, we creatively propose a solution that can connect the signature machine and the browser plug-in. This approach not only provides the security of the signature machine's shared private key management, but also allows the browser plug-in to complete the operations required by a specific platform, while minimizing the required development workload.
[0152] (2) Two-call design. The core of the signature machine's security design is that it can only sign whitelist information or information that is preset and confirmed by multiple people, preventing malicious information from being submitted for signature (for example, other plug-ins in the browser interfere with normal operation and tamper with the information to be signed. If there is no confirmation link, malicious information may be signed). The two-call design ensures that the signature information can only be signed after being confirmed by multiple people, which can effectively prevent attacks from various malware and malicious behaviors.
[0153] Example 2
[0154] Figure 17A block diagram of a signature machine according to the second embodiment of the present application is schematically shown. The signature machine can be divided into one or more program modules, one or more of which are stored in a storage medium and executed by one or more processors to implement the embodiment of the present application. The program modules referred to in the embodiments of the present application are a series of computer program instruction segments that can perform specific functions. The following description will specifically introduce the functions of each program module in this embodiment.
[0155] like Figure 17 As shown, the signature machine may include a first calling module 1701, a confirmation module 1703, a recovery module 1705, an export module 1707, a second calling module 1709, and a signature module 1711.
[0156] The first calling module 1701 is configured to accept a call from the browser plug-in and receive a first signature request, where the first signature request includes preset information;
[0157] As an example, the signature machine includes a service interface. The first calling module 1701 is further configured to: receive the first signature request from the browser plug-in through the service interface, wherein the first signature request includes the preset information, which is the first information to be signed.
[0158] The confirmation module 1703 is used to provide the preset information to multiple component holders for confirmation.
[0159] As an example, the confirmation module 1703 is further configured to: display the preset information to the multiple component holders for confirmation; and receive confirmation information of the multiple component holders for the preset information.
[0160] The recovery module 1705 is configured to obtain multiple components from the multiple component holders and recover the secret value based on the multiple components.
[0161] As an example, the recovery module 1705 is further configured to: if the preset information is valid, receive multiple components input by the multiple component holders; recover the first-level key based on the multiple components; and recover subsequent keys based on the first-level key.
[0162] As an example, the recovery module 1705 is further configured to: recover a second-level key based on the first-level key; and recover a third-level key based on the second-level key, where the third-level key is the secret value.
[0163] As an example, the recovery module 1705 is also used to: pre-save first pre-stored information, wherein the first pre-stored information is obtained by encrypting the second-level key using a first encryption algorithm in combination with a first group pattern and first additional information, and the first pre-stored information includes a first ciphertext and first integrity protection additional information; using the recovered first-level key as the key, using the first encryption algorithm in combination with the first group pattern and the first additional information, decrypt the second-level key from the first pre-stored information.
[0164] As an example, the recovery module 1705 is also used to: pre-save the second pre-stored information, wherein the second pre-stored information is obtained by encrypting the third-level key using a second encryption algorithm in combination with a second group pattern and second additional information, and the second pre-stored information includes a second ciphertext and second integrity protection additional information; using the recovered second-level key as the key, using the second encryption algorithm in combination with the second group pattern and the second additional information, decrypt the third-level key from the second pre-stored information.
[0165] The export module 1707 is used to export the blockchain private key according to the secret value.
[0166] As an example, the export module 1707 is further configured to: use a hierarchical deterministic wallet specification to export the blockchain private key according to the secret value.
[0167] The second calling module 1709 is used to accept the call of the browser plug-in again and receive the second signature request.
[0168] As an example, the second calling module 1709 is further configured to: receive a second signature request from the browser plug-in through the service interface, where the second signature request includes second information to be signed.
[0169] The signature module 1711 is used to sign the second signature request using the blockchain private key when the second signature request matches the preset information.
[0170] As an example, the signature module 1711 is also used to: compare whether the second information to be signed is consistent with the preset information; if the second information to be signed is consistent with the preset information and the preset information is valid, then use the blockchain private key to sign the second signature information. After the signing is completed, if the number of signatures has reached the preset limit, the preset information is invalid; if the second information to be signed is inconsistent with the preset information, or the preset information is invalid, then the second signature request is rejected.
[0171] As an example, the preset information and the second information to be signed both include a one-time secure random number or a timestamp, and the one-time secure random number or timestamp is not within the comparison range.
[0172] like Figure 17 As shown, the signature machine may further include an initialization module 1713 .
[0173] As an example, the initialization module 1713 is used to initialize the signature machine.
[0174] like Figure 17 As shown, the signature machine may further include a recording module 1715 .
[0175] As an example, the recording module 1715 is used to: record the preset information and the confirmation information of the preset information as an audit basis; and / or report the preset information and the confirmation information of the preset information as an audit basis by sending an email or calling a workflow.
[0176] Example 3
[0177] Figure 18 The schematic diagram of the hardware architecture of a computer device 1000 suitable for implementing a blockchain collective signature method according to the third embodiment of the present application is shown. In an exemplary embodiment of the present application, the computer device 1000 may be a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. For example, it may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers), a gateway, etc. Figure 18 As shown, the computer device 1000 includes at least but is not limited to: a memory 1010, a processor 1020, and a network interface 1030 that can be interconnected and communicated via a system bus.
[0178] The memory 1010 includes at least one type of computer-readable storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 1010 may be an internal storage module of the computer device 1000, such as a hard disk or memory of the computer device 1000. In other embodiments, the memory 1010 may also be an external storage device of the computer device 1000, such as a plug-in hard disk equipped on the computer device 1000, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Of course, the memory 1010 may also include both the internal storage module of the computer device 1000 and its external storage device. In this embodiment, the memory 1010 is generally used to store the operating system and various application software installed on the computer device 1000, such as the program code of the blockchain collective signature method. In addition, the memory 1010 can also be used to temporarily store various data that has been output or is about to be output.
[0179] In some embodiments, the processor 1020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 1020 is generally used to control the overall operation of the computer device 1000, such as performing control and processing related to data interaction or communication with the computer device 1000. In this embodiment, the processor 1020 is used to execute program code stored in the memory 1010 or process data.
[0180] The network interface 1030 may include a wireless network interface or a wired network interface. The network interface 1030 is generally used to establish a communication link between the computer device 1000 and other computer devices. For example, the network interface 1030 is used to connect the computer device 1000 to an external terminal via a network, and to establish a data transmission channel and a communication link between the computer device 1000 and the external terminal. The network can be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile Communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.
[0181] It should be pointed out that Figure 8 Only a computer device having components 1010 - 1030 is shown, but it should be understood that implementing all of the shown components is not a requirement, and more or fewer components may alternatively be implemented.
[0182] In this embodiment, the blockchain collective signature method stored in the memory 1010 can also be divided into one or more program modules and executed by one or more processors (processor 1020 in this embodiment) to complete the embodiment of the present application.
[0183] Example 4
[0184] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the blockchain collective signature method in the embodiment are implemented.
[0185] In this embodiment, computer-readable storage media include flash memory, hard disks, multimedia cards, card-type memories (e.g., SD or DX memories), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, magnetic disks, optical disks, and the like. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as the computer device's hard disk or memory. In other embodiments, the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, and the like. Of course, the computer-readable storage medium may also include both the internal storage unit and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the blockchain collective signature method in the embodiment. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are about to be output.
[0186] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0187] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A blockchain collective signature method, characterized in that: Applied to a signature machine, the method includes: Accepting a call from the browser plug-in and receiving a first signature request, wherein the first signature request includes preset information; providing the preset information to multiple component holders for confirmation; obtaining a plurality of components from the plurality of component holders, and recovering a secret value based on the plurality of components; Deriving a blockchain private key based on the secret value; Accepting the call of the browser plug-in again and receiving the second signature request; When the second signature request matches the preset information, the second signature request is signed using the blockchain private key.
2. The blockchain collective signature method according to claim 1, characterized in that: The signature machine includes a service interface; The step of accepting the call of the browser plug-in and receiving the first signature request includes: The first signature request is received from the browser plug-in through the service interface, where the first signature request includes the preset information, and the preset information is the first information to be signed.
3. The blockchain collective signature method according to claim 2, characterized in that: Providing the preset information to multiple component holders for confirmation includes: displaying the preset information to the plurality of component holders for confirmation; Receive confirmation information of the plurality of component holders regarding the preset information.
4. The blockchain collective signature method according to claim 3, characterized in that: The obtaining of the plurality of components from the plurality of component holders and recovering the secret value according to the plurality of components comprises: If the preset information is valid, receiving the multiple portions input by the multiple portion holders; recovering a first-level key from the plurality of components; Recover subsequent keys based on the first-level key.
5. The blockchain collective signature method according to claim 4, characterized in that: The recovering of subsequent keys according to the first-level key includes: Recovering a second-level key based on the first-level key; A third-level key is recovered according to the second-level key, where the third-level key is the secret value.
6. The blockchain collective signature method according to claim 5, characterized in that: The recovering of the second-level key according to the first-level key includes: Pre-saving first pre-stored information, wherein the first pre-stored information is obtained by encrypting the second-level key using a first encryption algorithm in combination with a first grouping mode and first additional information, and the first pre-stored information includes a first ciphertext and first integrity protection additional information; The recovered first-level key is used as the key, and the first encryption algorithm is used in combination with the first grouping pattern and the first additional information to decrypt the second-level key from the first pre-stored information.
7. The blockchain collective signature method according to claim 6, characterized in that: Recovering the third-level key according to the second-level key includes: Pre-saving second pre-stored information, wherein the second pre-stored information is obtained by encrypting the third-level key using a second encryption algorithm in combination with a second grouping mode and second additional information, and the second pre-stored information includes a second ciphertext and second integrity protection additional information; The recovered second-level key is used as the key, and the second encryption algorithm is used in combination with the second grouping mode and the second additional information to decrypt the third-level key from the second pre-stored information.
8. The blockchain collective signature method according to any one of claims 5 to 7, characterized in that: The deriving of the blockchain private key according to the secret value includes: The blockchain private key is derived from the secret value using a hierarchical deterministic wallet specification.
9. The blockchain collective signature method according to claim 2, characterized in that: The step of again accepting the call of the browser plug-in and receiving the second signature request includes: A second signature request is received from the browser plug-in through the service interface, where the second signature request includes second information to be signed.
10. The blockchain collective signature method according to claim 9, characterized in that: When the second signature request matches the preset information, signing the second signature request using the blockchain private key includes: comparing the second information to be signed with the preset information to see whether they are consistent; If the second information to be signed matches the preset information and the preset information is valid, the second signature information is signed using the blockchain private key. After the signature is completed, if the number of signatures has reached the preset limit, the preset information becomes invalid; If the second information to be signed does not match the preset information, or the preset information has expired, the second signature request is rejected.
11. The blockchain collective signature method according to claim 10, characterized in that: The preset information and the second information to be signed both include a one-time secure random number or a timestamp, and the one-time secure random number or the timestamp is not within the comparison range.
12. The blockchain collective signature method according to any one of claims 1-7, 9-11, characterized in that: Also includes: Initialize the signature machine.
13. The blockchain collective signature method according to any one of claims 1-7, 9-11, characterized in that: Also includes: Record the preset information and confirmation information of the preset information as audit basis; and / or By sending an email or calling a workflow, the preset information and confirmation information of the preset information are reported as an audit basis.
14. A blockchain collective signature method, characterized in that: Applied to a signature machine and a browser plug-in, the method includes: The browser plug-in calls the signature machine and sends a first signature request to the signature machine, where the first signature request includes preset information; The signature machine provides the preset information to multiple component holders for confirmation; The signing machine obtains multiple components from the multiple component holders and recovers the secret value based on the multiple components; The signature machine derives the blockchain private key according to the secret value; The browser plug-in calls the signature machine again and sends a second signature request to the signature machine; When the second signature request matches the preset information, the signature machine signs the second signature request using the blockchain private key.
15. A signature machine, characterized in that: include: A first calling module is configured to accept a call from the browser plug-in and receive a first signature request, where the first signature request includes preset information; a confirmation module, configured to provide the preset information to multiple component holders for confirmation; a recovery module, configured to obtain a plurality of components from the plurality of component holders and recover a secret value based on the plurality of components; An export module, configured to export a blockchain private key based on the secret value; A second calling module is used to accept the call of the browser plug-in again and receive a second signature request; A signing module is used to sign the second signature request using the blockchain private key when the second signature request matches the preset information.
16. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it is used to implement the steps of the blockchain collective signature method described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which can be executed by at least one processor to enable the at least one processor to perform the steps of the blockchain collective signature method according to any one of claims 1 to 14.
18. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the steps of the blockchain collective signature method described in any one of claims 1 to 14 are implemented.
Citation Information
Patent Citations
Digital signature method for escrowing private key of mobile terminal
CN104618120A
Blockchain key management method, multi-person common signature method and electronic device
CN111639361A