CN104469773B - A kind of wireless beacon anti-counterfeiting method - Google Patents

A kind of wireless beacon anti-counterfeiting method Download PDF

Info

Publication number
CN104469773B
CN104469773B CN201410850015.7A CN201410850015A CN104469773B CN 104469773 B CN104469773 B CN 104469773B CN 201410850015 A CN201410850015 A CN 201410850015A CN 104469773 B CN104469773 B CN 104469773B
Authority
CN
China
Prior art keywords
wireless beacon
msb
generated code
token
mediant
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410850015.7A
Other languages
Chinese (zh)
Other versions
CN104469773A (en
Inventor
赖众程
岳昂
祖新星
付山阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201410850015.7A priority Critical patent/CN104469773B/en
Publication of CN104469773A publication Critical patent/CN104469773A/en
Application granted granted Critical
Publication of CN104469773B publication Critical patent/CN104469773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud

Abstract

The invention discloses a kind of wireless beacon anti-counterfeiting method, this method is based on wireless beacon, mobile terminal and server and realizes that this method comprises the following steps:Step A, the wireless beacon for lacking generated code send out radio broadcasting, and standby communication terminal is established with the wireless beacon and connected;The legitimacy of other side is mutually authenticated in step B, the wireless beacon and mobile terminal;Step C is mutually authenticated by rear, and mobile terminal obtains generated code to server, and wireless beacon is written in generated code.In above-mentioned anti-counterfeiting method, the wireless beacon and mobile terminal are based on wireless communication mode, and the legitimacy of other side is verified between wireless beacon and mobile terminal by the verification method, only when be mutually authenticated by after, mobile terminal can obtain generated code to server, wireless beacon is written into generated code again so that the ablation process of generated code is safer, has effectively achieved the effect that anti-counterfeiting.

Description

A kind of wireless beacon anti-counterfeiting method
Technical field
The present invention relates to protecting information safety method more particularly to a kind of wireless beacon anti-counterfeiting methods.
Background technology
Currently, occurring a kind of wireless beacon production carrying out accurate micro- positioning by the low-consumption wireless communication technology in the market Product, when the mobile terminal of user is close to a wireless beacon, equipment can sense the signal that wireless beacon is sent out, covering Range can reach 50 meters.Wireless beacon technology is similar to indoor GPS, and mobile terminal can receive the letter of wireless beacon transmission Number, and obtain various accurate location informations.For example, when user drives to the underground parking in market, parking is returned after shopping When field, mobile terminal can find the exact position of oneself locomotive according to signals direct user.
But positioning is a part for wireless beacon technology, wireless beacon also allows the mobile terminal of user to send out letter Single " I am at this " signal, it means that wireless beacon technology can complete more things, for example, passing by one when user goes window-shopping Shop, this family shop can send out wireless signal, and at this moment the mobile phone of user can obtain the same day available discount coupon.For another example, User enters into the shop in a shopping center with a mobile terminal, while this also means that user has come into this family shop The signal area of paving, wireless beacon can transmit discount coupon, the various information such as navigation information in shop to the mobile terminal of user, Even when user goes to before certain sales counters, wireless beacon can also provide personalized commercial product recommending information.That is, In the information area of wireless beacon, user can obtain personalized location information and notice by the mobile terminal in hand.
Based on above-mentioned advantage, more and more wireless beacons will occur in public place, each wireless beacon can be one A independent hardware, transmission, broadcast for perfect information, the wireless beacon of oneself, such production will be developed in major operation commercial city Product in process of production, need to add firmware production process to the wireless beacon on assembly line, but each wireless beacon has Independent wireless beacon ID and generated code cause production efficiency low so needing that firmware is fabricated separately for each wireless beacon, In addition, wireless beacon is during exploitation, production, use, there is also following security risks:
1, be to resist to forge wireless beacon, the corresponding generated codes of wireless beacon ID need to hold in close confidence, but existing operation need by Generated code gives manufacturer to make firmware for each wireless beacon in plain text, is unfavorable for information security;
2, since manufacturer will make firmware, thus manufacturer is also given the source code of firmware to by operator, no Conducive to technical know-how;
3, wireless beacon is generally arranged at public arena, and attacker is easy to steal wireless beacon, then clones wireless beacon In the firmware deposited forge wireless beacon.That is, being read out in Flash completely from existing wireless beacon with hardware debugger Hold, then voluntarily copy the blank wireless beacon of a same hardware schematic diagram, the Flash content original text read out is written and is copied Blank wireless beacon Flash, the wireless beacon copied in this way will with broadcast the duplicate data packet of original product, to reach To the purpose of forgery so that the mobile terminal of attacker and the wireless beacon of forgery can cause wireless easily by verification The information security of beacon is seriously threatened.
Invention content
The technical problem to be solved in the present invention, which is to provide, a kind of can improve information security, be conducive to the wireless of technical know-how Beacon anti-counterfeiting method.
In order to solve the above technical problems, the present invention adopts the following technical scheme that.
A kind of wireless beacon anti-counterfeiting method, this method are based on wireless beacon, mobile terminal and server and realize, this method Include the following steps:Step A, the wireless beacon for lacking generated code send out radio broadcasting, and standby communication terminal is built with the wireless beacon Vertical connection;The legitimacy of other side is mutually authenticated in step B, the wireless beacon and mobile terminal;Step C is mutually authenticated by rear, Mobile terminal obtains generated code to server, and wireless beacon is written in generated code.
Preferably, the step C is specially:C1 is mutually authenticated by rear, and wireless beacon sends wireless beacon ID and its core Piece ID waits standby communication terminals that generated code is written to wireless beacon to mobile terminal;C2, mobile terminal is by wireless beacon ID and its core Piece ID is sent to server, and obtains generated code to server;C3, mobile terminal wireless beacon ID and generated code are written wireless Beacon.
Preferably, the server background is preset with database, and the server receives the generation that mobile terminal is sent When code obtains request, whether issued to the generated code corresponding to data base querying wireless beacon ID, and judge:If generated code It does not issue, then corresponding generated code is sent to mobile terminal by server, and in the database by generated code and wireless beacon ID And the chip id binding of wireless beacon, to indicate that the corresponding generated codes of wireless beacon ID are issued;If generated code has issued, Then server is refused to return to generated code to mobile terminal.
Preferably, after the acquisition for mobile terminal generated code, wireless beacon is written into wireless beacon ID and generated code, it is described Wireless beacon is disconnected after receiving wireless beacon ID and generated code and the connection of mobile terminal, and the wireless beacon adds generated code It is close, then wireless beacon ID and encrypted generated code are stored in the Flash of wireless beacon, and it is to mark the wireless beacon The state of wireless beacon ID and generated code is written.
Preferably, the wireless beacon includes to the ciphering process of generated code:Wireless beacon using wireless beacon ID as with Machine number nonce is set token Token=Token-HW, is obtained using the originating end and the operation result derivation method under test held Go out operation result answer, then every byte of generated code is generated into encrypted result Z, and encryption is tied respectively with answer exclusive or Fruit Z is stored in as encrypted generated code in the Flash of wireless beacon.
Preferably, the step B is mutually authenticated specially:Based on an originating end and a under test end realization, the wireless communication Mark and mobile terminal are originating end and under test hold;The originating end and under test end is equipped with identical token Token, when verification, institute It states originating end and generates random number nonce, and random number nonce is sent to and is under test held, the originating end and under test end utilizes phase With algorithm to random number nonce and token Token operations, operation result is obtained respectively, then the operation obtained by originating end As a result it is compared with the operation result of return is under test held, if two operation results are equal, then it represents that it is legal under test to hold, if two Operation result is unequal, then it represents that under test holds illegal;The originating end and the operation result under test held are in the following manner It obtains:Random number nonce and token Token are fused into a binary mediant X, recycling recycles XOR operation by turn The mediant X that length is m bits is transformed to the binary number Y that a preset length is n-bit;The exclusive or fortune of cycle by turn The calculating process of calculation includes:Step 1, binary mediant X is taken, the highest order of the mediant X is MSB:0, lowest order is MSB:(m-1);Step 2, the MSB of mediant X is taken:0 to MSB:(n-1), it is denoted as Y0;Step 3, the MSB of mediant X is taken:1 to MSB:(n), make XOR operation with Y0, obtain result and be denoted as Y1;Step 4, the MSB of mediant X is taken:2 to MSB:(n+1), with Y1 makees XOR operation, obtains result and is denoted as Y2;Operation ... step h successively takes the MSB of mediant X:(m-n) is to MSB: (m-1), make exclusive or with Y (m-n-1), obtain result and be denoted as Y (m-n), by Y=Y (m-n) as the fortune for recycling XOR operation by turn Calculate result.
Preferably, the mediant X is before fusion, first judge random number nonce and token Token whether equal length: If the two equal length, the random number nonce of equal length and token Token are fused into mediant X;If the two length not phase Deng after the two is then extended to equal length, the random number nonce of equal length and token Token are fused into mediant X.
Preferably, if random number nonce and token Token length are unequal, by random number nonce and token Token Extend to the least common multiple length of the two respectively by the extended mode of repetition.
Preferably, random number nonce and token Token are fused into a binary centre using fusion operation is interted Number X, the interspersed fusion operation include:Step a takes the MSB of random number nonce:0, the MSB as mediant X:0;Step b, Take the MSB of token Token:0, the MSB as mediant X:1;Step c takes the MSB of random number nonce:1, as mediant X MSB:2;Step d takes the MSB of token Token:1, the MSB as mediant X:3;Operation ... step p successively, take with The MSB-i of machine number nonce, the MSB as mediant X:2i;Step q takes the MSB of token Token:I, as mediant X's MSB-(2i+1)。
In wireless beacon anti-counterfeiting method disclosed by the invention, the wireless beacon and mobile terminal are logical based on wireless mode Letter, and the legitimacy of other side is verified between wireless beacon and mobile terminal by the verification method, it is only logical when being mutually authenticated Later, mobile terminal can obtain generated code to server, then wireless beacon is written in generated code so that the write-in of generated code Cheng Gengjia safety, has effectively achieved the effect that anti-counterfeiting.
Description of the drawings
Fig. 1 is the flow chart of wireless beacon anti-counterfeiting method of the present invention.
Fig. 2 is the particular flow sheet of step C in Fig. 1.
Fig. 3 is the flow chart that process is mutually authenticated under test end for originating end.
Fig. 4 is the flow chart of Beacon hardware anti-counterfeiting methods.
Specific implementation mode
The present invention is described in more detail with reference to the accompanying drawings and examples.
The invention discloses a kind of wireless beacon anti-counterfeiting methods, as shown in Figure 1, this method is based on wireless beacon, movement Terminal and server realizes that this method comprises the following steps:
Step A, the wireless beacon for lacking generated code send out radio broadcasting, and standby communication terminal is established with the wireless beacon to be connected It connects;
The legitimacy of other side is mutually authenticated in step B, the wireless beacon and mobile terminal;
Step C is mutually authenticated by rear, and mobile terminal obtains generated code to server, and wireless communication is written in generated code Mark.
In above-mentioned anti-counterfeiting method, the wireless beacon and mobile terminal are based on bluetooth and realize wireless communication, and wireless The legitimacy of other side is verified between beacon and mobile terminal by the verification method, only when be mutually authenticated by after, it is mobile eventually End can obtain generated code to server, then wireless beacon is written in generated code so that and the ablation process of generated code is safer, Effectively anti-counterfeiting is achieved the effect that.
Further, as shown in Fig. 2, the step C is specially:
C1 is mutually authenticated by rear, and wireless beacon sends wireless beacon ID and its chip id to mobile terminal, waits to be moved Generated code is written to wireless beacon in terminal;
C2, wireless beacon ID and its chip id are sent to server by mobile terminal, and obtain generated code to server;
Wireless beacon is written in wireless beacon ID and generated code by C3, mobile terminal.
In practical application, when wireless beacon and mobile terminal be mutually authenticated by after, the indicator light flicker of wireless beacon, behaviour Make flicker state of the personnel according to the indicator light, wireless beacon ID is input to mobile terminal, wireless beacon ID can be recorded in In wireless beacon packing box or its specification.
When mobile terminal and server be mutually authenticated by after, server respond mobile terminal generated code obtain request, Specifically, the server background is preset with database, and the server receives the generated code acquisition that mobile terminal is sent and asks When asking, whether issued to the generated code corresponding to data base querying wireless beacon ID, and judge:
If generated code does not issue, corresponding generated code is sent to mobile terminal by server, then is sent to by server Mobile terminal, and in the database bind the chip id of generated code and wireless beacon ID and wireless beacon, to indicate that this is wireless The corresponding generated codes of beacon ID are issued;
If generated code has issued, server is refused to return to generated code to mobile terminal.It is weighed so as to avoid generated code It issues again, achieves the effect that a wireless beacon only corresponds to a generated code.
After the acquisition for mobile terminal generated code, wireless beacon is written into wireless beacon ID and generated code, it is described wireless Beacon receives the connection disconnected after wireless beacon ID and generated code with mobile terminal, and the wireless beacon is to generating code encryption, then Wireless beacon ID and encrypted generated code are stored in the Flash of wireless beacon, and it is to have been written into mark the wireless beacon The state of wireless beacon ID and generated code.
In the above process, the wireless beacon includes to the ciphering process of generated code:
Wireless beacon sets token Token=Token-HW using wireless beacon ID as random number nonce, using described Originating end and the operation result derivation method under test held obtain operation result answer, then by every byte of generated code respectively with Answer exclusive or generates encrypted result Z, and the Flash of wireless beacon is stored in using encrypted result Z as encrypted generated code In.
Further include generated code decrypting process when the generated code of acquisition for mobile terminal wireless beacon:
Mobile terminal sets random number nonce=wireless beacon ID, token Token=Token-HW is set, using described Originating end and the operation result derivation method under test held obtain answer=f (Token-HW, wireless beacon ID), then encryption is tied Every byte of fruit Z with answer exclusive or, obtains the generated code of wireless beacon respectively.
Above-mentioned encryption, manner of decryption wireless beacon and mobile terminal be mutually authenticated by under conditions of carry out, because And ensure that the information security for generating code encryption, decrypting process, it is different twice due to being carried out to a number in encryption, decrypting process Be equal to nothing exclusive or after or, so operation result returns to former number, the present invention takes full advantage of the These characteristics of XOR operation, realizes Encryption, decryption to generated code.
As a preferred method, as shown in figure 3, the step B is mutually authenticated specially:
Based on an originating end and a under test end realization, the wireless beacon and mobile terminal are originating end and under test hold;
The originating end and under test end is equipped with identical token Token, when verification, the originating end generates random number Nonce, and random number nonce is sent to and is under test held, the originating end and under test end are using identical algorithms to random number nonce With token Token operations, operation result is obtained respectively, then the operation result obtained by originating end and the fortune under test holding return It calculates result to be compared, if two operation results are equal, then it represents that it is legal under test to hold, if two operation results are unequal, table Show under test hold it is illegal;
The originating end and the operation result under test held obtain in the following manner:By random number nonce and token Token is fused into a binary mediant X, recycles mediant X change of the cycle XOR operation by length for m bits by turn It is changed to the binary number Y that a preset length is n-bit;
It is described by turn cycle XOR operation calculating process include:
Step 1, binary mediant X is taken, the highest order of the mediant X is MSB:0, lowest order MSB:(m-1);
Step 2, the MSB of mediant X is taken:0 to MSB:(n-1), it is denoted as Y0;
Step 3, the MSB of mediant X is taken:1 to MSB:(n), make XOR operation with Y0, obtain result and be denoted as Y1;
Step 4, the MSB of mediant X is taken:2 to MSB:(n+1), make XOR operation with Y1, obtain result and be denoted as Y2;
Operation ... successively
Step h takes the MSB of mediant X:(m-n) is to MSB:(m-1), make exclusive or with Y (m-n-1), obtain result and be denoted as Y (m-n), by Y=Y (m-n) as the operation result for recycling XOR operation by turn.
Wherein, high-order significance bit (Most Significant Bit, MSB) is the bit started on the left of binary number The 1st of position, the i.e. start of calculation of the left sides mediant X is MSB:The 2nd started on the left of 0, mediant X is MSB:1, class successively It pushes away ...
In above-mentioned verification process, random number nonce and token Token are transported using identical algorithms in originating end and under test end It calculates, originating end and under test holds in calculating process, random number nonce and token Token are melted using XOR operation is recycled by turn The mediant X processing of synthesis, and operation result is obtained, during recycling XOR operation by turn, take the MSB of mediant X: (m-n) is to MSB:(m-1) multiple exclusive or is made in position with Y (m-n-1), operation result Y (m-n) is obtained, since the operation result is logical It crosses what the multiple exclusive or of different binary numbers obtained, and originating end and under test holds and only preserve operation result, therefore, even if attacking Person learns operation result Y and random number nonce, can not also derive token Token so that the under test end of forgery can not be by testing Card.In practical applications, wireless beacon is all made of the legitimacy of verification method verification other side with mobile terminal so that attacker It can not pass through verification between the wireless beacon and mobile terminal of imitation.In addition, under the support of the verification method, wireless beacon Generated code will only not be written and include that each wireless beacon is written in the unified firmware of token Token for manufacturer, substantially increase Production efficiency, and when wireless beacon comes into operation, each legal wireless beacon is written using mobile terminal by operator Generated code, operator are only that manufacturer provides firmware, do not provide source code and generated code, effective protection information security, favorably In technical know-how.
The mediant X first judges that random number nonce and token Token are before fusion as a preferred method, No equal length:
If the two equal length, the random number nonce of equal length and token Token are fused into mediant X;
If the two length is unequal, after the two is extended to equal length, by the random number nonce and token of equal length Token is fused into mediant X, and in the step, random number nonce and token Token is extended respectively by extended mode is repeated To the least common multiple length of the two.Such as:Random number nonce is 1011, and token Token is 11010011, is melted using repetition The mode of conjunction repeats random number nonce to be extended for 10111011 so that the random number nonce after extension and token Token long It spends equal.
Further, the fusion process of mediant X is that random number nonce and token Token is utilized interspersed fusion operation It is fused into a binary mediant X, the interspersed fusion operation includes:
Step a takes the MSB of random number nonce:0, the MSB as mediant X:0;
Step b takes the MSB of token Token:0, the MSB as mediant X:1;
Step c takes the MSB of random number nonce:1, the MSB as mediant X:2;
Step d takes the MSB of token Token:1, the MSB as mediant X:3;
Operation ... successively
Step p takes the MSB-i of random number nonce, the MSB as mediant X:2i;
Step q takes the MSB of token Token:I, the MSB- (2i+1) as mediant X.
But this is only that a kind of preferred embodiment of the present invention can also be to random number nonce and token under other modes Token extends to equal length in such a way that front end adds 0, for example random number nonce is 1011, and token Token is 11010011, After can random number nonce being extended to 00001011 mediant X=0101000110001111 is fused into token Token.
Embodiment 1:
Interspersed fusion operation of the present invention is used to two isometric binary number X and Y generate two double-lengths The binary number Z of degree, method are as follows:
The MSB-0 for taking X, the MSB-0 as Z;
The MSB-0 for taking Y, the MSB-1 as Z;
The MSB-1 for taking X, the MSB-2 as Z;
The MSB-1 for taking Y, the MSB-3 as Z;
It carries out according to this, that is, takes the MSB-i of X, as the MSB-2i of Z, take the MSB-i of Y, the MSB- (2i+1) as Z;
Example:If X=0xaa, Y=0xbb, then the method for calculating Z is as follows:
Binary representation X be 10101010, Y 10111011, then calculate Z be 1100110111001101, i.e. Z= 0xcdcd。
Embodiment 2:
It is of the present invention to recycle XOR operation by turn, it is used for the binary number X that a length is m bit, transformation For the binary number Y that a designated length is n bit (n < m), computational methods are as follows:
With binary representation X, it is high-order in preceding low level rear, i.e., highest order is MSB:0, lowest order MSB:(m-1);
Take the MSB of X:0 to MSB:(n-1), total n bit, are denoted as Y0;
Take the MSB of X:1 to MSB:(n), total n bit, make XOR operation with Y0, obtain result and are denoted as Y1;
Take the MSB of X:2 to MSB:(n+1), total n bit, make XOR operation with Y1, obtain result and are denoted as Y2;Class according to this It pushes away ...
Take the MSB of X:(m-n) is to MSB:(m-1), total n bit make exclusive or with Y (m-n-1), obtain result and be denoted as Y (m- N), Y is taken as Y (m-n)
Example:If X=0x12ab, n=8 are specified, then X=0001001010101011, m=16, n=8;
Y0=00010010;
Y1=Y0^00100101=00110111;
Y2=Y1^01001010=01111101;
Y3=Y2^10010101=11101000;
Y4=Y3^00101010=11000010;
Y5=Y4^01010101=10010111;
Y6=Y5^10101010=00111101;
Y7=Y6^01010101=01101000;
Y8=Y7^10101011=11000011;
Then Y=Y8=11000011=0xC3.
Embodiment 3:
In the encryption and decryption method of generated code of the present invention, generated code is encrypted using hardware ID and Token-HW, by The legitimacy of other side is verified by the verification method in wireless beacon and mobile terminal, therefore, even if be cloned in firmware In the case of, the burning firmware, can not also copy wireless beacon, also on other imitation hardware with same hardware schematic diagram It is to say, since hardware ID is built-in chip type, each chip has unique hardware ID, even if having forged the hard of striking resemblances Part circuit, but the hardware ID of built-in chip type can not be forged, so the firmware copied is run on the chip of imitation, necessarily use mistake Hardware ID accidentally decrypts generated code, is the generated code of mistake obtained from.Further, since there are irreversible for its calculating process Property, so, even if attacker knows the hardware ID for copying hardware in advance, and understands the realization of Encryption Algorithm, can not also retrodict out Token-HW。
Applicating example:It is 0x11223344 to set generated code in plain text, Token-HW 0x12345678, hardware ID= 0xaabbcc, then encryption flow:
Answer=f (0x12345678,0xaabbcc)=01100010=0x62;
By every byte of generated code 0x11223344 and 0x62 exclusive or, i.e.,
0x11^0x62=0x73;
0x22^0x62=0x40;
0x33^0x62=0x51;
0x44^0x62=0x26;
Then Y=0x73405126 preserves Y to the Flash of wireless beacon.
Decrypt flow:
Answer=f (0x12345678,0xaabbcc)=01100010=0x62;
By every byte of encrypted generated code 0x73405126 and 0x62 exclusive or, i.e.,
0x73^0x62=11;
0x40^0x62=22;
0x51^0x62=33;
0x26^0x62=44;
Then the generated code after decrypting is 0x11223344.
In anti-counterfeiting method disclosed by the invention, under the support of default verification method, operator is only that manufacturer provides Unified firmware, do not provide source code and generated code, and effective protection information security is conducive to technical know-how.In addition, of the invention The verification method is used in wireless beacon anti-counterfeiting method so that the ablation process of generated code is safer, effectively reaches The effect of anti-counterfeiting.
In conjunction with shown in Fig. 3 and Fig. 4, the present invention is by taking Beacon hardware as an example, Beacon hardware and mobile terminal base therein It realizes and wirelessly communicates in bluetooth, and the legal of other side is verified by the verification method between Beacon hardware and mobile terminal Property, only when be mutually authenticated by after, mobile terminal can to server obtain generated code, then by generated code write-in Beacon it is hard Part so that the ablation process of generated code is safer, has effectively achieved the effect that Beacon hardware anti-counterfeitings.
The above is preferred embodiments of the present invention, is not intended to restrict the invention, all technology models in the present invention Interior done modification, equivalent replacement or improvement etc. are enclosed, should be included in the range of of the invention protect.

Claims (6)

1. a kind of wireless beacon anti-counterfeiting method, which is characterized in that it is real that this method is based on wireless beacon, mobile terminal and server Existing, this method comprises the following steps:
Step A, the wireless beacon for lacking generated code send out radio broadcasting, and standby communication terminal is established with the wireless beacon and connected;
The legitimacy of other side is mutually authenticated in step B, the wireless beacon and mobile terminal;
Step C is mutually authenticated by rear, and mobile terminal obtains generated code to server, and wireless beacon is written in generated code;
Wherein, the mobile terminal obtains generated code to server, and is by the process of generated code write-in wireless beacon:Mutually test After card passes through, wireless beacon sends wireless beacon ID and its chip id to mobile terminal, and standby communication terminals is waited to be write to wireless beacon Enter generated code;Wireless beacon ID and its chip id are sent to server by mobile terminal, and obtain generated code to server;It is described Server background is preset with database, when the server receives the generated code acquisition request that mobile terminal is sent, to data Whether the generated code corresponding to library inquiry wireless beacon ID has issued, and judges:If generated code does not issue, server will be right The generated code answered is sent to mobile terminal, and in the database ties up the chip id of generated code and wireless beacon ID and wireless beacon It is fixed, to indicate that the corresponding generated codes of wireless beacon ID are issued;If generated code has issued, server is refused to mobile whole End returns to generated code;Wireless beacon is written in wireless beacon ID and generated code by mobile terminal.
2. wireless beacon anti-counterfeiting method as described in claim 1, which is characterized in that the acquisition for mobile terminal generated code Afterwards, wireless beacon is written into wireless beacon ID and generated code, the wireless beacon disconnects after receiving wireless beacon ID and generated code With the connection of mobile terminal, and the wireless beacon is stored to generating code encryption, then by wireless beacon ID and encrypted generated code In the Flash of wireless beacon, and it is the state for having been written into wireless beacon ID and generated code to mark the wireless beacon.
3. such as claim 1 to 2 any one of them wireless beacon anti-counterfeiting method, which is characterized in that the step B is mutually tested Card is specially:
Based on an originating end and a under test end realization, the wireless beacon and mobile terminal are originating end and under test hold;
The originating end and under test end is equipped with identical token Token, when verification, the originating end generates random number nonce, and Random number nonce is sent to and is under test held, the originating end and under test end are using identical algorithms to random number nonce and token Token operations obtain operation result respectively, then the operation result obtained by originating end and the operation result under test holding return It is compared, if two operation results are equal, then it represents that it is legal under test to hold, if two operation results are unequal, then it represents that under test It holds illegal;
The originating end and the operation result under test held obtain in the following manner:Random number nonce and token Token are melted A binary mediant X is synthesized, the mediant X that length is m bits is transformed to one to recycling by cycle XOR operation by turn A preset length is the binary number Y of n-bit;
It is described by turn cycle XOR operation calculating process include:
Step 1, binary mediant X is taken, the highest order of the mediant X is MSB:0, lowest order MSB:(m-1);
Step 2, the MSB of mediant X is taken:0 to MSB:(n-1), it is denoted as Y0;
Step 3, the MSB of mediant X is taken:1 to MSB:(n), make XOR operation with Y0, obtain result and be denoted as Y1;
Step 4, the MSB of mediant X is taken:2 to MSB:(n+1), make XOR operation with Y1, obtain result and be denoted as Y2;
Operation ... step h successively takes the MSB of mediant X:(m-n) is to MSB:(m-1), make exclusive or with Y (m-n-1), obtain It is denoted as Y (m-n) to result, by Y=Y (m-n) as the operation result for recycling XOR operation by turn.
4. wireless beacon anti-counterfeiting method as claimed in claim 3, which is characterized in that the mediant X is before fusion, first Judge random number nonce and token Token whether equal length:
If the two equal length, the random number nonce of equal length and token Token are fused into mediant X;
If the two length is unequal, after the two is extended to equal length, by the random number nonce and token Token of equal length It is fused into mediant X.
5. wireless beacon anti-counterfeiting method as claimed in claim 4, which is characterized in that if random number nonce and token Token Length is unequal, then random number nonce and token Token is extended to the least common multiple of the two respectively by the extended mode of repetition Number length.
6. wireless beacon anti-counterfeiting method as claimed in claim 5, which is characterized in that by random number nonce and token Token It is fused into a binary mediant X using interspersed fusion operation, the interspersed fusion operation includes:
Step a takes the MSB of random number nonce:0, the MSB as mediant X:0;
Step b takes the MSB of token Token:0, the MSB as mediant X:1;
Step c takes the MSB of random number nonce:1, the MSB as mediant X:2;
Step d takes the MSB of token Token:1, the MSB as mediant X:3;
Operation ... step p successively takes the MSB-i of random number nonce, the MSB as mediant X:2i;
Step q takes the MSB of token Token:I, the MSB- (2i+1) as mediant X.
CN201410850015.7A 2014-12-31 2014-12-31 A kind of wireless beacon anti-counterfeiting method Active CN104469773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410850015.7A CN104469773B (en) 2014-12-31 2014-12-31 A kind of wireless beacon anti-counterfeiting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410850015.7A CN104469773B (en) 2014-12-31 2014-12-31 A kind of wireless beacon anti-counterfeiting method

Publications (2)

Publication Number Publication Date
CN104469773A CN104469773A (en) 2015-03-25
CN104469773B true CN104469773B (en) 2018-08-24

Family

ID=52914985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410850015.7A Active CN104469773B (en) 2014-12-31 2014-12-31 A kind of wireless beacon anti-counterfeiting method

Country Status (1)

Country Link
CN (1) CN104469773B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102296901B1 (en) * 2015-03-30 2021-08-31 에스케이플래닛 주식회사 Method and Apparatus for Verifying Valid Beacon Signal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739540A (en) * 2008-11-20 2010-06-16 北京大学深圳研究生院 Label reader-writer and data communication method and system of radio frequency label
CN102495990A (en) * 2011-12-07 2012-06-13 惠州市德赛西威汽车电子有限公司 Software protection method based on microchip
CN102567760A (en) * 2012-01-10 2012-07-11 广州中盈物流科讯有限公司 One-way function-based dynamic password read-write control RFID (Radio Frequency Identification)
WO2012151351A1 (en) * 2011-05-04 2012-11-08 Marvell World Trade Ltd. Wireless authentication using beacon messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739540A (en) * 2008-11-20 2010-06-16 北京大学深圳研究生院 Label reader-writer and data communication method and system of radio frequency label
WO2012151351A1 (en) * 2011-05-04 2012-11-08 Marvell World Trade Ltd. Wireless authentication using beacon messages
CN102495990A (en) * 2011-12-07 2012-06-13 惠州市德赛西威汽车电子有限公司 Software protection method based on microchip
CN102567760A (en) * 2012-01-10 2012-07-11 广州中盈物流科讯有限公司 One-way function-based dynamic password read-write control RFID (Radio Frequency Identification)

Also Published As

Publication number Publication date
CN104469773A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN101978646B (en) For performing the system and method for file distributing and purchase
CN101390134B (en) Method for redistributing DRM protected content
JP4865854B2 (en) Digital copyright management method and apparatus
CN105324956B (en) The method and apparatus of encrypting plaintext data
CN109584066A (en) Privacy transaction and its application method and device based on block chain
CN101866498B (en) Electronic ticket implementation method and system based on intelligent card
CN102779284B (en) RFID (radio frequency identification device) label integrating comprehensive functions such as merchandise anti-counterfeiting, logistics control and the like
CN107292629A (en) Anti-counterfeit tracking verification method based on block chain and the device using this method
CN101192261A (en) Method and apparatus for generating proxy-signature on right object and issuing proxy signature certificate
CN104883677A (en) Equipment communication connection method, apparatus and system
CN102385710B (en) Method and system for verifying fact or fiction
CN110264200A (en) Block chain data processing method and device
EP1614047A1 (en) Method and apparatus for limiting number of times contents can be accessed using hashing chain
CN103150655A (en) Public key infrastructure (PKI)-based radio frequency identification (RFID) anti-counterfeiting system
CN109087203A (en) A kind of block chain isomerism system of main chain and side chain
CN109614813A (en) Privacy method of commerce, device and its application method, device based on block chain
CN104361490A (en) Payment method and payment system by sensitive information identification
CN103888475B (en) A kind of guard method and device to multi-medium data
CN109643282A (en) For generating, storing, manage and using one or more digital secret system and method associated with portable electronic device
CN102855577A (en) Multiple merchandise anti-counterfeiting verification method based on cloud computing
CN101606161A (en) Be used for definite supper-distribution and record the method for the price of product
CN107306254A (en) Digital literary property protection method and system based on double layer encryption
CN104469773B (en) A kind of wireless beacon anti-counterfeiting method
CN103905197B (en) A kind of method that SIM card and external equipment are bound and verified
CN103577726A (en) Digital right management method based on equipment and re-transaction method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant