A utxo-based infinite offline transaction method
Patent Information
- Application Number
- CN202110232908.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-03
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2041-03-03
AI Technical Summary
[0006]针对现有技术中存在的问题,本发明的目的在于提供一种基于UTXO的无限离线交易方法,解决了数字货币钱包在离线情况下收到的数字货币会被锁定的问题
[0030] Compared with existing technologies, this invention provides an infinite offline transaction method based on UTXO, which has the following beneficial effects:
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital currency trading technology, specifically to an infinite offline trading method based on UTXO. Background Technology
[0002] Digital currency, developed by the Digital Currency Research Institute of the People's Bank of China, is a new generation of currency equivalent to existing circulating currencies. The central bank issues encrypted strings representing real currency with face value. Users can store and manage these currencies in their wallets. The central bank operates a digital currency registration center to record ownership transfers during currency circulation. The registration center uses public-key-linked strings to mark currency ownership. When using the currency, users sign the transaction using their private key. The registration center verifies the transaction based on the currency's serial number and corresponding public key. After confirming the currency owner's identity, ownership is transferred, and the corresponding ownership is marked with a new public key. Essentially, the digital currency transaction payment process is a transfer of currency ownership.
[0003] In existing digital currency transaction processes, support for dual offline payments is provided. This dual offline payment ensures that digital currency transactions can be carried out normally even if the wallets of both parties are offline. However, for security reasons, digital currency transactions completed offline are generally locked and not allowed to continue. But in real-world scenarios, sometimes it may be impossible to be online for a long time. Therefore, in order to ensure that digital currency received offline is not locked and can continue to be traded, an infinite offline transaction method based on UTXO is proposed. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] 1. Technical problems to be solved
[0006] In view of the problems existing in the prior art, the purpose of this invention is to provide an unlimited offline transaction method based on UTXO, which solves the problem that digital currency received by digital currency wallets in offline situations will be locked.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] An unlimited offline transaction method based on UTXO includes a sender digital currency wallet, a receiver digital currency wallet, and a digital currency registration center. The sender digital currency wallet is responsible for sending digital currency, the receiver digital currency wallet is the terminal device that ultimately receives the digital currency, and the digital currency registration center is a system operated by a digital currency operator. After the transaction is finally completed, it records the transaction and generates new digital currency for the transaction output.
[0010] The specific process of the offline transaction method is as follows:
[0011] First, both parties establish a transaction channel and synchronize their timestamps using the timestamp field to ensure that the time difference between the two parties' transaction devices does not exceed a set value. If the time difference exceeds the set value, the transaction is rejected.
[0012] 2. The sender's digital currency wallet determines the amount m to be sent to the receiver's digital currency wallet;
[0013] 3. The sender’s digital currency wallet selects a total of n digital currencies greater than or equal to m from its own digital currency pool as transaction input;
[0014] IV. Construct digital currency output in the transaction, where the owner of the digital currency with an output amount of m is the recipient's digital currency wallet, and the owner of the digital currency with an output amount of nm is the sender's digital currency wallet.
[0015] 5. The sender's digital currency wallet uses the wallet's private key to generate a digital signature corresponding to the private key of the digital currency owner's information certificate.
[0016] 6. The sender's digital currency wallet sends the digital signature and the constructed transaction body to the recipient's digital currency wallet;
[0017] 7. The recipient's digital currency wallet performs verification logic based on the transaction details;
[0018] 8. After the recipient's digital currency wallet verifies the digital currency transaction, it generates virtual currency for each corresponding output.
[0019] 9. When the sender's digital currency wallet is online, send the previous transaction data and digital currency transaction to the digital currency registration center to retrieve their own digital currency;
[0020] 10. When the recipient's digital currency wallet is online, send the previous transaction data and digital currency transactions to the digital currency registration center to retrieve their own digital currency.
[0021] 11. After receiving the transaction, the digital currency registration center executes the same verification logic as in process seven. Once the verification is successful, it uses the private key of the digital currency registration center to generate digital currency and returns it to the digital currency wallet.
[0022] Preferably, if the digital currency selected in step three is a digital currency generated by the digital currency registration center, it can be directly used as input;
[0023] If the selected digital currency is virtual currency, then the virtual currency will be used as input. At the same time, the corresponding digital currency transaction will be found based on the digital currency transaction body index in the virtual currency, and the found digital currency transaction and the virtual currency will be sent as input.
[0024] Preferably, the verification logic is as follows:
[0025] ① If the input is digital currency generated by the digital currency registration center, then verify the correctness of the digital currency and whether the digital signature matches the private key generated by the certificate corresponding to the digital currency owner's information.
[0026] ② If the input is virtual currency, then the corresponding digital currency transaction needs to be found and the digital currency transaction needs to be verified recursively;
[0027] ③ Finally, verify whether the signature conforms to the signature list rules.
[0028] Preferably, each signature input in the signature list is a digital currency transaction entity, the signature list contains public keys of all digital currency owners present in the input, and the private key used for signing in the signature list is the private key corresponding to the public key of each input digital currency owner.
[0029] (III) Beneficial Effects
[0030] Compared with existing technologies, this invention provides an infinite offline transaction method based on UTXO, which has the following beneficial effects:
[0031] This solution addresses the issue of digital currency received by a digital currency wallet being locked when the wallet is offline. It allows digital currency received offline to continue to be traded without confirmation from the digital currency registration center, thus enabling offline wireless transactions. Detailed Implementation
[0032] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] An unlimited offline transaction method based on UTXO includes a sender digital currency wallet, a receiver digital currency wallet, and a digital currency registration center. The sender digital currency wallet is responsible for sending digital currency, the receiver digital currency wallet is the terminal device that ultimately receives the digital currency, and the digital currency registration center is a system operated by a digital currency operator. After the transaction is finally completed, it records the transaction and generates new digital currency for the transaction output.
[0034] The specific process for offline trading is as follows:
[0035] First, both parties establish a transaction channel. They first synchronize their timestamps using the timestamp field to ensure that the time difference between the two parties' transaction devices does not exceed a set value. If the time difference exceeds the set value, the transaction is rejected. The timestamp field is used to ensure that the problem of double-spending of digital currency is avoided as much as possible during offline digital currency transactions. The timestamp field uses UNIX timestamps to avoid the influence of time zones in different regions.
[0036] 2. The sender's digital currency wallet determines the amount m to be sent to the receiver's digital currency wallet;
[0037] 3. The sender’s digital currency wallet selects a total of n digital currencies greater than or equal to m from its own digital currency pool as the transaction input. If the selected digital currency is generated by the digital currency registration center, it can be used directly as the input.
[0038] If the selected digital currency is virtual currency, the virtual currency will be used as input. At the same time, the corresponding digital currency transaction will be found according to the digital currency transaction body index in the virtual currency. The found digital currency transaction and the virtual currency will be sent as input.
[0039] IV. Construct digital currency output in the transaction, where the owner of the digital currency with an output amount of m is the recipient's digital currency wallet, and the owner of the digital currency with an output amount of nm is the sender's digital currency wallet.
[0040] 5. The sender's digital currency wallet uses the wallet's private key to generate a digital signature corresponding to the private key of the digital currency owner's information certificate.
[0041] 6. The sender's digital currency wallet sends the digital signature and the constructed transaction body to the recipient's digital currency wallet;
[0042] 7. The recipient's digital currency wallet performs verification logic based on the transaction details. The specific verification logic is as follows:
[0043] ① If the input is digital currency generated by the digital currency registration center, the correctness of the digital currency and whether the digital signature matches the private key corresponding to the digital currency owner's information certificate are verified. The digital signature of the digital currency registration center is used to prove the authenticity of the digital currency.
[0044] ② If the input is virtual currency, then the corresponding digital currency transaction needs to be found and the digital currency transaction needs to be verified recursively;
[0045] ③ Finally, verify whether the signature conforms to the signature list rules;
[0046] 8. After the recipient's digital currency wallet verifies the digital currency transaction, it generates virtual currency for each corresponding output.
[0047] 9. When the sender's digital currency wallet is online, send the previous transaction data and digital currency transaction to the digital currency registration center to retrieve their own digital currency;
[0048] 10. When the recipient's digital currency wallet is online, send the previous transaction data and digital currency transactions to the digital currency registration center to retrieve their own digital currency.
[0049] 11. After receiving the transaction, the digital currency registration center executes the same verification logic as in process seven. Once the verification is successful, it uses the private key of the digital currency registration center to generate digital currency and returns it to the digital currency wallet.
[0050] Furthermore, each signature input in the signature list is a digital currency transaction entity. The signature list contains the public keys of all digital currency owners present in the input. The private key used for signing in the signature list is the private key corresponding to the public key of each input digital currency owner, where the digital currency owner information is the certificate corresponding to the digital currency wallet.
[0051] The above description is merely a preferred embodiment of the present invention; however, the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and its improved concepts, should be covered within the scope of protection of the present invention.
Claims
1. A method for unlimited offline trading based on UTXO, characterized in that: It includes a sender's digital currency wallet, a receiver's digital currency wallet, and a digital currency registration center. The sender's digital currency wallet is responsible for sending digital currency, the receiver's digital currency wallet is the terminal device that ultimately receives digital currency, and the digital currency registration center is a system operated by the digital currency operator. After the transaction is finally completed, it records the transaction and generates new digital currency output from the transaction. The specific steps of the offline transaction method are as follows: First, both parties establish a transaction channel and synchronize their timestamps using the timestamp field to ensure that the time difference between the two parties' transaction devices does not exceed a set value. If the time difference exceeds the set value, the transaction is rejected.
2. The sender's digital currency wallet determines the amount m to be sent to the receiver's digital currency wallet; 3. The sender’s digital currency wallet selects a total of n digital currencies greater than or equal to m from its own digital currency pool as transaction input; IV. Construct digital currency output in the transaction, where the owner of the digital currency with an output amount of m is the recipient's digital currency wallet, and the owner of the digital currency with an output amount of nm is the sender's digital currency wallet.
5. The sender's digital currency wallet uses the wallet's private key to generate a digital signature corresponding to the private key of the digital currency owner's information certificate.
6. The sender's digital currency wallet sends the digital signature and the constructed transaction body to the recipient's digital currency wallet; 7. The recipient's digital currency wallet performs verification logic based on the transaction details; 8. After the recipient's digital currency wallet verifies the digital currency transaction, it generates virtual currency for each corresponding output.
9. When the sender's digital currency wallet is online, send the previous transaction data and digital currency transactions to the digital currency registration center to retrieve their own digital currency; 10. When the recipient's digital currency wallet is online, send the previous transaction data and digital currency transactions to the digital currency registration center to retrieve their own digital currency; 11. After receiving the transaction, the digital currency registration center executes the same verification logic as in process seven. Once the verification is successful, it uses the private key of the digital currency registration center to generate digital currency and returns it to the digital currency wallet.
2. The infinite offline transaction method based on UTXO according to claim 1, characterized in that: If the selected digital currency in step three is a digital currency generated by the digital currency registration center, it can be directly used as input. If the selected digital currency is virtual currency, then the virtual currency will be used as input. At the same time, the corresponding digital currency transaction will be found based on the digital currency transaction body index in the virtual currency, and the found digital currency transaction and the virtual currency will be sent as input.
3. The infinite offline transaction method based on UTXO according to claim 2, characterized in that: The specific verification logic is as follows: ① If the input is digital currency generated by the digital currency registration center, then verify the correctness of the digital currency and whether the digital signature matches the private key generated by the certificate corresponding to the digital currency owner's information. ② If the input is virtual currency, then the corresponding digital currency transaction needs to be found and the digital currency transaction needs to be verified recursively; ③ Finally, verify whether the signature conforms to the signature list rules.
4. The infinite offline transaction method based on UTXO according to claim 3, characterized in that: Each signature input in the signature list is a digital currency transaction. The signature list contains the public keys of all digital currency owners present in the input. The private key used for signing in the signature list is the private key corresponding to the public key of each input digital currency owner.
Citation Information
Patent Citations
Digital currency wallet offline transaction method and system, and user identity identification card
CN111275411A
Digital currency wallet and digital currency double offline payment method
CN111340469A