Disclosure of Invention
The invention provides an RFID tag chip suitable for block chain application, and aims to solve the technical problems that an RFID tag cannot be used as a node of a block chain for accounting and further cannot perform hash operation.
The invention is realized by the following steps:
a method of controlling an RFID tag chip suitable for blockchain applications, comprising the steps of:
the MCU module sends a group of data to be encrypted to the Hash operation module;
the Hash operation module encrypts the data and transmits the encrypted data to the MCU module;
the MCU module sends the encrypted data to the RFID reader-writer through the RF module, and the reader-writer is directly linked on the network, so that the interaction between the RFID tag chip and the block chain is realized.
Further preferably, the method further comprises:
and realizing hardware digital signature on the RFID tag chip according to the true random number a generated by the true random generation module and the generation element G of the elliptic encryption module.
Further preferably, the true random number a is generated by using thermal noise.
Further preferably, the step of implementing a hardware digital signature on the RFID tag chip according to the true random number a generated by the true random generation module and the generator G of the elliptic encryption module includes:
constructing a first parameter (a, X)a) Wherein X isa=aG;
Comparing the first parameter with a parameter (k) held by the true random generation modulen-1,Xn-1) Performing linear operation to obtain signature parameter (k)n,Xn) Wherein k isn-1Is a random number, and Xn-1=kn-1G;
Using said signature parameters (k)n,Xn) Executing hardware digital signature;
and sending the hardware digital signature to the MCU module and then to a reader-writer through the RF module.
Further preferably, the method further comprises:
generating a digital currency public key and a digital currency private key in pair through an elliptic curve encryption algorithm, wherein the digital currency public key is a digital currency collection address and consists of a string of binary codes, and the digital currency on the digital currency public key can be paid only by obtaining the digital currency private key;
and sending the digital currency public key to the MCU module and then to a reader-writer through the RF module.
Further preferably, the digital money receiving address is a digital money receiving account number of a company, business or individual who provides the digital money payment service.
The present invention also provides an RFID tag chip suitable for blockchain applications, comprising: the MCU module is used for controlling the work of the whole chip and the running calculation of the algorithm; the RF module is in signal connection with the MCU module and is used for transmitting or receiving data; the storage module is used for storing algorithms and data; and a power management module; the RFID tag chip is characterized by further comprising a Hash operation module which is in signal connection with the MCU module and is used for receiving data to be encrypted sent by the MCU module, encrypting the data to be encrypted and feeding back the encrypted data to the MCU module; the MCU module sends the encrypted data to a network through the RF module, so that the interaction between the RFID tag chip and the block chain is realized; the power management module is used for providing working voltage for the MCU module or controlling the MCU to enter a power-off state according to the MCU module.
Preferably, the RFID tag chip further includes an elliptical encryption module in signal connection with the MCU module, and is configured to generate a digital currency public key and a digital currency private key in pair, and send the digital currency public key to the MCU module, where the digital currency public key is a digital currency collection address and is composed of a string of binary codes, and the digital currency on the digital currency public key can be paid only if the digital currency private key is obtained.
Preferably, the RFID tag chip further includes a true random generation module, which is in signal connection with the MCU module to generate a true random number a, and implements a hardware digital signature on the RFID tag chip according to the true random number a and the generator G of the elliptic encryption module.
Further preferably, the operating voltage may be 1.8V to 3.3V, and may be controlled to enter a power-off state.
The invention has the beneficial effects that: according to the RFID label chip suitable for the block chain application and the control method thereof, which are obtained through the design, the Hash operation module can realize the state Hash of the RFID label chip, automatically synchronize with the block chain, and realize the complete binding of the RFID label chip real object and the block chain, so that the application is safer, the traceability is really realized, and the anti-counterfeiting purpose is realized.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Before further detailed description of the present invention, terms and expressions referred to in the embodiments of the present invention will be described below.
Digital currency, referred to in embodiments of the present invention as encrypted internet currency, is distributed cryptographic-based digital currency including bitcoin, ethercurrency, ledebut coin and other similar derivative currencies, where different block chains may define different digital currencies.
The Block (Block) is a storage unit, each Block realizes the link (chain) through random hash (also called hash algorithm), the Block head (Block head) of the next Block contains the hash value of the previous Block, thereby realizing the sequential connection of the blocks and forming the Block chain.
The block chain (Blockchain) is characterized in that a plurality of nodes are related to each other by a string of nodes by using a cryptography method to generate a block, the block adopts a structure of a block head and a block body, data used for verifying the validity of recorded data in the block head and index data of a previous block are included in the block body, and the block body contains the recorded data within a certain time.
Functionally, a blockchain is a distributed database that is run by a group of distributed nodes and is used to store various records, such as records of virtual currency transactions. In terms of data structure, the blockchain includes a series of blocks, once a new block is added to the blockchain, the new block cannot be removed, and the blocks contain the recorded data for verifying the validity (anti-counterfeiting) of the recorded data and generating the next block.
Taking bitcoin as an example, the transaction of bitcoin depends on the confirmation of nodes in the running blockchain, when the bitcoin transaction is confirmed by a node for the first time, the corresponding transaction list is added to the latest block in the blockchain, the transaction is continuously confirmed by other nodes in the blockchain network to avoid transaction repetition, when the confirmation is obtained in enough blocks (namely, the transaction is recorded in blocks), the transaction is finally confirmed, and the transaction is not reversible.
Asymmetric encryption is a secret method of a key. Asymmetric encryption algorithms require two keys: public key (publickey) and private key (privatekey). The public key is paired with the private key, and if data is encrypted with the private key, it can only be decrypted with the corresponding public key. This algorithm is called asymmetric encryption algorithm because two different keys are used for encryption and decryption. The basic process of realizing confidential information exchange by the asymmetric encryption algorithm is as follows: the first party generates a pair of keys and discloses one of the keys as a public key to the other party; the party B obtaining the public key encrypts the confidential information by using the key and then sends the encrypted confidential information to the party A; the first party decrypts the encrypted information by using another private key stored by the first party.
Referring to fig. 1, an embodiment of the present invention provides a method for controlling an RFID tag chip 100 suitable for a block chain application, including the following steps:
the MCU module 10 sends a group of data to be encrypted to the Hash operation module 16;
the Hash operation module 16 encrypts the data and transmits the encrypted data to the MCU module 10;
the MCU module 10 transmits the encrypted data to the network through the RF module 13, thereby implementing the interaction between the RFID tag chip 100 and the blockchain.
It can be understood that the Hash operation module 16 can realize the Hash of the state of the RFID tag chip 100, automatically synchronize with the block chain, and completely bind the real object of the RFID tag chip 100 with the block chain, so that the application is safer, and the traceability is really realized, thereby achieving the anti-counterfeiting purpose.
The control method may further include the step of implementing a hardware digital signature of the RFID tag chip 100:
and realizing hardware digital signature on the RFID tag chip 100 according to the true random number a generated by the true random generation module 17 and the generator G of the elliptic encryption module.
Specifically, the true random number a may be generated by using thermal noise.
The step of implementing a hardware digital signature on the RFID tag chip 100 according to the true random number a generated by the true random generation module 17 and the generator G of the elliptic encryption module 18 may further include:
constructing a first parameter (a, X)a) Wherein X isa=aG;
The first parameter is compared with the parameter (k) held by the true random generation module 17n-1,Xn-1) Performing linear operation to obtain signature parameter (k)n,Xn) Wherein k isn-1Is a random number, and Xn-1=kn-1G;
Using said signature parameters (k)n,Xn) Number of executing hardwareA word signature;
and sending the hardware digital signature to the MCU module 10 and then to a reader/writer through the RF module 13.
The control method may further include the step of causing the RFID tag chip 100 to implement a wallet function:
generating a digital currency public key and a digital currency private key in pair through an elliptic curve encryption algorithm, wherein the digital currency public key is a digital currency collection address and consists of a string of binary codes, and the digital currency on the digital currency public key can be paid only by obtaining the digital currency private key;
and after sending the digital currency public key to the MCU module 10, sending the digital currency public key to the reader/writer through the RF module 13.
The digital money receiving address may be a digital money receiving account number of a company, business, or individual that provides the digital money payment service. The digital currency may be bitcoin, vicat coin, leite coin, or the like.
In order to avoid the influence of low voltage and low power consumption on the performance and save power while considering the performance, the control method further comprises the following steps:
acquiring a working mode of the MCU module 10, and controlling the MCU module 10 to enter a low-power consumption working mode by the control power management module 14 when the MCU module 10 is in a distributed accounting storage data mode; when the MCU module 10 is in a data transmission mode, the power management module 14 is controlled to provide a working voltage to the MCU module 10. The low-power-consumption working state is that partial non-working modules can enter a power-off state. The working voltage is in the range of 1.5V-3.3V. In one embodiment, the operating voltage is 3.3V.
Referring to fig. 2, an embodiment of the invention further provides an RFID tag chip 100 suitable for blockchain applications, including: the MCU module 10 is used for controlling the work of the whole chip and the running calculation of the algorithm; the RF module 13 is in signal connection with the MCU module 10 and is used for sending or receiving data; a storage module 15 for storing algorithms and data; and a power management module; the RFID tag chip 100 is characterized by further comprising a Hash operation module 16, which is in signal connection with the MCU module 10, and is used for receiving data to be encrypted sent by the MCU module 10, encrypting the data to be encrypted and feeding the encrypted data back to the MCU module 10; the MCU module 10 sends the encrypted data to a network through the RF module 13, thereby realizing the interaction between the RFID tag chip 100 and the block chain; the power management module 14 is provided for providing a working voltage to the MCU module 10 according to the MCU module 10. The RFID tag chip 100 further includes an oscillator 11 and a carrier generator 12. The oscillator 11 and the MCU module 10 are configured to convert dc power into ac power with a certain frequency; the carrier generator 12 is configured to convert a digital signal into a carrier signal and broadcast the carrier signal through the RF module 13.
Further preferably, the RFID tag chip 100 further includes an elliptical encryption module 18 in signal connection with the MCU module 10, and is configured to generate a digital currency public key and a digital currency private key in pair, and send the digital currency public key to the MCU module 10, where the digital currency public key is a digital currency receiving address and is composed of a string of binary codes, and only when the digital currency private key is obtained, the digital currency on the digital currency public key can be paid.
Further preferably, the RFID tag chip 100 further includes a true random generation module 17, which is in signal connection with the MCU module 10, generates a true random number a, and implements a hardware digital signature on the RFID tag chip 100 according to the true random number a and the generator G of the elliptic encryption module 18. In one embodiment, the operating voltage is 3.3V.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.