Data processing method and device, computer equipment and readable storage medium
By generating the encrypted blockchain private key on the resource client and storing it on the resource server, the security problem caused by the plaintext storage of blockchain private keys is solved, and the security of the private key is improved.
Patent Information
- Application Number
- CN202310757023.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2043-06-25
AI Technical Summary
In the prior art, blockchain private keys are stored in plain text on resource servers, which are susceptible to hacker network theft, resulting in reduced security of private keys.
The resource client generates a blockchain account, signs the verification string through the blockchain private key, and encrypts the authentication public key associated with the operation object to generate the encrypted blockchain private key. Send it to the resource server, which stores it after the signature verification is successful, and sends the decrypted blockchain private key back to the resource client.
Even if the resource server is stolen by hackers, the encrypted blockchain private key cannot be decrypted, avoiding private key leakage and improving the security of blockchain private key.
Smart Images

Figure CN119202067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a data processing method, apparatus, computer device, and readable storage medium. Background Art
[0002] Currently, the operation object can directly send the blockchain private key generated in the resource client to the resource server (i.e., the platform) through the terminal device, so that the resource server can directly obtain the blockchain private key and then directly store the blockchain private key in plain text. However, if the resource server is stolen by a hacker, the method of storing the blockchain private key in plain text on the resource server will lead to the leakage of the blockchain private key, thereby reducing the security of the blockchain private key. Summary of the invention
[0003] The embodiments of the present application provide a data processing method, apparatus, computer device, and readable storage medium, which can improve the security of blockchain private keys.
[0004] On the one hand, an embodiment of the present application provides a data processing method, including:
[0005] When receiving the first verification string sent by the resource server, a blockchain account corresponding to the operation object is generated in the resource client; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0006] Sign the first verification string using the blockchain private key to obtain signature information of the first string;
[0007] The blockchain private key is encrypted by the authentication public key associated with the operation object to obtain the encrypted blockchain private key; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0008] The encrypted blockchain private key, the first character string signature information and the blockchain public key are sent to the resource server; the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
[0009] An embodiment of the present application provides a data processing device, including:
[0010] An account generation module, configured to generate a blockchain account corresponding to the operation object in the resource client when receiving the first verification string sent by the resource server; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0011] A first signature module, used to sign the first verification string using a blockchain private key to obtain first string signature information;
[0012] An encryption processing module, used to encrypt the blockchain private key by using the authentication public key associated with the operation object to obtain the encrypted blockchain private key; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0013] The first sending module is used to send the encrypted blockchain private key, the first character string signature information and the blockchain public key to the resource server; the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
[0014] The device further comprises:
[0015] A first receiving module is used to respond to a trigger operation on an account creation control in a resource client and send a hosting request to a resource server; the hosting request is used to instruct the resource server to generate a first verification string corresponding to an object identifier of an operation object;
[0016] The first receiving module is used to receive a first verification string returned by the resource server.
[0017] The device further comprises:
[0018] The client input module is used to respond to the input operation on the resource client and send the text data input by the input operation to the resource server; if the text data does not exist in the account name set, the resource server is used to determine the text data as the object identifier of the operation object and generate a second verification string corresponding to the object identifier; the resource server is used to store the object identifier in the account name set;
[0019] A second receiving module is used to receive a second verification string and a registration identifier returned by the resource server, and generate an authentication public key and an authentication private key associated with the operation object in the resource client based on the registration identifier; the authentication public key and the authentication private key are generated by the resource client calling an authentication interface associated with the resource client;
[0020] The second signature module is used to sign the second verification string by using the authentication private key to obtain the second string signature information;
[0021] The second sending module is used to send the object identifier, the second string signature information and the authentication public key to the resource server; the authentication public key is used to instruct the resource server to verify the second string signature information to obtain a second verification result; the resource server is used to associate and store the object identifier and the authentication public key when the second verification result indicates that the verification is successful.
[0022] The device further comprises:
[0023] The client login module is used to respond to the login operation for the resource client when the login state of the operation object is an invalid state, and send the object identifier input for the login operation to the resource server; if the object identifier exists in the account name set, the resource server is used to generate a third verification string corresponding to the object identifier; the invalid state refers to the login state when the current operation timestamp of the operation object for the resource client is later than the invalid timestamp of the operation object for the resource client;
[0024] A third receiving module is used to receive a third verification string returned by the resource server, and to sign the third verification string using the authentication private key to obtain signature information of the third string;
[0025] The third sending module is used to send the object identifier and the third string signature information to the resource server; the resource server is used to obtain the authentication public key corresponding to the stored object identifier; the authentication public key is used to instruct the resource server to verify the third string signature information to obtain a third verification result; the resource server is used to send the blockchain account address list corresponding to the operation object to the resource client when the third verification result indicates that the verification is successful.
[0026] Among them, the resource server is used to generate a blockchain account address corresponding to the blockchain public key when the first signature verification result indicates that the signature verification is successful, and associate and store the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object; the resource server is used to send the stored blockchain account address to the resource client.
[0027] The device further comprises:
[0028] A list display module is used to receive transaction data sent by a decentralized application client through a resource client, and display a list of blockchain account addresses corresponding to the operation object in the resource client; the blockchain account address list includes blockchain account addresses;
[0029] An address selection module, used to respond to a selection operation on a blockchain account address list and obtain the blockchain account address selected by the selection operation;
[0030] The decryption processing module is used to obtain the encrypted blockchain private key corresponding to the blockchain account address from the resource server, and decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key;
[0031] The transaction signature module is used to sign the transaction data through the blockchain private key to obtain the signed transaction data.
[0032] The device further comprises:
[0033] The on-chain processing module is used to send the signed transaction data to the blockchain node in the blockchain network, so that the blockchain node can process the signed transaction data on the chain;
[0034] The result return module is used to receive the on-chain result returned by the blockchain node through the resource client to indicate the successful on-chain if the transaction data after signature processing is successfully on-chained to the blockchain network, and return the on-chain result to the decentralized application client;
[0035] The result return module is used to receive the on-chain result returned by the blockchain node through the resource client to indicate the failure of on-chain if the transaction data after signature processing is not successfully on-chained to the blockchain network, and return the on-chain result to the decentralized application client.
[0036] On the one hand, an embodiment of the present application provides a data processing method, including:
[0037] Sending a first verification string to the resource client; the first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0038] Receive the encrypted blockchain private key, first string signature information and blockchain public key sent by the resource client; the first string signature information is obtained by the resource client signing the first verification string with the blockchain private key; the encrypted blockchain private key is obtained by the resource client encrypting the blockchain private key with the authentication public key associated with the operation object; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0039] The first character string signature information is verified by using the blockchain public key to obtain a first verification result. If the first verification result indicates that the verification is successful, the encrypted blockchain private key is stored;
[0040] The stored encrypted blockchain private key is sent to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
[0041] An embodiment of the present application provides a data processing device, including:
[0042] A string sending module, used to send a first verification string to the resource client; the first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0043] A data receiving module, used to receive the encrypted blockchain private key, the first string signature information and the blockchain public key sent by the resource client; the first string signature information is obtained by the resource client signing the first verification string with the blockchain private key; the encrypted blockchain private key is obtained by the resource client encrypting the blockchain private key with the authentication public key associated with the operation object; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0044] A private key storage module is used to verify the signature information of the first character string by using the blockchain public key to obtain a first verification result, and if the first verification result indicates that the verification is successful, the encrypted blockchain private key is stored;
[0045] The private key sending module is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data of the operation object.
[0046] The private key storage module is specifically used to generate a blockchain account address corresponding to the blockchain public key if the first signature verification result indicates that the signature verification is successful;
[0047] The private key storage module is specifically used to associate and store the blockchain account address, the encrypted blockchain private key, and the object identifier of the operation object;
[0048] The private key storage module is also specifically used to send the stored blockchain account address to the resource client.
[0049] The device further comprises:
[0050] A timestamp acquisition module, used to obtain a character string generation timestamp corresponding to the first verification character string;
[0051] A timestamp acquisition module, used to determine a string expiration timestamp corresponding to the first verification string according to a string generation timestamp and a string validity period;
[0052] A timestamp determination module, configured to execute a step of verifying the signature of the first string of characters by using a blockchain public key if the first string of characters signature information sent by the resource client is received before the string of characters expiration timestamp;
[0053] The timestamp judgment module is used to return an error prompt message to the resource client if the first character string signature information sent by the resource client is received after the character string expiration timestamp.
[0054] The private key storage module is specifically used to decrypt the first character string signature information through the blockchain private key to obtain the first summary information corresponding to the first verification character string;
[0055] The private key storage module is specifically used to perform hash processing on the first verification string to obtain second summary information corresponding to the first verification string;
[0056] A private key storage module, specifically configured to generate a first verification result indicating successful signature verification if the first summary information and the second summary information are the same;
[0057] The private key storage module is specifically used to generate a first verification result indicating a signature verification failure if the first summary information and the second summary information are different.
[0058] An embodiment of the present application provides a computer device, including: a processor and a memory;
[0059] The processor is connected to the memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.
[0060] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.
[0061] In one aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.
[0062] In an embodiment of the present application, when the terminal device receives the first verification string sent by the resource server, it can generate a blockchain private key and a blockchain public key associated with the operation object in the resource client. Further, the terminal device can sign the first verification string through the blockchain private key to obtain the first string signature information; at the same time, the blockchain private key is encrypted through the authentication public key associated with the operation object to obtain the encrypted blockchain private key. Further, the terminal device can send the encrypted blockchain private key, the first string signature information and the blockchain public key to the resource server. Among them, the blockchain public key can be used to instruct the resource server to verify the signature of the first string signature information to obtain the first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; further, the resource server is used to send the stored encrypted blockchain private key to the resource client, and the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key, and the blockchain private key is used to sign the transaction data for the operation object. It can be seen that the embodiment of the present application can generate an authentication public key and an authentication private key associated with the operation object in the resource client, encrypt the blockchain private key in the blockchain account corresponding to the operation object through the authentication public key, obtain the encrypted blockchain private key, and then send the encrypted blockchain private key to the resource server so that the resource server stores the encrypted blockchain private key. In this way, if the resource server is stolen by a hacker's network, the encrypted blockchain private key stored on the resource server will be leaked. However, since the hacker cannot obtain the authentication private key, the hacker cannot decrypt the leaked encrypted blockchain private key. Therefore, the present application will not cause the leakage of the blockchain private key, thereby improving the security of the blockchain private key. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 It is a structural diagram of a network architecture provided by an embodiment of the present application;
[0065] Figure 2a This is a schematic diagram of a scenario for data interaction provided by an embodiment of the present application;
[0066] Figure 2b This is a schematic diagram of a scenario for data interaction provided by an embodiment of the present application;
[0067] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0068] Figure 4 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0069] Figure 5 This is a schematic diagram of a process for generating a blockchain account provided by an embodiment of the present application;
[0070] Figure 6 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0071] Figure 7 This is a schematic diagram of a scenario for generating an authentication public key and an authentication private key provided in an embodiment of the present application;
[0072] Figure 8 This is a flowchart of registering a blockchain resource account provided by an embodiment of the present application;
[0073] Fig. 9 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0074] Fig.10 This is a flowchart of logging into a blockchain resource account provided by an embodiment of the present application;
[0075] Fig.11 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0076] Fig.12 This is a schematic diagram of a process for performing transaction signature provided by an embodiment of the present application;
[0077] Fig.13 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0078] Fig.14 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0079] Fig.15It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0081] Blockchain: In a narrow sense, blockchain is a chain data structure with blocks as the basic unit. The digital summary is used in the block to verify the transaction history previously obtained, which is suitable for the needs of tamper-proof and scalability in the distributed accounting scenario; in a broad sense, blockchain also refers to the distributed accounting technology implemented by the blockchain structure, including distributed consensus, privacy and security protection, peer-to-peer communication technology, network protocols, smart contracts, etc. The goal of blockchain is to realize a distributed data record book, which only allows additions but not deletions. The basic structure of the underlying ledger is a linear linked list. The linked list is composed of "blocks" connected in series, and the hash value of the previous block is recorded in the subsequent block. Whether each block (and the transactions in the block) is legal can be quickly verified by calculating the hash value. If a node in the blockchain network proposes to add a new block, it must reach a consensus on the block through the consensus mechanism.
[0082] Blockchain nodes: The blockchain network divides nodes into consensus nodes (also called core nodes) and synchronization nodes (which can include data nodes and light nodes). Among them, the consensus node is responsible for the consensus business of the entire blockchain network; the synchronization node is responsible for synchronizing the ledger information of the consensus node, that is, synchronizing the latest block data. Whether it is a consensus node or a synchronization node, its internal structure includes network communication components, because the blockchain network is essentially a peer-to-peer (P2P) network, and it needs to communicate with other nodes in the blockchain network through P2P components. The resources and services in the blockchain network are scattered on each node, and the transmission of information and the implementation of services are directly carried out between nodes, without the intervention of intermediate links or centralized servers (third parties).
[0083] Asymmetric signature: The signature algorithm includes two keys, a public key (public key for short) and a private key (private key for short). The public key and the private key are a pair. If the private key is used to sign data, the signature can only be verified with the corresponding public key. Because the signing process and the verification process use two different keys, this algorithm is called an asymmetric signature. The basic process of asymmetric signature to achieve confidential information exchange can be: Party A generates a pair of keys and makes the public key public. When Party A needs to send a message to other roles (for example, Party B), it uses its own private key to sign the confidential message and then sends it to Party B; Party B then uses Party A's public key to verify the signed message.
[0084] Public key and private key: Public key and private key are a key pair obtained through an algorithm. The public key is the public part of the key pair, and the private key is the non-public part. This algorithm can ensure that the key pair is unique. When using this key pair, if one of the keys is used to encrypt a piece of data, the other key must be used to decrypt it. For example, data encrypted with the public key must be decrypted with the private key, and data encrypted with the private key must also be decrypted with the public key.
[0085] Webauthn (Web Authentication): Webauthn is a web authentication specification that complies with the W3C (World Wide Web Consortium) standard. It uses public and private key encryption technology to achieve password-free authentication. Users only need to use a pin code (Personal Identification Number), public and private keys, USB keys, etc. to complete the entire registration and login process. Using webauthn can greatly simplify the entire authentication process of a web site. At the same time, compared with traditional password authentication, webauthn is more secure.
[0086] For details, see Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 The network architecture shown may include a blockchain network 100a, a terminal device cluster 100b, and a resource server 100c. The blockchain network 100a may include one or more blockchain nodes, and the number of blockchain nodes in the blockchain network 100a is not limited here. Figure 1As shown, the multiple blockchain nodes may specifically include blockchain node 110a, blockchain node 110b, blockchain node 110c, ..., blockchain node 110n; in order to ensure information intercommunication within the blockchain network 100a, each blockchain node in the blockchain network 100a may be directly or indirectly connected to the network through wired or wireless communication (for example, a network connection may exist between blockchain node 110a and blockchain node 110b), so that the blockchain nodes may interact with each other through the network connection (for example, block transmission); the blockchain node may be a server connected to the blockchain network 100a, or a terminal device connected to the blockchain network 100a, and the specific form of the blockchain node is not limited here.
[0087] It is understandable that each blockchain node in the blockchain network 100a can receive data to be uploaded to the chain sent by off-chain devices (e.g., resource server 100c and terminal devices in terminal device cluster 100b) when performing normal operations, and generate blocks based on the received data to be uploaded to the chain, and then upload the blocks to the chain. It is understandable that the collection and processing of relevant data in this application (e.g., transaction data, object identifiers, encrypted blockchain private keys and blockchain account addresses) should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the subject of personal information should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the subject of personal information.
[0088] It should be understood that each blockchain node in the blockchain network has a node identifier corresponding to it, and each blockchain node can store the node identifiers of other blockchain nodes that are connected to it, so that data can be exchanged with other blockchain nodes based on the node identifiers of other blockchain nodes. For ease of understanding, please refer to Table 1, which is a node identifier list provided in an embodiment of the present application. The node identifier list can store the node identifier and node name maintained by blockchain node 110a (assuming that the node identifier of blockchain node 110a is DDDDDD). As shown in Table 1:
[0089] Table 1
[0090] Node Name Node ID Blockchain node 110b AAAAAA Blockchain node 110c BBBBBB … … Blockchain Node 110n CCCCCC
[0091] The node identifier may be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node. For example, blockchain node 110a may send information (e.g., a block synchronization request) to blockchain node 110b through node identifier AAAAAA, and blockchain node 110b may determine that the information is sent by blockchain node 110a through node identifier DDDDDD; blockchain node 110b may return information (e.g., block synchronization data) to blockchain node 110a through node identifier DDDDDD, and blockchain node 110a may determine that the information is returned by blockchain node 110b through node identifier AAAAAA.
[0092] The terminal device cluster 100b may specifically include one or more terminal devices, and the number of terminal devices in the terminal device cluster is not limited here. Figure 1 As shown, the multiple terminal devices may specifically include terminal device 120a, terminal device 120b, ..., terminal device 120m; terminal device 120a, terminal device 120b, ..., terminal device 120m may be respectively connected to the resource server 100c directly or indirectly through a wired or wireless communication, so that each terminal device can exchange data with the resource server 100c through a network connection. At the same time, the terminal device cluster 100b and the blockchain network 100a may be directly or indirectly connected to the network through a wired or wireless communication, so that the terminal device and the blockchain node may exchange data through a network connection, for example, a network connection may exist between the terminal device 120b in the terminal device cluster 100b and the blockchain node 110a in the blockchain network 100a. Optionally, the resource server 100c may be connected to the blockchain network 100a through a network connection, so that data can be exchanged through a network connection with the blockchain network 100a.
[0093] Each terminal device in the terminal device cluster 100b may include: a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance (e.g., a smart TV), a wearable device, a vehicle terminal, an aircraft, and other smart terminals with data processing functions. It should be understood that each terminal device in the terminal device cluster 100b may be installed with an application client with data processing functions. When the application client runs in each terminal device, it can be respectively connected to the above-mentioned Figure 1Data is exchanged between the servers 2000 shown. Among them, the application client may specifically include: a car client, a smart home client, an entertainment client (e.g., a game client), a multimedia client (e.g., a video client), a payment client (i.e., a payment application), and an information client (e.g., a news client), a resource client, a decentralized application client (Decentralized Application, DAPP), a browser, etc. Among them, the application client may be a sub-client integrated in a client (e.g., a browser), and the application client may also be an independent client (e.g., a resource client). The embodiment of the present application does not limit the type of the application client.
[0094] Among them, the resource server 100c can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0095] For ease of understanding, the embodiments of the present application can be Figure 1 Select one terminal device from the multiple terminal devices shown as the target terminal device. Figure 1 The terminal device 120b shown is used as the target terminal device. Here, the application client is a resource client and a decentralized application client as an example for explanation. The target terminal device can be installed with a browser and a decentralized application client, and the browser can be integrated with a resource client. At this time, the resource client can be the front end, and the resource server 100c can be the back end corresponding to the front end. The target terminal device can realize data interaction between the resource client and the resource server 100c (for example, the target terminal device can send the encrypted blockchain private key to the resource server 100c through the resource client, and the resource server 100c can return the blockchain account address to the resource client in the target terminal device). The target terminal device can also realize data interaction between the resource client and the decentralized application client, and the resource server 100c can be used to store the encrypted blockchain private key and blockchain account address.
[0096] Among them, the resource client can also be a decentralized application client. For the sake of distinction, the embodiment of the present application takes the resource client as an application client that performs signature processing and the decentralized application client as an application client that applies for signature processing as an example for explanation, that is, the decentralized application client can apply for the resource client to sign.
[0097] The resource client can be used to store the user's account private key on the blockchain (i.e., blockchain private key). The blockchain can identify the user's identity through the blockchain private key, and the user's digital assets are managed through the blockchain private key. The blockchain private key can be used to sign and confirm operations (e.g., digital asset transfers). Signed transactions can be sent directly to blockchain nodes by resource clients or decentralized application clients. Only correct transactions will be executed by the blockchain. Forged signatures will be rejected and prompted as failed. In addition, all accounts on the chain are publicly available for query, so the resource client can also help users record changes in account assets. Common forms of resource client installation include browser extension plug-ins (i.e., browser applications that rely on browsers to run, also understood as browser sub-clients) and APPs (i.e., Applications).
[0098] It should be understood that the resource client can be a hardware device or a software program. The resource client can be used to implement resource management business functions, and based on the resource management business functions, realize the communication connection with the decentralized application client (referred to as decentralized application, decentralized application can be a blockchain application) to realize the user's authorized login and other related operations. Among them, the resource client is a tool for managing and storing user digital assets. For example, digital assets can be transferred to other accounts based on the resource client, and digital assets transferred from other accounts can be received based on the resource client. With the widespread deployment of various decentralized applications on the blockchain, user activities on the blockchain have increased. When using decentralized applications, general users can use blockchain key management tools (i.e. resource clients) to log in.
[0099] like Figure 1 The blockchain nodes 110a, 110b, 110c, ..., and 110n shown may have a one-to-one correspondence with the corresponding roles (i.e., entity objects in the corresponding business scenarios) that need to be accessed in the blockchain network 100a. Among them, the business scenarios applicable to the embodiments of the present application may include but are not limited to qualification verification scenarios, medical scenarios, government affairs scenarios, payment scenarios, etc., and the business scenarios applicable to the embodiments of the present application will not be listed one by one here. At this time, the business under the corresponding business scenario may specifically include the academic qualification verification business under the qualification verification scenario, the insurance claim settlement business under the medical scenario, the property registration business under the government affairs scenario, the digital asset transfer business under the payment scenario, etc., and the specific business under the corresponding business scenario will not be listed one by one here.
[0100] For ease of understanding, the embodiments of the present application may refer to users as operation objects. For example, in the education verification business of the qualification verification scenario, the operation object may be an employee applying for employment, and the transaction data for the operation object may be an electronic education certificate submitted by the operation object, and the blockchain private key associated with the operation object may be used to sign the electronic education certificate submitted by the operation object. For another example, in the insurance claims business of the medical scenario, the operation object may be a patient who needs to make an insurance claim, and the transaction data for the operation object may be an electronic medical record submitted by the operation object, and the blockchain private key associated with the operation object may be used to sign the electronic medical record submitted by the operation object. For another example, in the property registration business of the government scenario, the operation object may be a buyer who is registering property rights, and the transaction data for the operation object may be an electronic real estate certificate submitted by the operation object, and the blockchain private key associated with the operation object may be used to sign the electronic real estate certificate submitted by the operation object. For another example, in the digital asset transfer business in a payment scenario, the operation object may be the transferor that performs the digital asset transfer, the transaction data for the operation object may be the asset transfer value of the digital asset submitted by the operation object, and the blockchain private key associated with the operation object may be used to sign the asset transfer value of the digital asset submitted by the operation object.
[0101] For easier understanding, see Figure 2a and Figure 2b , Figure 2a and Figure 2b Schematic diagram of a scenario for data interaction provided by an embodiment of the present application. Figure 2a and Figure 2b The resource server 20a shown may be the above Figure 1 The resource server 100c in the corresponding embodiment is as follows: Figure 2a and Figure 2b The terminal device 20b shown may be the above Figure 1 The target terminal device in the corresponding embodiment, the user corresponding to the terminal device 20b can operate the object. Among them, the terminal device 20b can be installed with a resource client and a decentralized application client, and the terminal device 20b can generate an authentication public key and an authentication private key associated with the operation object in the resource client.
[0102] like Figure 2aAs shown, the resource server 20a can send a first verification string to the terminal device 20b, so that the terminal device 20b can receive the first verification string sent by the resource server 20a through the resource client, and then generate a blockchain account corresponding to the operation object in the resource client. Among them, the blockchain account can include a blockchain private key and a blockchain public key associated with the operation object; in other words, the terminal device 20b can generate a blockchain private key and a blockchain public key associated with the operation object in the resource client when receiving the first verification string sent by the resource server 20a.
[0103] like Figure 2a As shown, the terminal device 20b can sign the first verification string through the blockchain private key to obtain the first string signature information; the terminal device 20b can encrypt the blockchain private key through the authentication public key to obtain the encrypted blockchain private key. Further, the terminal device 20b can send the encrypted blockchain private key, the first string signature information and the blockchain public key to the resource server 20a through the resource client, so that the resource server 20a can receive the encrypted blockchain private key, the first string signature information and the blockchain public key sent by the terminal device 20a through the resource client.
[0104] like Figure 2a As shown, the resource server 20a can verify the signature information of the first string through the blockchain public key to obtain the first verification result. Among them, the first verification result can indicate that the verification is successful or the verification fails. Further, if the first verification result indicates that the verification is successful, the resource server 20a can generate a blockchain account address corresponding to the blockchain public key, and then store the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object; optionally, if the first verification result indicates that the verification fails, the resource server 20a may not need to generate the blockchain account address corresponding to the blockchain public key, and does not need to store the encrypted blockchain private key and the object identifier of the operation object. Among them, the object identifier can be used to uniquely identify the operation object (that is, the object identifier is unique in the resource client). For example, the object identifier can be the account name of the operation object; for another example, the object identifier can be the email address entered by the operation object.
[0105] It is understood that the resource server 20a can associate and store the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object in the business database 21a. The business database 21a may include multiple databases, and the multiple databases may specifically include Figure 2aThe databases 21b, ..., and 21c shown, for example, databases 21b, ..., and 21c can be used to store different types of data, database 21b can be used to store encrypted blockchain private keys, and database 21c can be used to store blockchain account addresses. Among them, the business database 21a can be set up separately, or integrated on the resource server 20a, or integrated on other devices or clouds, which is not limited here.
[0106] like Figure 2b As shown, after generating the blockchain account address, the resource server 20a may send the generated blockchain account address (e.g., blockchain account address 22b) to the terminal device 20b, so that the terminal device 20b may display the blockchain account address list in the resource client. The blockchain account address list may include one or more blockchain account addresses associated with the operation object, and the one or more blockchain account addresses may specifically include blockchain account address 22a, ..., blockchain account address 22b.
[0107] like Figure 2b As shown, when the operation object needs to use the encrypted blockchain private key, the decentralized application client in the terminal device 20b can apply to the resource client for signature on the chain. At this time, the decentralized application client can send transaction data for the operation object to the resource client. Further, the operation object can perform a selection operation on the blockchain account address list. In this way, the terminal device 20b can respond to the selection operation performed by the operation object on the blockchain account address list and obtain the blockchain account address selected by the operation object in the blockchain account address list (for example, blockchain account address 22b).
[0108] like Figure 2b As shown, the terminal device 20b can obtain the encrypted blockchain private key corresponding to the blockchain account address 22b from the resource server 20a through the resource client, and decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key. Among them, the encrypted blockchain private key sent by the resource server 20a to the resource client in the terminal device 20b is obtained by the resource server 20a from the business database 21a (for example, the database 21b in the business database 21a). In addition, the terminal device 20b can store the authentication private key in the resource client (that is, obtain the authentication private key from the resource client), or store the authentication private key in the terminal device 20b (that is, obtain the authentication private key from the terminal device 20b), or store the authentication private key in the cloud (that is, obtain the authentication private key from the cloud), and this application does not limit this.
[0109] like Figure 2bAs shown, the terminal device 20b can sign the transaction data through the resource client to obtain the signed transaction data. Further, the terminal device 20b can process the signed transaction data on the blockchain, that is, write the signed transaction data into the blockchain network (for example, the above Figure 1 The blockchain ledger of the blockchain network 100a) in the corresponding embodiment.
[0110] For example, here we take the digital asset transfer business in the payment scenario as an example. The operation object can perform asset transfer processing on the digital assets on the blockchain account address 22b in the decentralized application client of the terminal device 20b, for example, transfer digital assets to the blockchain account address P. Therefore, the terminal device 20b will generate transaction data including the blockchain account address 22b as the asset transfer-out address, the blockchain account address P as the asset transfer-in address and the asset transfer value. If the transaction data needs to be executed, the transaction data needs to be signed by the blockchain private key corresponding to the blockchain account address 22b. Therefore, the operation object can select the blockchain account address 22b in the resource client to obtain the blockchain private key corresponding to the blockchain account address 22b.
[0111] It can be seen from this that the embodiment of the present application can encrypt the blockchain private key corresponding to the operation object through the authentication public key generated in the resource client, and then send the encrypted blockchain private key to the resource server, so that the resource server stores the encrypted blockchain private key, thereby eliminating the need to store the blockchain private key directly in the resource server, and preventing the blockchain private key from being leaked, thereby improving the security of the blockchain private key.
[0112] For further information, see Figure 3 , Figure 3 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a resource server, or by a terminal device, or by both a resource server and a terminal device. The resource server can be the above Figure 2a and Figure 2b The resource server 20a in the corresponding embodiment, the terminal device can be the above Figure 2a and Figure 2b The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S301-S304:
[0113] Step S301, upon receiving the first verification string sent by the resource server, generating a blockchain account corresponding to the operation object in the resource client;
[0114] Among them, the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object. The blockchain private key and the blockchain public key are a key pair. The embodiment of the present application does not limit the number of blockchain accounts corresponding to the operation object in the resource client.
[0115] It should be understood that the terminal device can respond to the trigger operation of the account creation control in the resource client and send a hosting request to the resource server. The hosting request is used to instruct the resource server to generate a first verification string corresponding to the object identifier of the operation object (i.e., a random string Nonce (Number once), where Nonce can be an arbitrary or non-repeating random value used once). Further, the terminal device can receive the first verification string returned by the resource server.
[0116] Step S302, signing the first verification string using the blockchain private key to obtain first string signature information;
[0117] Specifically, the terminal device may perform hash processing on the first verification string to obtain first summary information corresponding to the first verification string. Further, the terminal device may perform encryption processing on the first summary information using the blockchain private key to obtain first string signature information. Therefore, the signature processing may include hash processing and encryption processing.
[0118] Among them, the terminal device can hash the first verification string through a hash algorithm. The embodiment of the present application does not limit the hash algorithm used for hash calculation. For example, the hash algorithm can be an MD5 message digest algorithm (MD5Message-Digest Algorithm).
[0119] Step S303, encrypting the blockchain private key by using the authentication public key associated with the operation object to obtain the encrypted blockchain private key;
[0120] Among them, the authentication public key and authentication private key associated with the operation object are generated in the resource client, the authentication public key and authentication private key are a key pair, and the number of authentication public key and authentication private key in the terminal device is one.
[0121] Step S304: Send the encrypted blockchain private key, the first character string signature information, and the blockchain public key to the resource server.
[0122] Among them, the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result. The resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client, and the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
[0123] Among them, the resource server is used to generate a blockchain account address corresponding to the blockchain public key when the first signature verification result indicates that the signature verification is successful, and then store the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object in an associated manner; at the same time, the resource server is used to send the stored blockchain account address to the resource client.
[0124] The blockchain account address is generated based on the blockchain public key. The embodiment of the present application does not limit the specific process of generating the blockchain account address based on the blockchain public key. For example, the embodiment of the present application can determine the blockchain public key as the blockchain account address. The blockchain account address can be used for on-chain identity identification on the blockchain network.
[0125] The specific process of the resource server verifying the signature of the first character string through the blockchain public key can be found in the following Figure 4 The description of step S403 in the corresponding embodiment.
[0126] It can be seen that the embodiment of the present application can generate an authentication public key and an authentication private key associated with the operation object in the resource client, encrypt the blockchain private key in the blockchain account corresponding to the operation object through the authentication public key, obtain the encrypted blockchain private key, and then send the encrypted blockchain private key to the resource server so that the resource server stores the encrypted blockchain private key. In this way, if the resource server is stolen by a hacker's network, the encrypted blockchain private key stored on the resource server will be leaked. However, since the hacker cannot obtain the authentication private key, the hacker cannot decrypt the leaked encrypted blockchain private key. Therefore, the present application will not cause the leakage of the blockchain private key, thereby improving the security of the blockchain private key.
[0127] For further information, see Figure 4 , Figure 4 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a resource server, or by a terminal device, or by both a resource server and a terminal device. The resource server can be the above Figure 2a and Figure 2b The resource server 20a in the corresponding embodiment, the terminal device can be the above Figure 2a and Figure 2b The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the resource server as an example for explanation. Among them, the data processing method may include the following steps S401-S404:
[0128] Step S401, sending a first verification string to a resource client;
[0129] Specifically, the resource server may receive a hosting request sent by the terminal device through the resource client, and generate a first verification string corresponding to the object identifier of the operation object based on the hosting request. The hosting request is sent by the terminal device in response to a trigger operation for an account creation control in the resource client. Further, the resource server may send the first verification string to the resource client.
[0130] Among them, the first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object. The blockchain account includes a blockchain private key and a blockchain public key associated with the operation object. The blockchain private key and the blockchain public key are a key pair.
[0131] Step S402, receiving the encrypted blockchain private key, the first character string signature information and the blockchain public key sent by the resource client;
[0132] The first string signature information is obtained by the resource client signing the first verification string using the blockchain private key. The specific process of signing the first verification string using the blockchain private key can be found in the above Figure 3 The description of step S302 in the corresponding embodiment will not be repeated here.
[0133] The encrypted blockchain private key is obtained by encrypting the blockchain private key by the resource client through the authentication public key associated with the operation object. The authentication public key and authentication private key associated with the operation object are generated in the resource client, and the authentication public key and authentication private key are a key pair.
[0134] It should be understood that the resource server can obtain the string generation timestamp corresponding to the first verification string, and determine the string expiration timestamp corresponding to the first verification string (for example, time T2, which can be 16:06:00 on June 19, 2023) according to the string generation timestamp (for example, time T1, which can be 16:05:00 on June 19, 2023) and the string validity period (for example, 1 minute). Among them, the embodiment of the present application does not limit the specific duration of the string validity period.
[0135] Furthermore, if the first string signature information sent by the resource client is received before the string expiration timestamp, the resource server can perform the following step S403 to verify the first string signature information through the blockchain public key; optionally, if the first string signature information sent by the resource client is received after the string expiration timestamp, the resource server can return an error prompt message to the resource client. For example, the error prompt message can be "operation timeout", and the error prompt message is not limited here. In other words, the first verification string is time-limited. If the terminal device does not submit the first string signature information for a long time, the resource server can invalidate the first verification string.
[0136] Step S403, verifying the signature information of the first character string by using the blockchain public key to obtain a first verification result. If the first verification result indicates that the verification is successful, the encrypted blockchain private key is stored;
[0137] Specifically, the resource server can decrypt the first string signature information through the blockchain private key to obtain the first summary information corresponding to the first verification string. Further, the resource server can hash the first verification string to obtain the second summary information corresponding to the first verification string. Further, if the first summary information and the second summary information are the same, the resource server can generate a first verification result indicating that the signature verification is successful; optionally, if the first summary information and the second summary information are different, the resource server can generate a first verification result indicating that the signature verification failed. Further, if the first signature verification result indicates that the signature verification is successful, the resource server can store the encrypted blockchain private key; optionally, if the first signature verification result indicates that the signature verification fails, there is no need to store the encrypted blockchain private key.
[0138] It can be understood that if the first signature verification result indicates that the signature verification is successful, the resource server can generate a blockchain account address corresponding to the blockchain public key, and store the blockchain account address, the encrypted blockchain private key, and the object identifier of the operation object in an associated manner. The associated storage means that the blockchain account address and the encrypted blockchain private key can be obtained through the object identifier, the encrypted blockchain private key and the object identifier can be obtained through the blockchain account address, and the blockchain account address and the object identifier can be obtained through the encrypted blockchain private key. Further, the resource server can send the stored blockchain account address to the resource client.
[0139] Step S404: Send the stored encrypted blockchain private key to the resource client.
[0140] Among them, the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data of the operation object.
[0141] When receiving a key acquisition request sent by the terminal device through the resource client, the resource server may send the stored encrypted blockchain private key to the resource client in the terminal device. The key acquisition request is sent by the terminal device in response to a selection operation on a list of blockchain account addresses (in other words, the key acquisition request is sent by the terminal device when it needs to sign transaction data), and the encrypted blockchain private key sent by the resource server to the resource client may be the encrypted blockchain private key corresponding to the blockchain account address selected by the selection operation. Different blockchain account addresses may correspond to different encrypted blockchain private keys.
[0142] It can be seen that the embodiment of the present application can receive the encrypted blockchain private key, the first string signature information and the blockchain public key sent by the terminal device, and perform signature verification on the first string signature information through the blockchain public key, so that when the first signature verification result indicates that the signature verification is successful, it is determined that the verification operation object has the encrypted blockchain private key corresponding to the blockchain public key, and then the encrypted blockchain private key is stored. In this way, if the resource server is stolen by a hacker's network, the encrypted blockchain private key stored on the resource server will be leaked. However, since the hacker cannot obtain the authentication private key, the hacker cannot decrypt the leaked encrypted blockchain private key. Therefore, the present application will not cause the leakage of the blockchain private key, thereby improving the security of the blockchain private key.
[0143] For easier understanding, see Figure 5 , Figure 5This is a schematic diagram of a process for generating a blockchain account provided by an embodiment of the present application. Figure 5 Steps S11 to S18 shown may be a flow chart of a terminal device and a resource server jointly generating a blockchain account.
[0144] like Figure 5 As shown, the terminal device can execute step S11 through the resource client, and submit the blockchain encrypted private key background hosting request through step S11, that is, send the hosting request to the resource server. Among them, the hosting request is used to request the resource server to host the encrypted private key (that is, the encrypted blockchain private key). In this way, the resource server can execute step S12, generate a first verification string through step S12, and return the first verification string to the front end, that is, send the first verification string to the resource client.
[0145] like Figure 5 As shown, the terminal device can execute step S13 through the resource client, generate blockchain public and private keys (i.e., blockchain public key and blockchain private key) through step S13, and then execute steps S14 and S15 through the resource client. Among them, step S14 can be used to sign the first verification string using the blockchain private key, that is, to sign the first verification string using the blockchain private key; step S15 can be used to encrypt the blockchain private key using the authentication public key, that is, to encrypt the blockchain private key using the authentication public key.
[0146] like Figure 5 As shown, the terminal device can execute step S16 through the resource client, submit the first verification string signature (i.e., the first string signature information), the blockchain public key, and the encrypted blockchain private key (i.e., the encrypted blockchain private key) through step S16, that is, send the encrypted blockchain private key, the first string signature information, and the blockchain public key to the resource server. In this way, the resource server can execute step S17, and step S17 can be used to verify the first verification string signature using the blockchain public key, that is, to verify the first string signature information through the blockchain public key.
[0147] like Figure 5 As shown, the resource server can execute step S18, and store the encrypted blockchain private key (i.e., the encrypted blockchain private key), address account (blockchain account address) and account name (i.e., object identifier) through step S18, that is, the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object are associated and stored.
[0148] For further information, see Figure 6 , Figure 6This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a resource server, or by a terminal device, or by both a resource server and a terminal device. The resource server can be the above Figure 2a and Figure 2b The resource server 20a in the corresponding embodiment, the terminal device can be the above Figure 2a and Figure 2b The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S501-S504:
[0149] Step S501, responding to an input operation on a resource client, sending text data input by the input operation to a resource server;
[0150] It is understandable that if the text data does not exist in the account name set, the resource server is used to determine the text data as the object identifier of the operation object, and generate a second verification string (i.e., random string Nonce) corresponding to the object identifier; at the same time, the resource server is used to store the object identifier in the account name set, and return the second verification string and the registration identifier to the resource client in the terminal device. The registration identifier here is generated by the resource server when it is determined that the text data does not exist in the account name set. Optionally, if the text data exists in the account name set, the resource server is used to return a registration failure prompt message to the resource client. For example, the registration failure prompt message can be "The name is repeated, please re-enter the name", and the registration failure prompt message is not limited here.
[0151] Optionally, if the operation object has no operation on the resource client for a long time, the resource server can delete the object identifier in the account name set, that is, release the object identifier corresponding to the operation object. In this way, other objects or operation objects other than the operation object can register the resource client again through the object identifier.
[0152] Step S502, receiving the second verification string and the registration identifier returned by the resource server, and generating an authentication public key and an authentication private key associated with the operation object in the resource client based on the registration identifier;
[0153] Among them, the authentication public key and the authentication private key are generated by the resource client calling the authentication interface associated with the resource client (i.e., Webauthn interface), and the authentication interface can be an interface integrated in the browser (i.e., browser interface), and the resource client in the embodiment of the present application can be a sub-client integrated in the browser. At this time, there is no need to install the resource client in the terminal device, and the resource client can be accessed in the browser through the browser domain name.
[0154] Among them, the authentication public key and the authentication private key can belong to a webauthn account. A webauthn account can create one or more blockchain accounts. One or more blockchain accounts can correspond to a blockchain account address in the blockchain account address list. The blockchain private keys corresponding to one or more blockchain account addresses can be encrypted by the same authentication public key.
[0155] Optionally, when the resource server determines that there is no text data in the account name set, there is no need to generate a registration identifier, and further there is no need to return the registration identifier to the resource client in the terminal device. In this case, the terminal device can generate an authentication public key and an authentication private key associated with the operation object in the resource client when receiving the second verification string returned by the resource server.
[0156] For easier understanding, see Figure 7 , Figure 7 Schematic diagram of a scenario for generating a public authentication key and a private authentication key provided by an embodiment of the present application. Figure 7 As shown, after the terminal device generates the authentication public key (i.e., webauthn public key) and authentication private key (i.e., webauthn private key) associated with the operation object in the resource client, a successful registration prompt message can be displayed in the resource client. The successful registration prompt message can indicate that the operation object has successfully registered the resource client, or it can indicate that the operation object has successfully registered the webauthn account. For example, the successful registration prompt message can be "Do you want to store the pass key "KKKKKK", the communication key can be used to log in on all your devices", and the successful registration prompt message is not limited here.
[0157] Among them, "KKKKKK" can be the object identifier of the operation object, and the pass key can be the authentication public key and authentication private key associated with the operation object. Figure 7 As shown, the terminal device can display a storage control (e.g., a "Continue" control), and the operation object can perform a trigger operation on the storage control, so that the terminal device can respond to the trigger operation performed by the operation object on the storage control and store the authentication public key and the authentication private key. The authentication public key and the authentication private key can be stored in the terminal device or in the cloud, which is not limited here.
[0158] Step S503, signing the second verification string with the authentication private key to obtain second string signature information;
[0159] Specifically, the terminal device can perform hash processing on the second verification string to obtain third summary information corresponding to the second verification string. Further, the terminal device can encrypt the third summary information using the authentication private key to obtain the second string signature information. Therefore, the signature processing can include hash processing and encryption processing.
[0160] The specific process of the terminal device performing hash processing on the second verification string can be found in the above Figure 3 The description of hash processing of the first verification string in step S302 of the corresponding embodiment will not be repeated here.
[0161] Step S504: Send the object identifier, the second character string signature information and the authentication public key to the resource server.
[0162] The authentication public key is used to instruct the resource server to perform a signature verification process on the second character string signature information to obtain a second signature verification result. Further, the resource server is used to associate and store the object identifier and the authentication public key when the second signature verification result indicates that the signature verification is successful; optionally, the resource server is used to store the object identifier and the authentication public key without associating and storing the object identifier and the authentication public key when the second signature verification result indicates that the signature verification fails.
[0163] Similarly, the second verification string has a time limit. If the terminal device does not submit the second string signature information for a long time, the resource server can invalidate the second verification string. The specific process of the resource server judging the string expiration timestamp corresponding to the second verification string can be referred to above. Figure 4 The description of determining the string expiration timestamp corresponding to the first verification string in step S402 of the corresponding embodiment will not be repeated here.
[0164] The specific process of the resource server verifying the signature of the second character string through the authentication public key can be found in the above Figure 4 The description of verifying the signature information of the first character string by using the blockchain public key in the corresponding embodiment will not be repeated here.
[0165] It can be seen that the embodiment of the present application can generate an authentication public key and an authentication private key associated with the operation object in the resource client, and then send the object identification of the operation object and the authentication public key to the resource server, so that the resource server associates and stores the authentication public key and the object identification, thereby realizing the registration of the resource client through the object identification of the operation object. It can be understood that the authentication public key stored by the resource server can be used for the login of the operation object for verification, thereby improving the security of logging into the resource client through the object identification. In addition, the method of registering in the resource client through the authentication interface does not need to use the object password of the operation object, and protects the object identification of the operation object without relying on a third-party account, thereby protecting the privacy of the operation object.
[0166] For easier understanding, see Figure 8 , Figure 8 This is a flowchart of registering a blockchain resource account provided in an embodiment of the present application. Figure 8 Steps S21 to S28 shown may be a flow chart of jointly registering a blockchain resource account by a terminal device and a resource server.
[0167] like Figure 8 As shown, the terminal device can execute step S21 through the resource client, register the account name through step S21, that is, register the resource client through the object identifier. At this time, the operation object can enter text data in the resource client, and the terminal device can respond to the input operation of the operation object on the resource client, and send the text data entered by the input operation to the resource server. Further, the resource server can execute step S22, query whether the account name has been registered through step S22, that is, determine whether there is text data in the account name set. Among them, if there is text data in the account name set, it means that the account name has been registered; if there is no text data in the account name set, it means that the account name has not been registered.
[0168] like Figure 8 As shown, if there is no text data in the account name set, the resource server can generate a second verification string, and then execute step S23, and return the registration permission mark (i.e., registration mark) and the second verification string to the resource client in the terminal device through step S23. In this way, the resource client in the terminal device can execute step S24, and call the authentication interface through step S24 to generate authentication public and private keys (i.e., authentication public key and authentication private key). Further, the resource client in the terminal device can execute step S25, and step S25 can be used to sign the second verification string using the authentication private key, that is, to sign the second verification string through the authentication private key.
[0169] like Figure 8As shown, the terminal device can execute step S26 through the resource client, submit the account name (i.e., object identifier), the second verification string signature (i.e., second string signature information) and the authentication public key through step S26, that is, send the object identifier, the second string signature information and the authentication public key to the resource server. In this way, the resource server can execute step S27, and step S27 can be used to verify the second verification string signature using the authentication public key, that is, to verify the second string signature information through the authentication public key. Further, the resource server can execute step S28, and step S28 can be used to associate the account name and the authentication public key after the verification is successful, that is, to associate and store the object identifier and the authentication public key. Among them, the authentication public key can be used to log in to the resource client through the object identifier in the subsequent process.
[0170] For further information, see Fig. 9 , Fig. 9 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a resource server, or by a terminal device, or by both a resource server and a terminal device. The resource server can be the above Figure 2a and Figure 2b The resource server 20a in the corresponding embodiment, the terminal device can be the above Figure 2a and Figure 2b The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S601-S603:
[0171] Step S601, when the login state of the operation object is an invalid state, responding to the login operation of the resource client, sending the object identifier input in the login operation to the resource server;
[0172] Among them, the operation object can perform a login operation on the resource client. The login operation here can indicate that the operation object enters an object identifier in the resource client, and then performs a trigger operation on the login control in the resource client. In this way, the terminal device can obtain the object identifier entered by the operation object in the resource client, and determine the object identifier entered by the operation object in the resource client as the object identifier entered for the login operation.
[0173] Among them, if the object identifier exists in the account name set, the resource server is used to generate a third verification string (i.e., a random string Nonce) corresponding to the object identifier; optionally, if the object identifier exists in the account name set, the resource server is used to generate a login failure prompt message for the operation object, and return the login failure prompt message to the resource client. For example, the login failure prompt message can be "Wrong name, please re-enter the name", and the login failure prompt message is not limited here.
[0174] It can be understood that the invalid state refers to the login state when the current operation timestamp of the operation object for the resource client is later than the invalid timestamp of the operation object for the resource client; in other words, the resource client can retain the login state of the operation object for a period of time (i.e., the effective time period). If the operation object does not perform any operation on the resource client during the effective time period, the login state of the operation object for the resource client will become invalid. Among them, the invalid timestamp (for example, time T3, time T3 can be 16:06:00 on June 19, 2023) is determined by the effective time period (for example, 1 day) and the historical timestamp (for example, time T4, time T4 can be 16:06:00 on June 18, 2023), and the historical timestamp can be the timestamp of the last operation of the resource client by the operation object; the embodiment of the present application does not limit the specific duration of the effective time period.
[0175] Optionally, the invalid state may also refer to a login state when the operation object is in a logout state with respect to the resource client; in other words, if the operation object logs out of the resource client, the login state of the operation object is an invalid state.
[0176] Step S602, receiving a third verification string returned by the resource server, and signing the third verification string using the authentication private key to obtain signature information of the third string;
[0177] Specifically, the terminal device may receive the third verification string returned by the resource server, perform hash processing on the third verification string, and obtain fourth summary information corresponding to the third verification string. Further, the terminal device may encrypt the fourth summary information using the authentication private key to obtain signature information of the third string. Therefore, the signature processing may include hash processing and encryption processing.
[0178] The specific process of the terminal device performing hash processing on the third verification string can be found in the above Figure 3 The description of hash processing of the first verification string in step S302 of the corresponding embodiment will not be repeated here.
[0179] Step S603: Send the object identifier and the third character string signature information to the resource server.
[0180] The resource server is used to obtain the authentication public key corresponding to the stored object identifier, and the authentication public key is used to instruct the resource server to perform a signature verification process on the third string signature information to obtain a third signature verification result. Further, the resource server is used to send the blockchain account address list corresponding to the operation object to the resource client when the third signature verification result indicates that the signature verification is successful; optionally, the resource server is used to send the blockchain account address list corresponding to the operation object to the resource client when the third signature verification result indicates that the signature verification fails.
[0181] The blockchain account address list may include one or more blockchain account addresses, and the one or more blockchain account addresses in the blockchain account address list may represent the blockchain account addresses corresponding to the blockchain accounts historically generated by the operation object in the resource client. For example, the one or more blockchain account addresses in the blockchain account address list may include the above Figure 3 The blockchain account address corresponding to the blockchain account generated in the corresponding embodiment.
[0182] Similarly, the third verification string has a time limit. If the terminal device does not submit the third string signature information for a long time, the resource server can invalidate the third verification string. The specific process of the resource server judging the string expiration timestamp corresponding to the third verification string can be referred to above. Figure 4 The description of determining the string expiration timestamp corresponding to the first verification string in step S402 of the corresponding embodiment will not be repeated here.
[0183] The specific process of the resource server verifying the signature of the third character string through the authentication public key can be found in the above Figure 4 The description of verifying the signature information of the first character string by using the blockchain public key in the corresponding embodiment will not be repeated here.
[0184] It can be seen that the operation object in the embodiment of the present application can input the object identification in the resource client, and the terminal device can send the object identification input by the operation object to the resource server. In this way, the resource server can verify the login of the operation object through the stored authentication public key, and then realize the login of the resource client through the object identification of the operation object, thereby improving the security of logging into the resource client through the object identification. In addition, the method of logging in to the resource client through the authentication interface does not need to use the object password of the operation object, and protects the object identification of the operation object without relying on a third-party account, thereby protecting the privacy of the operation object.
[0185] For easier understanding, see Fig.10 , Fig.10 This is a flowchart of a method for logging into a blockchain resource account provided by an embodiment of the present application. Fig.10 Steps S31 to S37 shown may be a flow chart of a terminal device and a resource server jointly logging into a blockchain resource account.
[0186] like Fig.10 As shown, the terminal device can execute step S31 through the resource client, and input the account name to apply for login through step S31, that is, the operation object can perform the login operation on the resource client. In this way, the resource server can execute step S32, and query whether the name has been registered through step S32, that is, determine whether there is an object identifier in the account name set. Among them, if the object identifier exists in the account name set, it is determined that the name has been registered; if the object identifier does not exist in the account name set, it is determined that the name has not been registered.
[0187] like Fig.10 As shown, if the object identifier exists in the account name set, the resource server can generate a third verification string, and then execute step S33, and return the third verification string to the resource client in the terminal device through step S33. Further, the terminal device can execute step S34 through the resource client, and call the authentication interface through step S34, and the browser signs the third verification string with the authentication private key, that is, the third verification string is signed by the authentication private key.
[0188] like Fig.10 As shown, the terminal device can execute step S35 through the resource client, and submit the account name (i.e., object identifier) and the third verification string signature (i.e., third string signature information) through step S35 to log in, that is, send the object identifier and the third string signature information to the resource server. In this way, the resource server can execute step S36, and step S36 can be used to verify the third verification string signature using the authentication public key, that is, to verify the third string signature information through the authentication public key. Further, the resource server can execute step S37, and step S37 can be used to return the blockchain address (i.e., blockchain account address) and the encrypted blockchain private key (i.e., the encrypted blockchain private key) after successful verification.
[0189] For further information, see Fig.11 , Fig.11 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a resource server, or by a terminal device, or by both a resource server and a terminal device. The resource server can be the above Figure 2a and Figure 2bThe resource server 20a in the corresponding embodiment, the terminal device can be the above Figure 2a and Figure 2b The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S701-S705:
[0190] Step S701, receiving transaction data sent by the decentralized application client through the resource client, and displaying a list of blockchain account addresses corresponding to the operation object in the resource client;
[0191] The blockchain account address list may include the blockchain account address, where the blockchain account address may be the above Figure 3 The blockchain account address corresponding to the blockchain account generated in the corresponding embodiment.
[0192] The present embodiment of the application does not limit the number of blockchain account addresses in the blockchain account address list. Figure 3 In the corresponding embodiment of step S301-step S304, the blockchain account address list does not include the above Figure 3 The blockchain account address corresponding to the blockchain account generated in the corresponding embodiment; for ease of understanding, the embodiment of the present application is explained by taking the blockchain account address list as not empty as an example.
[0193] Step S702, in response to a selection operation on the blockchain account address list, obtaining the blockchain account address selected by the selection operation;
[0194] For example, the blockchain account address selected by the selection operation can be the above Figure 3 The blockchain account address corresponding to the blockchain account generated in the corresponding embodiment.
[0195] Step S703, obtaining the encrypted blockchain private key corresponding to the blockchain account address from the resource server, and decrypting the encrypted blockchain private key by using the authentication private key to obtain the blockchain private key;
[0196] Specifically, the terminal device can send an encrypted private key acquisition request to the resource server based on the blockchain account address (i.e., the blockchain account address selected by the selection operation). Among them, since the blockchain account address and the encrypted blockchain private key are stored in association, the blockchain account address can be used to instruct the resource server to obtain the encrypted blockchain private key corresponding to the blockchain account address. Furthermore, the terminal device can receive the encrypted blockchain private key returned by the resource server through the resource client, and decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key.
[0197] Step S704: Sign the transaction data using the blockchain private key to obtain the signed transaction data.
[0198] Specifically, the terminal device can perform hash processing on the transaction data to obtain the transaction summary information corresponding to the transaction data. Furthermore, the terminal device can encrypt the transaction summary information through the blockchain private key to obtain the transaction data after signature processing. Therefore, the signature processing can include hash processing and encryption processing.
[0199] The specific process of the terminal device performing hash processing on the transaction data can be found in the above Figure 3 The description of hash processing of the first verification string in step S302 of the corresponding embodiment will not be repeated here.
[0200] Step S705: Send the signed transaction data to the blockchain node in the blockchain network so that the blockchain node can process the signed transaction data on the chain.
[0201] Among them, the blockchain network can be Figure 1 In the corresponding embodiment of the blockchain network 100a, the blockchain nodes may be the above Figure 1 The blockchain node in the blockchain network 100a in the corresponding embodiment (for example, blockchain node 110a). At this time, the blockchain node can return to the resource client a chain result indicating that the chain is successfully uploaded (that is, the chain result indicates that the transaction data after the signature processing is successfully uploaded to the blockchain network) or a chain result indicating that the chain fails (that is, the transaction data after the signature processing is not successfully uploaded to the blockchain network). For example, when the chain data (that is, the transaction data after the signature processing) is not standard or the data is too large, the chain data will fail to be uploaded.
[0202] Therefore, if the transaction data after signature processing is successfully uploaded to the blockchain network, the terminal device can receive the upload result returned by the blockchain node through the resource client to indicate the successful upload, and return the upload result to the decentralized application client. Optionally, if the transaction data after signature processing is not successfully uploaded to the blockchain network, the terminal device can receive the upload result returned by the blockchain node through the resource client to indicate the failure of the upload, and return the upload result to the decentralized application client.
[0203] Optionally, the terminal device can return the signed transaction data to the decentralized application client through the resource client, and send the signed transaction data to the blockchain node in the blockchain network through the decentralized application client, so that the blockchain node can process the signed transaction data on the blockchain. Further, if the signed transaction data is successfully uploaded to the blockchain network, the terminal device can receive the on-chain result returned by the blockchain node through the decentralized application client to indicate the successful on-chain; optionally, if the signed transaction data is not successfully uploaded to the blockchain network, the terminal device can receive the on-chain result returned by the blockchain node through the decentralized application client to indicate the failure of on-chain.
[0204] It can be seen that the embodiment of the present application can send transaction data for the operation object to the resource client through the decentralized application client, and then through the data interaction between the resource client and the resource server, the signature processing of the transaction data is realized to obtain the transaction data after the signature processing. Among them, the resource client can obtain the blockchain private key after the encryption processing from the resource server, thereby obtaining the blockchain private key and improving the security of the blockchain private key. It can be understood that the transaction data after the signature processing can be linked to the blockchain network, so as to realize the storage of the transaction data after the signature processing through the blockchain network, and improve the security of the transaction data after the signature processing.
[0205] For easier understanding, see Fig.12 , Fig.12 This is a flow chart of a transaction signature process provided by an embodiment of the present application. Fig.12 Steps S41 to S48 are schematic diagrams of a process of a terminal device and a resource server jointly performing a transaction signature, wherein the terminal device may include a decentralized application client and a resource client.
[0206] like Fig.12As shown, the terminal device can execute step S41 through the decentralized application client, and apply for signature on the chain through step S41, that is, the decentralized application client sends the transaction data (that is, the message to be signed) to the resource client. In this way, the terminal device can execute step S42 through the resource client, and select the blockchain address through step S42 (that is, the operation object can select a blockchain account address in the blockchain address list for signing), that is, obtain the blockchain account address selected by the selection operation.
[0207] like Fig.12 As shown, the terminal device can execute step S43 through the resource client, and request the encrypted blockchain private key (i.e., the encrypted blockchain private key) corresponding to the blockchain address from the resource server through step S43, that is, send an encrypted private key acquisition request to the resource server. In this way, the resource server can execute step S44, and return the encrypted blockchain private key to the resource client through step S44, that is, return the encrypted blockchain private key to the resource client. At this time, the operation object has a login state in the resource client, so the resource server can know that the operation object has a blockchain account address.
[0208] like Fig.12 As shown, the terminal device can execute step S45 through the resource client, call the authentication interface through step S45, and use the authentication private key to decrypt the encrypted blockchain private key, that is, decrypt the encrypted blockchain private key through the authentication private key. Further, the terminal device can execute step S46 through the resource client, and step S46 can be used to sign the on-chain data using the blockchain private key, that is, to sign the transaction data through the blockchain private key.
[0209] like Fig.12 As shown, the terminal device can execute step S47 through the resource client, and carry out the transaction on-chain through step S47, that is, send the transaction data after signature processing to the blockchain node in the blockchain network, so that the blockchain node can carry out on-chain processing on the transaction data after signature processing. At this time, the blockchain node can return the on-chain result to the resource client, so that the terminal device can execute step S48 through the resource client, and return the on-chain result to the decentralized application client through step S48.
[0210] For further information, see Fig.13 , Fig.13It is a structural diagram of a data processing device provided by an embodiment of the present application. The data processing device 1 may include: an account generation module 101, a first signature module 102, an encryption processing module 103, and a first sending module 104; further, the data processing device 1 may also include: a first receiving module 105, a client input module 106, a second receiving module 107, a second signature module 108, a second sending module 109, a client login module 110, a third receiving module 111, a third sending module 112, a list display module 113, an address selection module 114, a decryption processing module 115, a transaction signature module 116, an on-chain processing module 117, and a result return module 118;
[0211] The account generation module 101 is used to generate a blockchain account corresponding to the operation object in the resource client when receiving the first verification string sent by the resource server; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0212] A first signature module 102 is used to sign the first verification string using the blockchain private key to obtain first string signature information;
[0213] An encryption processing module 103 is used to encrypt the blockchain private key by using the authentication public key associated with the operation object to obtain the encrypted blockchain private key; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0214] The first sending module 104 is used to send the encrypted blockchain private key, the first character string signature information and the blockchain public key to the resource server; the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
[0215] Optionally, the first receiving module 105 is used to respond to the triggering operation of the account creation control in the resource client and send a hosting request to the resource server; the hosting request is used to instruct the resource server to generate a first verification string corresponding to the object identifier of the operation object;
[0216] The first receiving module 105 is configured to receive a first verification string returned by the resource server.
[0217] Optionally, the client input module 106 is used to respond to the input operation on the resource client and send the text data input by the input operation to the resource server; if the text data does not exist in the account name set, the resource server is used to determine the text data as the object identifier of the operation object and generate a second verification string corresponding to the object identifier; the resource server is used to store the object identifier in the account name set;
[0218] The second receiving module 107 is used to receive the second verification string and the registration identifier returned by the resource server, and generate an authentication public key and an authentication private key associated with the operation object in the resource client based on the registration identifier; the authentication public key and the authentication private key are generated by the resource client calling the authentication interface associated with the resource client;
[0219] The second signature module 108 is used to sign the second verification string by using the authentication private key to obtain the second string signature information;
[0220] The second sending module 109 is used to send the object identifier, the second string signature information and the authentication public key to the resource server; the authentication public key is used to instruct the resource server to verify the second string signature information to obtain a second verification result; the resource server is used to associate and store the object identifier and the authentication public key when the second verification result indicates that the verification is successful.
[0221] Optionally, the client login module 110 is used to respond to a login operation for the resource client when the login state of the operation object is an invalid state, and send the object identifier input for the login operation to the resource server; if the object identifier exists in the account name set, the resource server is used to generate a third verification string corresponding to the object identifier; the invalid state refers to a login state when the current operation timestamp of the operation object for the resource client is later than the invalid timestamp of the operation object for the resource client;
[0222] The third receiving module 111 is used to receive the third verification string returned by the resource server, and to sign the third verification string using the authentication private key to obtain the third string signature information;
[0223] The third sending module 112 is used to send the object identifier and the third string signature information to the resource server; the resource server is used to obtain the authentication public key corresponding to the stored object identifier; the authentication public key is used to instruct the resource server to verify the third string signature information to obtain a third verification result; the resource server is used to send the blockchain account address list corresponding to the operation object to the resource client when the third verification result indicates that the verification is successful.
[0224] Among them, the resource server is used to generate a blockchain account address corresponding to the blockchain public key when the first signature verification result indicates that the signature verification is successful, and associate and store the blockchain account address, the encrypted blockchain private key and the object identifier of the operation object; the resource server is used to send the stored blockchain account address to the resource client.
[0225] Optionally, a list display module 113 is used to receive transaction data sent by a decentralized application client through a resource client, and display a list of blockchain account addresses corresponding to the operation object in the resource client; the blockchain account address list includes blockchain account addresses;
[0226] The address selection module 114 is used to respond to a selection operation on the blockchain account address list and obtain the blockchain account address selected by the selection operation;
[0227] The decryption processing module 115 is used to obtain the encrypted blockchain private key corresponding to the blockchain account address from the resource server, and decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key;
[0228] The transaction signature module 116 is used to sign the transaction data using the blockchain private key to obtain the signed transaction data.
[0229] Optionally, the on-chain processing module 117 is used to send the signed transaction data to the blockchain node in the blockchain network, so that the blockchain node performs on-chain processing on the signed transaction data;
[0230] The result return module 118 is used to receive the on-chain result returned by the blockchain node through the resource client to indicate the successful on-chain if the transaction data after signature processing is successfully on-chained to the blockchain network, and return the on-chain result to the decentralized application client;
[0231] The result return module 118 is used to receive the on-chain result returned by the blockchain node through the resource client to indicate the failure of on-chain if the transaction data after signature processing is not successfully on-chained to the blockchain network, and return the on-chain result to the decentralized application client.
[0232] Among them, the specific implementation of the account generation module 101, the first signature module 102, the encryption processing module 103, the first sending module 104, the first receiving module 105, the client input module 106, the second receiving module 107, the second signature module 108, the second sending module 109, the client login module 110, the third receiving module 111, the third sending module 112, the list display module 113, the address selection module 114, the decryption processing module 115, the transaction signature module 116, the chain processing module 117 and the result return module 118 can be referred to above. Figure 3 In the corresponding embodiment, steps S301 to S304, Figure 6 In the corresponding embodiment, steps S501 to S504, Fig. 9 In the corresponding embodiment, steps S601 to S603 and Fig.11 The description of steps S701 to S705 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0233] For further information, see Fig.14 , Fig.14 2 is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 2 may include: a string sending module 201, a data receiving module 202, a private key storage module 203, and a private key sending module 204; further, the data processing device 2 may also include: a timestamp acquisition module 205, and a timestamp determination module 206;
[0234] The string sending module 201 is used to send a first verification string to the resource client; the first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object; the blockchain account includes a blockchain private key and a blockchain public key associated with the operation object;
[0235] The data receiving module 202 is used to receive the encrypted blockchain private key, the first string signature information and the blockchain public key sent by the resource client; the first string signature information is obtained by the resource client signing the first verification string with the blockchain private key; the encrypted blockchain private key is obtained by the resource client encrypting the blockchain private key with the authentication public key associated with the operation object; the authentication public key and authentication private key associated with the operation object are generated in the resource client;
[0236] The private key storage module 203 is used to verify the signature information of the first character string by using the blockchain public key to obtain a first verification result. If the first verification result indicates that the verification is successful, the encrypted blockchain private key is stored;
[0237] The private key storage module 203 is specifically used to generate a blockchain account address corresponding to the blockchain public key if the first signature verification result indicates that the signature verification is successful;
[0238] The private key storage module 203 is specifically used to associate and store the blockchain account address, the encrypted blockchain private key, and the object identifier of the operation object;
[0239] The private key storage module 203 is also specifically used to send the stored blockchain account address to the resource client.
[0240] Among them, the private key storage module 203 is specifically used to decrypt the first string signature information through the blockchain private key to obtain the first summary information corresponding to the first verification string;
[0241] The private key storage module 203 is specifically used to perform hash processing on the first verification string to obtain second summary information corresponding to the first verification string;
[0242] The private key storage module 203 is specifically configured to generate a first verification result indicating successful signature verification if the first summary information and the second summary information are the same;
[0243] The private key storage module 203 is specifically configured to generate a first verification result indicating a signature verification failure if the first summary information and the second summary information are different.
[0244] The private key sending module 204 is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data of the operation object.
[0245] Optionally, a timestamp acquisition module 205 is used to obtain a character string generation timestamp corresponding to the first verification character string;
[0246] A timestamp acquisition module 205, configured to determine a string expiration timestamp corresponding to the first verification string according to the string generation timestamp and the string validity period;
[0247] The timestamp determination module 206 is configured to execute the step of verifying the signature of the first string using the blockchain public key if the first string signature information sent by the resource client is received before the string expiration timestamp;
[0248] The timestamp determination module 206 is configured to return an error prompt message to the resource client if the first character string signature information sent by the resource client is received after the character string expiration timestamp.
[0249] The specific implementation of the string sending module 201, the data receiving module 202, the private key storage module 203, the private key sending module 204, the timestamp acquisition module 205 and the timestamp determination module 206 can be found in the above Figure 4 The description of steps S401 to S404 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0250] For further information, see Fig.15 , Fig.15 Schematic diagram of a computer device provided in an embodiment of the present application, the computer device may be a terminal device or a resource server. Fig.15 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As Fig.15 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0251] In such Fig.15 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005.
[0252] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 , Figure 4 , Figure 6 , Fig. 9 and Fig.11 The description of the data processing method in the corresponding embodiment can also be performed as described above. Fig.13 In the corresponding embodiment, the data processing device 1 and Fig.14The description of the data processing device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0253] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the data processing device 1 and the data processing device 2 mentioned above. When the processor executes the computer program, it can execute the above-mentioned Figure 3 , Figure 4 , Figure 6 , Fig. 9 and Fig.11 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0254] In addition, it should be noted that: the embodiment of the present application also provides a computer program product, which may include a computer program, and the computer program may be stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor may execute the computer program, so that the computer device performs the above Figure 3 , Figure 4 , Figure 6 , Fig. 9 and Fig.11 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0255] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0256] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: include: When receiving the first verification string sent by the resource server, generating a blockchain account corresponding to the operation object in the resource client; The blockchain account includes a blockchain private key and a blockchain public key associated with the operation object; Signing the first verification string using the blockchain private key to obtain first string signature information; Encrypting the blockchain private key by using the authentication public key associated with the operation object to obtain an encrypted blockchain private key; The authentication public key and the authentication private key associated with the operation object are generated in the resource client; The encrypted blockchain private key, the first character string signature information and the blockchain public key are sent to the resource server; the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
2. The method according to claim 1, characterized in that The method further comprises: In response to a trigger operation on an account creation control in the resource client, a hosting request is sent to the resource server; the hosting request is used to instruct the resource server to generate a first verification string corresponding to the object identifier of the operation object; Receive the first verification string returned by the resource server.
3. The method according to claim 1, characterized in that: The method further comprises: In response to an input operation on the resource client, the text data input by the input operation is sent to the resource server; if the text data does not exist in the account name set, the resource server is used to determine the text data as the object identifier of the operation object, and generate a second verification string corresponding to the object identifier; the resource server is used to store the object identifier in the account name set; Receiving the second verification string and the registration identifier returned by the resource server, and generating the authentication public key and the authentication private key associated with the operation object in the resource client based on the registration identifier; the authentication public key and the authentication private key are generated by the resource client calling the authentication interface associated with the resource client; The second verification string is signed by the authentication private key to obtain second string signature information; The object identifier, the second character string signature information and the authentication public key are sent to the resource server; the authentication public key is used to instruct the resource server to perform signature verification on the second character string signature information to obtain a second signature verification result; the resource server is used to associate and store the object identifier and the authentication public key when the second signature verification result indicates that the signature verification is successful.
4. The method according to claim 3, characterized in that The method further comprises: When the login state of the operation object is an invalid state, in response to the login operation for the resource client, the object identifier input for the login operation is sent to the resource server; if the object identifier exists in the account name set, the resource server is used to generate a third verification string corresponding to the object identifier; the invalid state refers to a login state when the current operation timestamp of the operation object for the resource client is later than the invalidation timestamp of the operation object for the resource client; Receive the third verification string returned by the resource server, and sign the third verification string using the authentication private key to obtain third string signature information; The object identifier and the third string signature information are sent to the resource server; the resource server is used to obtain the stored authentication public key corresponding to the object identifier; the authentication public key is used to instruct the resource server to verify the third string signature information to obtain a third verification result; the resource server is used to send the blockchain account address list corresponding to the operation object to the resource client when the third verification result indicates that the verification is successful.
5. The method according to claim 1, characterized in that The resource server is used to generate a blockchain account address corresponding to the blockchain public key when the first signature verification result indicates that the signature verification is successful, and associate and store the blockchain account address, the encrypted blockchain private key, and the object identifier of the operation object; the resource server is used to send the stored blockchain account address to the resource client.
6. The method according to claim 5, characterized in that The method further comprises: Receiving the transaction data sent by the decentralized application client through the resource client, and displaying a list of blockchain account addresses corresponding to the operation object in the resource client; the blockchain account address list includes the blockchain account address; In response to a selection operation on the blockchain account address list, obtaining the blockchain account address selected by the selection operation; Obtain the encrypted blockchain private key corresponding to the blockchain account address from the resource server, and decrypt the encrypted blockchain private key using the authentication private key to obtain the blockchain private key; The transaction data is signed by the blockchain private key to obtain the signed transaction data.
7. The method according to claim 6, characterized in that The method further comprises: Sending the signed transaction data to a blockchain node in a blockchain network so that the blockchain node processes the signed transaction data on a blockchain; If the transaction data after the signature processing is successfully uploaded to the blockchain network, the resource client receives the upload result returned by the blockchain node to indicate the successful upload, and returns the upload result to the decentralized application client; If the transaction data after the signature processing is not successfully uploaded to the blockchain network, the resource client receives the upload result returned by the blockchain node to indicate the failure of the upload, and returns the upload result to the decentralized application client.
8. A data processing method, characterized in that: include: Sending a first verification string to the resource client; the first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object; The blockchain account includes a blockchain private key and a blockchain public key associated with the operation object; Receive the encrypted blockchain private key, the first character string signature information and the blockchain public key sent by the resource client; The first character string signature information is obtained by the resource client signing the first verification character string using the blockchain private key; the encrypted blockchain private key is obtained by the resource client encrypting the blockchain private key using the authentication public key associated with the operation object; The authentication public key and the authentication private key associated with the operation object are generated in the resource client; Verifying the signature information of the first character string by using the blockchain public key to obtain a first verification result, and if the first verification result indicates that the verification is successful, storing the encrypted blockchain private key; The stored encrypted blockchain private key is sent to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
9. The method according to claim 8, characterized in that If the first signature verification result indicates that the signature verification is successful, storing the encrypted blockchain private key includes: If the first signature verification result indicates that the signature verification is successful, generating a blockchain account address corresponding to the blockchain public key; The blockchain account address, the encrypted blockchain private key, and the object identifier of the operation object are stored in association; The method further comprises: The stored blockchain account address is sent to the resource client.
10. The method according to claim 8, characterized in that The method further comprises: Obtain a string generation timestamp corresponding to the first verification string; Determine a string expiration timestamp corresponding to the first verification string according to the string generation timestamp and the string validity period; If the first string signature information sent by the resource client is received before the string expiration timestamp, the step of verifying the first string signature information by using the blockchain public key is performed; If the first character string signature information sent by the resource client is received after the character string expiration timestamp, an error prompt information is returned to the resource client.
11. The method according to claim 8, characterized in that The verifying the signature information of the first character string by using the blockchain public key to obtain a first verification result includes: Decrypting the first character string signature information by using the blockchain public key to obtain first summary information corresponding to the first verification character string; Performing hash processing on the first verification string to obtain second summary information corresponding to the first verification string; If the first summary information and the second summary information are the same, generating a first verification result indicating that the signature verification is successful; If the first summary information and the second summary information are different, a first verification result indicating a signature verification failure is generated.
12. A data processing device, characterized in that: include: An account generation module, configured to generate a blockchain account corresponding to the operation object in the resource client when receiving the first verification string sent by the resource server; The blockchain account includes a blockchain private key and a blockchain public key associated with the operation object; A first signature module, used to sign the first verification string using the blockchain private key to obtain first string signature information; An encryption processing module, used to encrypt the blockchain private key by using the authentication public key associated with the operation object to obtain the encrypted blockchain private key; The authentication public key and the authentication private key associated with the operation object are generated in the resource client; The first sending module is used to send the encrypted blockchain private key, the first character string signature information and the blockchain public key to the resource server; the blockchain public key is used to instruct the resource server to verify the first character string signature information to obtain a first verification result; the resource server is used to store the encrypted blockchain private key when the first verification result indicates that the verification is successful; the resource server is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
13. A data processing device, characterized in that: include: A string sending module, used for sending a first verification string to a resource client; The first verification string is used to instruct the resource client to generate a blockchain account corresponding to the operation object; The blockchain account includes a blockchain private key and a blockchain public key associated with the operation object; A data receiving module, used to receive the encrypted blockchain private key, the first character string signature information and the blockchain public key sent by the resource client; The first character string signature information is obtained by the resource client signing the first verification character string using the blockchain private key; the encrypted blockchain private key is obtained by the resource client encrypting the blockchain private key using the authentication public key associated with the operation object; The authentication public key and the authentication private key associated with the operation object are generated in the resource client; A private key storage module, configured to perform a signature verification process on the first character string signature information by using the blockchain public key to obtain a first signature verification result, and if the first signature verification result indicates that the signature verification is successful, store the encrypted blockchain private key; A private key sending module is used to send the stored encrypted blockchain private key to the resource client; the resource client is used to decrypt the encrypted blockchain private key through the authentication private key to obtain the blockchain private key; the blockchain private key is used to sign the transaction data for the operation object.
14. A computer device, characterized in that: include: Processor and memory; The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.
16. A computer program product, characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium and is suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Alliance chain-based registration method, application server, user side and system
CN110233850A
Block chain-based account generation method and system in stock right transaction system, and medium
CN112581285A
Multi-authentication encryption method and system based on block chain, electronic equipment and medium
CN113886781A
Federated identity management with decentralized computing platforms
US20200067907A1
Secure storage techniques utilizing consortium distributed ledgers
US20220021528A1