WO2019218919A1 - Private key management method and apparatus in blockchain scenario, and system - Google Patents

Private key management method and apparatus in blockchain scenario, and system Download PDF

Info

Publication number
WO2019218919A1
WO2019218919A1 PCT/CN2019/086111 CN2019086111W WO2019218919A1 WO 2019218919 A1 WO2019218919 A1 WO 2019218919A1 CN 2019086111 W CN2019086111 W CN 2019086111W WO 2019218919 A1 WO2019218919 A1 WO 2019218919A1
Authority
WO
WIPO (PCT)
Prior art keywords
private key
blockchain
tee
computer system
password
Prior art date
Application number
PCT/CN2019/086111
Other languages
French (fr)
Chinese (zh)
Inventor
文白林
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019218919A1 publication Critical patent/WO2019218919A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0209Architectural arrangements, e.g. perimeter networks or demilitarized zones
    • H04L63/0218Distributed architectures, e.g. distributed firewalls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage

Definitions

  • the present application relates to a blockchain technology, and in particular, to a method, device and system for managing a private key in a blockchain.
  • Blockchain refers to data generated and stored in blocks, and connected into a chain data structure in chronological order. All nodes need to participate in the data verification, storage and maintenance of the blockchain system, and new blocks. The creation needs to be confirmed by consensus, and broadcast to each node to achieve network-wide synchronization, and then cannot be changed or deleted.
  • the blockchain is a collection of innovations of various prior art, mainly solving the problem of multi-party trust and efficient coordination.
  • the technologies that make up the blockchain mainly include hash operations (SHA256), digital signatures, P2P (peer-to-peer) networks, and consensus algorithms.
  • Typical application scenarios for blockchain technology include cryptocurrency, finance, supply chain, and the Internet of Things.
  • the currency transaction information is stored in the block of each node, and the currency transaction information includes one or more transaction processes, and a transaction process, for example, the address of the A wallet transfers 100 digital coins to the B wallet address ( For example bitcoin).
  • a transaction process for example, the address of the A wallet transfers 100 digital coins to the B wallet address ( For example bitcoin).
  • the receiver decrypts the received ciphertext digest with the corresponding public key to obtain the digest a, performs a hash operation on the received transaction data to obtain the digest b, compares the digest a and the digest b, and when the digest a and the digest b are the same It is only safe to determine the currency trading information. It can be seen that the digital signature technology can ensure the integrity of the information transmission and at the same time verify the identity authentication of the sender, thereby preventing the occurrence of the repudiation in the transaction. However, how to ensure the security of the private key in the digital signature process and avoid the sender's private key from being obtained by a malicious third party is a problem that needs to be solved in the blockchain field.
  • the most common method of private key management is to host the private key on the server of the service provider.
  • the user logs in to the server using the account login method before using the private key to perform related operations.
  • drawbacks in this way if the server is hacked or other vulnerabilities are generated, it is easy to cause the private key to be leaked or lost; the user account may also be stolen; the browser vulnerability in the process of logging in to the server will also be safe for the account.
  • Sexuality has an impact; man-in-the-middle attacks in the process of network transmission and HTTPS certificate hijacking are also a common security risk.
  • Another way is to create and store the private key yourself at the blockchain node device.
  • the security design of most encrypted digital currency wallets is completely dependent on the security boundary of the operating system.
  • the storage and processing of the private key is still stored by using a fixed key or even directly in plaintext, completely relying on the security boundary of the operating system to avoid Illegal access, but whether it is Android (Android), iOS, Windows or Linux, a large number of system security vulnerabilities are exposed and fixed every year, and there are many local rights vulnerabilities in these vulnerabilities. It is easy to break the security design boundary of the operating system and gain the ability to access the private key.
  • the present application provides a private key management method, apparatus, and system, which can be applied to improve the security of a private key in an application scenario involved in a blockchain, thereby improving the security of information stored in a blockchain.
  • the present application provides a computer system on which a rich execution environment REE and a trusted execution environment TEE are deployed, the computer system also deploying a blockchain functional unit based on blockchain technology, such as a digital wallet software.
  • the private key management module and the transaction data processing module in the blockchain functional unit are deployed in the TEE.
  • the private key management module is configured to create a private key and store the private key in the TEE.
  • the transaction data processing module is configured to perform encryption on the digest data related to the blockchain functional unit by using the private key.
  • the generating of the digest data is in the TEE; in other implementations, the generating of the digest data is in the REE, and then the REE sends the digest data to the TEE .
  • the private key management module is specifically configured to perform encryption on the private key before storing the private key, where the stored private key is an encrypted private key.
  • the private key management module is specifically configured to perform encryption on the private key by using a password, where the password is updated or periodically updated when the condition is met, and the new password is used to re-execute the private key. Encrypted and stores the private key encrypted with the new password.
  • the updating condition of the password includes performing encryption of the summary data once.
  • the password is a random number generated by a hardware random number generator.
  • the random number can also be generated by a software random number generator.
  • the present application provides a method for managing a private key, which is applied to a blockchain scenario.
  • the method is applied to a computer system, such as a terminal device, deployed with a rich execution environment REE and a trusted execution environment TEE.
  • a blockchain functional unit such as digital wallet software, is also deployed on the computer system.
  • the method includes: creating a private key involved in the blockchain functional unit at a TEE, and storing the private key on a TEE side; using the private key to perform a digest on the blockchain functional unit on the TEE side
  • the data is encrypted.
  • the summary data is generated on the TEE side; in other implementations, the summary data is generated on the REE side, and the summary data is sent to the TEE for TEE The side performs encryption on the summary data.
  • the method prior to storing the private key, further comprises performing encryption on the private key. It is easy to understand that after encryption, the stored private key is not the original private key, and the encrypted private key needs to be decrypted before using the private key.
  • performing encryption on the private key and storing the encrypted private key includes performing encryption on the private key by using a password, and the password is updated or periodically updated when the condition is satisfied, and is used after being updated.
  • the new password re-encrypts the private key and stores the private key encrypted by the new password.
  • updating the password when the condition is satisfied includes updating the password after performing encryption of the summary data once with the private key.
  • the periodically updating the password comprises: updating the password at regular intervals, and re-encrypting and storing the private key.
  • the password is a random number generated by a hardware random number generator.
  • the random number can also be generated by a software random number generator.
  • the present application provides a computer system, characterized in that the computer system comprises a memory and a processor, the memory is for storing a computer program, the processor is for reading and executing the computer program to implement The method provided by any of the foregoing implementations.
  • the present application provides a blockchain system, characterized in that the blockchain system comprises a computer system provided by any aspect of the present application.
  • the computer system can be a terminal device or other type of computer system.
  • the private key management method, device and system create, store and use the private key involved in the blockchain scenario by using the private key involved in the blockchain scenario.
  • the trusted execution environment of the architecture provides the security of the private key, which solves the security risk of the private key in the untrusted environment to some extent, and improves the security of the blockchain system.
  • the private key is encrypted in the storage execution, further ensuring security.
  • the password of the encrypted private key is changed periodically or under the conditional trigger, so that the security of the password is higher, and the security of the private key is also higher.
  • FIG. 1a is a schematic diagram of a network architecture of a blockchain scenario
  • FIG. 1b is a schematic diagram of a system architecture of a terminal device
  • FIG. 2 is a schematic diagram of an interaction process between CA and TA
  • 3 is a schematic diagram of functional deployment of digital wallet software
  • FIG. 4 is a schematic diagram of a processing flow of a transaction data sender in a digital wallet software
  • FIG. 5 is a schematic diagram of a processing flow of a transaction data receiver in a digital wallet software
  • FIG. 6 is a schematic flowchart of a method for creating a private key
  • FIG. 7 is a schematic flow chart of a private key encryption method
  • FIG. 8 is a schematic structural view of a computer system.
  • TEE ensures the storage, processing and protection of sensitive data in a trusted environment and provides a secure execution environment for authorized trusted applications (TAs).
  • TAs trusted applications
  • the management and use of the private key by the mobile terminal in the blockchain scenario is based on REE. Since the REE has a large number of attacks, the security is not high, and after the private key management and use is moved to the TEE, it is required. Solve the problem of creating and using private keys in TEE and how the digital signature process interacts between REE and TEE.
  • FIG. 1 is a schematic diagram of a network architecture of a blockchain scenario applied by the secret key management method according to the embodiment.
  • the blockchain system consists of a plurality of terminal devices forming a peer-to-peer, decentralized network structure.
  • a terminal device can be seen as a node of a blockchain.
  • the car in the figure represents an in-vehicle terminal device.
  • FIG. 1b is a schematic diagram of a system architecture of any one of the terminal devices in FIG. 1a.
  • the terminal device includes REE and TEE, and REE and TEE respectively run Operating system and a TEE side operating system (such as the open source OP-TEE operating system).
  • the operating system and TEE OS are further divided into user state and kernel state.
  • the CA (Client Application) in the REE and the TA in the TEE form a client/server-like architecture.
  • the TA acts as the server, the CA acts as the client, and the CA initiates the access operation.
  • the two exchange data through the message channel of the hardware layer.
  • the development of the CA needs to call the TEE client API to communicate with the corresponding TA; the TA needs to call the TEE internal API to implement the related functions using the programming resources provided by the TEE.
  • S201 The CA first performs the necessary context initialization.
  • the specific command implemented is TEEC_InitializeContext.
  • S202 Specify a specific path (ta_path) where the TA file is located, and open the session.
  • the specific command implemented is TEEC_OpenSession(ta_path).
  • S204 The CA sends a command, and the bottom interface invokes a SMC (secure monitor call) instruction to trigger the processor to switch to the secure mode, and passes the command to the TA in the TEE for processing (through shared memory mode).
  • SMC secure monitor call
  • the specific command implemented is TEEC_InvokeCommand(cmd).
  • the processor still has a monitoring mode between the safe mode and the non-secure mode, and switches from the safe mode to the monitoring mode and then to the non-secure mode during the switching process, and vice versa.
  • a monitoring mode between the safe mode and the non-secure mode, and switches from the safe mode to the monitoring mode and then to the non-secure mode during the switching process, and vice versa.
  • a blockchain-based application is implemented on a mobile device, and the private key management module and the data processing module in the application are implemented in the REE.
  • the private key management module is configured to create and store a private key/public key
  • the data processing module is configured to perform hashing, digital signature, summary comparison, and the like on the data, thereby identifying whether the data is tampered with and verifying the sender identity information.
  • the digital wallet software mainly includes five major modules: a user management module 301, an asset management module 302, a secret key management module 305, a transaction data processing module 304, and a network management module 303.
  • the user management module 301 is configured to authenticate the correctness of the user name and password when the user logs in.
  • the asset management module 302 is used to view digital asset information, transfer funds to third parties, and the like.
  • the network management module 303 is configured to connect to the network and send/receive network data packets.
  • the key management module is used to create and store private and public keys.
  • the transaction data processing module 304 is configured to perform hash operation and digital signature processing on the transferred transaction data, and further needs to compare the transaction summary data, identify whether the transaction data has been tampered with, and verify the identity information of the sender.
  • the function of the digital signature in the transaction data processing module (equivalent to the transaction data processing module 304_B) and the key management module 305 are implemented on the TEE side, and other functions (equivalent to the transaction data processing module 304_A) ) and other modules are still placed on the REE side.
  • the digital wallet software is completed by being implemented only on the REE side and on the REE and TEE side.
  • the digital wallet software implements the functions of the foregoing key management module and transaction data processing module through one or more TAs on the TEE side, and the functions of other modules can be implemented on one or more CAs on the REE side.
  • modules on the REE side are implemented by one CA
  • two modules on the TEE side are implemented by one TA
  • different functional modules may also be configured by multiple CAs or TAs. achieve.
  • the division of modules is only an example, and the application is not limited thereto.
  • FIG. 4 is an example of processing the transaction data by taking the wallet A to pay 100 digital coins to the wallet B as an example.
  • the process of calling the TEE side module by the REE side module may refer to the process of calling the TA by the CA described above, and the specific calling process is not detailed.
  • Wallet A (also referred to as terminal device A) performs a hash operation on the REE side using the SHA256 algorithm to generate a 256-bit transaction digest.
  • the transaction data includes the address information of the wallet A, the address information of the wallet B, and the payment amount information.
  • Transaction data can be represented as a string.
  • the wallet A then sends the transaction digest to the TA on the TEE side through the data channel between the CA and the TA.
  • the specific implementation is as follows: The REE side CA calls the TEEC_InvokeCommand (cmd) function to send transaction summary data, where cmd is: SEND_DIGEST command.
  • steps S401 and S402 can be performed by the transaction data processing module 304_A.
  • S403 The TA on the TEE side encrypts the transaction digest using the private key of the wallet A and the Elliptic Curve Digital Signature Algorithm (ECDSA) to generate a digital signature (or called signature data) of less than 320 bits.
  • EDSA Elliptic Curve Digital Signature Algorithm
  • the TA on the TEE side returns the signature data and the public key of the wallet A to the REE side CA.
  • the public key and private key of the wallet A are created by the TA on the TEE side. They are created before use, but the specific time is not limited in this embodiment. For example, the public key can be created after the private key is created. It can be created before returning to the REE side.
  • the public key of the wallet A can be obtained according to the private key of the wallet A and the ECDSA algorithm.
  • steps S403 and S404 can be performed by the transaction data processing module 304_B.
  • the CA on the REE side packages the transaction data, the public key, and the signature data into a network data packet and sends the data packet to the network management module.
  • the network management module broadcasts the network data packet to other blockchain nodes of the entire network.
  • step S405 can be performed by the transaction data processing module 304_A.
  • FIG. 5 is a process subsequent to FIG. 4, after the wallet B (also referred to as the terminal device B) receives the network data packet.
  • the processing after the other nodes receive the network data packet is similar to the following, and will not be described in detail.
  • S501 The CA parses out three pieces of data: transaction data, public key, and signature data.
  • the CA invokes the SHA256 algorithm to hash the transaction data to obtain 256-bit summary data.
  • S503 The CA invokes the ECDSA verification signature algorithm to decrypt the signature data to obtain the original transaction summary data.
  • S504 Compare whether the summary data generated by S502 and S503 are equal. If they are equal, it indicates that the transaction data has not been tampered with, and accepts the transaction data; otherwise, the transaction data is discarded.
  • FIG. 6 is a schematic flowchart of a private key created by a TA provided by the present application, and can also be understood as a schematic flowchart of a private key management module for creating a private key.
  • the TA calls a random number generator to generate a 256-bit random number R1.
  • the random number generator is a hardware random number generator or a software random number generator.
  • the hardware random number generator has better randomness and higher security.
  • the implementation of the software random number generator and the hardware random number generator are all prior art in the prior art, wherein the software random number generator is a software functional unit, and the hardware random number generator is a hardware, and the specific implementation is prior art. This embodiment only needs to be called, and will not be described here.
  • S602 Perform a hash operation on the random number R1 by using a hash algorithm to obtain a 256-bit private key, and the hash algorithm may be a SHA (Secure Hash Algorithm) 256 algorithm.
  • SHA Secure Hash Algorithm
  • S603 Encrypt the private key obtained by S602 by using another random number R2 (which may also be understood as a random password, a password, or a key).
  • R2 which may also be understood as a random password, a password, or a key.
  • the specific encryption algorithm may be an AES (Advanced Encryption Standard) 256 algorithm or other encryption algorithm.
  • AES Advanced Encryption Standard
  • Another random number can be generated by calling the aforementioned random number generator or other random number generator.
  • S603 Store the value of R2 and the encrypted key.
  • the value of R2 in this embodiment can be updated. After R2 is updated, the corresponding decryption algorithm is executed on the encrypted key, and then the private key is re-encrypted with the new value.
  • FIG. 7 is a schematic diagram of the process of updating the random number R2.
  • S702 The TA encrypts the transaction digest using the decrypted secret key to obtain signature data.
  • the trigger random number generator generates a new random number as the value of R2.
  • the update of R2 in the implementation shown in Figure 7 is after performing a digital signature (S702).
  • the update of R2 may also be periodic, such as every 3 seconds, or periodically. Combined with the approach shown in Figure 7, or other update method determined as needed.
  • the method provided by the foregoing embodiment provides the security of the private key by using the trusted execution environment of the TrustZone architecture, and can solve the security risk problem caused by the creation, storage, and use of the private key in the untrusted environment to some extent, and improve the block.
  • FIG. 8 is a schematic structural diagram of a computer system according to an embodiment of the present disclosure.
  • the computer system can be a terminal device.
  • the computer system includes a communication module 510, a sensor 520, a user input module 530, an output module 540, a processor 550, an audio and video input module 560, a memory 570, and a power source 580.
  • Communication module 510 can include at least one module that enables communication between the computer system and a communication system or other computer system.
  • the communication module 510 can include one or more of a wired network interface, a broadcast receiving module, a mobile communication module, a wireless internet module, a local area communication module, and a location (or positioning) information module.
  • a wired network interface for example, a wireless network interface
  • a mobile communication module for example, a mobile communication module
  • a wireless internet module a wireless internet module
  • local area communication module a local area communication module
  • a location (or positioning) information module There are many implementations of these various modules in the prior art, and the present application does not describe them one by one.
  • Sensor 520 can sense the current state of the system, such as an open/closed state, position, contact with the user, direction, and acceleration/deceleration, and sensor 520 can generate a sensing signal for controlling the operation of the system.
  • the current state of the system such as an open/closed state, position, contact with the user, direction, and acceleration/deceleration
  • the user input module 530 is configured to receive input digital information, character information or contact touch/contactless gestures, and receive signal input related to user settings and function control of the system.
  • User input module 530 includes a touch panel and/or other input device.
  • the output module 540 includes a display panel for displaying information input by the user, information provided to the user, or various menu interfaces of the system, and the like.
  • the display panel can be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
  • the touch panel can cover the display panel to form a touch display.
  • the output module 540 may further include an audio output module, an alarm, a haptic module, and the like.
  • the audio and video input module 560 is configured to input an audio signal or a video signal.
  • the audio and video input module 560 can include a camera and a microphone.
  • the power supply 580 can receive external power and internal power under the control of the processor 550 and provide the power required for operation of the various components of the system.
  • Processor 550 can include one or more processors.
  • processor 150 can include one or more central processors, or can include a central processing unit and a graphics processor.
  • the processor 150 includes a plurality of processors, the plurality of processors may be integrated on the same chip, or may each be a separate chip.
  • a processor can include one or more physical cores, with the physical core being the smallest processing module.
  • the memory 570 stores a computer program including an operating system program 572, an application 571, and the like.
  • Typical operating systems such as Microsoft's Windows, Apple's MacOS, etc. for desktop or notebook systems, as developed by Google Inc.
  • Android A system such as a system for a mobile terminal.
  • the method provided by the foregoing embodiment may be implemented by means of software, and may be considered as a specific implementation of the application 571.
  • the memory 570 may be one or more of the following types: flash memory, hard disk type memory, micro multimedia card type memory, card memory (such as SD or XD memory), random access memory (random access memory) , RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable Read-only memory (PROM), magnetic memory, magnetic disk or optical disk.
  • the memory 570 can also be a network storage device on the Internet, and the system can perform operations such as updating or reading on the memory 570 on the Internet.
  • the processor 550 is configured to read a computer program in the memory 570 and then execute a computer program defined method, such as the processor 550 reading the operating system program 572 to run an operating system on the system and implementing various functions of the operating system, or reading One or more applications 571 are taken to run the application on the system.
  • the memory 570 also stores other data 573 than computer programs, such as blocks, private keys, transaction data, and random numbers, etc., as referred to in this application.
  • connection relationship of each module in FIG. 8 is only an example, and the method provided by any embodiment of the present application may also be applied to other connection mode terminal devices, for example, all modules are connected through a bus.
  • the method provided in this embodiment may also be applied to a non-terminal computer device, such as a cloud server.
  • the device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized.

Abstract

The present application provides a computer system. A rich execution environment (REE) and a trusted execution environment (TEE) are deployed in the computer system; a blockchain technology-based blockchain functional unit is further deployed in the computer system, and a private key management module and a transaction data processing module in the blockchain functional unit are deployed in the TEE, wherein the private key management module is used for creating a private key and storing same in the TEE, and the transaction data processing module is used for encrypting digest data involved in the blockchain functional unit by using the private key. By placing the private key involved in the blockchain scenario at a TEE side for creating, storing, and using, the security of the private key is ensured by means of the TEE of a TrustZone architecture, and the security risk problem caused by the private key in an untrusted environment is solved to some extent, thereby improving the security of a blockchain system.

Description

区块链场景下的私钥管理方法、装置及系统Private key management method, device and system under blockchain scenario 技术领域Technical field
本申请涉及区块链技术,尤其涉及一种区块链中私钥的管理方法、装置及系统。The present application relates to a blockchain technology, and in particular, to a method, device and system for managing a private key in a blockchain.
背景技术Background technique
区块链指数据以区块(block)为单位产生和存储,并按照时间顺序连成链式(chain)数据结构,所有节点需要共同参与区块链系统的数据验证、存储和维护,新区块的创建需得到共识确认,并向各节点广播实现全网同步,之后就不能更改或删除。区块链是多种已有技术的集合创新,主要解决多方信任与高效协同的问题。构成区块链的技术主要包括哈希运算(SHA256)、数字签名、P2P(peer-to-peer)网络和共识算法。区块链技术的典型应用场景包括加密货币、金融、供应链、物联网等。Blockchain refers to data generated and stored in blocks, and connected into a chain data structure in chronological order. All nodes need to participate in the data verification, storage and maintenance of the blockchain system, and new blocks. The creation needs to be confirmed by consensus, and broadcast to each node to achieve network-wide synchronization, and then cannot be changed or deleted. The blockchain is a collection of innovations of various prior art, mainly solving the problem of multi-party trust and efficient coordination. The technologies that make up the blockchain mainly include hash operations (SHA256), digital signatures, P2P (peer-to-peer) networks, and consensus algorithms. Typical application scenarios for blockchain technology include cryptocurrency, finance, supply chain, and the Internet of Things.
数字签名技术用于一定程度上保证数据传输的安全性。以加密数字货币场景为例,每个节点的区块内存储着货币交易信息,货币交易信息包括一次或多次交易过程,一次交易过程例如为A钱包的地址向B钱包地址转账100数字币(例如比特币)。在不同的节点之间传输交易信息之前需要对交易过程执行哈希运算以得到该交易过程的摘要,然后使用发送方的私钥对该摘要进行加密,将加密后的摘要和交易数据(或加密后的交易数据)发送到接收方。接收方利用对应的公钥解密接收到的密文摘要以得到摘要a,并对接收到的交易数据执行哈希运算以得到摘要b,比较摘要a和摘要b,在摘要a和摘要b相同时才确定货币交易信息是安全的。可见,通过数字签名技术能够保证信息传输的完整性、同时验证发送者的身份认证,从而防止交易中的抵赖发生。但是如何保证数字签名过程中私钥的安全性,避免发送者的私钥被恶意第三方获取,这个问题在区块链领域亟待解决。Digital signature technology is used to ensure the security of data transmission to a certain extent. Taking the encrypted digital currency scenario as an example, the currency transaction information is stored in the block of each node, and the currency transaction information includes one or more transaction processes, and a transaction process, for example, the address of the A wallet transfers 100 digital coins to the B wallet address ( For example bitcoin). Before transmitting transaction information between different nodes, it is necessary to perform a hash operation on the transaction process to obtain a summary of the transaction process, and then encrypt the digest using the sender's private key, and encrypt the digest and transaction data (or encryption). After the transaction data) is sent to the recipient. The receiver decrypts the received ciphertext digest with the corresponding public key to obtain the digest a, performs a hash operation on the received transaction data to obtain the digest b, compares the digest a and the digest b, and when the digest a and the digest b are the same It is only safe to determine the currency trading information. It can be seen that the digital signature technology can ensure the integrity of the information transmission and at the same time verify the identity authentication of the sender, thereby preventing the occurrence of the repudiation in the transaction. However, how to ensure the security of the private key in the digital signature process and avoid the sender's private key from being obtained by a malicious third party is a problem that needs to be solved in the blockchain field.
当前最常见的私钥管理方式是将私钥托管在服务提供者的服务器上,用户在使用私钥之前使用账号登陆方式登陆到服务器上进行相关操作。但是这种方式存在一些缺陷:若服务器被黑客攻击或产生其它漏洞,则很容易导致私钥泄露或丢失;用户账号也可能被窃取;用户登陆服务器的过程中浏览器漏洞也会对账户的安全性产生影响;网络传输过程中的中间人攻击行为以及HTTPS证书劫持也是一种常见的安全风险。另一种方式是在区块链节点设备自己创建和存储私钥。目前大多数加密数字货币钱包的安全设计都是完全依靠操作系统的安全边界,对于私钥的存储和处理还是停留在使用固定密钥进行加密甚至直接明文保存,完全依靠操作系统的安全边界来避免非法访问,但无论是安卓(Android)、iOS、Windows还是Linux,每年都有大量的系统安全漏洞被公开和被修复,而这些漏洞里面就有不少本地提权的漏洞,利用这些提权漏洞就可以轻易的打破操作系统的安全设计边界,获得访问私钥的能力。Currently, the most common method of private key management is to host the private key on the server of the service provider. The user logs in to the server using the account login method before using the private key to perform related operations. However, there are some drawbacks in this way: if the server is hacked or other vulnerabilities are generated, it is easy to cause the private key to be leaked or lost; the user account may also be stolen; the browser vulnerability in the process of logging in to the server will also be safe for the account. Sexuality has an impact; man-in-the-middle attacks in the process of network transmission and HTTPS certificate hijacking are also a common security risk. Another way is to create and store the private key yourself at the blockchain node device. At present, the security design of most encrypted digital currency wallets is completely dependent on the security boundary of the operating system. The storage and processing of the private key is still stored by using a fixed key or even directly in plaintext, completely relying on the security boundary of the operating system to avoid Illegal access, but whether it is Android (Android), iOS, Windows or Linux, a large number of system security vulnerabilities are exposed and fixed every year, and there are many local rights vulnerabilities in these vulnerabilities. It is easy to break the security design boundary of the operating system and gain the ability to access the private key.
发明内容Summary of the invention
本申请提供一种私钥管理方法、装置和系统,具体可以应用在区块链所涉及的应用场景下,用于提高私钥的安全性,从而提高区块链中存储的信息的安全性。The present application provides a private key management method, apparatus, and system, which can be applied to improve the security of a private key in an application scenario involved in a blockchain, thereby improving the security of information stored in a blockchain.
下面介绍本申请的几个方面,容易理解的是,以下几个方面的实现方式中相同或相似的部分可以互相参考。Several aspects of the present application are described below, and it is easily understood that the same or similar parts of the implementations of the following aspects may be referred to each other.
第一方面,本申请提供一种计算机系统,该计算机系统上部署有富执行环境REE和可信执行环境TEE,该计算机系统还部署有基于区块链技术的区块链功能单元,例如数字钱包软件。该TEE中部署有所述区块链功能单元中的私钥管理模块和交易数据处理模块。所述私钥管理模块用于创建私钥,以及将所述私钥存储在TEE中。所述交易数据处理模块用于利用所述私钥对区块链功能单元涉及的摘要数据执行加密。In a first aspect, the present application provides a computer system on which a rich execution environment REE and a trusted execution environment TEE are deployed, the computer system also deploying a blockchain functional unit based on blockchain technology, such as a digital wallet software. The private key management module and the transaction data processing module in the blockchain functional unit are deployed in the TEE. The private key management module is configured to create a private key and store the private key in the TEE. The transaction data processing module is configured to perform encryption on the digest data related to the blockchain functional unit by using the private key.
在一些实现方式下,所述摘要数据的生成在所述TEE中;在另一些实现方式下,所述摘要数据的生成在所述REE中,然后所述REE发送所述摘要数据到所述TEE。In some implementations, the generating of the digest data is in the TEE; in other implementations, the generating of the digest data is in the REE, and then the REE sends the digest data to the TEE .
在一些实现方式下,所述私钥管理模块具体用于在存储所述私钥之前对所述私钥执行加密,其中,存储的所述私钥为加密后的私钥。In some implementations, the private key management module is specifically configured to perform encryption on the private key before storing the private key, where the stored private key is an encrypted private key.
在一些实现方式下,所述私钥管理模块具体用于利用密码对所述私钥执行加密,所述密码在条件满足时更新或周期性更新,更新后利用新密码重新对所述私钥执行加密,且存储新密码加密后的私钥。In some implementations, the private key management module is specifically configured to perform encryption on the private key by using a password, where the password is updated or periodically updated when the condition is met, and the new password is used to re-execute the private key. Encrypted and stores the private key encrypted with the new password.
在一些实现方式下,所述密码的更新条件包括执行完一次对所述摘要数据的加密。In some implementations, the updating condition of the password includes performing encryption of the summary data once.
在一些实现方式下,所述密码为硬件随机数产生器产生的随机数。在另一些实现方式下,该随机数也可以由软件随机数产生器产生。In some implementations, the password is a random number generated by a hardware random number generator. In other implementations, the random number can also be generated by a software random number generator.
第二方面,本申请提供一种私钥的管理方法,应用于区块链场景下。该方法应用于部署有富执行环境REE和可信执行环境TEE的计算机系统,例如终端设备。该计算机系统上还部署有区块链功能单元,例如数字钱包软件。该方法包括:在TEE创建所述区块链功能单元所涉及的私钥,以及将所述私钥存储在TEE侧;在TEE侧利用所述私钥对所述区块链功能单元涉及的摘要数据执行加密。In a second aspect, the present application provides a method for managing a private key, which is applied to a blockchain scenario. The method is applied to a computer system, such as a terminal device, deployed with a rich execution environment REE and a trusted execution environment TEE. A blockchain functional unit, such as digital wallet software, is also deployed on the computer system. The method includes: creating a private key involved in the blockchain functional unit at a TEE, and storing the private key on a TEE side; using the private key to perform a digest on the blockchain functional unit on the TEE side The data is encrypted.
在一些实现方式下,在所述TEE侧生成所述摘要数据;在另一些实现方式下,在所述REE侧生成所述摘要数据,并将所述摘要数据发送到所述TEE,以便在TEE侧对所述摘要数据执行加密。In some implementations, the summary data is generated on the TEE side; in other implementations, the summary data is generated on the REE side, and the summary data is sent to the TEE for TEE The side performs encryption on the summary data.
在一些实现方式下,在存储所述私钥之前所述方法还包括:对所述私钥执行加密。容易理解的,加密之后,存储的就不是原来的私钥,而是加密后的私钥,且下次使用该私钥之前需要先解密。In some implementations, prior to storing the private key, the method further comprises performing encryption on the private key. It is easy to understand that after encryption, the stored private key is not the original private key, and the encrypted private key needs to be decrypted before using the private key.
在一些实现方式下,对所述私钥执行加密并存储所述加密后的私钥包括:利用密码对所述私钥执行加密,所述密码在条件满足时更新或周期性更新,更新后利用新密码重新对所述私钥执行加密,且存储新密码加密后的私钥。In some implementations, performing encryption on the private key and storing the encrypted private key includes performing encryption on the private key by using a password, and the password is updated or periodically updated when the condition is satisfied, and is used after being updated. The new password re-encrypts the private key and stores the private key encrypted by the new password.
在一些实现方式下,所述密码在条件满足时更新包括:在利用所述私钥执行完一次对所述摘要数据的加密之后更新所述密码。In some implementations, updating the password when the condition is satisfied includes updating the password after performing encryption of the summary data once with the private key.
在一些实现方式下,所述周期性更新所述密码包括:每隔固定时间就更新所述密码,并重新加密和存储所述私钥。In some implementations, the periodically updating the password comprises: updating the password at regular intervals, and re-encrypting and storing the private key.
在一些实现方式下,所述密码为硬件随机数产生器产生的随机数。在另一些实现方式下,该随机数也可以由软件随机数产生器产生。In some implementations, the password is a random number generated by a hardware random number generator. In other implementations, the random number can also be generated by a software random number generator.
第三方面,本申请提供一种计算机系统,其特征在于,所述计算机系统包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于读取并执行所述计算机程序以 实现前述任意实现方式提供的方法。In a third aspect, the present application provides a computer system, characterized in that the computer system comprises a memory and a processor, the memory is for storing a computer program, the processor is for reading and executing the computer program to implement The method provided by any of the foregoing implementations.
第四方面,本申请提供一种区块链系统,其特征在于,所述区块链系统中包括本申请任意方面提供的计算机系统。该计算机系统可以是终端设备,也可以是其他类型的计算机系统。In a fourth aspect, the present application provides a blockchain system, characterized in that the blockchain system comprises a computer system provided by any aspect of the present application. The computer system can be a terminal device or other type of computer system.
可见,本申请提供的私钥管理方法、装置和系统,通过将区块链场景下涉及到的私钥放置到TEE侧进行创建、存储和使用,借助
Figure PCTCN2019086111-appb-000001
架构的可信执行环境提供私钥的安全性,从而一定程度上解决了私钥在不可信环境中带来的安全风险问题,提高了区块链系统的安全性。进一步的,私钥在存储执行被加密处理,进一步保证了安全性。而且,在加密私钥的密码会周期性或条件触发下变更,这样密码的安全性就更高,从而私钥的安全性也更高。
It can be seen that the private key management method, device and system provided by the present application create, store and use the private key involved in the blockchain scenario by using the private key involved in the blockchain scenario.
Figure PCTCN2019086111-appb-000001
The trusted execution environment of the architecture provides the security of the private key, which solves the security risk of the private key in the untrusted environment to some extent, and improves the security of the blockchain system. Further, the private key is encrypted in the storage execution, further ensuring security. Moreover, the password of the encrypted private key is changed periodically or under the conditional trigger, so that the security of the password is higher, and the security of the private key is also higher.
附图说明DRAWINGS
为了更清楚地说明本申请提供的技术方案,下面将对附图作简单地介绍。显而易见地,下面描述的附图仅仅是本申请的一些实施例。In order to more clearly illustrate the technical solutions provided by the present application, the drawings will be briefly described below. Obviously, the drawings described below are only some embodiments of the present application.
图1a为区块链场景的网络架构示意图;FIG. 1a is a schematic diagram of a network architecture of a blockchain scenario;
图1b为终端设备的系统架构示意图;FIG. 1b is a schematic diagram of a system architecture of a terminal device;
图2为CA和TA的交互流程示意图;2 is a schematic diagram of an interaction process between CA and TA;
图3为数字钱包软件的功能部署示意图;3 is a schematic diagram of functional deployment of digital wallet software;
图4为数字钱包软件中交易数据发送方的处理流程示意图;4 is a schematic diagram of a processing flow of a transaction data sender in a digital wallet software;
图5为数字钱包软件中交易数据接收方的处理流程示意图;5 is a schematic diagram of a processing flow of a transaction data receiver in a digital wallet software;
图6为私钥创建方法的流程示意图;6 is a schematic flowchart of a method for creating a private key;
图7为私钥加密方法的流程示意图;7 is a schematic flow chart of a private key encryption method;
图8为计算机系统的结构示意图。8 is a schematic structural view of a computer system.
具体实施方式Detailed ways
终端设备处理重要服务的需求日益增加。从能够支付、下载和观看某一特定时段的最新好莱坞大片,到能够通过手机远程支付账单和管理银行账户,这些发展趋势已使终端设备成为恶意软件、木马和rootkit等病毒的重点攻击目标。为了保证终端设备的安全性,出现了以
Figure PCTCN2019086111-appb-000002
为代表的终端设备安全框架。在现有的
Figure PCTCN2019086111-appb-000003
框架下,系统级的安全是通过将片上系统(system on chips,SoC)的软硬件资源划分到两个世界中分别获得,即正常世界(normal world)和安全世界(secure world)(也可以叫安全域和非安全域),这两个世界分别对应富执行环境(rich execution environment,REE)和可信执行环境(trusted execution environment,TEE)。TEE和REE运行于同一个设备上,TEE能够保证在可信的环境中进行敏感数据的存储、处理和保护,并为授权的可信应用(trusted application,TA)提供安全的执行环境。但是区块链场景下的移动终端对私钥的管理和使用是基于REE的,由于REE存在攻击面多的问题,所以安全性不高,而将私钥管理和使用移到TEE后,就需要解决TEE中私钥的创建和使用,以及数字签名流程在REE和TEE之间如何交互的问题。
There is an increasing demand for terminal devices to handle important services. From the ability to pay, download and watch the latest Hollywood blockbusters for a specific time period, to the ability to remotely pay bills and manage bank accounts via mobile phones, these trends have made end devices a key target for viruses such as malware, trojans and rootkits. In order to ensure the security of the terminal device,
Figure PCTCN2019086111-appb-000002
The terminal device security framework represented. In existing
Figure PCTCN2019086111-appb-000003
Under the framework, system-level security is obtained by dividing the software and hardware resources of system on chips (SoC) into two worlds, namely the normal world and the secure world (also called The security domain and the non-security domain) correspond to the rich execution environment (REE) and the trusted execution environment (TEE). TEE and REE run on the same device. TEE ensures the storage, processing and protection of sensitive data in a trusted environment and provides a secure execution environment for authorized trusted applications (TAs). However, the management and use of the private key by the mobile terminal in the blockchain scenario is based on REE. Since the REE has a large number of attacks, the security is not high, and after the private key management and use is moved to the TEE, it is required. Solve the problem of creating and using private keys in TEE and how the digital signature process interacts between REE and TEE.
图1a为本实施例提供的秘钥管理方法应用的区块链场景的网络架构示意图。该区块链系统由多个终端设备组成一个点对点(peer-to-peer)的、去中心化的网络结构。一个终端设备可以看做一个区块链的节点。图中的汽车表示车载终端设备。FIG. 1 is a schematic diagram of a network architecture of a blockchain scenario applied by the secret key management method according to the embodiment. The blockchain system consists of a plurality of terminal devices forming a peer-to-peer, decentralized network structure. A terminal device can be seen as a node of a blockchain. The car in the figure represents an in-vehicle terminal device.
图1b为图1a中任意一个终端设备的系统架构示意图。该终端设备包含REE和TEE,REE和TEE上分别运行有
Figure PCTCN2019086111-appb-000004
操作系统和一种TEE侧操作系统(例如开源的OP-TEE操作系统)。
Figure PCTCN2019086111-appb-000005
操作系统和TEE OS又划分为用户态和内核态两种状态。REE中的CA(Client Application)与TEE中的TA构成了类似client/server的架构,TA作为服务端,CA作为客户端,由CA端发起访问操作,两者通过硬件层的消息通道交互数据,CA端发起请求后挂起系统,等待TA返回结果。CA的开发需要调用TEE客户端(client)API(application program interface)来和对应的TA实现通信;TA需要调用TEE内部(internal)API来使用TEE提供的编程资源实现相关功能。
FIG. 1b is a schematic diagram of a system architecture of any one of the terminal devices in FIG. 1a. The terminal device includes REE and TEE, and REE and TEE respectively run
Figure PCTCN2019086111-appb-000004
Operating system and a TEE side operating system (such as the open source OP-TEE operating system).
Figure PCTCN2019086111-appb-000005
The operating system and TEE OS are further divided into user state and kernel state. The CA (Client Application) in the REE and the TA in the TEE form a client/server-like architecture. The TA acts as the server, the CA acts as the client, and the CA initiates the access operation. The two exchange data through the message channel of the hardware layer. After the CA sends the request, the system hangs and waits for the TA to return the result. The development of the CA needs to call the TEE client API to communicate with the corresponding TA; the TA needs to call the TEE internal API to implement the related functions using the programming resources provided by the TEE.
典型的CA与TA的交互流程如图2所示:The typical CA and TA interaction process is shown in Figure 2:
S201:CA先做必要的上下文初始化。实现的具体命令为TEEC_InitializeContext。S201: The CA first performs the necessary context initialization. The specific command implemented is TEEC_InitializeContext.
S202:指定TA文件所在的具体路径(ta_path),打开会话。实现的具体命令为TEEC_OpenSession(ta_path)。S202: Specify a specific path (ta_path) where the TA file is located, and open the session. The specific command implemented is TEEC_OpenSession(ta_path).
S203:会话建立成功后返回会话句柄(Return SesstionHandle),这时TA已经在TEE中运行起来,等待接收来自CA的命令。S203: Returning the session handle (Return SesstionHandle) after the session is successfully established, then the TA has already run in the TEE, waiting to receive the command from the CA.
S204:CA发送命令,底层接口会调用SMC(secure monitor call)指令触发处理器切换到安全模式,并将命令传递给TEE中的TA进行处理(通过共享内存方式)。实现的具体命令为TEEC_InvokeCommand(cmd)。S204: The CA sends a command, and the bottom interface invokes a SMC (secure monitor call) instruction to trigger the processor to switch to the secure mode, and passes the command to the TA in the TEE for processing (through shared memory mode). The specific command implemented is TEEC_InvokeCommand(cmd).
S205:TA处理完命令之后返回结果(Return result)给CA,处理器切换回非安全模式。S205: The TA returns a result (Return result) to the CA after the command is processed, and the processor switches back to the non-secure mode.
需要说明的是,处理器在安全模式和非安全模式之间还存在一个监控模式,在切换过程中会先从安全模式切换到监控模式,然后再切换到非安全模式,反之亦然。更具体的切换过程可参考现有技术,在此不再赘述。It should be noted that the processor still has a monitoring mode between the safe mode and the non-secure mode, and switches from the safe mode to the monitoring mode and then to the non-secure mode during the switching process, and vice versa. For a more specific handover process, reference may be made to the prior art, and details are not described herein again.
现有技术中在移动设备上实现基于区块链的应用,该应用中的私钥管理模块和数据处理模块是放到REE中实现的。其中私钥管理模块用于创建和存储私钥/公钥,数据处理模块用于对数据执行哈希运算、数字签名、摘要比较等处理,从而识别数据是否被篡改以及验证发送方身份信息。In the prior art, a blockchain-based application is implemented on a mobile device, and the private key management module and the data processing module in the application are implemented in the REE. The private key management module is configured to create and store a private key/public key, and the data processing module is configured to perform hashing, digital signature, summary comparison, and the like on the data, thereby identifying whether the data is tampered with and verifying the sender identity information.
以数字钱包软件为例,参考图3,其主要包括五大模块:用户管理模块301、资产管理模块302、秘钥管理模块305、交易数据处理模块304和网络管理模块303。其中,用户管理模块301用于认证用户登录时用户名和密码正确性。资产管理模块302用于查看数字资产信息,给第三方转账等。网络管理模块303用于连接网络,发送/接收网络数据包。秘钥管理模块用于创建和存储私钥和公钥。交易数据处理模块304用于对转出交易数据进行哈希运算以及数字签名处理,对转入交易数据还需要进行交易摘要数据比较,识别交易数据是否被篡改以及验证发送方的身份信息等。如图3所示,本实施例将交易数据处理模块中数字签名的功能(相当于交易数据处理模块304_B)和秘钥管理模块305放置在TEE侧实现,其它功能(相当于交易数据处理模块304_A)和其他模块则仍然放置在REE侧实现。Taking the digital wallet software as an example, referring to FIG. 3, it mainly includes five major modules: a user management module 301, an asset management module 302, a secret key management module 305, a transaction data processing module 304, and a network management module 303. The user management module 301 is configured to authenticate the correctness of the user name and password when the user logs in. The asset management module 302 is used to view digital asset information, transfer funds to third parties, and the like. The network management module 303 is configured to connect to the network and send/receive network data packets. The key management module is used to create and store private and public keys. The transaction data processing module 304 is configured to perform hash operation and digital signature processing on the transferred transaction data, and further needs to compare the transaction summary data, identify whether the transaction data has been tampered with, and verify the identity information of the sender. As shown in FIG. 3, in this embodiment, the function of the digital signature in the transaction data processing module (equivalent to the transaction data processing module 304_B) and the key management module 305 are implemented on the TEE side, and other functions (equivalent to the transaction data processing module 304_A) ) and other modules are still placed on the REE side.
本实施例把数字钱包软件由原来只在REE侧实现变成在REE和TEE侧共同来完成。数字钱包软件在TEE侧通过一个或多个TA实现前述秘钥管理模块和交易数据处理模块的功能,其他模块的功能可在REE侧通过一个或多个CA实现。In this embodiment, the digital wallet software is completed by being implemented only on the REE side and on the REE and TEE side. The digital wallet software implements the functions of the foregoing key management module and transaction data processing module through one or more TAs on the TEE side, and the functions of other modules can be implemented on one or more CAs on the REE side.
需要说明的是,本实施例中REE侧的4个模块由一个CA实现,TEE侧的2个模块由一个TA实现,而在其他实施例中,不同的功能模块也可以由多个CA或TA实现。另外,模块的划分也仅是举例,本申请并不以此为限。It should be noted that, in this embodiment, four modules on the REE side are implemented by one CA, and two modules on the TEE side are implemented by one TA, and in other embodiments, different functional modules may also be configured by multiple CAs or TAs. achieve. In addition, the division of modules is only an example, and the application is not limited thereto.
图4以钱包A向钱包B支付100个数字币为例,介绍交易数据的处理流程。在本实施例中涉及到REE侧模块调用TEE侧模块的过程,可参考前述介绍的CA调用TA的过程,具体调用过程不再详述。FIG. 4 is an example of processing the transaction data by taking the wallet A to pay 100 digital coins to the wallet B as an example. In the embodiment, the process of calling the TEE side module by the REE side module may refer to the process of calling the TA by the CA described above, and the specific calling process is not detailed.
S401:钱包A(也可以理解为终端设备A)在REE侧使用SHA256算法对交易数据进行哈希运算,产生256bit交易摘要。交易数据中包括钱包A的地址信息、钱包B的地址信息以及支付金额信息。交易数据可具体表现为字符串。S401: Wallet A (also referred to as terminal device A) performs a hash operation on the REE side using the SHA256 algorithm to generate a 256-bit transaction digest. The transaction data includes the address information of the wallet A, the address information of the wallet B, and the payment amount information. Transaction data can be represented as a string.
S402:然后钱包A通过CA与TA之间的数据通道,把交易摘要发送给TEE侧的TA。具体实现如下:REE侧CA调用TEEC_InvokeCommand(cmd)函数发送交易摘要数据,其中cmd为:SEND_DIGEST命令。S402: The wallet A then sends the transaction digest to the TA on the TEE side through the data channel between the CA and the TA. The specific implementation is as follows: The REE side CA calls the TEEC_InvokeCommand (cmd) function to send transaction summary data, where cmd is: SEND_DIGEST command.
若以图3为例,则步骤S401和S402可以由交易数据处理模块304_A执行。If FIG. 3 is taken as an example, steps S401 and S402 can be performed by the transaction data processing module 304_A.
S403:TEE侧的TA使用钱包A的私钥以及椭圆曲线数字签名算法(Elliptic Curve Digital Signature Algorithm,ECDSA)对交易摘要进行加密,生成小于320bit的数字签名(或称为签名数据)。S403: The TA on the TEE side encrypts the transaction digest using the private key of the wallet A and the Elliptic Curve Digital Signature Algorithm (ECDSA) to generate a digital signature (or called signature data) of less than 320 bits.
S404:TEE侧的TA将签名数据和钱包A的公钥返回给REE侧CA。钱包A公钥和私钥是在TEE侧通过TA创建的,它们的创建在使用之前,但具体是什么时间在本实施例中不做限定,比如公钥可以在创建私钥之后接着创建,也可以在返回给REE侧之前才创建。钱包A的公钥具体可以根据钱包A的私钥和ECDSA算法获得。S404: The TA on the TEE side returns the signature data and the public key of the wallet A to the REE side CA. The public key and private key of the wallet A are created by the TA on the TEE side. They are created before use, but the specific time is not limited in this embodiment. For example, the public key can be created after the private key is created. It can be created before returning to the REE side. The public key of the wallet A can be obtained according to the private key of the wallet A and the ECDSA algorithm.
若以图3为例,则步骤S403和S404可以由交易数据处理模块304_B执行。If FIG. 3 is taken as an example, steps S403 and S404 can be performed by the transaction data processing module 304_B.
S405:REE侧的CA获得公钥和签名数据后,将交易数据、公钥以及签名数据一起打包成一个网络数据包发送给网络管理模块。网络管理模块将该网络数据包广播给全网的其它区块链节点。S405: After obtaining the public key and the signature data, the CA on the REE side packages the transaction data, the public key, and the signature data into a network data packet and sends the data packet to the network management module. The network management module broadcasts the network data packet to other blockchain nodes of the entire network.
若以图3为例,则步骤S405可以由交易数据处理模块304_A执行。If FIG. 3 is taken as an example, step S405 can be performed by the transaction data processing module 304_A.
图5接续图4,为钱包B(也可以理解为终端设备B)接收到该网络数据包之后的处理过程。其它节点接收到该网络数据包之后的处理过程与下述类似,不再详述。FIG. 5 is a process subsequent to FIG. 4, after the wallet B (also referred to as the terminal device B) receives the network data packet. The processing after the other nodes receive the network data packet is similar to the following, and will not be described in detail.
S501:CA解析出三部分数据:交易数据、公钥以及签名数据。S501: The CA parses out three pieces of data: transaction data, public key, and signature data.
S502:CA调用SHA256算法对交易数据进行哈希运算获得256bit摘要数据。S502: The CA invokes the SHA256 algorithm to hash the transaction data to obtain 256-bit summary data.
S503:CA调用ECDSA验证签名算法对签名数据进行解密,获得原始交易摘要数据。S503: The CA invokes the ECDSA verification signature algorithm to decrypt the signature data to obtain the original transaction summary data.
S504:比较S502和S503产生的摘要数据是否相等,若相等,表示交易数据没有被篡改,接受此交易数据;否则丢弃该交易数据。S504: Compare whether the summary data generated by S502 and S503 are equal. If they are equal, it indicates that the transaction data has not been tampered with, and accepts the transaction data; otherwise, the transaction data is discarded.
在以上交易数据处理流程中私钥的创建和存储是关键的一个环节,如果私钥泄露,那么交易数据的安全就不能被保证。图6为本申请提供的TA创建私钥的流程示意图,亦可以理解为私钥管理模块创建私钥的流程示意图。In the above transaction data processing flow, the creation and storage of the private key is a key link. If the private key is leaked, the security of the transaction data cannot be guaranteed. FIG. 6 is a schematic flowchart of a private key created by a TA provided by the present application, and can also be understood as a schematic flowchart of a private key management module for creating a private key.
S601:TA调用一个随机数产生器产生一个256bit的随机数R1。具体的,该随机数产 生器为硬件随机数产生器或软件随机数产生器,通常硬件随机数产生器的随机性更好,形成的安全性也更高。软件随机数产生器和硬件随机数产生器的实现均为本领域现有技术,其中,软件随机数产生器为一个软件功能单元,硬件随机数产生器为一个硬件,具体实现均为现有技术,本实施例只需调用即可,在此不赘述。S601: The TA calls a random number generator to generate a 256-bit random number R1. Specifically, the random number generator is a hardware random number generator or a software random number generator. Generally, the hardware random number generator has better randomness and higher security. The implementation of the software random number generator and the hardware random number generator are all prior art in the prior art, wherein the software random number generator is a software functional unit, and the hardware random number generator is a hardware, and the specific implementation is prior art. This embodiment only needs to be called, and will not be described here.
S602:使用哈希算法对该随机数R1执行哈希运算获得一个256bit的私钥,该哈希算法可以是SHA(Secure Hash Algorithm)256算法。S602: Perform a hash operation on the random number R1 by using a hash algorithm to obtain a 256-bit private key, and the hash algorithm may be a SHA (Secure Hash Algorithm) 256 algorithm.
S603:使用另一个随机数R2(也可以理解为随机口令、密码或密钥)对S602获得的私钥进行加密,具体的加密算法可以是AES(Advanced Encryption Standard)256算法或其它加密算法,本实施例不做限定。另一个随机数可以通过调用前述随机数产生器或其他随机数产生器产生。S603: Encrypt the private key obtained by S602 by using another random number R2 (which may also be understood as a random password, a password, or a key). The specific encryption algorithm may be an AES (Advanced Encryption Standard) 256 algorithm or other encryption algorithm. The embodiment is not limited. Another random number can be generated by calling the aforementioned random number generator or other random number generator.
S603:存储R2的值和加密后的秘钥。S603: Store the value of R2 and the encrypted key.
为了提高进一步的安全性,本实施例中的R2的值可以进行更新。R2更新后,先对加密后的秘钥执行相应的解密算法,然后在用新的值重新加密私钥。In order to improve further security, the value of R2 in this embodiment can be updated. After R2 is updated, the corresponding decryption algorithm is executed on the encrypted key, and then the private key is re-encrypted with the new value.
请参考图7,为随机数R2更新的流程示意图。Please refer to FIG. 7 , which is a schematic diagram of the process of updating the random number R2.
S701:结合图4所示,TA在接收到交易摘要之后,使用当前存储的R2的值解密当前存储的秘钥。S701: As shown in FIG. 4, after receiving the transaction digest, the TA decrypts the currently stored secret key by using the currently stored value of R2.
S702:TA使用解密后的秘钥对交易摘要进行加密以获得签名数据。S702: The TA encrypts the transaction digest using the decrypted secret key to obtain signature data.
S703:触发随机数产生器产生一个新的随机数,作为R2的值。S703: The trigger random number generator generates a new random number as the value of R2.
S704:使用更新后的R2对私钥重新加密。S704: Re-encrypt the private key by using the updated R2.
S705:存储重新加密后的私钥和新的R2。S705: Store the re-encrypted private key and the new R2.
图7所示出的实现中R2的更新是在执行完一次数字签名(S702)之后,在其他实施例中,R2的更新也可以是周期性地,例如每隔3秒更新一次,或者周期性和图7所示方式结合,或者其它根据需求确定的更新方法。The update of R2 in the implementation shown in Figure 7 is after performing a digital signature (S702). In other embodiments, the update of R2 may also be periodic, such as every 3 seconds, or periodically. Combined with the approach shown in Figure 7, or other update method determined as needed.
以上实施例提供的方法使用TrustZone架构的可信执行环境提供私钥的安全性,可以一定程度上解决私钥在不可信环境中创建、存储和使用所带来的安全风险问题,提高了区块链应用场景下交易数据或其他类型的数据的安全性。The method provided by the foregoing embodiment provides the security of the private key by using the trusted execution environment of the TrustZone architecture, and can solve the security risk problem caused by the creation, storage, and use of the private key in the untrusted environment to some extent, and improve the block. The security of transaction data or other types of data in a chain application scenario.
请参考图8,为本实施例提供的一种计算机系统的结构示意图。该计算机系统可以为终端设备。如图所示,该计算机系统包括通信模块510、传感器520、用户输入模块530、输出模块540、处理器550、音视频输入模块560、存储器570以及电源580。Please refer to FIG. 8 , which is a schematic structural diagram of a computer system according to an embodiment of the present disclosure. The computer system can be a terminal device. As shown, the computer system includes a communication module 510, a sensor 520, a user input module 530, an output module 540, a processor 550, an audio and video input module 560, a memory 570, and a power source 580.
通信模块510可以包括至少一个能使该计算机系统与通信系统或其他计算机系统之间进行通信的模块。例如,通信模块510可以包括有线网络接口,广播接收模块、移动通信模块、无线因特网模块、局域通信模块和位置(或定位)信息模块等其中的一个或多个。这多种模块均在现有技术中有多种实现,本申请不一一描述。 Communication module 510 can include at least one module that enables communication between the computer system and a communication system or other computer system. For example, the communication module 510 can include one or more of a wired network interface, a broadcast receiving module, a mobile communication module, a wireless internet module, a local area communication module, and a location (or positioning) information module. There are many implementations of these various modules in the prior art, and the present application does not describe them one by one.
传感器520可以感测系统的当前状态,诸如打开/闭合状态、位置、与用户是否有接触、方向、和加速/减速,并且传感器520可以生成用于控制系统的操作的感测信号。 Sensor 520 can sense the current state of the system, such as an open/closed state, position, contact with the user, direction, and acceleration/deceleration, and sensor 520 can generate a sensing signal for controlling the operation of the system.
用户输入模块530,用于接收输入的数字信息、字符信息或接触式触摸操作/非接触式手势,以及接收与系统的用户设置以及功能控制有关的信号输入等。用户输入模块530包括触控面板和/或其他输入设备。The user input module 530 is configured to receive input digital information, character information or contact touch/contactless gestures, and receive signal input related to user settings and function control of the system. User input module 530 includes a touch panel and/or other input device.
输出模块540包括显示面板,用于显示由用户输入的信息、提供给用户的信息或系统 的各种菜单界面等。可选的,可以采用液晶显示器(liquid crystal display,LCD)或有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板。在其他一些实施例中,触控面板可覆盖显示面板上,形成触摸显示屏。另外,输出模块540还可以包括音频输出模块、告警器以及触觉模块等。The output module 540 includes a display panel for displaying information input by the user, information provided to the user, or various menu interfaces of the system, and the like. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED). In some other embodiments, the touch panel can cover the display panel to form a touch display. In addition, the output module 540 may further include an audio output module, an alarm, a haptic module, and the like.
音视频输入模块560,用于输入音频信号或视频信号。音视频输入模块560可以包括摄像头和麦克风。The audio and video input module 560 is configured to input an audio signal or a video signal. The audio and video input module 560 can include a camera and a microphone.
电源580可以在处理器550的控制下接收外部电力和内部电力,并且提供系统的各个组件的操作所需的电力。The power supply 580 can receive external power and internal power under the control of the processor 550 and provide the power required for operation of the various components of the system.
处理器550可以包括一个或多个处理器,例如,处理器150可以包括一个或多个中央处理器,或者包括一个中央处理器和一个图形处理器。当处理器150包括多个处理器时,这多个处理器可以集成在同一块芯片上,也可以各自为独立的芯片。一个处理器可以包括一个或多个物理核,其中物理核为最小的处理模块。 Processor 550 can include one or more processors. For example, processor 150 can include one or more central processors, or can include a central processing unit and a graphics processor. When the processor 150 includes a plurality of processors, the plurality of processors may be integrated on the same chip, or may each be a separate chip. A processor can include one or more physical cores, with the physical core being the smallest processing module.
存储器570存储计算机程序,该计算机程序包括操作系统程序572和应用程序571等。典型的操作系统如微软公司的Windows,苹果公司的MacOS等用于台式机或笔记本的系统,又如谷歌公司开发的基于
Figure PCTCN2019086111-appb-000006
的安卓
Figure PCTCN2019086111-appb-000007
系统等用于移动终端的系统。前述实施例提供的方法可以通过软件的方式实现,可以认为是应用程序571的具体实现。
The memory 570 stores a computer program including an operating system program 572, an application 571, and the like. Typical operating systems such as Microsoft's Windows, Apple's MacOS, etc. for desktop or notebook systems, as developed by Google Inc.
Figure PCTCN2019086111-appb-000006
Android
Figure PCTCN2019086111-appb-000007
A system such as a system for a mobile terminal. The method provided by the foregoing embodiment may be implemented by means of software, and may be considered as a specific implementation of the application 571.
存储器570可以是以下类型中的一种或多种:闪速(flash)存储器、硬盘类型存储器、微型多媒体卡型存储器、卡式存储器(例如SD或XD存储器)、随机存取存储器(random access memory,RAM)、静态随机存取存储器(static RAM,SRAM)、只读存储器(read only memory,ROM)、电可擦除可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、可编程只读存储器(programmable ROM,PROM)、磁存储器、磁盘或光盘。在其他一些实施例中,存储器570也可以是因特网上的网络存储设备,系统可以对在因特网上的存储器570执行更新或读取等操作。The memory 570 may be one or more of the following types: flash memory, hard disk type memory, micro multimedia card type memory, card memory (such as SD or XD memory), random access memory (random access memory) , RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable Read-only memory (PROM), magnetic memory, magnetic disk or optical disk. In other embodiments, the memory 570 can also be a network storage device on the Internet, and the system can perform operations such as updating or reading on the memory 570 on the Internet.
处理器550用于读取存储器570中的计算机程序,然后执行计算机程序定义的方法,例如处理器550读取操作系统程序572从而在该系统运行操作系统以及实现操作系统的各种功能,或读取一种或多种应用程序571,从而在该系统上运行应用。The processor 550 is configured to read a computer program in the memory 570 and then execute a computer program defined method, such as the processor 550 reading the operating system program 572 to run an operating system on the system and implementing various functions of the operating system, or reading One or more applications 571 are taken to run the application on the system.
存储器570还存储有除计算机程序之外的其他数据573,例如本申请中涉及的区块、私钥、交易数据、以及随机数等。The memory 570 also stores other data 573 than computer programs, such as blocks, private keys, transaction data, and random numbers, etc., as referred to in this application.
图8中各个模块的连接关系仅为一种示例,本申请任意实施例提供的方法也可以应用在其它连接方式的终端设备中,例如所有模块通过总线连接。The connection relationship of each module in FIG. 8 is only an example, and the method provided by any embodiment of the present application may also be applied to other connection mode terminal devices, for example, all modules are connected through a bus.
需要说明的是,本实施例提供的方法也可以应用于非终端的计算机设备,例如云端服务器。It should be noted that the method provided in this embodiment may also be applied to a non-terminal computer device, such as a cloud server.
需要说明的是,前述实施例中提出模块或单元的划分仅作为一种示例性的示出,所描述的各个模块的功能仅是举例说明,本申请并不以此为限。本领域普通技术人员可以根据需求合并其中两个或更多模块的功能,或者将一个模块的功能拆分从而获得更多更细粒度的模块,以及其他变形方式。It should be noted that the division of the modules or the units in the foregoing embodiments is only shown as an example, and the functions of the various modules described are only examples, and the application is not limited thereto. One of ordinary skill in the art can combine the functions of two or more of the modules as needed, or split the functions of one module to obtain more finer-grained modules, as well as other variations.
以上描述的各个实施例之间相同或相似的部分可相互参考。本申请中的“多个”若无特殊说明,指两个或两个以上,或“至少两个”。The same or similar parts between the various embodiments described above may be referred to each other. "Multiple" in the present application means two or more, or "at least two" unless otherwise specified.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是 或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized. Those of ordinary skill in the art can understand and implement without any creative effort.
以上所述,仅为本申请的一些具体实施方式,但本申请的保护范围并不局限于此。The foregoing is only some specific embodiments of the present application, but the scope of protection of the present application is not limited thereto.

Claims (11)

  1. 一种计算机系统,其特征在于,所述计算机系统上部署有富执行环境REE和可信执行环境TEE,所述计算机系统还部署有基于区块链技术的区块链功能单元,且TEE中部署有所述区块链功能单元中的私钥管理模块和交易数据处理模块,其中A computer system, characterized in that a rich execution environment REE and a trusted execution environment TEE are deployed on the computer system, and the computer system is further configured with a blockchain functional unit based on blockchain technology, and deployed in the TEE There is a private key management module and a transaction data processing module in the blockchain functional unit, wherein
    所述私钥管理模块用于:创建私钥,以及将所述私钥存储在TEE中;The private key management module is configured to: create a private key, and store the private key in a TEE;
    所述交易数据处理模块用于:利用所述私钥对区块链功能单元涉及的摘要数据执行加密。The transaction data processing module is configured to perform encryption on the digest data related to the blockchain functional unit by using the private key.
  2. 根据权利要求1所述的计算机系统,其特征在于,所述私钥管理模块具体用于:在存储所述私钥之前对所述私钥执行加密,其中,存储的所述私钥为加密后的私钥。The computer system according to claim 1, wherein the private key management module is configured to: perform encryption on the private key before storing the private key, wherein the stored private key is encrypted Private key.
  3. 根据权利要求2所述的计算机系统,其特征在于,所述私钥管理模块具体用于:利用密码对所述私钥执行加密,所述密码在条件满足时更新或周期性更新,更新后利用新密码重新对所述私钥执行加密,且存储新密码加密后的私钥。The computer system according to claim 2, wherein the private key management module is configured to: perform encryption on the private key by using a password, and the password is updated or periodically updated when the condition is satisfied, and is used after being updated. The new password re-encrypts the private key and stores the private key encrypted by the new password.
  4. 根据权利要求3所述的计算机系统,其特征在于,所述私钥管理模块具体用于:在利用所述私钥执行完一次对所述摘要数据的加密之后更新所述密码。The computer system according to claim 3, wherein the private key management module is specifically configured to: update the password after performing encryption of the summary data once by using the private key.
  5. 根据权利要求3或4所述的计算机系统,其特征在于,所述密码为硬件随机数产生器产生的随机数。The computer system according to claim 3 or 4, wherein the password is a random number generated by a hardware random number generator.
  6. 一种区块链技术中私钥的管理方法,其特征在于,所述方法应用于部署有富执行环境REE和可信执行环境TEE的计算机系统,所述计算机系统上还部署有区块链功能单元,所述方法包括:在TEE创建所述区块链功能单元所涉及的私钥,以及将所述私钥存储在TEE侧;在TEE侧利用所述私钥对所述区块链功能单元涉及的摘要数据执行加密。A method for managing a private key in a blockchain technology, characterized in that the method is applied to a computer system in which a rich execution environment REE and a trusted execution environment TEE are deployed, and a blockchain function is also deployed on the computer system. a unit, the method comprising: creating a private key involved in the blockchain functional unit at a TEE, and storing the private key on a TEE side; using the private key to the blockchain functional unit on a TEE side The summary data involved performs encryption.
  7. 根据权利要求6所述的方法,其特征在于,在存储所述私钥之前所述方法还包括:对所述私钥执行加密,则存储的私钥为加密后的私钥。The method according to claim 6, wherein the method further comprises: performing encryption on the private key before storing the private key, and storing the private key as an encrypted private key.
  8. 根据权利要求7所述的方法,其特征在于,对所述私钥执行加密并存储所述加密后的私钥包括:The method according to claim 7, wherein performing encryption on the private key and storing the encrypted private key comprises:
    利用密码对所述私钥执行加密,所述密码在条件满足时更新或周期性更新,更新后利用新密码重新对所述私钥执行加密,且存储新密码加密后的私钥。Encryption is performed on the private key by using a password that is updated or periodically updated when the condition is satisfied, and the private key is re-encrypted with the new password after the update, and the private key encrypted by the new password is stored.
  9. 根据权利要求8所述的方法,其特征在于,所述密码在条件满足时更新包括:在利用所述私钥执行完一次对所述摘要数据的加密之后更新所述密码。The method of claim 8, wherein the updating of the password when the condition is satisfied comprises updating the password after performing encryption of the summary data once with the private key.
  10. 一种计算机系统,其特征在于,所述计算机系统包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于读取并执行所述计算机程序以实现如权利要求6-9任意一项所述的方法。A computer system, comprising: a memory for storing a computer program, the processor for reading and executing the computer program to implement any of claims 6-9 One of the methods described.
  11. 一种区块链系统,其特征在于,所述区块链系统中包括如权利要求10所述的计算机系统。A blockchain system, characterized in that the blockchain system comprises the computer system of claim 10.
PCT/CN2019/086111 2018-05-15 2019-05-09 Private key management method and apparatus in blockchain scenario, and system WO2019218919A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810458967.2A CN110492990B (en) 2018-05-15 2018-05-15 Private key management method, device and system under block chain scene
CN201810458967.2 2018-05-15

Publications (1)

Publication Number Publication Date
WO2019218919A1 true WO2019218919A1 (en) 2019-11-21

Family

ID=68539534

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/086111 WO2019218919A1 (en) 2018-05-15 2019-05-09 Private key management method and apparatus in blockchain scenario, and system

Country Status (2)

Country Link
CN (1) CN110492990B (en)
WO (1) WO2019218919A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178884A (en) * 2019-12-16 2020-05-19 平安壹钱包电子商务有限公司 Information processing method, device, equipment and readable storage medium
CN111192050A (en) * 2019-12-31 2020-05-22 成都库珀区块链科技有限公司 Digital asset private key storage and extraction method and device
CN111400743A (en) * 2020-04-07 2020-07-10 百度国际科技(深圳)有限公司 Transaction processing method and device based on block chain network, electronic equipment and medium
CN111538782A (en) * 2020-04-14 2020-08-14 浙江浙燃能源有限公司 Energy big data management system based on block chain
CN111565108A (en) * 2020-07-15 2020-08-21 北京信安世纪科技股份有限公司 Signature processing method, device and system
CN113221141A (en) * 2021-05-06 2021-08-06 杭州复杂美科技有限公司 Wallet encryption storage method, signature method, computer device and storage medium
CN114157431A (en) * 2021-10-27 2022-03-08 上海朝夕网络技术有限公司 Block chain transaction processing method based on multivariate signature method and computer equipment
CN113395159B (en) * 2021-01-08 2024-03-12 腾讯科技(深圳)有限公司 Data processing method based on trusted execution environment and related device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851851B (en) * 2020-01-15 2020-11-06 蚂蚁区块链科技(上海)有限公司 Authority management method, device and equipment in block chain type account book
CN111429254B (en) * 2020-03-19 2021-09-10 腾讯科技(深圳)有限公司 Business data processing method and device and readable storage medium
CN111881474B (en) * 2020-07-24 2023-09-15 杭州弦冰科技有限公司 Private key management method and device based on trusted computing environment
CN112214780B (en) * 2020-08-26 2021-06-25 腾讯科技(深圳)有限公司 Data processing method and device, intelligent equipment and storage medium
CN113014539B (en) * 2020-11-23 2022-05-17 杭州安芯物联网安全技术有限公司 Internet of things equipment safety protection system and method
CN113656841A (en) * 2021-07-28 2021-11-16 复旦大学 Trustzone-based block chain terminal security guarantee system
CN114465761A (en) * 2021-12-22 2022-05-10 航天信息股份有限公司 System and method for safety communication and terminal management

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850200A (en) * 2017-01-25 2017-06-13 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of method for using the digital cash based on block chain, system and terminal
WO2018058441A1 (en) * 2016-09-29 2018-04-05 Nokia Technologies Oy Method and apparatus for trusted computing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9973341B2 (en) * 2015-01-23 2018-05-15 Daniel Robert Ferrin Method and apparatus for the limitation of the mining of blocks on a block chain
US10318746B2 (en) * 2015-09-25 2019-06-11 Mcafee, Llc Provable traceability
CN106991334B (en) * 2016-11-24 2021-03-02 创新先进技术有限公司 Data access method, system and device
CN106549749B (en) * 2016-12-06 2019-12-24 杭州趣链科技有限公司 Block chain privacy protection method based on addition homomorphic encryption
CN107920052B (en) * 2017-08-02 2020-11-17 唐盛(北京)物联技术有限公司 Encryption method and intelligent device
CN107896150A (en) * 2017-12-21 2018-04-10 善林(上海)金融信息服务有限公司 Link block chain network and the system of Internet of Things

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018058441A1 (en) * 2016-09-29 2018-04-05 Nokia Technologies Oy Method and apparatus for trusted computing
CN106850200A (en) * 2017-01-25 2017-06-13 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of method for using the digital cash based on block chain, system and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MIRAJE GENTILAL: "Trustzone-backed Bitcoin Wallet", CS 2 '17 PROCEEDINGS OF THE FOURTH WORKSHOP ON CRYPTOGRAPHY AND SECURITY IN COMPUTING SYSTEMS, 24 January 2017 (2017-01-24), pages 25 - 28, XP058317237 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178884A (en) * 2019-12-16 2020-05-19 平安壹钱包电子商务有限公司 Information processing method, device, equipment and readable storage medium
CN111178884B (en) * 2019-12-16 2024-04-12 平安壹钱包电子商务有限公司 Information processing method, device, equipment and readable storage medium
CN111192050B (en) * 2019-12-31 2023-08-11 成都库珀创新科技有限公司 Digital asset private key storage and extraction method and device
CN111192050A (en) * 2019-12-31 2020-05-22 成都库珀区块链科技有限公司 Digital asset private key storage and extraction method and device
CN111400743A (en) * 2020-04-07 2020-07-10 百度国际科技(深圳)有限公司 Transaction processing method and device based on block chain network, electronic equipment and medium
CN111400743B (en) * 2020-04-07 2023-08-15 百度国际科技(深圳)有限公司 Transaction processing method, device, electronic equipment and medium based on blockchain network
CN111538782A (en) * 2020-04-14 2020-08-14 浙江浙燃能源有限公司 Energy big data management system based on block chain
CN111538782B (en) * 2020-04-14 2023-08-08 浙江浙燃能源有限公司 Energy big data management system based on block chain
CN111565108A (en) * 2020-07-15 2020-08-21 北京信安世纪科技股份有限公司 Signature processing method, device and system
CN113395159B (en) * 2021-01-08 2024-03-12 腾讯科技(深圳)有限公司 Data processing method based on trusted execution environment and related device
CN113221141B (en) * 2021-05-06 2022-07-19 杭州复杂美科技有限公司 Wallet encryption storage method, signature method, computer device and storage medium
CN113221141A (en) * 2021-05-06 2021-08-06 杭州复杂美科技有限公司 Wallet encryption storage method, signature method, computer device and storage medium
CN114157431A (en) * 2021-10-27 2022-03-08 上海朝夕网络技术有限公司 Block chain transaction processing method based on multivariate signature method and computer equipment

Also Published As

Publication number Publication date
CN110492990B (en) 2021-10-15
CN110492990A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
WO2019218919A1 (en) Private key management method and apparatus in blockchain scenario, and system
KR102074116B1 (en) Blockchain node communication method and apparatus
EP3704613B1 (en) Provisioning trusted execution environment(s) based on chain of trust including platform
US10116645B1 (en) Controlling use of encryption keys
EP3387813B1 (en) Mobile device having trusted execution environment
US9838205B2 (en) Network authentication method for secure electronic transactions
ES2687191T3 (en) Network authentication method for secure electronic transactions
TWI601405B (en) Method and apparatus for cloud-assisted cryptography
JP6545136B2 (en) System and method for encrypted transmission of web pages
EP3437322B1 (en) Providing low risk exceptional access
JP5852265B2 (en) COMPUTER DEVICE, COMPUTER PROGRAM, AND ACCESS Permission Judgment Method
US9413754B2 (en) Authenticator device facilitating file security
US9621524B2 (en) Cloud-based key management
JP2020528224A (en) Secure execution of smart contract operations in a reliable execution environment
US20160294794A1 (en) Security System For Data Communications Including Key Management And Privacy
WO2015180691A1 (en) Key agreement method and device for verification information
US10601590B1 (en) Secure secrets in hardware security module for use by protected function in trusted execution environment
US10003467B1 (en) Controlling digital certificate use
WO2022028289A1 (en) Data encryption method and apparatus, data decryption method and apparatus, terminal, and storage medium
US10045212B2 (en) Method and apparatus for providing provably secure user input/output
JP6756056B2 (en) Cryptographic chip by identity verification
KR20150087205A (en) Secure communication architecture
WO2018112482A1 (en) Method and system for distributing attestation key and certificate in trusted computing
JP2022534677A (en) Protecting online applications and web pages that use blockchain
US10462113B1 (en) Systems and methods for securing push authentications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19802901

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19802901

Country of ref document: EP

Kind code of ref document: A1