Summary of the invention
In view of this, the invention provides a kind of radio-frequency recognition system, reader and radio-frequency identification method, can effectively ensure the information security of electronic tag.
For addressing the above problem, the invention provides a kind of radio-frequency recognition system, comprising:
Electronic tag is used to store first random number and utilizes described first random number and first encrypt data that system key obtains after label data is encrypted;
Reader is used for reading described first random number and described first encrypt data that described electronic tag is stored, and utilizes described first random number and described system key, and described first encrypt data is decrypted, and obtains described label data; And be used to generate second random number, and utilize described second random number and described system key, described label data is encrypted, obtain second encrypt data, described second random number and described second encrypt data are write described electronic tag.
Described electronic tag also is used to store the update time of the described first encrypt data correspondence;
Described reader also is used for according to the update time of the described first encrypt data correspondence and default interval update time, judge current described first encrypt data that whether needs to upgrade, and judging when need upgrading described first encrypt data, utilize described first random number and described system key, described first encrypt data is decrypted, obtains described label data.
Described electronic tag comprises main with data storage area and preliminary data memory block;
Described reader is further used for described second random number and described second encrypt data are write described preliminary data memory block; And be used for described preliminary data memory block switched to and main use the data storage area, former master is switched to the preliminary data memory block with the data storage area.
Described reader is further used for determining that the current master of described electronic tag uses the data storage area, reads definite main random number and encrypt data with the data storage area stored.
Described reader is used for sending access code to described electronic tag; Be further used for when receiving described electronic tag, described second random number and described second encrypt data being write described electronic tag to the notice that is proved to be successful of described access code.
The present invention also provides a kind of reader, comprising:
Read module is used for reading first random number and first encrypt data that electronic tag is stored;
Deciphering module is used to utilize described first random number and described system key, and described first encrypt data is decrypted, and obtains described label data;
The random number generation module is used to generate second random number;
Encrypting module is used to utilize described second random number and described system key, and described label data is encrypted, and obtains second encrypt data;
Writing module is used for described second random number and described second encrypt data are write described electronic tag.
Described reader also comprises:
Upgrade judge module, be used for according to default update time at interval and the update time of the described electronic tag described first encrypt data correspondence of storing, judge current described first encrypt data that whether needs to upgrade, and when need upgrading described first encrypt data, trigger described deciphering module current.
The said write module is further used for described second random number and described second encrypt data are write preliminary data memory block in the described electronic tag;
Described reader also comprises:
Handover module, be used for after the said write module writes described preliminary data memory block with described second random number and described second encrypt data, described preliminary data memory block is switched to the master use the data storage area, former master is switched to the preliminary data memory block with the data storage area.
Described read module is further used for determining that the current master of described electronic tag uses the data storage area, reads definite main random number and encrypt data with the data storage area stored.
Described reader also comprises:
Authentication module is used for sending access code to described electronic tag;
The said write module is further used for when receiving described electronic tag to the notice that is proved to be successful of described access code described second random number and described second encrypt data being write described electronic tag.
The present invention also provides a kind of radio-frequency identification method, is applied in the radio-frequency recognition system, and described radio-frequency recognition system comprises reader and electronic tag, and described method comprises:
Described reader reads described first random number and described first encrypt data of storing in the described electronic tag;
Described reader utilizes described first random number and described system key, and described first encrypt data is decrypted, and obtains described label data;
Described reader generates second random number, utilizes described second random number and described system key, and described label data is encrypted, and obtains second encrypt data;
Described reader writes described electronic tag with described second random number and described second encrypt data.
Described reader utilizes described first random number and described system key, and described first encrypt data is decrypted, and obtains before the described label data, and described method also comprises:
Described reader is judged current described first encrypt data that needs to upgrade according to the update time of the first encrypt data correspondence of storing in the described electronic tag and default interval update time.
The present invention has following beneficial effect:
When each time the label data of electronic tag being encrypted, all utilize a random number and system key that label data is encrypted, the encrypt data that encryption obtains changes along with the variation of random number, therefore, the encrypt data of electronic tag stored can irregularly upgrade, not changeless, thereby can effectively avoid the illegal reader lock onto target object outside the system, prevent that responsive target object from illegally being followed the tracks of or setting up the mapping relations of target object and electronic tag, ensured the private ownership and the exclusiveness of the label data in the electronic tag.
When encrypt data is write electronic tag, write the update time of encrypt data correspondence simultaneously, when reading the encrypt data of electronic tag next time, can be according to judging at interval encrypt data update time and default update time current whether needs upgrade encrypt data, avoid the mistake of electronic tag is repeatedly write, improved the serviceable life of label;
Electronic tag takes active and standby mode to store data, guarantees to upgrade the reliability of label data, and when avoiding because of the renewal data manipulation, environment or other influence cause the label data of electronic tag to lose efficacy the situation that causes electronic tag to use;
The write operation of electronic tag utilizes access code protection, can avoid illegal reader altered data, and in addition, by the authentication-access password, reader can also be used to discerning the true and false of electronic tag.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.
Be illustrated in figure 2 as a structural representation of the radio-frequency recognition system of the embodiment of the invention, described radio-frequency recognition system can be passive ultra-high frequency radio-frequency recognition system, passive non-ultrahigh-frequency radio-frequency identification system or active radio-frequency recognition system etc.
Described radio-frequency recognition system comprises reader 100 and electronic tag 200, stores first random number in the described electronic tag 200 and utilizes described first random number and first encrypt data that system key obtains after label data is encrypted; The label data of described electronic tag 200 is used to identify the accompanying target object of described electronic tag 200, and for example, described label data can be the license plate number of vehicle, the sequence number of product or the contents such as title of article.
Described reader 100 comprises:
Read module 101 is used for reading described first random number and described first encrypt data that described electronic tag is stored;
Deciphering module 102 is used to utilize described first random number and described system key, and described first encrypt data is decrypted, and obtains described label data;
Random number generation module 103 is used to generate second random number; Described second random number is different with described first random number;
Encrypting module 104 is used to utilize described second random number and described system key, and described label data is encrypted, and obtains second encrypt data; Described second encrypt data is different with described first encrypt data.
Writing module 105 is used for described second random number and described second encrypt data are write described electronic tag.Promptly utilize described second random number and described second encrypt data, upgrade described first random number and described first encrypt data of storage in the described electronic tag 200.
Reader 100 in the above-mentioned radio-frequency recognition system utilizes random number and system key, label data to described electronic tag 200 is encrypted, therefore, the illegal reader outside system does not know can't decrypt the label data of electronic tag 200 under the situation of system key.
Further, because when the label data of described electronic tag 200 is encrypted, the difference of number average at random of Sheng Chenging each time, the encrypt data that encryption obtains also changes along with the variation of random number, therefore, the encrypt data of described electronic tag 200 stored can irregularly upgrade, not changeless, thereby can effectively avoid the illegal reader lock onto target object outside the system, prevent that responsive target object from illegally being followed the tracks of or setting up the mapping relations of target object and electronic tag, ensured the private ownership and the exclusiveness of the label data in the electronic tag.
When above-mentioned radio-frequency recognition system is the passive radio frequency identification system, because the power supply of the electronic tag in the passive radio frequency identification system is provided by the electromagnetic wave of reader in remote emission, output power is lower, be difficult to carry out complicated treatment scheme on the electronic tag, therefore, described encrypting module 104 utilizes symmetric encipherment algorithm that the label data of described electronic tag 200 is carried out encryption and decryption usually, 3DES (Data Encryption Standard for example, data encryption standards) or AES (Advanced Encryption Standard, superencipherment algorithm standard) cryptographic algorithm, the calculating process of encryption and decryption is all realized on reader.Enciphering and deciphering algorithm also can utilize rivest, shamir, adelman.
In the foregoing description, described encrypting module 104 utilizes random number and system key, when the label data of electronic tag 200 is encrypted, can at first carry out computing to random number and system key, obtain an operation result, and with described operation result as encryption key, the label data of described electronic tag is encrypted, describe for example below.
Suppose that the random number that current described random number generation module 103 generates is 0x1234, system key is 0xC0DE, then both intersection 0x1234C0DE (being described operation result) as encryption key, can be encrypted the label data of described electronic tag 200.
In addition, to random number and system key carry out computing method can also for: utilize system key that random number is encrypted, and will the label data of described electronic tag 200 be encrypted to the encrypted result of random number as encryption key.Under this kind mode, the cryptographic algorithm that adopts when random number is encrypted, the cryptographic algorithm that adopts when the label data of described electronic tag 200 is encrypted can be the same or different.
Distort the data of storing in the described electronic tag 200 for fear of illegal reader, described electronic tag can be protected by access code, and in addition, by the authentication-access password, reader can also be used to discerning the true and false of electronic tag.
At this moment, described reader 100 can also comprise an authentication module, is used in said write module 105 before described electronic tag 200 writes data, sends access code to described electronic tag.Described electronic tag 200 is when receiving described access code, access code that receives and the access code of self storing can be mated, if it is consistent, then feed back the notice that access code are proved to be successful to described reader 100, said write module 105 is further used for when receiving the notice that is proved to be successful of 200 pairs of described access code of described electronic tag random number and encrypt data being write described electronic tag 200.
Generally, it is the label data that utilizes described electronic tag 200, as the license plate number of vehicle or the Electronic Serial Number of product etc., carry out the digital digest that the one-way hash function computing obtains with system key, access code as described electronic tag 200, wherein, one-way hash function can utilize MD5 (Message-Digest Algorithm 5, message digest algorithm 5).
In the foregoing description, described reader 100 can be when reading and deciphering the label data of described electronic tag 200 each time, utilize a random number and system key, label data to described electronic tag 200 is encrypted again, obtain new encrypt data (being second encrypt data in the foregoing description), and new encrypt data is updated in the described electronic tag 200.Thereby, the encrypt data of described electronic tag 200 stored can irregularly upgrade, the encrypt data of the described electronic tag 200 that the illegal reader outside the system reads changes, avoid the specific electronic tag of illegal reader locking or set up electronic tag and target object between mapping relations.
Be understandable that, the indegree of writing of described electronic tag 200 is limited, if after reading the label data of described electronic tag 200 each time, all the label data of described electronic tag 200 is encrypted again, and new encrypt data write described electronic tag 200, then may cause to described electronic tag 200 to write indegree too much, reduce the life-span of electronic tag.
For avoiding the above-mentioned too frequent problem that writes to electronic tag 200, in the embodiment of the invention, can be when in described electronic tag 200, writing encrypt data, write the update time of described encrypt data correspondence simultaneously, be in the electronic tag 200 of the foregoing description except storing described first random number and described first encrypt data, also store the update time of the described first encrypt data correspondence.
When described read module 101 next time reads described electronic tag 200, except needs read described first random number and described first encrypt data of storage in the described electronic tag 200, the update time that also needs to read the described first encrypt data correspondence.
Described reader 100 can be according to the update time of the described first encrypt data correspondence that reads, judge current described first encrypt data that whether needs to upgrade, if do not satisfy update condition, then need not to upgrade described first encrypt data, thereby can reduce the indegree of writing described electronic tag 200.
At this moment, as shown in Figure 3, described reader 100 also comprises:
Upgrade judge module 106, be used for according to default update time at interval and the update time of the described electronic tag described first encrypt data correspondence of storing, judge current described first encrypt data that whether needs to upgrade, and when need upgrading described first encrypt data, trigger described deciphering module 102 current.Concrete, poor in the update time corresponding current time with described first encrypt data, when surpassing default interval update time (for example 1 day), then judged result is the current encrypt data that does not need to upgrade in the described electronic tag 200, this operation is finished.Surpass default update time at interval the time in the difference of the update time corresponding with described first encrypt data current time, then judged result is the current encrypt data that needs to upgrade in the described electronic tag 200.
Judge currently when need upgrading described first encrypt data at described renewal judge module 106, other modules in the described reader are carried out following flow process:
Utilize described first random number and described system key after described deciphering module 102 is triggered, described first encrypt data is decrypted, obtain described label data;
Described random number generation module 103 generates described second random number;
Described encrypting module 104 utilizes described second random number and described system key, and described label data is encrypted, and obtains described second encrypt data;
Said write module 105 is further used for obtaining the current time in system, as the update time of the described second encrypt data correspondence, and described electronic tag will be write update time of described second random number, described second encrypt data and the described second encrypt data correspondence.
In addition, in some cases, described encrypting module 103 can also utilize random number and system key, simultaneously to encrypting the label data and the current update time of described electronic tag 200, promptly, in the encrypt data that obtains, comprise the label data of described electronic tag 200 and the information of current update time simultaneously.At this moment, when reading described electronic tag 200 next time, described reader 100 at first needs described encrypt data is decrypted, obtain the update time of described encrypt data correspondence, and then, judge the current described encrypt data that whether needs to upgrade according to update time of described encrypt data correspondence.
When radio-frequency recognition system in the above-described embodiments is the passive ultra-high frequency radio-frequency recognition system, because the reader 100 in the passive ultra-high frequency radio-frequency recognition system is noncontacts with electronic tag 200, and electronic tag 200 accompanying target objects may be rapid movements, therefore, at reader 100 when electronic tag 200 writes data, the situation that the label data that might occur writing the failure and cause electronic tag lost efficacy, this kind situation can cause electronic tag 200 to use.
For avoiding the above-mentioned situation that writes failure, in the embodiment of the invention, can in described electronic tag 200, be provided with main with data storage area and preliminary data memory block, at needs when described electronic tag 200 writes data, the writing module 105 of described reader 100 writes described preliminary data memory block with random number and encrypt data, at this moment, as shown in Figure 4, described reader 100 also comprises: all die change pieces 107, be used for after said write module 105 writes described preliminary data memory block with random number and encrypt data, described preliminary data memory block is switched to the master use the data storage area, former master is switched to the preliminary data memory block with the data storage area.Under this kind situation, even data write failure, the data that former master writes when also preserving last the renewal with the data storage area can not cause electronic tag 200 to use.
Main in the described electronic tag 200 can be two partition holdings on the physical division with data storage area and preliminary data memory block, can be two partition holdings in logic according to the address division.Described master can also comprise a data field and a tag slot with the data storage area, described master is used for storing the encrypt data (being described second encrypt data of the foregoing description) of last update with the data field of data storage area, the described main encrypt data random number corresponding (being described second random number of the foregoing description) that is used for storing described last update with the tag slot of data storage area.Described preliminary data memory block also can comprise a data field and a tag slot, the data field of described preliminary data memory block is used for storing the last encrypt data (being described first encrypt data of the foregoing description) that upgrades, and the tag slot of described preliminary data memory block is used for storing the described last encrypt data random number corresponding of upgrading (being described first random number of the foregoing description).
In addition, during the encrypt data of described read module 101 in reading described electronic tag 200, need at first to determine that the current main of described electronic tag 200 use the data storage area, read described main random number and the encrypt data of using the data storage area stored then.Specifically, described read module 101 reads described main random number and the described main encrypt data of storing with the tag slot of data storage area of using the data area stores of data storage area successively.
In the foregoing description, described handover module 107 can be by the mode of adding activation tagging in the tag slot of described data storage area, and indication current data memory block is main with data storage area or preliminary data memory block.At this moment, the activation tagging of putting down in writing in the tag slot of two data memory blocks that described reader 100 can be by analyzing described electronic tag 200 determines that the current master of described electronic tag 200 uses the data storage area.
Can utilize activation tagging and random number verification and method judge whether the current data memory block is activated (be main use data storage area).Suppose verification and be 0xFF, described reader 100 reads the activation tagging and the random number of active and standby data storage area storage from described electronic tag 100, and judge the verification of ∑ RN (random number)+En (activation tagging) and whether be 0xFF, if be verification and 0xFF, the data storage area of then described activation tagging correspondence activates.If two situations that the data memory block is activated simultaneously then can select a data memory block to use the data storage area as current master at random.In addition, when the master is used the data storage area deactivation, former activation tagging negate can be got final product.
For example the handoff procedure of the active and standby data storage area of above-mentioned electronic tag 200 is elaborated below.
Be depicted as the structural representation of active and standby data storage area of the electronic tag of the embodiment of the invention as Fig. 5 a, 5b, 5c and 5d.
As described in reader 100 reads as described in being depicted as Fig. 5 a during electronic tag 200, data storage situation in the described electronic tag 200, arrow indication data storage area is that the master uses data storage area, described reader 100 to read the encrypt data 1 (being described first encrypt data in the foregoing description) of this data storage area stored.
As described in being depicted as Fig. 5 b reader 100 to as described in the data field of preliminary data storage area when writing new encrypt data 2 (be in the foregoing description as described in second encrypt data), the data storage situation in the described electronic tag 200.
As described in being depicted as Fig. 5 c reader 100 to as described in the tag slot of preliminary data storage area write new random number (be in the foregoing description as described in second random number) and activate as described in during the preliminary data memory block, the data storage situation in the described electronic tag 200.
As described in being depicted as Fig. 5 d reader 100 with as described in the data storage area at new encrypt data 2 places switch to the main data storage area of using, when the data storage area at encrypt data 1 place is switched to the preliminary data memory block, the data storage situation in the described electronic tag 200.
The embodiment of the invention also provides a kind of reader, and described reader application is in a radio-frequency recognition system, and described radio-frequency recognition system can be passive ultra-high frequency radio-frequency recognition system, passive non-ultrahigh-frequency radio-frequency identification system or active radio-frequency recognition system etc.Described radio-frequency recognition system also comprises an electronic tag, stores first random number in the described electronic tag and utilizes described first random number and first encrypt data that system key obtains after label data is encrypted; The label data of described electronic tag is used to identify the accompanying target object of described electronic tag, and for example, described label data can be the license plate number of vehicle, the sequence number of product or the contents such as title of article.
Described reader comprises:
Read module is used for reading described first random number and described first encrypt data that described electronic tag is stored;
Deciphering module is used to utilize described first random number and described system key, and described first encrypt data is decrypted, and obtains described label data;
The random number generation module is used to generate second random number; Described second random number is different with described first random number;
Encrypting module is used to utilize described second random number and described system key, and described label data is encrypted, and obtains second encrypt data; Described second encrypt data is different with described first encrypt data.
Writing module is used for described second random number and described second encrypt data are write described electronic tag.Promptly utilize described second random number and described second encrypt data, upgrade described first random number and described first encrypt data stored in the described electronic tag.
Above-mentioned reader utilizes random number and system key, and the label data of described electronic tag is encrypted, and therefore, the illegal reader outside system does not know can't decrypt the label data of electronic tag under the situation of system key.
Further, because when the label data of described electronic tag is encrypted, the difference of number average at random of Sheng Chenging each time, the encrypt data that encryption obtains also changes along with the variation of random number, therefore, the encrypt data of described electronic tag stored can irregularly upgrade, not changeless, thereby can effectively avoid the illegal reader lock onto target object outside the system, prevent that responsive target object from illegally being followed the tracks of or setting up the mapping relations of target object and electronic tag, ensured the private ownership and the exclusiveness of the label data in the electronic tag.
In the foregoing description, described encrypting module utilizes random number and system key, when the label data of electronic tag is encrypted, can at first carry out computing to random number and system key, obtain an operation result, and with described operation result as encryption key, the label data of described electronic tag is encrypted.
Distort the data of storing in the described electronic tag for fear of illegal reader, described electronic tag can be protected by access code, and in addition, by the authentication-access password, reader can also be used to discerning the true and false of electronic tag.
At this moment, described reader can also comprise an authentication module, is used in the said write module before described electronic tag writes data, sends access code to described electronic tag.Described electronic tag is when receiving described access code, access code that receives and the access code of self storing can be mated, if it is consistent, then feed back the notice that access code is proved to be successful to described reader, the said write module is further used for when receiving described electronic tag to the notice that is proved to be successful of described access code random number and encrypt data being write described electronic tag.
In the foregoing description, described reader can be when reading and deciphering the label data of described electronic tag each time, utilize a random number and system key, label data to described electronic tag is encrypted again, obtain new encrypt data (being second encrypt data in the foregoing description), and new encrypt data is updated in the described electronic tag.Thereby, the encrypt data of described electronic tag stored can irregularly upgrade, the encrypt data of the described electronic tag that the illegal reader outside the system reads changes, avoid the specific electronic tag of illegal reader locking or set up electronic tag and target object between mapping relations.
Be understandable that, the indegree of writing of described electronic tag is limited, if after reading the label data of described electronic tag each time, all the label data of described electronic tag is encrypted again, and new encrypt data write described electronic tag, then may cause to described electronic tag to write indegree too much, reduce the life-span of electronic tag.
For avoiding the above-mentioned too frequent problem that writes to electronic tag, in the embodiment of the invention, can be when in described electronic tag, writing encrypt data, write the update time of described encrypt data correspondence simultaneously, be in the electronic tag of the foregoing description except storing described first random number and described first encrypt data, also store the update time of the described first encrypt data correspondence.
When described read module reads described electronic tag next time, except needs read described first random number and described first encrypt data of storing in the described electronic tag, the update time that also needs to read the described first encrypt data correspondence.
Described reader can be according to the update time of the described first encrypt data correspondence that reads, judge current described first encrypt data that whether needs to upgrade, if do not satisfy update condition, then need not to upgrade described first encrypt data, thereby can reduce the indegree of writing described electronic tag.
At this moment, described reader also comprises:
Upgrade judge module, be used for according to the update time of the described first encrypt data correspondence and default interval update time, judge current described first encrypt data that whether needs to upgrade, and when need upgrading described first encrypt data, trigger described deciphering module current.
Judge currently when need upgrading described first encrypt data at described renewal judge module, other modules in the described reader are carried out following flow process:
After described deciphering module is triggered, utilize described first random number and described system key, described first encrypt data is decrypted, obtain described label data;
Described random number generation module generates described second random number;
Described encrypting module utilizes described second random number and described system key, and described label data is encrypted, and obtains described second encrypt data;
The said write module is further used for obtaining the current time in system, as the update time of the described second encrypt data correspondence, and described electronic tag will be write update time of described second random number, described second encrypt data and the described second encrypt data correspondence.
In addition, in some cases, described encrypting module can also utilize random number and system key, simultaneously to encrypting the label data and the current update time of described electronic tag, promptly, in the encrypt data that obtains, comprise the label data of described electronic tag and the information of current update time simultaneously.At this moment, when reading described electronic tag, described reader at first needs described encrypt data is decrypted, and obtains the update time of described encrypt data correspondence next time, and then, judge the current described encrypt data that whether needs to upgrade according to update time of described encrypt data correspondence.
When radio-frequency recognition system in the above-described embodiments is the passive ultra-high frequency radio-frequency recognition system, because reader and electronic tag in the passive ultra-high frequency radio-frequency recognition system are noncontacts, and the accompanying target object of electronic tag may be a rapid movement, therefore, at reader when electronic tag writes data, the situation that the label data that might occur writing the failure and cause electronic tag lost efficacy, this kind situation can cause electronic tag to use.
For avoiding the above-mentioned situation that writes failure, in the embodiment of the invention, can in described electronic tag, be provided with main with data storage area and preliminary data memory block, at needs when described electronic tag writes data, the writing module of described reader writes described preliminary data memory block with random number and encrypt data, at this moment, described reader also comprises: all die change pieces, be used for after the said write module writes described preliminary data memory block with random number and encrypt data, described preliminary data memory block is switched to the master use the data storage area, former master is switched to the preliminary data memory block with the data storage area.Under this kind situation, even data write failure, the data that former master writes when also preserving last the renewal with the data storage area can not cause electronic tag to use.
Main in the described electronic tag can be two partition holdings on the physical division with data storage area and preliminary data memory block, can be two partition holdings in logic according to the address division.Described master can also comprise a data field and a tag slot with the data storage area, described master is used for storing the encrypt data (being described second encrypt data of the foregoing description) of last update with the data field of data storage area, the described main encrypt data random number corresponding (being described second random number of the foregoing description) that is used for storing described last update with the tag slot of data storage area.Described preliminary data memory block also can comprise a data field and a tag slot, the data field of described preliminary data memory block is used for storing the last encrypt data (being described first encrypt data of the foregoing description) that upgrades, and the tag slot of described preliminary data memory block is used for storing the described last encrypt data random number corresponding of upgrading (being described first random number of the foregoing description).
In addition, during the encrypt data of described read module in reading described electronic tag, need at first to determine that the current main of described electronic tag use the data storage area, read described main random number and the encrypt data of using the data storage area stored then.Specifically, described read module reads described main random number and the described main encrypt data of storing with the tag slot of data storage area of using the data area stores of data storage area successively.
In the foregoing description, described handover module can be by the mode of adding activation tagging in the tag slot of described data storage area, and indication current data memory block is main with data storage area or preliminary data memory block.At this moment, the activation tagging of putting down in writing in the tag slot of two data memory blocks that described reader can be by analyzing described electronic tag determines that the current master of described electronic tag uses the data storage area.
Be illustrated in figure 6 as a flow process synoptic diagram of the radio-frequency identification method of the embodiment of the invention, be applied in the radio-frequency recognition system, described radio-frequency recognition system comprises reader and electronic tag, stores first random number in the described electronic tag and utilizes described first random number and first encrypt data that system key obtains after label data is encrypted.
Described radio-frequency identification method may further comprise the steps:
Step 601, described reader read described first random number and described first encrypt data of storing in the described electronic tag;
Step 602, described reader are utilized described first random number and described system key, and described first encrypt data is decrypted, and obtain described label data;
Step 603, described reader generates second random number;
Step 604, described reader are utilized described second random number and described system key, and described label data is encrypted, and obtain second encrypt data;
Step 605, described reader writes described electronic tag with described second random number and described second encrypt data.
Above-mentioned reader utilizes random number and system key, and the label data of described electronic tag is encrypted, and therefore, the illegal reader outside system does not know can't decrypt the label data of electronic tag under the situation of system key.
Further, because when the label data of described electronic tag is encrypted, the difference of number average at random of Sheng Chenging each time, the encrypt data that encryption obtains also changes along with the variation of random number, therefore, the encrypt data of described electronic tag stored can irregularly upgrade, not changeless, thereby can effectively avoid the illegal reader lock onto target object outside the system, prevent that responsive target object from illegally being followed the tracks of or setting up the mapping relations of target object and electronic tag, ensured the private ownership and the exclusiveness of the label data in the electronic tag.
In the foregoing description, described reader can be when reading and deciphering the label data of described electronic tag each time, utilize a random number and system key, label data to described electronic tag is encrypted again, obtain new encrypt data (being second encrypt data in the foregoing description), and new encrypt data is updated in the described electronic tag.Thereby, the encrypt data of described electronic tag stored can irregularly upgrade, the encrypt data of the described electronic tag that the illegal reader outside the system reads changes, avoid the specific electronic tag of illegal reader locking or set up electronic tag and target object between mapping relations.
Be understandable that, the indegree of writing of described electronic tag is limited, if after reading the label data of described electronic tag each time, all the label data of described electronic tag is encrypted again, and new encrypt data write described electronic tag, then may cause to described electronic tag to write indegree too much, reduce the life-span of electronic tag.
For avoiding the above-mentioned too frequent problem that writes to electronic tag, in the embodiment of the invention, can be when in described electronic tag, writing encrypt data, write the update time of described encrypt data correspondence simultaneously, be in the electronic tag of the foregoing description except storing described first random number and described first encrypt data, also store the update time of the described first encrypt data correspondence.
Be illustrated in figure 7 as another schematic flow sheet of the radio-frequency identification method of the embodiment of the invention, described radio-frequency identification method may further comprise the steps:
Step 701, described reader read the update time of described first random number of storing in the described electronic tag, described first encrypt data and the described first encrypt data correspondence;
Step 702, described reader is judged current described first encrypt data that whether needs to upgrade according to the update time of the described first encrypt data correspondence and default interval update time, if, execution in step 703, otherwise finish this operation;
Step 703, described reader when need upgrading described first encrypt data, utilizes described first random number and described system key current, and described first encrypt data is decrypted, and obtains described label data;
Step 704, described reader generate described second random number;
Step 705, described reader are utilized described second random number and described system key, and described label data is encrypted, and obtain described second encrypt data;
Step 706, described reader obtains the current time in system, as the update time of the described second encrypt data correspondence, and will write update time of described second random number, described second encrypt data and the described second encrypt data correspondence described electronic tag.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.