WO2019237258A1 - 数字货币交互方法,数字货币物理载体,终端设备及存储介质 - Google Patents

数字货币交互方法,数字货币物理载体,终端设备及存储介质 Download PDF

Info

Publication number
WO2019237258A1
WO2019237258A1 PCT/CN2018/090893 CN2018090893W WO2019237258A1 WO 2019237258 A1 WO2019237258 A1 WO 2019237258A1 CN 2018090893 W CN2018090893 W CN 2018090893W WO 2019237258 A1 WO2019237258 A1 WO 2019237258A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
digital currency
physical carrier
terminal device
private key
Prior art date
Application number
PCT/CN2018/090893
Other languages
English (en)
French (fr)
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 王健
Priority to PCT/CN2018/090893 priority Critical patent/WO2019237258A1/zh
Priority to CN201880094551.5A priority patent/CN112352241A/zh
Publication of WO2019237258A1 publication Critical patent/WO2019237258A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data

Definitions

  • the present disclosure relates to the field of digital currency, and in particular, to a digital currency interaction method, a digital currency physical carrier, a terminal device, and a storage medium.
  • Digital currency is an alternative currency in the form of electronic money.
  • Today's digital currencies such as Bitcoin, Litecoin, and PPCoin, rely on checksum cryptography to create, issue, and circulate electronic money. Its characteristics are the use of P2P peer-to-peer network technology to issue, manage and circulate.
  • the learning cost of using digital currency transactions will be much higher than the transaction costs of using traditional currencies.
  • the use of blockchain-based currency transactions requires users to have certain basic knowledge of the blockchain and recognize the transaction characteristics of this type of currency. And when using these digital currencies, the installation and use of applications such as wallets also form a natural barrier to entry.
  • the online transaction process of digital currency takes a long time. Taking Bitcoin as an example, due to its special characteristics, the confirmation time of its transaction is at least one hour, and as the global transaction volume continues to increase, the degree of transaction congestion As it grows, buyers and sellers of normal transactions may not accept it.
  • the present disclosure provides a digital currency interaction method, a digital currency physical carrier, a terminal device, and a storage medium, which can implement offline digital currency ownership transfer that does not depend on the network.
  • a first aspect of the present disclosure provides a digital currency interaction method, which is applied to a digital currency physical carrier, wherein the digital currency physical carrier stores a private key and a public key of a blockchain account,
  • the method includes:
  • the signature response including information signed by the private key.
  • a second aspect of the present disclosure provides another method for interacting with digital currency, the method being applied to a terminal device, the method including:
  • the currency validity of the digital currency physical carrier is checked according to the signature response.
  • a third aspect of the present disclosure provides a digital currency physical carrier, including:
  • the key chip is further configured to: when receiving the signature request sent by the terminal device, use the private key to sign the information carried in the signature request, and return the signed information to the terminal device.
  • a fourth aspect of the present disclosure provides a digital currency physical carrier, including:
  • a processor configured to execute the computer program in the memory to implement the steps of the method according to the first aspect.
  • a fifth aspect of the present disclosure provides a computer-readable storage medium that, when executed by a processor, implements the steps of the method described in the second aspect.
  • a sixth aspect of the present disclosure provides a terminal device, including:
  • a processor configured to execute the computer program in the memory to implement the steps of the method according to the second aspect.
  • the private key of the digital currency is stored in the physical hardware, which can serve as the physical carrier of the digital currency and act as the physical currency for transaction and circulation.
  • the private key in the physical carrier is completely generated and used in hardware, the private key never leaves the hardware itself, and has anti-counterfeiting and non-reproducibility of currency. In this way, the transfer of the digital currency physical carrier in the user's hands is equivalent to completing the currency transaction, and the transaction site does not require users to operate online, which is easy to use and time-consuming.
  • any user obtains the ownership of the digital currency physical carrier, he can inquire and extract the digital currency in the physical carrier online through the terminal device. For a physical carrier with a wallet balance of 0, it can also be recharged through a terminal device.
  • FIG. 1 is a schematic structural diagram of a digital currency physical carrier provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of an interactive method for verifying currency validity of a digital currency physical carrier according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a method for performing online transactions on a digital currency of a digital currency physical carrier according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a digital currency physical carrier key pair generation method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of another method for generating a digital currency physical carrier key pair according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of a method for performing recharge and balance inquiry on a digital currency physical carrier according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a method for verifying the legality of hardware of a digital currency physical carrier according to an embodiment of the present disclosure
  • FIG. 8 is a schematic diagram of an application scenario of the digital currency physical carrier 10 shown in FIG. 1;
  • FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • the digital currency physical carrier 10 includes:
  • a key chip 100 is used to store a key pair of a blockchain account, wherein the private key in the key pair is not readable in the key chip, and the public key in the key pair is in the key chip Readable.
  • the key chip 100 is further configured to: when receiving a signature request sent by the terminal device, use the private key to sign the information carried in the signature request, and return the signed information to the terminal device.
  • the non-readable private key in the key chip refers to the use of hardware to protect the private key. For example, if a high-security crypto chip is used, the calculation of key generation, encryption, decryption, and signature verification is completed in the crypto chip , To ensure that the private key does not leave the cryptographic chip, to prevent the backup and recovery of the private key, to prevent currency counterfeiting and non-replication.
  • the wallet address in the blockchain account is generated based on the public key. Therefore, the public key in the key chip can be read to enable the terminal device to perform balance inquiry or recharge on the physical carrier of the digital currency.
  • the key chip uses the private key to sign the information carried in the signing request of the terminal device, so that the terminal device can verify the validity of the currency of the digital currency physical carrier, and the terminal device can complete the transfer operation online.
  • a user after obtaining a digital currency physical carrier, a user can verify the authenticity of the digital currency physical carrier through a terminal device, and based on the private key signature of the digital currency physical carrier, he can initiate online currency on the blockchain network.
  • Transaction transfer the balance of the digital currency physical carrier to other blockchain accounts.
  • the creation of an online transaction can be initiated by a terminal device or by a digital currency physical carrier.
  • a vendor certificate is also stored in the key chip 100, and the vendor certificate is used to verify the legality of the hardware of the digital currency physical carrier, wherein the vendor certificate is a key from a production batch of a manufacturer
  • the private key in the pair is obtained by signing the public key of the device key pair generated by the digital currency physical carrier.
  • FIG. 1 is schematically illustrated by a card-type physical carrier, such as an IC card (Integrated Circuit Card).
  • the digital currency physical carrier does not need a power supply design and a battery module.
  • the physical carrier of the digital currency may be any programmable smart card, such as a Java Card, and the shape may also be a coin type, which is not limited in this disclosure.
  • all the above-mentioned interactions between the physical carrier of the digital currency and the terminal device can be contact or non-contact.
  • the contact type may be, for example, NFC communication (Near Field Communication).
  • NFC communication Near Field Communication
  • the terminal device may be a smart phone with an NFC interface. Adopting NFC two-way identification and connection, there is no fixed master-slave relationship between the two communication parties, and the digital currency physical carrier can operate in a powerless environment.
  • the embodiment of the present disclosure may integrate a function for connection communication with a terminal device to the key chip 100.
  • the communication function of the digital currency physical carrier may also be provided separately from the key chip, that is, the digital currency physical carrier further includes a communication module connected to the key chip, wherein the communication module It is used to implement at least one of the following communication methods with the terminal device: NFC communication, Bluetooth communication, infrared communication, radio communication, and contact communication.
  • the appearance of the digital currency physical carrier can also be provided with a currency denomination identifier.
  • the issuer before issuing the digital currency physical carrier, the issuer can recharge according to the denomination size already set on the appearance of the digital currency physical carrier, so as to keep users watching
  • the size of the denomination is the same as the actual amount in the blockchain account of the digital currency physical carrier.
  • the denomination logo can be made by printing, stamping, casting, etc.
  • the issuing institution can also set the release time, number, product information, etc. of the digital currency physical carrier according to actual needs, which is not limited in this disclosure.
  • the digital currency physical carrier can act as a physical currency for transaction and circulation.
  • the transfer of the digital currency physical carrier in the user's hands is equivalent to completing the currency transaction, and the transaction site does not require users to operate online, which is easy to use and time-consuming.
  • any user obtains the ownership of the digital currency physical carrier, he can subsequently query and extract the digital currency in the physical carrier online through the terminal device, and can also recharge it through the terminal device.
  • An embodiment of the present disclosure provides an interaction method between a digital currency physical carrier and a terminal device.
  • the digital currency physical carrier may be, for example, the digital currency physical carrier 10 shown in FIG. 1.
  • the interaction method includes an interaction method for verifying currency validity of a digital currency physical carrier, as shown in FIG. 2, including:
  • the terminal device sends an authentication challenge request to a digital currency physical carrier.
  • the digital currency physical carrier receives the authentication challenge request.
  • the digital currency physical carrier signs the information carried in the authentication challenge request according to the stored private key of the blockchain account.
  • the information may be a challenge code.
  • the digital currency physical carrier sends an authentication challenge response to the terminal device, where the authentication challenge response includes information signed by the private key.
  • the information signed by the private key is used by the terminal device to verify the validity of the private key of the digital currency physical carrier.
  • the terminal device receives the authentication challenge response.
  • the currency validity test of the digital currency physical carrier may also include checking whether the private key has been used and whether the account balance is correct. Therefore, in a possible implementation manner of the embodiment of the present disclosure, the above-mentioned authentication challenge response may further include the use status information of the public key and the private key stored on the digital currency physical carrier.
  • the terminal device may further perform the following steps S206 to S208.
  • the terminal device performs signature verification on the information signed by the private key, and obtains an authentication result.
  • the terminal device performs signature verification on the information signed by the private key, and if the authentication is passed, the private key of the digital currency physical carrier is considered valid.
  • the terminal device uses the public key to query the blockchain network for the balance in the wallet of the blockchain account.
  • the key chip 100 records the use state of the private key. Specifically, the key chip 100 is used to sign the currency transaction using the private key, The usage status changes to used. In this way, the terminal device can confirm whether the digital currency of the digital currency physical carrier has been withdrawn based on the use status information of the private key. If the use status information of the private key indicates that the private key has been used, the digital currency physical carrier can be determined. The digital currency is being traded or has been completed. At this time, the terminal device is required to further query the balance of the blockchain network through the public key address.
  • the following table 1 provides the correspondence between the combination of the validity of the private key, the use state of the private key, and the account balance and the state of the physical carrier of the digital currency:
  • the digital currency physical carrier in a secure state, can be used for offline transactions as physical currency; in a state of issuance error, the digital currency physical carrier is recovered by the issuing institution; in an insecure state, the digital currency physical carrier may have used the private key
  • the transaction has been signed, but the transaction has not been confirmed.
  • the transaction has not been broadcasted to the blockchain network, or has not been accepted by the blockchain network, and other reasons can cause the transaction to be in an unconfirmed state.
  • the digital currency physical carrier cannot be used for offline transactions; the cashed digital currency physical carrier can be recharged by the issuing institution or the user; the counterfeit digital currency physical carrier can be destroyed.
  • it can be considered that only the currency of the digital currency physical carrier in a secure state is valid, that is, it can be traded.
  • a user who owns the physical carrier of digital currency consumes it offline.
  • the payee uses his smartphone to check the status of the received physical carrier of digital currency.
  • the detection method is shown in Figure 2. After confirming that the digital currency physical carrier is in a secure state, the transaction is completed. If the state of the digital currency physical carrier is in another state, it can be refused to receive.
  • the transfer of the digital currency physical carrier in the user's hands is equivalent to completing the currency transaction, and the transaction site does not require the user to perform online operations. Further, after the payee obtains the physical carrier of the digital currency, the subsequent transfer can be performed online. For example, the beneficiary himself has an account in the blockchain network, and after receiving the digital currency physical carrier, he can transfer the digital currency to his account wallet.
  • the interaction method between the digital currency physical carrier and the terminal device may also include a method for online transaction of digital currency, as shown in FIG. 3, including:
  • the terminal device sends a transaction request to a digital currency physical carrier.
  • the transaction request includes currency transaction information, such as a payee address.
  • the currency transaction information is created by the terminal device based on a user operation.
  • the digital currency physical carrier receives the transaction request.
  • the digital currency physical carrier signs the currency transaction information carried in the transaction request according to the stored private key of the blockchain account.
  • the digital currency physical carrier changes the use state of the private key to used.
  • the use status information of the private key recorded on the digital currency physical carrier is readable, and is used by the terminal device to determine whether the currency of the digital currency physical carrier is safe and effective in combination with the validity of the private key and the balance.
  • the digital currency physical carrier sends a transaction response to the terminal device.
  • the transaction response includes currency transaction information signed by the private key.
  • the terminal device receives the transaction response.
  • the terminal device initiates a currency transaction to the blockchain network according to the transaction response.
  • the terminal device may also verify the validity of the currency of the digital currency physical carrier before initiating a currency transaction.
  • the transaction response includes the use status information of the private key and the public key stored by the digital currency physical carrier.
  • steps S206 to S208 shown in FIG. 2 are performed. For details, refer to the corresponding description in FIG. 2, and details are not described herein again.
  • the terminal device After determining that the digital currency physical carrier is safe and effective, the terminal device begins to execute the process of initiating a currency transaction to the blockchain network. It is worth noting that the process for the terminal device to initiate a currency transaction to the blockchain network is consistent with the existing online transaction process of the blockchain, and will not be repeated here.
  • the currency transaction information may be created by a digital currency physical carrier, and after the created currency transaction information is signed with a private key, a transaction request is sent to the terminal device.
  • the method for interacting with the terminal device includes: receiving a signature request sent by the terminal device; and according to the private key stored in the digital currency physical carrier Sign the information carried in the signature request; and send a signature response to the terminal device, where the signature response includes the information signed by the private key.
  • the signature request may be, for example, the authentication challenge request described in FIG. 2 or the transaction request described in FIG. 3.
  • the information carried in the transaction request includes currency transaction information.
  • the digital currency physical carrier may also create currency transaction information, use the private key to sign the currency transaction information, and send a transaction request to the terminal device, where the transaction request includes the signed currency transaction Information, the transaction request is used by the terminal device to initiate a currency transaction to a blockchain network according to the currency transaction information.
  • the method for interacting with the digital currency physical carrier includes: sending a signature request to the digital currency physical carrier, such as the authentication challenge request described in FIG. 2 or the transaction request described in FIG. 3; receiving the digital A signature response sent by a physical currency carrier, the signature response including information carried by the signature request signed by the private key; and checking the currency validity of the digital currency physical carrier according to the signature response.
  • the terminal device checking the validity of the currency of the digital currency physical carrier includes: The information signed by the key is subjected to signature verification to obtain an authentication result; the public key is used to query the blockchain network for the balance in the wallet of the blockchain account; according to the use status of the private key, the authentication result and The balance determines whether the digital currency physical carrier is valid.
  • the terminal device when the terminal device receives a transaction request sent by the digital currency physical carrier, and the transaction request includes currency transaction information signed by the private key, it may also initiate currency to the blockchain network according to the transaction request transaction.
  • the interaction method between the digital currency physical carrier and the terminal device may further include a method of generating a key pair, as shown in FIG. 4, including:
  • the terminal device sends a key generation request to the server, and the key generation request is used by the server to authenticate the terminal device.
  • the server is specifically a service backend of the distribution structure.
  • the server can authorize the designated terminal device to have the authority to control the key pair generated by the digital currency physical carrier. In this way, when the server receives a key generation request sent by a terminal device, it needs to authenticate the terminal device to determine whether the terminal device has the corresponding authority.
  • the server receives the key generation request, and authenticates the terminal device according to the key generation request.
  • the server sends a key generation response to the terminal device, where the key generation response includes an authentication result.
  • the terminal device receives a key generation response sent by the server.
  • the terminal device sends a key pair generation instruction to the digital currency physical carrier.
  • the key generation response also includes related information of the account registered in the blockchain network, and the related information is used to generate a key pair and a wallet address.
  • the related information may include a mnemonic in the blockchain wallet AToken.
  • the key pair generation instruction sent by the terminal device to the digital currency physical carrier carries the related information, and is used to trigger the digital currency physical carrier to generate a public key and a private key.
  • the digital currency physical carrier receives a key pair generation instruction sent by the terminal device.
  • the digital currency physical carrier generates a corresponding public key and private key according to the key pair generation instruction.
  • steps S401 to S407 may be steps in the initialization process of the digital currency physical carrier, and the key generation request is an initialization request, then the public and private keys are generated in step S407, and the public key can be directly And private keys are stored, where the private key is not readable, cannot be exported, and the public key is readable.
  • the key pair in the physical carrier of the digital currency may be repeatedly generated. That is, the above key generation request may be a reset request. In this case, after a new key pair is generated in step S407, S408 is performed.
  • the key pair in the digital currency physical carrier can be repeatedly generated.
  • the existing key pair is lost.
  • the physical carrier with a balance of 0 be reset for the digital currency physical carrier.
  • the balance of its account wallet is zero.
  • the public key address can be read by the terminal device by linking the data terminal, and then recharged into the corresponding address. For details, refer to the method steps shown in FIG. 5 below.
  • the digital currency corresponding to the denomination should be recharged when recharging.
  • a digital currency physical carrier generates a key pair.
  • what triggers the digital currency physical carrier to generate a key pair may be a user operation on the digital currency physical carrier.
  • the digital currency physical carrier provides an initialization or reset function button, allowing the user to trigger the digital currency physical carrier to generate a key pair by operating the button.
  • the public key is readable and the private key is unreadable.
  • the digital currency physical carrier sends a newly generated public key of the key pair to a terminal device.
  • the terminal device receives a public key sent by the digital currency physical carrier, and writes the public key into a blockchain.
  • the terminal device writes the public key of the newly generated key pair of the digital currency physical carrier into the blockchain to complete the registration of a new account in the blockchain network.
  • the digital currency physical carrier may have the ability to communicate with the blockchain network.
  • the digital currency physical carrier may also initiate a new account registration of the blockchain network. This disclosure does not address this. Be limited.
  • the interaction method between the digital currency physical carrier and the terminal device may further include a method for performing recharge and balance inquiry on the digital currency physical carrier, as shown in FIG. 6, the method includes:
  • the terminal device sends a public key reading instruction to a digital currency physical carrier.
  • the digital currency physical carrier receives a public key reading instruction initiated by the terminal device.
  • the digital currency physical carrier returns the stored public key to the terminal device according to the public key reading instruction.
  • a digital currency physical carrier may store a private key, a public key, and an address generated based on the public key.
  • the private key is not readable.
  • the public key and address are readable.
  • the terminal device receives the public key returned by the digital currency physical carrier.
  • the terminal device performs recharge or balance inquiry on the wallet of the blockchain account corresponding to the digital currency physical carrier according to the public key.
  • the user can recharge the digital currency physical carrier that has been initialized, or, for the digital currency physical carrier that has been withdrawn, when the user needs to conduct offline transactions, he can recharge the embodied digital currency physical carrier in advance.
  • the digital currency physical carrier may further store a vendor certificate, which is used to verify the digital currency physical The hardware legitimacy of the carrier, wherein the vendor certificate is obtained by signing the public key of the device key pair generated by the digital currency physical carrier by using the private key in the manufacturer's production batch key pair.
  • a key pair of the device can be generated, and for different production batches, the manufacturer's device can generate a key pair for the production.
  • the private key in the production batch key pair is used to sign the read public key of the digital currency physical carrier, and a manufacturer certificate can be obtained.
  • the manufacturer device can write the public key in the production batch key pair into the blockchain.
  • the user terminal device can read the manufacturer's certificate in the digital currency physical carrier and the public key of the manufacturer in the blockchain, and use the public key to sign and verify the manufacturer's certificate. , It is determined that the digital currency physical carrier is issued by the manufacturer. If the authentication fails, it is determined that the digital currency physical carrier is counterfeit.
  • the interaction method between the digital currency physical carrier and the terminal device may further include a method for verifying the hardware legality of the digital currency physical carrier. As shown in FIG. 7, the method includes:
  • the terminal device sends a certificate reading instruction to the digital currency physical carrier.
  • the digital currency physical carrier receives the certificate reading instruction.
  • S703 The digital currency physical carrier sends a manufacturer certificate to the terminal device according to the certificate reading instruction.
  • the terminal device receives the manufacturer certificate.
  • the terminal device obtains the public key of the manufacturer stored in the blockchain.
  • the public key of the manufacturer may be divided into production batches, and the key pairs of the manufacturers corresponding to the physical carriers of digital currency produced in different batches are different.
  • the terminal device uses the public key of the manufacturer to perform signature verification on the manufacturer's certificate, and obtains a signature verification result.
  • the terminal device displays whether the hardware of the digital currency physical carrier is legal according to the result of the signature authentication to the user.
  • the authentication is passed, it is determined that the digital currency physical carrier is issued by the manufacturer, and if the authentication fails, it is determined that the digital currency physical carrier is counterfeit.
  • the interaction between the terminal device and the digital currency physical carrier involved in FIG. 2 to FIG. 7 requires a communication link between the terminal device and the digital currency physical carrier.
  • the communication link may be wired or wireless. It can be contact or non-contact.
  • NFC communication can be established between the key chip 100 and the terminal device 20 (illustrated by a smart phone), and is implemented based on the NFC communication key chip 100.
  • the terminal device 20 is communicatively connected with the blockchain network 30 and the back-end server 40.
  • the embodiment of the present disclosure also provides another digital currency physical carrier, including:
  • a processor configured to execute the computer program in the memory to implement the method steps performed by the digital currency physical carrier in the interaction method provided by the foregoing method embodiment.
  • the execution subject for implementing the above-mentioned digital currency interaction method may have different physical implementations, and the digital currency physical carrier 10 shown in FIG. 1 is only one possible physical implementation.
  • the digital currency physical carrier 10 shown in FIG. 1 is only one possible physical implementation.
  • An embodiment of the present disclosure further provides a computer-readable storage medium, and when the program is executed by a processor, implements method steps performed by a terminal device in the interaction method provided by the foregoing method embodiments.
  • An embodiment of the present disclosure further provides a terminal device, including:
  • a processor configured to execute the computer program in the memory to implement the method steps performed by the terminal device in the interaction method provided by the foregoing method embodiment.
  • FIG. 9 is a schematic diagram of a possible structure of the foregoing terminal device.
  • the terminal device 900 may include a processor 901 and a memory 902.
  • the terminal device 900 may further include one or more of a multimedia component 903, an input / output (I / O) interface 904, and a communication component 905.
  • the processor 901 is configured to control the overall operation of the terminal device 900 to complete the method steps performed by the terminal device in the interaction method provided by the foregoing method embodiments.
  • the memory 902 is configured to store various types of data to support operations on the terminal device 900, and these data may include, for example, instructions for any application program or method for operating on the terminal device 900, and application-related data, Examples include contact data, messages sent and received, pictures, audio, video, and more.
  • the memory 902 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (SRAM) Electrically Erasable Programmable Read-Only Memory (referred to as EEPROM), Erasable Programmable Read-Only Memory (referred to as EPROM), Programmable Read-Only Memory (referred to as PROM), read-only Memory (Read-Only Memory, ROM for short), magnetic memory, flash memory, magnetic disk or optical disk.
  • the multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals.
  • the audio component may include a microphone for receiving external audio signals.
  • the received audio signal may be further stored in the memory 902 or transmitted through the communication component 905.
  • the audio component also includes at least one speaker for outputting an audio signal.
  • the I / O interface 904 provides an interface between the processor 901 and other interface modules.
  • the other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • the communication component 905 is used for wired or wireless communication between the terminal device 900 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or one or more of them, so the corresponding communication component 905 may include: Wi-Fi module, Bluetooth module, NFC module.
  • the terminal device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital signal processors (DSPs), and digital signal processing devices (Digital Signal Processing Device (DSPD for short), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic components Implementation, for performing the method steps performed by the terminal device in the interaction method provided by the foregoing method embodiments.
  • ASICs Application Specific Integrated Circuits
  • DSPs digital signal processors
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • a computer-readable storage medium provided in the embodiment of the present disclosure may be the foregoing memory 902 including program instructions, and the foregoing program instructions may be executed by the processor 901 of the terminal device 900 to complete the terminal in the interaction method provided by the foregoing method embodiment. Method steps performed by the device.

Abstract

一种数字货币交互方法,数字货币物理载体(10),终端设备(20)及存储介质。该数字货币物理载体(10)包括:密钥芯片(100),用于存储区块链账户的密钥对,其中,所述密钥对中的私钥在所述密钥芯片(100)中不可读,所述密钥对中的公钥在所述密钥芯片(100)中可读;所述密钥芯片(100)还用于,在接收到终端设备(20)发送的签名请求时,利用所述私钥对所述签名请求中携带的信息进行签名,并将签名后的信息返回给所述终端设备(20)。该技术方案能够实现不依赖于网络的离线数字货币所有权转移。

Description

数字货币交互方法,数字货币物理载体,终端设备及存储介质 技术领域
本公开涉及数字货币领域,具体地,涉及一种数字货币交互方法,数字货币物理载体,终端设备及存储介质。
背景技术
数字货币是电子货币形式的替代货币,现在的数子货币,比如比特币、莱特币和PPCoin是依靠校验和密码技术来创建、发行和流通的电子货币。其特点是运用P2P对等网络技术来发行、管理和流通。
但是目前数字货币的使用存在以下问题:
对普通消费者而言,使用数字货币交易的学习成本会大大高于使用传统货币的交易成本。例如使用基于区块链的货币交易需要用户具备一定的区块链基础知识,并认识到该类货币的交易特性。并且在使用这些数字货币时,诸如像钱包等应用的安装与使用也形成了天然的准入门槛。另外,数字货币的线上交易过程耗时较长,以比特币为例,由于其特殊特性,使得其交易的确认时间至少在一个小时,并且随着全球交易量的持续增长,交易的拥堵程度不断增大,正常交易的买卖双方可能都无法接受。
发明内容
为了解决现有技术中存在的上述问题,本公开提供一种数字货币交互方法,数字货币物理载体,终端设备及存储介质,能够实现不依赖于网络的离线数字货币所有权转移。
为了实现上述目的,本公开第一方面提供一种数字货币的交互方法,所述方法应用于数字货币物理载体,其中,所述数字货币物理载体存储有区块 链账户的私钥和公钥,所述方法包括:
接收终端设备发送的签名请求;
根据所述数字货币物理载体中存储的所述私钥对所述签名请求携带的信息进行签名,其中,所述数字货币物理载体中存储的所述公钥可读,存储的所述私钥不可读;
向所述终端设备发送签名响应,所述签名响应包括经所述私钥签名的信息。
本公开第二方面提供另一种数字货币的交互方法,所述方法应用于终端设备,所述方法包括:
向数字货币物理载体发送签名请求,其中,所述数字货币物理载体存储有区块链账户的私钥和公钥,并且,存储的所述公钥可读,所述私钥不可读;
接收所述数字货币物理载体发送的签名响应,所述签名响应包括经所述私钥签名后的所述签名请求携带的信息;
根据所述签名响应对所述数字货币物理载体的货币有效性进行检验。
本公开第三方面提供一种数字货币物理载体,包括:
密钥芯片,用于存储密钥对,其中,所述密钥对中的私钥在所述密钥芯片中不可读,所述密钥对中的公钥在所述密钥芯片中可读;
所述密钥芯片还用于,在接收到终端设备发送的签名请求时,利用所述私钥对所述签名请求中携带的信息进行签名,并将签名后的信息返回给所述终端设备。
本公开第四方面提供一种数字货币物理载体,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现第一方面所述方法的步骤。
本公开第五方面提供一种计算机可读存储介质,该程序被处理器执行时实现第二方面所述方法的步骤。
本公开第六方面提供一种终端设备,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现第二方面所述方法的步骤。
采用上述技术方案,至少可以达到如下技术效果:
将数字货币的私钥保存在物理硬件当中,该物理硬件即可作为数字货币的物理载体,充当实体货币进行交易流通。其中,该物理载体内的私钥完全在硬件中生成和使用,私钥永不离开硬件本身,具有货币的防伪以及不可复制性。这样,数字货币物理载体在用户手中的转移即相当于完成了货币交易,交易现场无需用户线上操作,易用性强,耗时短。
进一步地,任一用户在获得数字货币物理载体的所有权后,可以通过终端设备在线上查询以及提取该物理载体中的数字货币。对于钱包余额为0的物理载体,还可以通过终端设备对其进行充值。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
附图说明
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:
图1是本公开实施例提供的一种数字货币物理载体的结构示意图;
图2是本公开实施例提供的一种对数字货币物理载体货币有效性进行验证的交互方法的流程示意图;
图3是本公开实施例提供的一种对数字货币物理载体的数字货币进行线 上交易的方法的流程示意图;
图4是本公开实施例提供的一种数字货币物理载体密钥对的生成方法的流程示意图;
图5是本公开实施例提供的另一种数字货币物理载体密钥对的生成方法的流程示意图;
图6是本公开实施例提供的一种对数字货币物理载体进行充值和余额查询的方法的流程示意图;
图7是本公开实施例提供的一种对数字货币物理载体的硬件合法性进行验证的方法的流程示意图;
图8是图1所示的数字货币物理载体10的一种应用场景的示意图;
图9是本公开实施例提供的一种终端设备的结构示意图。
具体实施方式
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。
本公开实施例提供一种数字货币物理载体,如图1所示,数字货币物理载体10包括:
密钥芯片100,用于存储区块链账户的密钥对,其中,该密钥对中的私钥在该密钥芯片中不可读,该密钥对中的公钥在该密钥芯片中可读。
该密钥芯片100还用于,在接收到终端设备发送的签名请求时,利用该私钥对该签名请求中携带的信息进行签名,并将签名后的信息返回给该终端设备。
其中,私钥在密钥芯片中不可读是指利用硬件对私钥进行保护,如采用高安全性密码芯片,其密钥的产生,加解密、签名验签等计算过程均在密码芯片内完成,确保私钥不离开密码芯片,杜绝了私钥的备份和恢复,具有货 币的防伪以及不可复制性。
值得说明的是,区块链账号中钱包地址是根据公钥生成的,因此,密钥芯片中的公钥可读是为了实现终端设备对该数字货币的物理载体进行余额查询或者充值等操作。
密钥芯片利用私钥对终端设备的签名请求携带的信息进行签名,可以实现终端设备对数字货币物理载体的货币有效性进行检验,以及终端设备在线上完成转账操作。也就是说,某一用户在获得数字货币物理载体后,可以通过终端设备对数字货币物理载体进行真伪验证,并且基于数字货币物理载体的私钥签名,可以在区块链网络发起线上货币交易,将数字货币物理载体的余额转给其他区块链账户。其中,线上交易的创建可以是由终端设备发起,也可以是由数字货币物理载体发起。
可选地,所述密钥芯片100中还存储有厂商证书,所述厂商证书用于验证所述数字货币物理载体的硬件合法性,其中,所述厂商证书是利用厂商的生产批次密钥对中的私钥对所述数字货币物理载体生成的设备密钥对的公钥进行签名得到的。
另外,图1是以卡型的物理载体进行示意,例如IC卡(Integrated Circuit Card,集成电路卡),这样,该数字货币物理载体无需供电设计及电池模块。在具体实施时,该数字货币的物理载体可以是任意可编程的智能卡,例如Java Card,造型也可以是币型的,本公开对此不做限定。并且,上述涉及到数字货币物理载体与终端设备的所有交互,可以是接触式的也可以是非接触式的。
接触式的例如可以是NFC通信(Near Field Communication,近距离无线通信),这样,终端设备即可以为带有NFC接口的智能手机。采用NFC双向识别与连接,通信双方不存在固定的主从关系,并且数字货币物理载体可以在无电的环境下运行。
具体地,本公开实施例可以将用于与终端设备进行连接通信的功能集成到密钥芯片100。在一种可能的实现方式中,数字货币物理载体的通信功能也可以是与密钥芯片分开设置,也就是说,数字货币物理载体还包括与密钥芯片相连的通信模块,其中,该通信模块用于与终端设备实现以下至少一种方式的通信:NFC通信,蓝牙通信,红外通信,无线电通信,接触式通信。
该数字货币的物理载体的外观上还可以设置有货币面额标识,这样,发行机构在发行该数字货币物理载体前,可以按照数字货币物理载体外观上已设置的面额大小进行充值,从而保持用户看到的面额大小与该数字货币物理载体的区块链账户中实际金额大小一致。该面额标识可以使用印刷,冲压,铸造等方式制作。可选地,发行机构也可以根据实际需求设置数字货币物理载体对应的发布时间,编号,产品信息等,本公开对此不做限定。
采用上述数字货币物理载体,该数字货币的物理载体可充当实体货币进行交易流通。这样,数字货币物理载体在用户手中的转移即相当于完成了货币交易,交易现场无需用户线上操作,易用性强,耗时短。并且,任一用户在获得数字货币物理载体的所有权后,后续可以通过终端设备在线上查询以及提取该物理载体中的数字货币,还可以通过终端设备对其进行充值。
具体地,该数字货币物理载体涉及到的与终端设备的交互方法具体可以参照以下方法实施例提供的技术方案。
本公开实施例提供一种数字货币物理载体与终端设备之间的交互方法,该数字货币物理载体例如可以是图1所示的数字货币物理载体10。
具体地,该交互方法包括对数字货币物理载体货币有效性进行验证的交互方法,如图2所示,包括:
S201、终端设备向数字货币物理载体发送认证挑战请求。
S202、该数字货币物理载体接收该认证挑战请求。
S203、该数字货币物理载体根据存储的区块链账号的私钥对该认证挑战 请求携带的信息进行签名。
例如,该信息可以是挑战码。
S204、该数字货币物理载体向该终端设备发送认证挑战响应,该认证挑战响应包括经该私钥签名的信息。
其中,经该私钥签名的信息用于终端设备对该数字货币物理载体私钥的有效性进行验证。
S205、该终端设备接收该认证挑战响应。
另外,对数字货币物理载体的货币有效性检验还可以包括检验私钥是否已使用,账户余额是否正确。因此,在本公开实施例的一种可能的实现方式中,上述认证挑战响应还可以包括数字货币物理载体存储的公钥以及私钥的使用状态信息。
这样,终端设备接收到该认证挑战响应后,还可以执行以下步骤S206至步骤S208。
S206、该终端设备对经私钥签名后的信息进行签名认证,得到认证结果。
具体地,终端设备对经该私钥签名的信息进行签名认证,若认证通过,则认为该数字货币物理载体的私钥有效。
S207、该终端设备利用公钥向区块链网络查询区块链账户的钱包中的余额。
S208、根据所述私钥的使用状态,所述认证结果以及所述余额判断该数字货币物理载体是否有效。
以图1所示的数字货币物理载体10进行举例说明,密钥芯片100记录有私钥的使用状态,具体地,密钥芯片100用于,在使用私钥签署货币交易后,将私钥的使用状态更改为已使用。这样,终端设备基于私钥的使用状态信息即可确认该数字货币物理载体的数字货币是否已经被提现,若私钥的使用状态信息表明私钥已被使用,则可确定该数字货币物理载体的数字货币正 在被交易或者已完成交易,此时需终端设备进一步通过公钥地址向区块链网络查询余额。
下表1提供了私钥有效性,私钥使用状态,账户余额三者的组合与数字货币物理载体的状态的对应关系:
Figure PCTCN2018090893-appb-000001
表1
其中,在安全状态下,数字货币物理载体可作为实体货币进行线下交易;在发行错误状态下,数字货币物理载体由发行机构恢复;在不安全状态下,数字货币物理载体可能已经利用私钥签署过交易,但是该交易还未被确认,其中,交易未被广播到区块链网络,或者还未被区块链网络接受等原因均可导致交易处于未被确认状态,此种状态下,该数字货币物理载体不可用于线下交易;已提现的数字货币物理载体可由发行机构或者所属用户进行充值;伪造的数字货币物理载体可进行销毁。在具体实施时,可认为只有在安全状态下的数字货币物理载体的货币是有效的,即是可以进行交易的。
因此,在一种可能的应用场景下,拥有数字货币物理载体的用户在线下进行消费,收款人收取数字货币物理载体时,利用自身携带的智能手机对收取到的数字货币物理载体进行状态检测,检测方法如图2所示。在确认该数字货币物理载体为安全状态时,完成交易,若该数字货币物理载体的状态为其他状态,则可以拒绝收取。
在上述举例的应用场景中,数字货币物理载体在用户手中的转移即相当 于完成了货币交易,交易现场无需用户线上操作。进一步地,收款人获得数字货币物理载体后,后续可以在线上进行转账。例如,收款人自身在区块链网络中具有账户,其在收取到数字货币物理载体后,可将数字货币转账到自身的账户钱包中。
也就是说,数字货币物理载体与终端设备之间的交互方法还可以包括对数字货币进行线上交易的方法,如图3所示,包括:
S301、终端设备向数字货币物理载体发送交易请求。
其中,该交易请求包括货币交易信息,例如收款人地址。该货币交易信息由终端设备基于用户操作创建。
S302、该数字货币物理载体接收该交易请求。
S303、该数字货币物理载体根据存储的区块链账号的私钥对该交易请求携带的货币交易信息进行签名。
S304、该数字货币物理载体将私钥的使用状态更改为已使用。
其中,数字货币物理载体记录的私钥的使用状态信息是可读取的,用于终端设备结合私钥有效性以及余额判断数字货币物理载体的货币是否安全有效。
S305、该数字货币物理载体向该终端设备发送交易响应。
该交易响应包括经私钥签名的货币交易信息。
S306、该终端设备接收该交易响应。
S307、该终端设备根据该交易响应向区块链网络发起货币交易。
具体地,终端设备在发起货币交易之前,也可以对数字货币物理载体的货币有效性进行验证,例如,该交易响应包括私钥的使用状态信息以及数字货币物理载体存储的公钥,终端设备在接收到该交易响应后,执行图2所示的步骤S206至步骤S208,具体可参照图2中相应的说明,此处不再赘述。在确定数字货币物理载体安全有效后,终端设备开始执行向区块链网络发起 货币交易的流程。值得说明的是,终端设备向区块链网络发起货币交易的流程与现有区块链线上交易流程一致,此处不再赘述。
此外,为了便于理解,上述采用了方法步骤的方式进行描述,但是,本领域技术人员应该知悉,本公开实施例提供的技术方案不受步骤时序的限制,例如,上述S304的步骤可以在S305的步骤之后进行。并且,图3所示的方法仅是一种可能的实现方式,还可能存在其他可替代方式。例如,货币交易信息可以由数字货币物理载体创建,并且对创建的货币交易信息进行私钥签名后,向终端设备发送交易请求。
综合图2和图3所示的方法步骤,在数字货币物理载体侧,其与终端设备的交互方法包括:接收终端设备发送的签名请求;根据所述数字货币物理载体中存储的所述私钥对所述签名请求携带的信息进行签名;向所述终端设备发送签名响应,所述签名响应包括经所述私钥签名的信息。其中,该签名请求例如可以是图2中所述的认证挑战请求,还可以是图3中所述的交易请求,该交易请求携带的信息包括货币交易信息,在此种情况下,该数字货币物理载体在对货币交易信息私钥签名后,还可以将所述私钥的使用状态更改为已使用。
可选地,数字货币物理载体还可以创建货币交易信息,利用所述私钥对所述货币交易信息进行签名,向所述终端设备发送交易请求,所述交易请求包括签名后的所述货币交易信息,所述交易请求用于所述终端设备根据所述货币交易信息向区块链网络发起货币交易。
在终端设备侧,其与数字货币物理载体的交互方法包括:向数字货币物理载体发送签名请求,例如图2中所述的认证挑战请求,或者图3中所述的交易请求;接收所述数字货币物理载体发送的签名响应,所述签名响应包括经所述私钥签名后的所述签名请求携带的信息;根据所述签名响应对所述数字货币物理载体的货币有效性进行检验。
具体地,在签名响应包括所述数字货币物理载体中记录的所述私钥的使用状态以及公钥的情况下,终端设备对数字货币物理载体的货币有效性进行检验包括:对经所述私钥签名后的信息进行签名认证,得到认证结果;利用所述公钥向区块链网络查询所述区块链账户的钱包中的余额;根据所述私钥的使用状态,所述认证结果以及所述余额判断所述数字货币物理载体是否有效。
可选地,终端设备在接收所述数字货币物理载体发送的交易请求,所述交易请求包括经所述私钥签名的货币交易信息时,还可以根据所述交易请求向区块链网络发起货币交易。
数字货币物理载体与终端设备之间的交互方法还可以包括密钥对的生成方法,如图4所示,包括:
S401、终端设备向服务器发送密钥生成请求,该密钥生成请求用于该服务器对终端设备进行鉴权。
其中,该服务器具体为发行结构的服务后端。该服务器可以授权指定的终端设备具有控制数字货币物理载体生成密钥对的权限。这样,服务器接收到某一终端设备发送的密钥生成请求时,需对该终端设备进行鉴权,以确定该终端设备是否拥有相应的权限。
S402、该服务器接收该密钥生成请求,并根据该密钥生成请求对该终端设备进行鉴权。
S403、该服务器向该终端设备发送密钥生成响应,该密钥生成响应包括鉴权结果。
S404、该终端设备接收该服务器发送的密钥生成响应。
S405、若该鉴权结果表明该终端设备具备控制数字货币物理载体生成密钥对的权限,则该终端设备向该数字货币物理载体发送密钥对生成指令。
其中,该密钥生成响应还包括在区块链网络注册的账号的相关信息,该 相关信息用于生成密钥对以及钱包地址,例如该相关信息可以包括区块链钱包AToken中助记词。终端设备向数字货币物理载体发送的密钥对生成指令携带所述相关信息,用于触发数字货币物理载体生成公钥和私钥。
S406、该数字货币物理载体接收该终端设备发送的密钥对生成指令。
S407、该数字货币物理载体根据该密钥对生成指令生成对应的公钥和私钥。
值得说明的是,上述步骤S401至步骤S407可以是数字货币物理载体的初始化过程中的步骤,该密钥生成请求为初始化请求,则在步骤S407中生成得到公钥和私钥,可以直接对公钥和私钥进行存储,其中,私钥不可读,不可导出,公钥可读。
另外,为了重复利用数字货币的物理载体,本公开实施例在一种可能的实现方式中,数字货币物理载体中的密钥对可以重复生成。也就是说,上述密钥生成请求可以为重置请求,在此种情况下,步骤S407生成得到新的密钥对后,执行S408。
S408、若该数字货币物理载体中已存储有一密钥对,则将所述密钥对删除,并存储新生成的所述公钥和所述私钥。
也就是说,数字货币物理载体中的密钥对可以重复生成,重新生成密钥对时,已有密钥对丢失。在实际应用时,由于用户可以重新生成密钥对,但是密钥对的再生会造成前一个密钥对的丢失,因此只建议余额为0数字货币物理载体进行重置操作。
对于新生成了密钥对的数字货币物理载体,其账户钱包的余额为0。此时,可以通过链接数据终端,由终端设备读取公钥地址,再向对应的地址内进行充值,具体可参照下述图5所示的方法步骤。对于外观上展示出了货币面额的数字货币物理载体,充值时应该充值对应面额的数字货币。
值得说明的是,对于上述方法实施例,为了简单描述,故将其都表述为 一系列的动作组合,但是本领域技术人员应该知悉,本公开并不受所描述的动作顺序的限制。
其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本公开所必须的。例如,数字货币物理载体密钥对的生成方法还可以如图5所示,包括:
S501、数字货币物理载体生成密钥对。
其中,触发数字货币物理载体生成密钥对的可以是用户针对数字货币物理载体的操作。例如,数字货币物理载体自身提供初始化或者重置功能按钮,允许用户通过操作该按钮触发数字货币物理载体生成密钥对。
S502、若该数字货币物理载体中已存储有一密钥对,则将该密钥对删除,并存储新生成的所述密钥对中的公钥和私钥。
其中,公钥可读,私钥不可读。
S503、该数字货币物理载体将新生成的所述密钥对的公钥发送给终端设备。
S504、该终端设备接收该数字货币物理载体发送的公钥,并将所述公钥写入区块链。
终端设备将数字货币物理载体新生成的密钥对的公钥写入区块链,以完成区块链网络中新账户的注册。在具体实施时,该数字货币物理载体可以具备与区块链网络通信的能力,在此种情况下,也可以由数字货币物理载体自身发起区块链网络的新账户注册,本公开对此不做限定。
数字货币物理载体与终端设备之间的交互方法还可以包括对数字货币物理载体进行充值和余额查询的方法,如图6所示,该方法包括:
S601、终端设备向数字货币物理载体发送公钥读取指令。
S602、该数字货币物理载体接收该终端设备发起的公钥读取指令。
S603、该数字货币物理载体根据该公钥读取指令将存储的公钥返回给该 终端设备。
本领域技术人员应该理解的是,基于区块链的数字货币的钱包地址通常是公钥生成的,也可能直接是公钥。为了便于描述,本公开实施例直接使用公钥表示钱包地址,根据具体的应用场景,数字货币物理载体可以同时存储私钥、公钥、以及基于公钥生成的地址,其中,私钥不可读,公钥和地址可读。
S604、该终端设备接收该数字货币物理载体返回的公钥。
S605、该终端设备根据该公钥对该数字货币物理载体对应的区块链账户的钱包进行充值或者余额查询。
用户可以对已初始化完成的数字货币物理载体进行充值,或者,对于已被提现的数字货币物理载体,用户需要进行线下交易时,可以预先对已体现的数字货币物理载体进行充值。
可选地,为了防止数字货币物理载体的发行厂商被仿冒,本公开实施例的一种可能的实现方式中,数字货币物理载体中还可以存储有厂商证书,该厂商证书用于验证数字货币物理载体的硬件合法性,其中,所述厂商证书是利用厂商的生产批次密钥对中的私钥对所述数字货币物理载体生成的设备密钥对的公钥进行签名得到的。
具体地,数字货币物理载体在出产前,可以生成设备的密钥对,针对不同的生产批次,厂商设备可以生成生产的密钥对。这样,利用生产批次密钥对中的私钥对读取到的数字货币物理载体的公钥进行签名,即可得到厂商证书。进一步地,厂商设备可以将生产批次密钥对中的公钥写入区块链中。这样,数字货币物理载体出厂流通后,用户终端设备可以读取数字货币物理载体中的厂商证书以及区块链中该产商的公钥,并利用公钥对厂商证书进行签名认证,若认证通过,则确定该数字货币物理载体是该厂商发行的,若认证失败,则确定该数字货币物理载体是伪冒的。
也就是说,数字货币物理载体与终端设备之间的交互方法还可以包括对数字货币物理载体的硬件合法性进行验证的方法,如图7所示,该方法包括:
S701、终端设备向数字货币物理载体发送证书读取指令。
S702、该数字货币物理载体接收该证书读取指令。
S703、该数字货币物理载体根据该证书读取指令向该终端设备发送厂商证书。
S704、该终端设备接收该厂商证书。
S705、该终端设备获取区块链中存储的该厂商的公钥。
其中,厂商的公钥可以是分生产批次的,不同批次生产的数字货币物理载体对应的厂商的密钥对不同。
S706、该终端设备利用该厂商的公钥对该厂商证书进行签名认证,得到签名认证结果。
S707、该终端设备根据签名认证结果向用户展示数字货币物理载体的硬件是否合法。
具体地,若认证通过,则确定该数字货币物理载体是该厂商发行的,若认证失败,则确定该数字货币物理载体是伪冒的。
图2至图7中所涉及到的终端设备与数字货币物理载体之间的交互,需要终端设备与数字货币物理载体之间建立通信链接,该通信链接可以是有线的,也可以是无线的,可以是接触式的,也可以是非接触式的。
以图1所示的数字货币物理载体10为例,如图8所示,密钥芯片100与终端设备20(以智能手机示意)之间可以建立NFC通信,并基于NFC通信密钥芯片100实现图2至图7所示的方法中数字货币物理载体的步骤。终端设备20与区块链网络30以及后端的服务器40通信相连。
本公开实施例还提供另一种数字货币物理载体,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述方法实施例提供的交互方法中数字货币物理载体执行的方法步骤。
也就是说,用于实施上述一种数字货币交互方法的执行主体可以有不同的物理实现方式,图1所示的数字货币物理载体10只是一种可能的物理实现方式。基于本公开实施例提供的技术方案,本领域普通技术人员能够想到的其他方式也属于本发明保护范围之内。
本公开实施例还提供一种计算机可读存储介质,该程序被处理器执行时实现上述方法实施例提供的交互方法中终端设备执行的方法步骤。
本公开实施例还提供一种终端设备,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述方法实施例提供的交互方法中终端设备执行的方法步骤。
示例地,图9是上述终端设备的一种可能的结构示意图。如图9所示,该终端设备900可以包括:处理器901,存储器902。该终端设备900还可以包括多媒体组件903,输入/输出(I/O)接口904,以及通信组件905中的一者或多者。
其中,处理器901用于控制该终端设备900的整体操作,以完成上述方法实施例提供的交互方法中终端设备执行的方法步骤。存储器902用于存储各种类型的数据以支持在该终端设备900的操作,这些数据例如可以包括用于在该终端设备900上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器902可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable  Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件703可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器902或通过通信组件905发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口904为处理器901和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件905用于该终端设备900与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件905可以包括:Wi-Fi模块,蓝牙模块,NFC模块。
在一示例性实施例中,终端设备900可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法实施例提供的交互方法中终端设备执行的方法步骤。
此外,本公开实施例提供的一种计算机可读存储介质即可以为上述包括程序指令的存储器902,上述程序指令可由终端设备900的处理器901执行以完成上述方法实施例提供的交互方法中终端设备执行的方法步骤。
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开 的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,例如,可以在线上交易的流程中,对数字货币物理载体的货币有效性以及硬件合法性进行验证,也就是说,将图2和图7的方法结合到图3所示的方法流程中。为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。

Claims (22)

  1. 一种数字货币的交互方法,其特征在于,所述方法应用于数字货币物理载体,其中,所述数字货币物理载体存储有区块链账户的私钥和公钥,所述方法包括:
    接收终端设备发送的签名请求;
    根据所述数字货币物理载体中存储的所述私钥对所述签名请求携带的信息进行签名,其中,所述数字货币物理载体中存储的所述公钥可读,存储的所述私钥不可读;
    向所述终端设备发送签名响应,所述签名响应包括经所述私钥签名的信息。
  2. 根据权利要求1所述的方法,其特征在于,所述签名请求携带的信息包括货币交易信息,所述方法还包括:
    将所述私钥的使用状态更改为已使用,其中,所述密钥芯片记录有所述私钥的使用状态,所述签名响应用于所述终端设备根据经私钥签名的货币交易信息向区块链网络发起货币交易。
  3. 根据权利要求1所述的方法,其特征在于,所述签名响应还包括所述私钥的使用状态信息,所述密钥芯片记录有所述私钥的使用状态,所述经所述私钥签名的信息以及所述使用状态信息用于所述终端设备对所述数字货币物理载体进行有效性验证。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    生成密钥对;
    若所述数字货币物理载体中已存储有一密钥对,则将所述密钥对删除,并存储新生成的所述密钥对中的公钥和私钥;
    将新生成的所述密钥对的公钥发送给所述终端设备,以便所述终端设备将所述公钥写入区块链。
  5. 根据权利要求4所述的方法,其特征在于,所述生成密钥对包括:
    接收所述终端设备发送的密钥对生成指令;
    根据所述密钥对生成指令生成对应的公钥和私钥。
  6. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    创建货币交易信息;
    利用所述私钥对所述货币交易信息进行签名;
    向所述终端设备发送交易请求,所述交易请求包括签名后的所述货币交易信息,所述交易请求用于所述终端设备根据所述货币交易信息向区块链网络发起货币交易。
  7. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    接收所述终端设备发起的公钥读取指令;
    根据所述公钥读取指令将所述数字货币物理载体中存储的所述公钥返回给所述终端设备,所述公钥用于所述终端设备对所述区块链账户的钱包进行充值或者查询余额。
  8. 根据权利要求1至3中任一项所述的方法,其特征在于,所述数字 货币物理载体中还存储有厂商证书,所述厂商证书用于验证所述数字货币物理载体的硬件合法性,其中,所述厂商证书是利用厂商的生产批次密钥对中的私钥对所述数字货币物理载体生成的设备密钥对的公钥进行签名得到的。
  9. 一种数字货币的交互方法,其特征在于,所述方法应用于终端设备,所述方法包括:
    向数字货币物理载体发送签名请求,其中,所述数字货币物理载体存储有区块链账户的私钥和公钥,并且,存储的所述公钥可读,所述私钥不可读;
    接收所述数字货币物理载体发送的签名响应,所述签名响应包括经所述私钥签名后的所述签名请求携带的信息;
    根据所述签名响应对所述数字货币物理载体的货币有效性进行检验。
  10. 根据权利要求9所述的方法,其特征在于,所述签名响应还包括所述数字货币物理载体中记录的所述私钥的使用状态,所述根据所述签名响应对所述数字货币物理载体的有效性进行检验,包括:
    对经所述私钥签名后的信息进行签名认证,得到认证结果;
    利用所述公钥向区块链网络查询所述区块链账户的钱包中的余额;
    根据所述私钥的使用状态,所述认证结果以及所述余额对所述数字货币物理载体的货币有效性进行检验。
  11. 根据权利要求9所述的方法,其特征在于,所述签名请求中包括货币交易信息,所述方法还包括:
    根据所述签名响应向所述区块链网络发起货币交易。
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述数 字货币物理载体中还存储有厂商证书,所述厂商证书是利用厂商的生产批次密钥对中的私钥对所述数字货币物理载体生成的设备密钥对的公钥进行签名得到的,所述方法还包括:
    向所述数字货币物理载体发送证书读取指令;
    接收所述数字货币物理载体返回的厂商证书;
    从所述区块链网络中获取所述厂商的生产批次密钥对中的公钥;
    根据所述公钥对所述厂商证书进行签名认证,若认证成功,则表明所述数字货币物理载体的硬件合法。
  13. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:
    向服务器发送密钥生成请求,所述密钥生成请求用于所述服务器对终端设备进行鉴权;
    接收所述服务器发送的密钥生成响应,所述密钥生成响应包括鉴权结果;
    若所述鉴权结果表明所述终端设备具备控制所述数字货币物理载体生成密钥对的权限,则向所述数字货币物理载体发送密钥对生成指令,所述密钥对生成指令用于触发所述数字货币物理载体生成公钥和私钥。
  14. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:
    向所述数字货币物理载体发送公钥读取指令;
    接收所述数字货币物理载体返回的公钥;
    根据所述公钥对所述区块链账户的钱包进行充值或者查询余额。
  15. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方 法还包括:
    接收所述数字货币物理载体发送的交易请求,所述交易请求包括经所述私钥签名的货币交易信息;
    根据所述交易请求向区块链网络发起货币交易。
  16. 一种数字货币物理载体,其特征在于,包括:
    密钥芯片,用于存储区块链账户的密钥对,其中,所述密钥对中的私钥在所述密钥芯片中不可读,所述密钥对中的公钥在所述密钥芯片中可读;
    所述密钥芯片还用于,在接收到终端设备发送的签名请求时,利用所述私钥对所述签名请求中携带的信息进行签名,并将签名后的信息返回给所述终端设备。
  17. 根据权利要求16所述的数字货币物理载体,其特征在于,所述数字货币物理载体为接触式或者非接触式IC卡,用于作为实体货币进行流通;或者,所述数字货币物理载体设置有货币面额标识。
  18. 根据权利要求16所述的数字货币物理载体,其特征在于,还包括:与所述密钥芯片相连的通信模块;
    所述通信模块用于与终端设备实现连接通信,其中,所述连接通信的方式包括以下至少一种:NFC通信,蓝牙通信,红外通信,无线电通信,接触式通信。
  19. 根据权利要求16至18中任一项所述的数字货币物理载体,其特征在于,所述密钥芯片中还存储有厂商证书,所述厂商证书用于验证所述数字货币物理载体的硬件合法性,其中,所述厂商证书是利用厂商的生产批次密 钥对中的私钥对所述数字货币物理载体生成的设备密钥对的公钥进行签名得到的。
  20. 一种数字货币物理载体,其特征在于,包括:
    存储器,其上存储有计算机程序;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求1至8中任一项所述方法的步骤。
  21. 一种计算机可读存储介质,其特征在于,该程序被处理器执行时实现权利要求9至15中任一项所述方法的步骤。
  22. 一种终端设备,其特征在于,包括:
    存储器,其上存储有计算机程序;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求9至15中任一项所述方法的步骤。
PCT/CN2018/090893 2018-06-12 2018-06-12 数字货币交互方法,数字货币物理载体,终端设备及存储介质 WO2019237258A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/090893 WO2019237258A1 (zh) 2018-06-12 2018-06-12 数字货币交互方法,数字货币物理载体,终端设备及存储介质
CN201880094551.5A CN112352241A (zh) 2018-06-12 2018-06-12 数字货币交互方法,数字货币物理载体,终端设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090893 WO2019237258A1 (zh) 2018-06-12 2018-06-12 数字货币交互方法,数字货币物理载体,终端设备及存储介质

Publications (1)

Publication Number Publication Date
WO2019237258A1 true WO2019237258A1 (zh) 2019-12-19

Family

ID=68842329

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090893 WO2019237258A1 (zh) 2018-06-12 2018-06-12 数字货币交互方法,数字货币物理载体,终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN112352241A (zh)
WO (1) WO2019237258A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862488A (zh) * 2021-03-29 2021-05-28 中信银行股份有限公司 数据的签名方法、装置、电子设备及计算机可读存储介质
CN113450093B (zh) * 2021-07-06 2023-02-24 山西特信环宇信息技术有限公司 基于锥体区块链的数字零钱钱包实时共识认证方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463001A (zh) * 2014-12-19 2015-03-25 比特卡国际有限公司 一种独立生成和保存加密数字货币私钥的方法及承载加密数字货币私钥的装置
CN107220824A (zh) * 2017-05-02 2017-09-29 北京云知科技有限公司 一种基于数字货币的商品售卖系统和方法
CN107240056A (zh) * 2017-05-08 2017-10-10 暨南大学 一种基于区块链技术的婚恋登记方法
CN107240010A (zh) * 2016-03-25 2017-10-10 中国人民银行印制科学技术研究所 向数字货币芯片卡转入数字货币的方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463001A (zh) * 2014-12-19 2015-03-25 比特卡国际有限公司 一种独立生成和保存加密数字货币私钥的方法及承载加密数字货币私钥的装置
CN107240010A (zh) * 2016-03-25 2017-10-10 中国人民银行印制科学技术研究所 向数字货币芯片卡转入数字货币的方法和系统
CN107220824A (zh) * 2017-05-02 2017-09-29 北京云知科技有限公司 一种基于数字货币的商品售卖系统和方法
CN107240056A (zh) * 2017-05-08 2017-10-10 暨南大学 一种基于区块链技术的婚恋登记方法

Also Published As

Publication number Publication date
CN112352241A (zh) 2021-02-09

Similar Documents

Publication Publication Date Title
US11664997B2 (en) Authentication in ubiquitous environment
JP7442552B2 (ja) 動的オフチェーンデジタル通貨トランザクション処理
US11394559B2 (en) Methods and systems for ownership verification using blockchain
US10846663B2 (en) Systems and methods for securing cryptocurrency purchases
JP6665217B2 (ja) カードリーダとモバイルデバイスとの間のセキュアなセッションの確立
KR101544722B1 (ko) 부인 방지 방법, 이를 위한 결제 관리 서버 및 사용자 단말기
US20220141036A1 (en) Electronic authentication device and method using blockchain
US20190080300A1 (en) Cash-equivalent device for digital currencies
JP7332087B2 (ja) エアギャッピングされた秘密鍵を用いてトランザクションに署名するためのシステムおよび方法
US20130219481A1 (en) Cyberspace Trusted Identity (CTI) Module
AU2015247929A1 (en) Systems, apparatus and methods for improved authentication
US20180158058A1 (en) Apparatus and method to prevent execution of an unauthorized transaction via a distributed database
JP2017537421A (ja) 支払いトークンのセキュリティを確保する方法
CN111034120A (zh) 基于身份信息的加密密钥管理
AU2018382778A1 (en) Device for storing digital keys for signing transactions on a blockchain
CN112352410B (zh) 使用智能卡作为安全令牌的方法和装置,可读存储介质
JP2016528613A (ja) オンライン取引の検証ステップを安全にするための方法
CN110999254B (zh) 安全地执行加密操作
BR112018010287B1 (pt) Método para autenticação de um usuário para uma dada operação,função, ação e/ou processo a ser assegurado, dispositivo para a autenticação de um usuário para uma dada operação, função, ação e/ou processo a ser assegurado,servidor para a autenticação de um usuário para uma dada operação, função, ação e/ou processo a ser assegurado, e sistema, para autenticação de um usuário para uma dada operação, função, ação e/ou processo a ser assegurado
WO2015055120A1 (zh) 用于安全性信息交互的装置
WO2019237258A1 (zh) 数字货币交互方法,数字货币物理载体,终端设备及存储介质
WO2020168564A1 (zh) 数字货币的交易和账户验证方法,装置及存储介质
JP2022054439A (ja) 中央銀行デジタル通貨のための決済方法およびシステム
US20170372306A1 (en) Payment by mobile device secured by f-puf
US9438420B2 (en) Unpredictable number generation

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: 18922191

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: 18922191

Country of ref document: EP

Kind code of ref document: A1