Decentralized account and transaction management method and device based on one-time pad encryption technology
Through one-time pad encryption technology and chain encryption processing, the complexity and security issues of traditional decentralized account management are solved, a user-friendly digital asset operation experience and high security are achieved, and account loss and leakage are avoided.
Patent Information
- Application Number
- CN202210619912.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-06-02
AI Technical Summary
Traditional decentralized account management methods have high learning barriers and are complex to use, which can easily lead to account loss and digital asset leakage. Existing solutions such as custody models, account key sharing, multi-signature models, and threshold signatures have centralization risks or high complexity.
It uses one-time-only encryption technology to generate a time-series user private key through hash processing, and uses blockchain smart contracts for chain encryption and verification to ensure that the private key used each time is only valid once. Combined with chain encryption processing, data can be uploaded to the chain and signed.
It improves the convenience and security of decentralized accounts, reduces the complexity of user operations, ensures the accuracy, reliability and security of digital asset transactions, and reduces the risk of account loss and leakage.
Smart Images

Figure CN115348007B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain technology, and in particular to a decentralized account and transaction management method, electronic device, and server based on one-time pad encryption technology. Background Art
[0002] Blockchain-based digital assets are increasingly being applied in various fields. The rise of blockchain technology, non-fungible tokens (NFTs), and the metaverse is accelerating. However, traditional blockchain decentralized accounts present challenges such as high learning curves and complex usage. Consequently, there is an urgent need for a secure decentralized account management method that is convenient and easy to use, without requiring extensive data or password memorization.
[0003] Traditional decentralized account management: Decentralized user accounts are generated using a client device (PC or mobile). The generated decentralized account is stored only on the user's client, and the decentralized account information does not participate in any network transmission or interaction. When using a decentralized account for transactions, only the decentralized account private key is used to sign the transaction information offline, and the signed data is exchanged over the network.
[0004] Based on the above approach, users are fully responsible for their decentralized accounts. Forgetting their private key password, losing their decentralized account, or losing their client device will directly lead to the loss of digital assets in their decentralized accounts, with no technical means to recover them. Because traditional methods only provide security but fail to provide a good user experience, using decentralized blockchain accounts is currently extremely difficult, and the loss of digital assets due to various human errors is common.
[0005] In order to solve the problems of traditional methods and improve the convenience and safety of use, people have also proposed various technical points and new solutions. Among them, the following technologies are more prominent:
[0006] The first: Custody mode - the account is centrally managed
[0007] User-generated accounts are no longer stored solely on their own clients; they are also backed up in a centralized database. This allows for recovery through centralized verification if a client account is lost. For example, patent application number CN201910324825.1, "A Novel Decentralized Custody Platform Account Security System and Operation Method," is available.
[0008] Second: Account key sharing mode
[0009] The account key sharing model divides the key into multiple parts and stores them separately in a redundant manner. When initiating a transaction, a certain number of keys are reassembled into a key for signing. This solution can also share the key if it is stolen, while solving the above-mentioned disadvantage of high multi-signature fees. For example, the public patent application number CN200710202055.0, "Shared Key Generation Method",
[0010] The third type: multi-signature mode: Multiple account keys control a single account. When using multi-signatures, private key reuse must be avoided, as this increases the risk of private key leakage. Multi-signatures are typically implemented using on-chain contracts (or scripts). Examples include patent application number CN201510875058.5, "Method and System for Authentication of Pre-Shared Multiple Keys Based on Symmetric Cryptography Algorithms," and patent application number CN201710253749.0, "Method and System for Escrow of Key Components Based on Algorithms."
[0011] Fourth type: threshold signature
[0012] Threshold signatures (TSS) combine the advantages of account key sharing and multi-signatures. Based on multi-party secure computation (MPC), they use the secret keys of multiple shards to sign transactions in turn, generating a final, valid signature. For example, patent application number CN201810644332.1, "A Threshold Private Key Generation Method, Transaction Method, and Related Device," is available.
[0013] Fifth: One-time password
[0014] A one-time password (OTP), also known as a dynamic password or single-use password, is a password that can be used only once on a computer system or other digital device, valid for a single login session or transaction. OTP avoids some of the shortcomings associated with traditional (static) password-based authentication; some implementations also incorporate two-factor authentication, whereby a one-time password requires access to something a person possesses (such as a small key fob with a built-in OTP calculator) and something they know (such as a PIN). OTP has been discussed as a possible replacement for and enhancement to traditional passwords.
[0015] The above-mentioned traditional methods all have different defects in the management of decentralized accounts, specifically:
[0016] 1. Defects of the hosting model
[0017] The root of the problem with this approach is that accounts, previously stored decentralized, are now centralized. While this solves the problem of account recovery, it also introduces the problems inherent in centralized storage. If the centralized storage server fails or is hacked, it can easily lead to the leakage of a user's decentralized account and the loss of digital assets. Furthermore, centralized storage, rather than reducing account risk, actually increases it.
[0018] 2. The flaws of account key sharing
[0019] This solution has a major drawback: the account key must always be assembled in one place to form a usable account. When the account key is reassembled, it provides an opportunity for attackers to obtain the key. Similarly, the risk of account leakage can lead to the theft of digital assets in the user's account.
[0020] 3. Multi-signature mode: multiple account keys control one account
[0021] When using multi-signatures, it is important to avoid reusing account private keys, as this increases the risk of private key leakage. Multi-signatures are typically implemented using on-chain contracts (or scripts), which also brings disadvantages: higher transaction fees and longer transaction confirmation times due to asynchronous signatures from multiple people.
[0022] 4. Threshold signatures
[0023] The threshold signature problem exists in that two different keys need to be saved for the user. The location where the user account private key is stored becomes a new vulnerability point, and the recovery process is at risk of being attacked. In addition, it is more difficult to implement a system that solves the problem of multiple keys signing together.
[0024] 5. One-time Password (OTP)
[0025] The downside is that OTPs are difficult for humans to remember, so they require additional technology to function.
[0026] For all the reasons mentioned above, ordinary users face a high learning threshold and inconvenience in using decentralized accounts. They also face various problems such as account loss, leakage, and asset risks. Summary of the Invention
[0027] In order to solve the above problems, this application proposes a decentralized account and transaction management method based on one-time pad encryption technology to solve the technical problems that ordinary users face when using decentralized accounts, such as high learning threshold, inconvenience in use, and various account loss, leakage, and asset risks.
[0028] In one aspect, the present application proposes a decentralized account and transaction management method, electronic device, and server based on one-time pad encryption technology, comprising the following steps:
[0029] S100: Obtain the user's decentralized account information, perform hash processing on the decentralized account information, and obtain the user's private key Key with a time sequence;
[0030] S200: Using the user's private key, perform chain encryption on the user's on-chain information, and initiate an on-chain request for the encrypted on-chain information;
[0031] S300: Receive the on-chain request, and verify the user private key contained in the on-chain request in a time sequence through the blockchain smart contract;
[0032] S400: After verification, the data is uploaded and recorded on the blockchain.
[0033] As an optional implementation scheme of the present application, optionally, in step S100, the user's decentralized account information is obtained, and the decentralized account information is hashed to obtain the user's private key Key with a time sequence, including:
[0034] S101. Set the user ID and user password through the client;
[0035] S102: Perform a hash operation on the user secret phrase using a preset first hash algorithm to obtain a secret phrase hash value of the user secret phrase;
[0036] S103: Obtain the number of transactions completed by the current decentralized account as a serial number, and collect the user ID, the password hash value of the user's secret word, and the serial number as the decentralized account information of the user.
[0037] As an optional implementation scheme of the present application, optionally, in step S100, the decentralized account information of the user is obtained, the decentralized account information is hashed to obtain the user private key Key with a time sequence, and the following is further included:
[0038] S110, obtaining the user ID, the password hash value of the user's password, and the serial number, and performing merging preprocessing to obtain a character string;
[0039] S120, performing a hash operation on the character string using a preset second hash algorithm to obtain a hash value with a time sequence, and using the hash value as a private key Key corresponding to the serial number, from 0 to n, respectively: Key-0, Key-1...Key-n;
[0040] S130: Perform a one-time data upload operation on the chain according to the private key.
[0041] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain user's on-chain information using the user's private key Key, and an on-chain request is initiated for the encrypted on-chain information, including:
[0042] S201: The user accesses the blockchain through the client and generates a first user private key Key according to a first time sequence;
[0043] S202: Use the first user private key Key to perform an offline numerical signature on the first on-chain data to obtain first signature data;
[0044] S203: Submit an empty content private key, the first on-chain data, and the first signature data to the blockchain smart contract for storage through the client.
[0045] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain information of the on-chain user using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising:
[0046] S210. The user confirms through the client whether the data is successfully uploaded to the blockchain;
[0047] S220: If successful, increment the first time sequence to a second time sequence;
[0048] S230: Generate a second user private key Key corresponding to the second time sequence according to the second time sequence.
[0049] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain information of the on-chain user using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising:
[0050] S211. Use the second user private key Key to perform an offline numerical signature on the second on-chain data to obtain second signature data;
[0051] S221. Submitting the first user private key, the second on-chain data, and the second signature data to the blockchain smart contract for storage through the client;
[0052] S231. The user confirms through the client whether the data is successfully uploaded to the chain. If successful, the second time sequence is incremented and the empty content private key Key is deleted to implement chain encryption of the uploaded information by a one-time pad decentralized account.
[0053] As an optional implementation scheme of the present application, optionally, in step S300, the on-chain request is received, and the user private key Key contained in the on-chain request is verified in time sequence through the blockchain smart contract, including:
[0054] S301: The blockchain smart contract receives the on-chain data submitted by the client and checks whether the content of the private key in the on-chain data is empty;
[0055] S302: If yes, directly save the first on-chain data and the first signature data to the blockchain, and return a notification of successful on-chaining to the client;
[0056] S303: The client receives the notification of successful upload to the blockchain and notifies the user.
[0057] As an optional implementation scheme of the present application, optionally, in step S300, receiving the on-chain request, and verifying the user private key Key contained in the on-chain request in a time sequence through a blockchain smart contract, further comprising:
[0058] S310: The blockchain smart contract receives the first user private key, the second on-chain data, and the second signature data submitted by the client;
[0059] S320: The blockchain smart contract verifies the first on-chain data and the first signature data using the first user private key using a preset verification algorithm:
[0060] If the signature is incorrect, the error is directly returned to the client and the data on-chain process is exited;
[0061] If the signature is correct, save the uploaded second on-chain data and the second signature data, and upload the data to the chain and record it in the blockchain;
[0062] S330, repeat the above steps in a loop.
[0063] In another aspect, the present application provides an electronic device for implementing the above-mentioned decentralized account and transaction management method based on one-time pad encryption technology, comprising:
[0064] The user private key acquisition module is used to obtain the user's decentralized account information, hash the decentralized account information, and obtain the user private key with time sequence;
[0065] The chain encryption module is used to perform chain encryption on the on-chain information of the on-chain user using the user private key Key, and initiate an on-chain request for the encrypted on-chain information;
[0066] A verification module is used to receive the on-chain request and verify the user private key contained in the on-chain request in a time sequence through a blockchain smart contract;
[0067] The recording module is used to verify that the data has passed and to upload and record it on the blockchain.
[0068] In another aspect, the present application further provides a server, comprising:
[0069] processor;
[0070] a memory for storing processor-executable instructions;
[0071] Wherein, the processor is configured to implement the above-mentioned decentralized account and transaction management method based on one-time pad encryption technology when executing the executable instructions.
[0072] Technical effects of the present invention:
[0073] This application obtains a user's decentralized account information, hashes it, and obtains a time-sequenced user private key. Using this private key, the user's on-chain information is chain-encrypted, and an on-chain request is initiated for the encrypted on-chain information. Upon receiving the on-chain request, the user's private key contained in the on-chain request is verified according to the time sequence via a blockchain smart contract. Upon successful verification, the data is uploaded and recorded on the blockchain. This decentralized account and transaction management method, based on one-time pad chain encryption technology, not only avoids the difficulties faced by ordinary users in using decentralized accounts, but also ensures the accuracy, reliability, availability, and security of digital asset transactions, data on-chain, and information queries. It allows users to more conveniently operate decentralized digital assets, reduces the workload and complexity of using decentralized accounts, and improves the user experience of decentralized accounts.
[0074] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0076] Figure 1 It is a schematic diagram of the implementation process of the present invention;
[0077] Figure 2 Shown is an application system of the present invention;
[0078] Figure 3Shown is a schematic diagram of the composition structure of the present invention;
[0079] Figure 4 FIG. 4 is a timing diagram showing the chain encryption verification method of the present invention. DETAILED DESCRIPTION
[0080] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0081] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0082] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0083] Example 1
[0084] This solution implements the one-time pad chain encryption and on-chain processing through three key aspects:
[0085] First, users use a secret encryption algorithm to generate a series of private keys. These private keys can be used to sign and encrypt user account operations, forming the basis of a one-time pad. Each private key is used only once and becomes invalid after use, and cannot be reused.
[0086] Second, a public verification algorithm is used in the blockchain smart contract to verify whether the data request provided by the user each time meets the verification standards. If it meets the verification standards, it will be processed later; otherwise, the request will be rejected.
[0087] Third, the processing logic adopts chain encryption processing mode: the data content of this request will be processed and saved only after the verification data provided by the user meets the data requirements of the previous time. The verification data provided by the user next time must meet the data content verification requirements of this time.
[0088] In this embodiment, the first and second numbers are simply the corresponding information labels generated according to the time sequence, such as the first user private key and the first on-chain data, and are only used to correspond to the information description in the accompanying drawings. The type of hash algorithm used is determined by the user and is not limited here.
[0089] like Figure 1As shown, on one hand, the present application proposes a decentralized account and transaction management method, electronic device and server based on one-time pad encryption technology, including the following steps:
[0090] S100: Obtain the user's decentralized account information, perform hash processing on the decentralized account information, and obtain the user's private key Key with a time sequence;
[0091] Since a one-time pad requires a large amount of key information, users need to be able to generate a series of key information at any time.
[0092] To create a decentralized account, users only need to provide two pieces of information: their phone number and a secret phrase. The phone number is the number under the user's name, and the secret phrase is a piece of text that the user remembers well (such as a poem, a proverb, a witty remark, or a two-part allegorical saying).
[0093] The key information of a decentralized account consists of three parts: the user's phone number, the user's secret word, and the usage number (Nonce). The usage number is an integer starting from 0 and automatically increases by one after each transaction.
[0094] S200: Using the user's private key, perform chain encryption on the user's on-chain information, and initiate an on-chain request for the encrypted on-chain information;
[0095] When users perform on-chain operations (meaning writing data to the blockchain), chain encryption of the on-chain information is implemented. The processing logic adopts chain encryption processing: the data content of the current request will be processed and saved only after the verification data provided by the user meets the previous data requirements. The verification data provided by the user next time must meet the data content verification requirements of the current data content.
[0096] S300: Receive the on-chain request, and verify the user private key contained in the on-chain request in a time sequence through the blockchain smart contract;
[0097] The verification method of chain encryption in blockchain smart contracts is mainly to verify the correctness of the chain encryption sent by the client. A public verification algorithm is used in blockchain smart contracts to verify whether the data request provided by the user meets the verification standards each time. If it meets the verification standards, it will be processed later. Otherwise, the request will be rejected.
[0098] S400: After verification, the data is uploaded and recorded on the blockchain.
[0099] Therefore, this technology manages decentralized accounts and transactions based on one-time pad chained encryption, not only eliminating the challenges faced by ordinary users in using decentralized accounts, but also ensuring the accuracy, reliability, availability, and security of digital asset transactions, data on-chain, and information queries. It allows users to more conveniently operate decentralized digital assets, reducing the workload and complexity of using decentralized accounts and improving the user experience.
[0100] The implementation details of the three stages are described below.
[0101] like Figure 2 As shown in the figure, it is a sequence diagram for the generation and management of a user's one-time password decentralized account.
[0102] As an optional implementation scheme of the present application, optionally, in step S100, the user's decentralized account information is obtained, and the decentralized account information is hashed to obtain the user's private key Key with a time sequence, including:
[0103] S101. Set the user ID and user password through the client;
[0104] S102: Perform a hash operation on the user secret phrase using a preset first hash algorithm to obtain a secret phrase hash value of the user secret phrase;
[0105] S103: Obtain the number of transactions completed by the current decentralized account as a serial number, and collect the user ID, the password hash value of the user's secret word, and the serial number as the decentralized account information of the user.
[0106] As an optional implementation scheme of the present application, optionally, in step S100, the decentralized account information of the user is obtained, the decentralized account information is hashed to obtain the user private key Key with a time sequence, and the following is further included:
[0107] S110, obtaining the user ID, the password hash value of the user's password, and the serial number, and performing merging preprocessing to obtain a character string;
[0108] S120, performing a hash operation on the character string using a preset second hash algorithm to obtain a hash value with a time sequence, and using the hash value as a private key Key corresponding to the serial number, from 0 to n, respectively: Key-0, Key-1...Key-n;
[0109] S130: Perform a one-time data upload operation on the chain according to the private key.
[0110] For details, see Figure 2As shown, in this embodiment, the mobile phone number is used as the user ID. The key information of a centralized account consists of three parts: the user's mobile phone number, the user's secret word, and the usage nonce. The usage nonce is an integer starting from 0 and automatically increases by one after each transaction.
[0111] The implementation steps are as follows:
[0112] 1) The user sets the user's mobile phone number and user password on the client;
[0113] 2) Perform a hash operation on the user's secret phrase (this can be a single hash operation or a combination of multiple hash operations);
[0114] 3) Obtain the number of transactions completed by the current decentralized account as a nonce;
[0115] 4) Combine the user's mobile phone number, the hash value of the user's secret phrase, and the serial number into a single string;
[0116] 5) The combined string is hashed (either one or a combination of multiple hash operations) to obtain a hash value. This operation is not public.
[0117] 6) The hash value is the private key of the corresponding serial number, from 0 to n: Key-0, Key-1...Key-n;
[0118] In this way, users can obtain a string of private key data as their own decentralized account and can obtain the corresponding private key at any time;
[0119] The key that has been used each time will not be used again. The newly generated key will be used directly next time to achieve one-time password and increase the security of the account.
[0120] like Figure 3 As shown in the figure, it is a timing diagram of a user using a one-time pad decentralized account to chain encrypt information on the chain.
[0121] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain user's on-chain information using the user's private key Key, and an on-chain request is initiated for the encrypted on-chain information, including:
[0122] S201: The user accesses the blockchain through the client and generates a first user private key Key according to a first time sequence;
[0123] S202: Use the first user private key Key to perform an offline numerical signature on the first on-chain data to obtain first signature data;
[0124] S203: Submit an empty content private key, the first on-chain data, and the first signature data to the blockchain smart contract for storage through the client.
[0125] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain information of the on-chain user using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising:
[0126] S210. The user confirms through the client whether the data is successfully uploaded to the blockchain;
[0127] S220: If successful, increment the first time sequence to a second time sequence;
[0128] S230: Generate a second user private key Key corresponding to the second time sequence according to the second time sequence.
[0129] As an optional implementation scheme of the present application, optionally, in step S200, chain encryption is performed on the on-chain information of the on-chain user using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising:
[0130] S211. Use the second user private key Key to perform an offline numerical signature on the second on-chain data to obtain second signature data;
[0131] S221. Submitting the first user private key, the second on-chain data, and the second signature data to the blockchain smart contract for storage through the client;
[0132] S231. The user confirms through the client whether the data is successfully uploaded to the chain. If successful, the second time sequence is incremented and the empty content private key Key is deleted to implement chain encryption of the uploaded information by a one-time pad decentralized account.
[0133] In this embodiment, Figure 3 As shown in the figure, when users perform on-chain operations (writing data to the blockchain), chain encryption of the on-chain information is implemented. The implementation steps are as follows:
[0134] 1) The client generates a new private key using sequence number 0, such as Key-0;
[0135] 2) Use private key Key-0 to perform an offline digital signature on the on-chain data Data-0 to obtain signature Sign-0;
[0136] 3) The client submits an empty private key, the on-chain data Data-0, and the signature Sign-0 to the blockchain smart contract for storage;
[0137] 4) After the client confirms that the data has been successfully uploaded to the chain, the sequence number increases by one to 1;
[0138] 5) When the client submits the second time, it uses sequence number 1 to generate the next private key, such as Key-1, and performs an offline digital signature on the on-chain data Data-1 to obtain the signature Sign-1;
[0139] 6) The client submits the private key Key-0, the on-chain data Data-1, and the signature Sign-1 to the blockchain smart contract for storage;
[0140] 7) After the client confirms that the data has been successfully uploaded to the chain, the sequence number increases by one to 2;
[0141] 8) Delete Key-0 and no longer use the private key;
[0142] 9) Continue steps 5 to 8 to implement chain encryption of on-chain information using a one-time-key decentralized account.
[0143] like Figure 4 The following is a timing diagram of the chain encryption verification method.
[0144] As an optional implementation scheme of the present application, optionally, in step S300, the on-chain request is received, and the user private key Key contained in the on-chain request is verified in time sequence through the blockchain smart contract, including:
[0145] S301: The blockchain smart contract receives the on-chain data submitted by the client and checks whether the content of the private key in the on-chain data is empty;
[0146] S302: If yes, directly save the first on-chain data and the first signature data to the blockchain, and return a notification of successful on-chaining to the client;
[0147] S303: The client receives the notification of successful upload to the blockchain and notifies the user.
[0148] As an optional implementation scheme of the present application, optionally, in step S300, receiving the on-chain request, and verifying the user private key Key contained in the on-chain request in a time sequence through a blockchain smart contract, further comprising:
[0149] S310: The blockchain smart contract receives the first user private key, the second on-chain data, and the second signature data submitted by the client;
[0150] S320: The blockchain smart contract verifies the first on-chain data and the first signature data using the first user private key using a preset verification algorithm:
[0151] If the signature is incorrect, directly return an error to the client, and exit the data chaining process;
[0152] If the signature is correct, save the uploaded second chaining data and second signature data, implement data chaining and record in the blockchain;
[0153] S330, the above steps are repeated.
[0154] The embodiment, as shown in the figure, the verification method of chain encryption in the blockchain smart contract is mainly to verify the correctness of the chain encryption sent by the client, and the implementation steps are as follows: Figure 4
[0155] 1) The client submits the empty private key Key content, the chaining data Data-0 and the signature Sign-0 to the blockchain smart contract;
[0156] 2) When the blockchain smart contract checks the Key content and finds that it is an empty private key, directly saves Data-0 and signature Sign-0 to the blockchain, and returns success;
[0157] 3) The client submits the private key Key-0, the chaining data Data-1 and the signature Sign-1 to the blockchain smart contract for saving;
[0158] 4) After the blockchain smart contract receives the information, it first verifies the signature of the previous data Data-0 using the private key Key-0;
[0159] 5) In the case of signature error, directly return an error and exit the data chaining process;
[0160] 6) In the case of correct signature, save the uploaded data Data-1 and signature Sign-1, and implement data chaining;
[0161] 7) Through continuous chain processing, the blockchain smart contract records the data Data submitted by the client on the blockchain continuously, and completes the verification work.
[0162] The encryption algorithm in the above scheme (such as symmetric encryption, asymmetric encryption, hash algorithm, etc.), the present application does not make limitation;
[0163] The content of the chaining data in the above scheme (such as text, picture, formatted data, unformatted data, etc.), the present application does not make limitation;
[0164] The use of the chaining data in the above scheme (such as transaction, storage, verification, traceability, etc.), the present application does not make limitation.
[0165] Therefore, this application manages decentralized accounts and transactions through one-time-one-pad chained encryption technology, not only eliminating the difficulties faced by ordinary users in using decentralized accounts, but also ensuring the accuracy, reliability, availability, and security of digital asset transactions, data on-chain, and information queries. This allows users to more conveniently operate decentralized digital assets, reducing the workload and complexity of using decentralized accounts and improving the user experience.
[0166] It should be noted that although the above description of user IDs uses the user's mobile phone number as an example, those skilled in the art will understand that the present disclosure is not limited to this. In fact, users can flexibly set the type of user ID, such as an ID card number, according to actual application scenarios, as long as the technical functions of this application can be implemented according to the above technical methods.
[0167] Example 2
[0168] Based on the implementation principle of Example 1, this embodiment, in another aspect of the present application, provides an electronic device for implementing the above-mentioned decentralized account and transaction management method based on one-time pad encryption technology, including:
[0169] The user private key acquisition module is used to obtain the user's decentralized account information, hash the decentralized account information, and obtain the user private key with time sequence;
[0170] The chain encryption module is used to perform chain encryption on the on-chain information of the on-chain user using the user private key Key, and initiate an on-chain request for the encrypted on-chain information;
[0171] A verification module is used to receive the on-chain request and verify the user private key contained in the on-chain request in a time sequence through a blockchain smart contract;
[0172] The recording module is used to verify that the data has passed and to upload and record it on the blockchain.
[0173] The functional principles and implementation principles of the above-mentioned user private key acquisition module, chain encryption module, verification module and recording module are specifically described in the above-mentioned embodiment 1 and will not be repeated here.
[0174] Obviously, those skilled in the art should understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned control methods. The modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, 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. In this way, the present invention is not limited to any specific combination of hardware and software.
[0175] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When executed, the program can include the processes of the above-described control method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.
[0176] Example 3
[0177] Furthermore, in another aspect, the present application further provides a server, comprising:
[0178] processor;
[0179] a memory for storing processor-executable instructions;
[0180] Wherein, the processor is configured to implement any one of the decentralized account and transaction management methods based on one-time pad encryption technology when executing the executable instructions.
[0181] In an embodiment of the present disclosure, a server includes a processor and a memory for storing processor-executable instructions. The processor is configured to implement any of the aforementioned decentralized account and transaction management methods based on one-time pad encryption technology when executing the executable instructions.
[0182] It should be noted that the number of processors can be one or more. Furthermore, the server in the embodiments of the present disclosure may also include an input device and an output device. The processor, memory, input device, and output device may be connected via a bus or other means, which are not specifically limited here.
[0183] Memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the decentralized account and transaction management method based on one-time pad encryption technology in the embodiments of the present disclosure. The processor executes the various functional applications and data processing of the server by running the software programs or modules stored in memory.
[0184] The input device can be used to receive input numbers or signals. The signals can be key signals related to user settings and function control of the device / terminal / server. The output device can include a display device such as a display screen.
[0185] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technical improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A decentralized account and transaction management method based on one-time pad encryption technology, characterized in that: The steps include: S100: Obtain the user's decentralized account information, perform hash processing on the decentralized account information, and obtain the user's private key Key with a time sequence; include: S101. Set the user ID and user password through the client; S102: Perform a hash operation on the user secret phrase using a preset first hash algorithm to obtain a secret phrase hash value of the user secret phrase; S103. Obtain the number of transactions completed by the current decentralized account as a serial number, and collect the user ID, the password hash value of the user's secret word, and the serial number as the decentralized account information of the user; Users use a private encryption algorithm to generate a series of private keys. These private keys can be used to sign and encrypt user accounts and are the basis of one-time pads. Each time it is used only once, the private key will be invalidated after use and will not be reused; Also includes: S110, obtaining the user ID, the password hash value of the user's password, and the serial number, and performing merging preprocessing to obtain a character string; S120, performing a hash operation on the character string using a preset second hash algorithm to obtain a hash value with a time sequence, and using the hash value as a private key Key corresponding to the serial number, from 0 to n, respectively: Key-0, Key-1...Key-n; S130: Perform a one-time data upload operation on the blockchain based on the private key. S200: Using the user's private key, perform chain encryption on the user's on-chain information, and initiate an on-chain request for the encrypted on-chain information; S300: Receive the on-chain request, and verify the user private key contained in the on-chain request in a time sequence through the blockchain smart contract; S400: After verification, the data is uploaded and recorded on the blockchain.
2. The decentralized account and transaction management method based on one-time pad encryption technology according to claim 1, characterized in that: In step S200, the user's on-chain information is chain-encrypted using the user's private key Key, and an on-chain request is initiated for the encrypted on-chain information, including: S201: The user accesses the blockchain through the client and generates a first user private key Key according to a first time sequence; S202: Use the first user private key Key to perform an offline numerical signature on the first on-chain data to obtain first signature data; S203: Submit an empty content private key, the first on-chain data, and the first signature data to the blockchain smart contract for storage through the client.
3. The decentralized account and transaction management method based on one-time pad encryption technology according to claim 2, characterized in that: In step S200, the on-chain information of the on-chain user is chain-encrypted using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising: S210. The user confirms through the client whether the data is successfully uploaded to the blockchain; S220: If successful, increment the first time sequence to a second time sequence; S230: Generate a second user private key Key corresponding to the second time sequence according to the second time sequence.
4. The decentralized account and transaction management method based on one-time pad encryption technology according to claim 3, characterized in that: In step S200, the on-chain information of the on-chain user is chain-encrypted using the user private key Key, and an on-chain request is initiated for the encrypted on-chain information, further comprising: S211. Use the second user private key Key to perform an offline numerical signature on the second on-chain data to obtain second signature data; S221. Submitting the first user private key, the second on-chain data, and the second signature data to the blockchain smart contract for storage through the client; S231. The user confirms through the client whether the data is successfully uploaded to the chain. If successful, the second time sequence is incremented and the empty content private key Key is deleted to implement chain encryption of the uploaded information by a one-time pad decentralized account.
5. The decentralized account and transaction management method based on one-time pad encryption technology according to claim 2, characterized in that: In step S300, the on-chain request is received, and the user private key contained in the on-chain request is verified in time sequence through the blockchain smart contract, including: S301: The blockchain smart contract receives the on-chain data submitted by the client and checks whether the content of the private key in the on-chain data is empty; S302: If yes, directly save the first on-chain data and the first signature data to the blockchain, and return a notification of successful on-chaining to the client; S303: The client receives the notification of successful upload to the blockchain and notifies the user.
6. The decentralized account and transaction management method based on one-time pad encryption technology according to claim 5, characterized in that: In step S300, the on-chain request is received, and the user private key Key contained in the on-chain request is verified in time sequence through the blockchain smart contract, further comprising: S310: The blockchain smart contract receives the first user private key, the second on-chain data, and the second signature data submitted by the client; S320: The blockchain smart contract verifies the first on-chain data and the first signature data using the first user private key using a preset verification algorithm: If the signature is incorrect, the error is directly returned to the client and the data on-chain process is exited; If the signature is correct, save the uploaded second on-chain data and the second signature data, and upload the data to the chain and record it in the blockchain; S330, repeat the above steps in a loop.
7. An electronic device for implementing the decentralized account and transaction management method based on one-time pad encryption technology as described in any one of claims 1 to 6, characterized in that: include: The user private key acquisition module is used to obtain the user's decentralized account information, perform hashing on the decentralized account information, and obtain the user private key with a time sequence, including: Set the user ID and user secret phrase through the client; Performing a hash operation on the user secret word using a preset first hash algorithm to obtain a secret word hash value of the user secret word; Obtain the number of transactions completed by the current decentralized account as a serial number, and collect the user ID, the password hash value of the user's secret word, and the serial number as the decentralized account information of the user; Users use a private encryption algorithm to generate a series of private keys. These private keys can be used to sign and encrypt user accounts and are the basis of one-time pads. Each time it is used only once, the private key will be invalidated after use and will not be reused; Also includes: Obtain the user ID, the password hash value of the user password, and the serial number, and perform merging preprocessing to obtain a character string; Perform a hash operation on the string using a preset second hash algorithm to obtain a hash value with a time sequence, and use the hash value as the private key Key corresponding to the serial number, from 0 to n, respectively: Key-0, Key-1...Key-n; According to the private key, a one-time data upload operation is performed; The chain encryption module is used to perform chain encryption on the on-chain information of the on-chain user using the user private key Key, and initiate an on-chain request for the encrypted on-chain information; A verification module is used to receive the on-chain request and verify the user private key contained in the on-chain request in a time sequence through a blockchain smart contract; The recording module is used to verify that the data has passed and to upload and record it on the blockchain.
8. A server, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the decentralized account and transaction management method based on one-time pad encryption technology as described in any one of claims 1 to 6 when executing the executable instructions.
Citation Information
Patent Citations
Generation method for share secret key
CN101150399A
Method and system for authenticating multiple pre-shared keys based on symmetric cryptographic algorithm
CN105790950A
PKE method and system based on SM2 algorithm
CN106961336A
Threshold private key generation method, transaction method and relevant device
CN108921553A
Account security system of novel decentralized hosting platform and operation method of account security system
CN110084597A