Instant Confirmation Method and System for Double-Offline Transactions of Digital Currency Based on ID Cryptography
Through the digital currency dual offline transaction method based on ID cryptography, the key management server and identity authentication technology are used to solve the problem that the payee cannot instant authentication in digital currency dual offline transactions, and the immediate confirmation and invalid payment collection are eliminated.
Patent Information
- Application Number
- CN202011322057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2040-11-23
AI Technical Summary
In the digital currency dual offline transaction of the People's Bank of China, the recipient cannot instantly authenticate the received digital currency through the Internet, resulting in the inability to use it immediately, which poses the risk of collection and the possibility of double payment.
The digital currency dual offline transaction instant confirmation method based on ID cryptography is adopted, and public and private keys are issued to the central bank, commercial banks and users through the key management server, and the steps of identity authentication and currency pre-transaction, dual offline transactions, currency retraction are used to ensure the reliability and instant confirmation of transactions.
It realizes the effectiveness of instantly confirming transactions in dual offline trading scenarios, eliminates the possibility of the payee receiving party receiving invalid payments, and ensures that the payee can use digital currency instantly.
Smart Images

Figure CN114529281B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital currency, and in particular to an instant confirmation method and system for double-offline transactions of digital currency based on ID cryptography. Background Art
[0002] The core elements of the digital currency D-RMB system of the People's Bank of China (PBOC) are one kind of currency, two types of libraries, and three centers. One kind of currency, namely "D-RMB" (DC / EP), abbreviated as D-currency, specifically refers to a string of encrypted digital strings representing specific amounts signed by the central bank. Two types of libraries: the issuance library of D-RMB and the bank library (central bank digital currency database, commercial bank digital currency database). Digital currency in the issuance library is manifested as the central bank's digital currency fund; digital currency in the bank library is manifested as the commercial bank's inventory digital cash. Three centers: one is the registration center (recording the whole process of currency generation, circulation, counting and verification, and extinction); the other two are certification centers, namely the CA certification center (based on the PKI system, centrally managing the certificates of institutions and users, such as CFCA) and the IBC certification center [i.e., the certification center established based on identity-based cryptography (Identity-Based Cryptograph)]. Two tables can be designed in the registration center, one is the digital currency ownership registration form, recording the ownership of digital currency, and the other is the transaction record form.
[0003] The D-RMB system is a hierarchical system, jointly built by the central bank and each commercial bank. The central bank digital currency system is a computer system operated and maintained by the central bank or an institution designated by the central bank to process information about digital currency. Its main functions include being responsible for the issuance and verification monitoring of digital currency. The commercial bank digital currency system is a computer system operated and maintained by a commercial bank or an institution designated by the commercial bank to process information about digital currency. It performs various functions related to currency of existing banks, that is, bank functions, mainly including after applying for digital currency from the central bank, being responsible for directly facing the society and meeting various demands for providing digital currency circulation services.
[0004] Problems existing in the prior art:
[0005] In the existing double-offline transactions of digital currency of the People's Bank of China (PBOC), the recipient can only locally verify the received digital currency and cannot obtain the certification of the People's Bank of China through the network. As a result, the received digital currency cannot be used immediately and can only be used after being connected to the network and obtaining the certification of the People's Bank of China through the network; due to the inability to obtain the instant certification of the People's Bank of China for the received digital currency, there is a certain collection risk, that is, the payer pays a double-spent digital currency, resulting in the subsequent inability of the digital currency to obtain the certification of the People's Bank of China and being an invalid collection. Summary of the Invention
[0006] In response to the problems in the related art, the present invention proposes a method and system for instant confirmation of digital currency dual offline transactions based on ID cryptography to overcome the above-mentioned technical problems existing in the existing related art.
[0007] To this end, the specific technical solutions adopted in the present invention are as follows:
[0008] According to one aspect of the present invention, a method for instant confirmation of dual offline digital currency transactions based on ID cryptography is provided, the method comprising the following steps:
[0009] S1. Use the key management server to issue public and private keys to the central bank digital currency system, commercial bank digital currency system, and users respectively;
[0010] S2. Use identity authentication methods to achieve identity authentication between the commercial bank digital currency system and the central bank digital currency system;
[0011] S3. Implement identity authentication between the sender user and the sender's commercial bank digital currency system based on the identity authentication method;
[0012] S4. Implementing a digital currency pre-transaction of the sender user through a currency pre-transaction method;
[0013] S5. Implementing a dual offline digital currency transaction between the payee and the payee using an offline currency transaction method.
[0014] S6. Implementing the rollback of the sender's digital currency pre-transaction through a currency rollback method;
[0015] Wherein, said S1 comprises the following steps:
[0016] When the key management server corresponding to the central bank digital currency system issues the system public and private keys for the central bank digital currency system, it takes a random number as the system private key and calculates the corresponding system public key based on the system private key;
[0017] When the key management server corresponding to the central bank's digital currency system issues public and private keys for the central bank's digital currency system, it calls a hash function to calculate the public key, calculates the corresponding private key based on the public key, and stores the ID of the central bank's digital currency system and the public and private keys locally in the central bank's digital currency system;
[0018] When the key management server corresponding to the central bank digital currency system issues public and private keys to the commercial bank digital currency system, it calls the hash function to calculate the public key, calculates the corresponding private key based on the public key, and stores the user's ID and the public and private keys locally in the commercial bank digital currency system;
[0019] When the key management server corresponding to the commercial bank digital currency system issues the system public and private keys for the commercial bank digital currency system, a random number is taken as the system private key, and the corresponding system public key is calculated based on this system private key;
[0020] When the key management server corresponding to the commercial bank digital currency system issues public and private keys for users, it calls a hash function to calculate the public key, calculates the corresponding private key based on this public key, and stores the user's ID and these public and private keys in the user's local area.
[0021] Further, the identity authentication between the commercial bank digital currency system and the central bank digital currency system using the identity authentication method in S2 includes the following steps: The commercial bank digital currency system obtains the ID of the central bank digital currency system, uses the IDs of both parties for identity authentication and session key negotiation, and conducts subsequent secure communication through the session key obtained through negotiation.
[0022] Further, the identity authentication and session key negotiation include the following steps: An identity authentication similar to HTTPS is conducted between the commercial bank digital currency system and the central bank digital currency system to form a session key, where the certificates in HTTPS are replaced with the IDs of both parties, and the keys in the process are encrypted using the theory of ID-based cryptography.
[0023] Further, the digital currency pre-transaction of the payer user in S4 is achieved through the currency pre-transaction method, including the following steps:
[0024] S41. The payer user combines the sender information, recipient information, and digital currency to obtain a transaction, obtains the first current timestamp, and signs the transaction and the first current timestamp to obtain the first signature. At the same time, a first signature file is generated and sent to the payer commercial bank digital currency system corresponding to the payer user;
[0025] S42. The payer commercial bank digital currency system receives the first signature file, confirms the first timestamp, verifies the first signature. If the verification is successful, it confirms the identity of the payer user. At the same time, it signs the first timestamp and the transaction to obtain the second signature, and generates a second signature file and sends it to the central bank digital currency system;
[0026] S43. The central bank digital currency system receives the second signature file, confirms the first timestamp, verifies the second signature. After the verification passes, it verifies the transaction to obtain the verification result information, and records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful. At the same time, it signs the first timestamp, the transaction, and the verification result information to obtain the third signature, and generates a third signature file and sends it to the payee commercial bank digital currency system;
[0027] S44. The receiving party's commercial bank digital currency system receives the third signature file, confirms the first timestamp, verifies the third signature. After successful verification, it locally records the first timestamp, transaction, and verification result information, and records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful. At the same time, it signs the first timestamp, transaction, and verification result information to obtain the fourth signature and sends it to the central bank digital currency system;
[0028] S45. After receiving the message, the central bank digital currency system obtains the fourth signature and verifies it. After successful verification, it signs the first timestamp, transaction, verification result information, and the fourth signature to obtain the fifth signature, and generates the fourth signature file and sends it to the sender's commercial bank digital currency system;
[0029] S46. The sender's commercial bank digital currency system receives the fourth signature file, verifies the fifth signature. After successful verification, it takes the fourth signature file as a pre-transaction and signs it to obtain the sixth signature. At the same time, it generates the fifth signature file and sends it to the sender user, and records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful;
[0030] S47. The sender user receives the fifth signature file and verifies the sixth signature. After successful verification, it confirms the pre-transaction and locally stores the pre-transaction.
[0031] Furthermore, the sender information includes the sender ID, wallet ID, contact information, and hardware device code, and the receiver information includes the receiver ID, wallet ID, contact information, and hardware device code.
[0032] Furthermore, the verification method based on ID cryptography digital signature in S42 includes the following steps: The sender's commercial bank digital currency system calculates the public key of the sender user according to the ID of the sender user, and uses this public key and the system public key of the sender's commercial bank digital currency system to verify the signature.
[0033] Furthermore, the use of the currency off-line transaction method in S5 to implement the digital currency double off-line transaction between the sender user and the receiver user includes the following steps:
[0034] S51. The sender user sends the pre-transaction to the receiver user through close range;
[0035] S52. The receiver user receives the pre-transaction, verifies the fifth signature and the fourth signature. After successful verification, it confirms the verification result information. When the verification result information contains that the transaction is successful and the transaction is within the valid period, the receiver user withdraws the digital currency from the transaction and stores it, completing the double off-line transaction, and the digital currency can be used immediately.
[0036] Further, the rollback of the digital currency pre - transaction of the remitter user in S6 through the currency rollback method includes the following steps:
[0037] S61. The remitter user initiates a rollback application for the pre - transaction, obtains the second current timestamp, signs the second timestamp and the pre - transaction to obtain the seventh signature, and simultaneously generates a sixth signature file and sends it to the digital currency system of the remitter's commercial bank;
[0038] S62. The digital currency system of the remitter's commercial bank receives the sixth signature file, confirms the second timestamp, verifies the seventh signature. After passing the verification, it signs the second timestamp and the pre - transaction to obtain the eighth signature, and simultaneously generates a seventh signature file and sends it to the central bank digital currency system;
[0039] S63. The central bank digital currency system receives the seventh signature file, confirms the second timestamp, verifies the eighth signature. After passing the verification, it rolls back the pre - transaction, records the change in the ownership of the digital currency and the change in the balance of the trading party after the rollback of the pre - transaction, and simultaneously signs the second timestamp, the pre - transaction and the rollback success information to obtain the ninth signature, and generates an eighth signature file and sends it to the digital currency system of the payee's commercial bank;
[0040] S64. The digital currency system of the payee's commercial bank receives the eighth signature file, confirms the second timestamp, verifies the ninth signature. After passing the verification, it compares the received pre - transaction with the previously stored transaction. If it is confirmed that they are related to the same transaction, it deletes the previously saved record in the local area, and records the change in the ownership of the digital currency and the change in the balance of the trading party after the rollback of the pre - transaction. At the same time, it signs the second timestamp, the pre - transaction and the rollback success information to obtain the tenth signature and sends it to the central bank digital currency system;
[0041] S65. The central bank digital currency system receives the tenth signature and verifies it. After passing the verification, it signs the second timestamp, the pre - transaction and the rollback success information to obtain the eleventh signature, and generates a tenth signature file and sends it to the digital currency system of the remitter's commercial bank;
[0042] S66. The digital currency system of the remitter's commercial bank receives the tenth signature file, verifies the eleventh signature. After passing the verification, it rolls back the pre - transaction, signs the rollback success information to obtain the twelfth signature, and simultaneously sends the rollback success information and the twelfth signature to the remitter user. The remitter user records the change in the ownership of the digital currency and the change in the balance of the trading party after the rollback of the pre - transaction;
[0043] S67. The remitter user receives the message to obtain the rollback success information and the twelfth signature, verifies the twelfth signature. After passing the verification, it views the rollback success information and confirms that the pre - transaction rollback is completed.
[0044] Further, the reasons for abandoning the pre - transaction in S61 include, but are not limited to, the expiration of the valid period of the pre - transaction and the active abandonment of the transaction with the recipient user.
[0045] According to another aspect of the present invention, there is provided an instant confirmation system for dual - offline transactions of digital currency based on ID cryptography. The system includes a central bank digital currency system, a commercial bank digital currency system, and users. Both the central bank digital currency system and the commercial bank digital currency system are equipped with key management servers based on ID cryptography. Moreover, the identity authentication between the central bank digital currency system and the commercial bank digital currency system, as well as the identity authentication between the commercial bank digital currency system and the users, are all based on the theory of ID cryptography.
[0046] Among them, the central bank digital currency system is used to generate and issue digital currency, and conduct ownership registration for digital currency; the commercial bank digital currency system is used to perform banking functions for digital currency, and the commercial bank digital currency system includes a remitter commercial bank digital currency system and a recipient commercial bank digital currency system; users are the main body of digital currency use, and users include remitter users and recipient users.
[0047] The beneficial effects of the present invention are as follows: In view of the concerns of the recipient regarding the validity of the received digital currency in the dual - offline transaction scenario, the present invention designs an instant confirmation method for dual - offline transactions of digital currency. This method enables the remitter to conduct a pre - transaction of digital currency when the network is in a wired state, forming a reliable uncompleted transaction recognized by the central bank. In the dual - offline transaction scenario, this uncompleted transaction is sent to the recipient. Since the recipient can verify the signature of the central bank, the transaction can be instantaneously confirmed, thereby verifying the received digital currency in the transaction. Therefore, the problem that the recipient in dual - offline transactions cannot immediately use the received digital currency is solved, and at the same time, the possibility of the recipient receiving invalid payments is eliminated. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0049] Figure 1 is a flowchart of an instant confirmation method for dual - offline transactions of digital currency based on ID cryptography according to an embodiment of the present invention;
[0050] Figure 2This is a flow chart of a user performing a pre-transaction and a pre-transaction rollback in a method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to an embodiment of the present invention;
[0051] Figure 3 This is a basic structural diagram of a digital currency dual offline transaction instant confirmation system based on ID cryptography according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention. They are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. By referring to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0053] According to an embodiment of the present invention, a method and system for instant confirmation of dual offline transactions of digital currencies based on ID cryptography are provided.
[0054] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1-2 As shown, according to one embodiment of the present invention, a method for instant confirmation of digital currency dual offline transactions based on ID cryptography is provided, the method comprising the following steps:
[0055] S1. Use the key management server to issue public and private keys to the central bank digital currency system, commercial bank digital currency system, and users respectively;
[0056] Wherein, said S1 comprises the following steps:
[0057] Randomly take SK MS ∈Z p * As the system private key of the central bank's digital currency system (S), and calculate the system public key PK of the central bank's digital currency system MS =SK MS *P.
[0058] When KMS (the key management server corresponding to the central bank's digital currency system) issues public and private keys to S, it calls the hash function H1 to calculate the public key PK S =H1(ID S ), then according to the public key PK S Calculate the private key SK S =SK MS *PK S , S's ID and public / private key, namely ID S PK S SK SStored locally in the central bank. When the KMS issues public and private keys to A (the receiving party's commercial bank digital currency system), it calls the hash function H1 to calculate the public key PK A = H1(ID A ), and then calculates the private key SK A = SK A * PK MS * PK A , and stores A's ID and public and private keys, namely ID A , PK A , SK A locally in commercial bank A. The process of the KMS issuing public and private keys to other commercial banks such as B, C... is similar.
[0059] KMSA (the key management server corresponding to the commercial bank digital currency system) randomly selects SK MSA ∈Z p * as the system private key of the commercial bank digital currency system A, and calculates the system public key PK MSA = SK MSA * P.
[0060] When KMSA issues public and private keys to user A1 (the receiving party user), it calls the hash function H1 to calculate the public key PK A1 = H1(ID A1 ), and then calculates the private key SK A1 = SK A1 * PK MSA * PK A1 , and stores A1's ID and public and private keys, namely ID A1 , PK A1 , SK A1 locally in A1. The process of KMSA issuing public and private keys to other users such as A1, A2... is similar. The methods of other key management servers KMSB, KMSC... issuing public and private keys to their respective users are similar.
[0061] S2. The commercial bank digital currency systems A / B authenticate with the central bank digital currency system S (using the identity authentication method to achieve the identity authentication between the commercial bank digital currency system and the central bank digital currency system);
[0062] Among them, the S2 includes the following steps:
[0063] The A / B (Receiving Party Commercial Bank Digital Currency System / Sending Party Commercial Bank Digital Currency System) obtains the ID of the central bank digital currency system and conducts identity authentication and session key negotiation using the IDs of both parties. For example, it conducts identity authentication similar to HTTPS to form a session key. Here, the IDs of both parties are used to replace the certificates in HTTPS, and the keys in the process are encrypted using the theory of ID cryptography. All subsequent communications are encrypted using the session key.
[0064] S3. User B1 and the Commercial Bank Digital Currency System B conduct identity authentication (implementing the identity authentication between the sending party user and the sending party commercial bank digital currency system according to the identity authentication method);
[0065] Specifically, the identity authentication method of S3 is as in step S2, conducting identity authentication and session key negotiation using the IDs of both parties. All subsequent communications are encrypted using the session key.
[0066] S4. User B1 conducts a digital currency pre-transaction (implementing the digital currency pre-transaction of the sending party user through the currency pre-transaction method);
[0067] Among them, S4 includes the following steps:
[0068] S41. B1 signs to obtain a signature file
[0069] B1 combines the transaction information such as the sender information, receiver information, and digital currency and calls it transaction TX. The sender information includes the sender ID, wallet ID, contact information, and hardware device code, etc. The receiver information includes the receiver ID, wallet ID, contact information, and hardware device code, etc. And since the receiver is an offline member, the receiver information needs to be obtained by the sender at the bank counter or provided by the receiver himself. B1 obtains the current timestamp T1 (the first current timestamp) and uses its own private key SK B1 to perform an ID-cryptography-based digital signature on T1||TX to obtain SIG B1 (the first signature).
[0070] B1 sends the message T1||TX||ID B1 ||SIG B1 (the first signature file) to B.
[0071] S42. B receives the signature file
[0072] After receiving the message, B obtains T1||TX||ID B1 ||SIG B1 , and confirms the timestamp T1. After confirmation, based on the ID-cryptography digital signature verification method, B calculates PK B1 = H1(ID B1 =H1(IDB1 ) to verify the signature using PK B1 and PK MSB to verify the signature. If the verification is successful, B can confirm the identity of the sender B1.
[0073] B uses its own private key SK in accordance with the signature method in 3.1 B to perform an ID-based cryptographic digital signature on T1||TX to obtain SIG B (the second signature), and then sends the message T1||TX||ID B ||SIG B (the second signature file) to S.
[0074] S43. S receives the signature file
[0075] After receiving the message, S obtains T1||TX||ID B ||SIG B , and confirms the timestamp T1. After confirmation, S verifies SIG in accordance with the signature verification method in 3.2 B . After successful verification, S verifies the transaction TX, records the verification result as RET (verification result information), and RET can also include the validity period of this pre-transaction. S records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful.
[0076] S uses its own private key SK in accordance with the signature method in 3.1 S to perform an ID-based cryptographic digital signature on T1||TX||RET to obtain SIG S (the third signature), and sends T1||TX||RET||SIG S (the third signature file) to A.
[0077] S44. A receives the signature file
[0078] After receiving the message, A obtains T1||TX||RET||SIG S , and confirms the timestamp T1. After confirmation, A verifies SIG in accordance with the signature verification method in 3.2 S . After successful verification, A records T1||TX||RET locally. A records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful.
[0079] A uses its own private key SK in accordance with the signature method in 3.1 A to perform an ID-based cryptographic digital signature on T1||TX||RET to obtain SIG A (the fourth signature), and sends SIG A to S.
[0080] S45. S receives the signed file
[0081] After S receives the message, it obtains SIG A . S verifies SIG according to the signature verification method in 3.2 A . After successful verification, S uses its own private key SK according to the signature method in 3.1 S to perform a digital signature based on ID cryptography on T1||TX||RET||SIG A to obtain SIG S-2 (the fifth signature), and sends T1||TX||RET||SIG A ||SIG S-2 (the fourth signed file) to B
[0082] S46. B receives the signed file
[0083] After B receives the message, it obtains T1||TX||RET||SIG A ||SIG S-2 . B verifies SIG according to the signature verification method in 3.2 S-2 . After successful verification, B uses T1||TX||RET||SIG A ||SIG S-2 as an unfinished transaction (i.e., a pre-transaction) UTX, and uses its own private key SK according to the signature method in 3.1 B to perform a digital signature based on ID cryptography on UTX to obtain SIG B-2 (the sixth signature), and immediately sends UTX||SIG B-2 (the fifth signed file) to B1. B records the change in the ownership of the digital currency and the change in the balance of the trading parties after the transaction is successful
[0084] S47. B1 receives the signed file
[0085] After B1 receives the message, it obtains UTX||SIG B-2 . B1 verifies SIG according to the signature verification method in 3.2 B-2 . After successful verification, it confirms the unfinished transaction UTX and then stores UTX locally
[0086] S5. User B1 and user A1 conduct a double-offline digital currency transaction (using the digital currency offline transaction method to achieve a double-offline digital currency transaction between the sender user and the recipient user);
[0087] Among them, S5 includes the following steps
[0088] S51. B1 sends a transaction
[0089] B1 sends the uncompleted transaction UTX to A1 at close range.
[0090] S52. A1 receives the transaction
[0091] A1 receives the UTX, which is T1||TX||RET||SIG A ||SIG S-2 . A1 verifies the SIG S-2 and SIG A in accordance with the method of verifying signatures in 3.2. After successful verification, A1 confirms RET. If RET indicates that the transaction is successful and within the valid period, A1 withdraws the digital currency from TX and stores it, and the transaction is completed. Since A1 has obtained the approval signatures of the central bank and Commercial Bank A for the transaction here, this dual-offline transaction can be completed immediately without the need to continue to connect to the network to confirm with the central bank and Commercial Bank A. At the same time, A1 can immediately use the received digital currency.
[0092] S6. User B1 performs a rollback of the digital currency pre-transaction (realizes the rollback of the digital currency pre-transaction of the sender user through the currency rollback method);
[0093] Among them, S6 includes the following steps:
[0094] S61. B1 sends the signature file to B
[0095] Before B1 conducts a digital currency transaction with A1, it may abandon the pre-transaction for various reasons. The reasons for abandonment can be selected as: the expiration of the valid period of the pre-transaction, actively abandoning the transaction with the recipient A1, etc. Therefore, B1 needs to actively initiate a rollback application for the pre-transaction.
[0096] Then obtain the current timestamp T2, and use its own private key SK B1 to perform an ID-based cryptographic digital signature on T2||UTX to obtain SIG B1-2 (the seventh signature), and send the message T2||UTX||ID B1 ||SIG B1-2 (the sixth signature file) to B.
[0097] S62. B receives the signature file
[0098] After B receives the message, it obtains T2||UTX||ID B1 ||SIG B1-2 , and confirms the timestamp T2. After confirmation, it verifies the SIG B1-2 in accordance with the method of verifying signatures in 3.2. After successful verification, it performs an ID-based cryptographic digital signature on T2||UTX to obtain SIG B-3(The Eighth Signature), then send the message T2||UTX||ID B ||SIG B-3 (The Seventh Signed File) to S.
[0099] S63. S receives the signed file
[0100] After receiving the message, S obtains T2||UTX||ID B ||SIG B-3 , and verifies the timestamp T2. After verification, S verifies SIG B-3 in accordance with the signature verification method in 3.2. After successful verification, S rolls back the uncompleted transaction UTX, and records the successful rollback result as RET2 (rollback success information). S records the changes in the ownership of the digital currency and the balance changes of the trading parties after the rollback of UTX.
[0101] S makes a digital signature of T2||UTX||RET2 based on ID cryptography to obtain SIG S-3 (The Ninth Signature), and sends T2||UTX||RET2||SIG S-3 (The Eighth Signed File) to A.
[0102] S64. A receives the signed file
[0103] After receiving the message, A obtains T2||UTX||RET2||SIG S-3 , and verifies the timestamp T2. After verification, A verifies SIG S-3 in accordance with the signature verification method in 3.2. After successful verification, A compares the received uncompleted transaction UTX with the previously stored transaction TX. If it is confirmed that they are related to the same transaction, A deletes the previously saved record T1||TX||RET locally. A records the changes in the ownership of the digital currency and the balance changes of the trading parties after the rollback of UTX.
[0104] A makes a digital signature of T2||UTX||RET2 based on ID cryptography to obtain SIG A-2 (The Tenth Signature), and sends SIG A-2 to S.
[0105] S65. S receives the signed file
[0106] After receiving the message, S obtains SIG A-2 . S verifies SIG A-2 in accordance with the signature verification method in 3.2. After successful verification, S uses its own private key SK S to make a digital signature of T2||UTX||RET2 based on ID cryptography to obtain SIG S-4(The eleventh signature), and send T2||UTX||RET2||SIG S-4 (The tenth signed document) to B.
[0107] S66. B receives the signed document
[0108] After receiving the message, B obtains T2||UTX||RET2||SIG S-4 . B verifies SIG according to the method of verifying signatures in 3.2 S-4 . After successful verification, B confirms to roll back the uncompleted transaction UTX and makes a digital signature of RET2 based on ID cryptography to obtain SIG B-4 , and then immediately sends RET2||SIG B-4 to B1. B records the change in the ownership of the digital currency after the rollback of UTX and the change in the balance of the trading parties.
[0109] S67. B1 receives the signed document
[0110] After receiving the message, B1 obtains RET2||SIG B-4 . B1 verifies SIG according to the method of verifying signatures in 3.2 B-4 . After successful verification, B1 checks RET2 and confirms that the rollback of the uncompleted transaction UTX is completed.
[0111] According to another aspect of the present invention, as Figure 3 shown, an instant confirmation system for dual-offline transactions of digital currency based on ID cryptography is provided. The system includes a central bank digital currency system, commercial bank digital currency systems (in practice, there can be multiple commercial bank digital currency systems), and users. Among them, the identity authentication between the central bank digital currency system and commercial bank digital currency systems, and the identity authentication between commercial bank digital currency systems and users are both based on the theory of ID cryptography. The central bank digital currency system is used to generate and issue digital currency, and register the ownership of digital currency; the commercial bank digital currency system is used to perform banking functions for digital currency; the user is the main body of digital currency use.
[0112] Suppose the ID of the central bank digital currency system is S, and it deploys a key management server KMS based on ID cryptography; the IDs of commercial bank digital currency systems are A, B, C..., and each deploys a key management server KMSA, KMSB, KMSC... based on ID cryptography; commercial bank digital currency system A includes users A1, A2, A3..., commercial bank digital currency system B includes users B1, B2, B3..., and commercial bank digital currency system C includes users C1, C2, C3....
[0113] When the KMS issues public and private keys to a certain member, a system parameter based on ID cryptography needs to be established first. The steps are as follows:
[0114] (1) G1 and G2 are groups of GDH (Diffie-Hellman group) with order q. q is a large prime number. G1 is an additive cyclic group composed of points on an elliptic curve, and P is the generator of group G1; G2 is a multiplicative cyclic group; the bilinear mapping e: G1×G1→G2.
[0115] (2) Randomly take SK MS ∈Z p * as the system private key of the central bank digital currency system, and calculate the system public key PK MS =SK MS *P.
[0116] (3) When the KMS issues public and private keys to S, it calls the hash function H1 to calculate the public key PK S =H1(ID S ), and then calculates the private key SK S =SK S *PK MS S , and stores the ID and public and private keys of S, namely ID S 、PK S 、SK S locally in the central bank. When the KMS issues public and private keys to A, it calls the hash function H1 to calculate the public key PK A =H1(ID A ), and then calculates the private key SK A [[ID=4@2]]=SK A *PK MS A , and stores the ID and public and private keys of A, namely ID A 、PK A 、SK A locally in commercial bank A. The process of the KMS issuing public and private keys to other commercial banks such as B, C... is similar.
[0117] (4) KMSA randomly takes SK MSA ∈Z p * as the system private key of commercial bank digital currency system A, and calculates the system public key PK MSA =SK MSA *P.
[0118] (5) When KMSA issues public and private keys to user A1, it calls the hash function H1 to calculate the public key PK A1 =H1(IDA1 ), and then calculate the private key SK A1 according to the public key PK A1 = SK MSA * PK A1 , and store the ID of A1 and the public and private keys, namely ID A1 , PK A1 , SK A1 locally in A1. The process of the KMSA issuing public and private keys for other users such as A1, A2... is similar. The methods of other key management servers KMSB, KMSC... etc. issuing public and private keys for their respective users are similar.
[0119] In summary, by means of the above technical solutions of the present invention, the present invention designs a method for instant confirmation of double-offline transactions of digital currency in view of the concerns of the payee about the validity of the received digital currency in the double-offline transaction scenario; this method forms a reliable uncompleted transaction recognized by the central bank through the payer conducting a pre-transaction of digital currency in the wired network state; in the double-offline transaction scenario, this uncompleted transaction is sent to the payee. Since the payee can verify the signature of the central bank, the transaction can be instantaneously confirmed, so that the digital currency received in the transaction is verified and passed, thus solving the problem that the payee in the double-offline transaction cannot immediately use the received digital currency, and at the same time removing the possibility of the payee receiving an invalid payment.
[0120] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0121] The above-described embodiments only represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the appended claims.
Claims
1. A method for instant confirmation of digital currency dual offline transactions based on ID cryptography, characterized in that: The method comprises the following steps: S1. Use the key management server to issue public and private keys to the central bank digital currency system, commercial bank digital currency system, and users respectively; S2. Use identity authentication methods to achieve identity authentication between the commercial bank digital currency system and the central bank digital currency system; S3. Implement identity authentication between the sender user and the sender's commercial bank digital currency system based on the identity authentication method; S4. Implementing a digital currency pre-transaction of the sender user through a currency pre-transaction method; S5. Implementing a dual offline digital currency transaction between the payee and the payee using an offline currency transaction method. S6. Implementing the rollback of the sender's digital currency pre-transaction through a currency rollback method; Wherein, said S1 comprises the following steps: When the key management server corresponding to the central bank digital currency system issues the system public and private keys for the central bank digital currency system, it takes a random number as the system private key and calculates the corresponding system public key based on the system private key; When the key management server corresponding to the central bank's digital currency system issues public and private keys for the central bank's digital currency system, it calls a hash function to calculate the public key, calculates the corresponding private key based on the public key, and stores the ID of the central bank's digital currency system and the public and private keys locally in the central bank's digital currency system; When the key management server corresponding to the central bank digital currency system issues public and private keys to the commercial bank digital currency system, it calls the hash function to calculate the public key, calculates the corresponding private key based on the public key, and stores the user's ID and the public and private keys locally in the commercial bank digital currency system; When the key management server corresponding to the commercial bank digital currency system issues the system public and private keys for the commercial bank digital currency system, it takes a random number as the system private key and calculates the corresponding system public key based on the system private key; When the key management server corresponding to the commercial bank digital currency system issues a public and private key to a user, it calls a hash function to calculate the public key, calculates the corresponding private key based on the public key, and stores the user's ID and the public and private keys locally in the user; The digital currency pre-transaction of the sender user is implemented by the currency pre-transaction method in S4, including the following steps: S41. The payee user combines the sender information, the receiver information, and the digital currency to obtain a transaction, obtains a first current timestamp, and signs the transaction and the first current timestamp to obtain a first signature. A first signature file is generated and sent to the payee user's corresponding payee commercial bank digital currency system. S42. The issuer's commercial bank digital currency system receives the first signature file, confirms the first timestamp, and verifies the first signature. If the verification is successful, the issuer's identity is confirmed. The first timestamp and the transaction are signed to obtain a second signature, and a second signature file is generated and sent to the central bank digital currency system. S43. The central bank digital currency system receives the second signature file, confirms the first timestamp, verifies the second signature, verifies the transaction after verification, obtains verification result information, and records the change in the ownership of the digital currency and the balance change of the transacting party after the transaction is successful. At the same time, the first timestamp, transaction and verification result information are signed to obtain a third signature, and the third signature file is generated and sent to the payee's commercial bank digital currency system. S44. The payee's commercial bank digital currency system receives the third signature file, confirms the first timestamp, verifies the third signature, and after verification, locally records the first timestamp, transaction, and verification result information. It also records the change in ownership of the digital currency and the balance change of the transacting party after the transaction is successful. At the same time, it signs the first timestamp, transaction, and verification result information to obtain a fourth signature, and sends it to the central bank digital currency system. S45. After receiving the message, the central bank digital currency system obtains the fourth signature and verifies it. After the verification is successful, it signs the first timestamp, transaction, verification result information, and the fourth signature to obtain a fifth signature, and generates a fourth signature file and sends it to the sender's commercial bank digital currency system. S46. The digital currency system of the commercial bank of the originating party receives the fourth signature file and verifies the fifth signature. After verification, the fourth signature file is used as a pre-transaction and signed to obtain a sixth signature. The fifth signature file is generated and sent to the originating party user. The digital currency system also records the change in ownership of the digital currency and the balance change of the transacting party after the successful transaction. S47. The payee user receives the fifth signature file and verifies the sixth signature. After verification, the pre-transaction is confirmed and stored locally.
2. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 1 is characterized in that: The identity authentication method used in S2 to achieve identity authentication between the commercial bank digital currency system and the central bank digital currency system includes the following steps: the commercial bank digital currency system obtains the ID of the central bank digital currency system, uses the IDs of both parties to perform identity authentication and session key negotiation, and uses the negotiated session key for subsequent confidential communication.
3. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 2 is characterized in that: The identity authentication and session key negotiation include the following steps: HTTPS identity authentication is performed between the commercial bank digital currency system and the central bank digital currency system to form a session key, wherein the IDs of both parties are used to replace the certificates in HTTPS, and the keys in the process are encrypted using theories based on ID cryptography.
4. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 1, characterized in that: The sender information includes the sender ID, wallet ID, contact information and hardware device code, and the receiver information includes the receiver ID, wallet ID, contact information and hardware device code.
5. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 1 is characterized in that: The verification method based on ID cryptography digital signature in S42 includes the following steps: the digital currency system of the payee's commercial bank calculates the public key of the payee's user based on the ID of the payee's user, and uses the public key and the system public key of the digital currency system of the payee's commercial bank to verify the signature.
6. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 1, characterized in that: The S5 uses the currency offline transaction method to implement a digital currency dual offline transaction between the payee user and the payee user, including the following steps: S51: The payee user sends the pre-transaction to the payee user via short distance; S52. The payee user receives the pre-transaction and verifies the fifth signature and the fourth signature. After the verification is successful, the payee user confirms the verification result information. If the verification result information contains that the transaction is successful and the transaction is within the validity period, the payee user withdraws the digital currency from the transaction and stores it, completing the dual offline transaction, and the digital currency can be used immediately.
7. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 1, characterized in that: The method of implementing the rollback of the digital currency pre-transaction of the payee user through the currency rollback method in S6 includes the following steps: S61: The payee user initiates a rollback request for the pre-transaction, obtains a second current timestamp, signs the second timestamp and the pre-transaction to obtain a seventh signature, and simultaneously generates a sixth signature file and sends it to the payee commercial bank digital currency system; S62. The issuer's commercial bank digital currency system receives the sixth signature file, confirms the second timestamp, verifies the seventh signature, and after verification, signs the second timestamp and the pre-transaction to obtain an eighth signature. The seventh signature file is generated and sent to the central bank digital currency system. S63. The central bank digital currency system receives the seventh signature file, confirms the second timestamp, verifies the eighth signature, rolls back the pre-transaction after verification, and records the change in the ownership of the digital currency and the balance change of the transacting party after the pre-transaction is rolled back. At the same time, the second timestamp, the pre-transaction, and the rollback success information are signed to obtain a ninth signature, and the eighth signature file is generated and sent to the payee's commercial bank digital currency system. S64. The payee's commercial bank digital currency system receives the eighth signature file, confirms the second timestamp, and verifies the ninth signature. After verification, the received pre-transaction is compared with the previously stored transaction. If it is confirmed that they are related to the same transaction, the previously saved record is deleted, and the change in the ownership of the digital currency and the balance change of the transacting party after the pre-transaction is rolled back is recorded. At the same time, the second timestamp, the pre-transaction, and the rollback success information are signed to obtain the tenth signature and sent to the central bank digital currency system. S65. The central bank digital currency system receives the tenth signature and verifies it. After verification, it signs the second timestamp, pre-transaction, and rollback success information to obtain an eleventh signature, and generates a tenth signature file and sends it to the payee's commercial bank digital currency system. S66. The digital currency system of the commercial bank of the originating party receives the tenth signature file and verifies the eleventh signature. After verification, the pre-transaction is rolled back and the rollback success information is signed to obtain the twelfth signature. The rollback success information and the twelfth signature are simultaneously sent to the originating party user. The originating party user records the change in ownership of the digital currency and the balance change of the transacting party after the pre-transaction is rolled back. S67. The payee user receives the message and obtains the rollback success information and the twelfth signature, and verifies the twelfth signature. After the verification is successful, the payee user checks the rollback success information to confirm that the pre-transaction rollback is completed.
8. The method for instant confirmation of digital currency dual offline transactions based on ID cryptography according to claim 7 is characterized in that: The reasons for abandoning the pre-transaction in S61 include but are not limited to the expiration of the validity period of the pre-transaction and the active abandonment of the transaction with the payee user.
9. A system for instant confirmation of dual offline digital currency transactions based on ID cryptography, for implementing the steps of the method for instant confirmation of dual offline digital currency transactions based on ID cryptography according to any one of claims 1 to 8, characterized in that: The system includes the central bank's digital currency system, the commercial bank's digital currency system, and users. Both the central bank's digital currency system and the commercial bank's digital currency system are deployed with key management servers based on ID cryptography. The identity authentication between the central bank's digital currency system and the commercial bank's digital currency system, and the identity authentication between the commercial bank's digital currency system and users are all based on the theory of ID cryptography. Among them, the central bank's digital currency system is used to generate and issue digital currency, as well as to register the ownership of digital currency; the commercial bank's digital currency system is used to perform banking functions for digital currency, and the commercial bank's digital currency system includes the issuer's commercial bank digital currency system and the payee's commercial bank digital currency system; users are the main users of digital currency, and users include issuer users and payee users.
Citation Information
Patent Citations
Payment method and payment system for digital currency
CN107230051A
Digital currency circulation system and method
CN111401869A