CN104469773A - Wireless beacon anti-counterfeiting method - Google Patents

Wireless beacon anti-counterfeiting method Download PDF

Info

Publication number
CN104469773A
CN104469773A CN201410850015.7A CN201410850015A CN104469773A CN 104469773 A CN104469773 A CN 104469773A CN 201410850015 A CN201410850015 A CN 201410850015A CN 104469773 A CN104469773 A CN 104469773A
Authority
CN
China
Prior art keywords
wireless beacon
msb
token
generated code
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.)
Granted
Application number
CN201410850015.7A
Other languages
Chinese (zh)
Other versions
CN104469773B (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 wireless beacon anti-counterfeiting method. The wireless beacon anti-counterfeiting method is achieved based on wireless beacons, mobile terminals and servers. The method includes the following steps: A, the wireless beacons lack of generation codes transmit wireless radios for waiting for building connection between the mobile terminals and the wireless beacons; B, the validity of the wireless beacons and the validity of the mobile terminals are verified by the mobile terminals and the wireless beacons respectively; C, after mutual verification is successful, the mobile terminals obtain the generation codes from the servers, and the generation codes are written into the wireless beacons. According to the wireless beacon anti-counterfeiting method, the wireless beacons are in communication with the mobile terminals based on a wireless mode; in addition, the validity of the wireless beacons and the validity of the mobile terminals are verified through the verification method; only after the verification is successful, the mobile terminals can obtain the generation codes from the servers, and then the generation codes are written into the wireless beacons, so that the generation code writing process is safer, and the anti-counterfeiting effect is effectively achieved.

Description

A kind of wireless beacon anti-counterfeiting method
Technical field
The present invention relates to protecting information safety method, particularly relate to a kind of wireless beacon anti-counterfeiting method.
Background technology
At present, market there is a kind of wireless beacon product being carried out accurate microposition by the low-consumption wireless communication technology, when the mobile terminal of user is near a wireless beacon, equipment can sense the signal that wireless beacon sends, and its coverage can reach 50 meters.Wireless beacon technology type is similar to indoor GPS, and mobile terminal can receive the signal of wireless beacon transmission, and obtains various locating information accurately.Such as, when user drives the underground parking in market, when returning to parking lot after shopping, mobile terminal can find the exact position of oneself locomotive according to this signals direct user.
But, location is a part for wireless beacon technology, wireless beacon also allows the mobile terminal of user to send simply " I am at this " signal, this means that wireless beacon technology can complete more eventful feelings, such as, pass by a shop when user goes window-shopping, this family shop can send wireless signal, at this moment the mobile phone of user just can obtain the same day can reward voucher.For another example, user enters into the shop in a shopping center with a mobile terminal, this also means that user has entered the signal area in this family shop simultaneously, wireless beacon just can to various information such as navigation informations in the mobile terminal transmission reward voucher of user, shop, even when user goes to before some sales counter, wireless beacon also can provide personalized commercial product recommending information.That is, in the information area of wireless beacon, user can obtain personalized positional information and notice by the mobile terminal in hand.
Based on above-mentioned advantage, increasing wireless beacon will be there is in public place, each wireless beacon can be an independently hardware, in order to the transmission of perfect information, broadcast, each large operation commercial city is by the wireless beacon of exploitation oneself, this series products in process of production, the wireless beacon on pipeline is needed to set up firmware production process, but each wireless beacon has independently wireless beacon ID and generated code, so need for each wireless beacon makes firmware separately, cause production efficiency low, in addition, wireless beacon is in exploitation, produce, following potential safety hazard is also there is in the process used:
1, for wireless beacon is forged in opposing, the generated code that wireless beacon ID is corresponding need hold in close confidence, but generated code expressly need be given manufacturer and comes, for each wireless beacon makes firmware, to be unfavorable for information security by existing operation;
2, because manufacturer wants field fabrication firmware, thus the source code of firmware also will be given manufacturer by operator, is unfavorable for technical know-how;
3, wireless beacon is arranged on public arena usually, and assailant is easy to steal wireless beacon, then clones the firmware deposited in wireless beacon to forge wireless beacon.Namely, from existing wireless beacon, Flash content is read out completely by hardware debugger, copy the blank wireless beacon of a same hardware schematic diagram more voluntarily, by the Flash of the blank wireless beacon that the Flash content original text write read out is copied, the wireless beacon of such imitation will with the duplicate packet of broadcast original product, thus reach the object of forgery, the wireless beacon of the mobile terminal of assailant and forgery is made easily by checking, to cause the information security of wireless beacon to be subject to serious threat.
Summary of the invention
The wireless beacon anti-counterfeiting method that the technical problem to be solved in the present invention is to provide a kind of and can improves information security, be conducive to technical know-how.
For solving the problems of the technologies described above, the present invention adopts following technical scheme.
A kind of wireless beacon anti-counterfeiting method, the method realizes based on wireless beacon, mobile terminal and server, and the method comprises the steps: steps A, and the wireless beacon lacking generated code sends radio broadcasting, and standby communication terminal and this wireless beacon connect; Step B, described wireless beacon and mobile terminal verify the legitimacy of the other side mutually; Step C, after being mutually verified, mobile terminal obtains generated code to server, and generated code is write wireless beacon.
Preferably, described step C is specially: C1, and after being mutually verified, wireless beacon transmission wireless beacon ID and chip id thereof, to mobile terminal, wait standby communication terminal to write generated code to wireless beacon; C2, wireless beacon ID and chip id thereof are sent to server by mobile terminal, and obtain generated code to server; C3, mobile terminal is by wireless beacon ID and generated code write wireless beacon.
Preferably, described server background is preset with database, described server receives generated code that mobile terminal sends when obtaining request, whether issue to the generated code corresponding to this wireless beacon of data base querying ID, and judge: if generated code does not issue, then the generated code of correspondence is sent to mobile terminal by server, and is bound by the chip id of generated code and wireless beacon ID and wireless beacon in a database, to represent that the generated code that this wireless beacon ID is corresponding is issued; If generated code issues, then server refusal returns generated code to mobile terminal.
Preferably, after described acquisition for mobile terminal generated code, by wireless beacon ID and generated code write wireless beacon, described wireless beacon disconnects the connection with mobile terminal after receiving wireless beacon ID and generated code, and this wireless beacon is encrypted generated code, again the generated code after wireless beacon ID and encryption is stored in the Flash of wireless beacon, and to mark this wireless beacon be the state having write wireless beacon ID and generated code.
Preferably, the ciphering process of described wireless beacon to generated code comprises: wireless beacon using wireless beacon ID as random number nonce, setting token Token=Token-HW, described originating end and the operation result derivation method under test held is utilized to draw operation result answer, again by every byte of generated code respectively with answer XOR, generate encrypted result Z, and encrypted result Z is stored in the Flash of wireless beacon as the generated code after encryption.
Preferably, described step B mutually verifies and is specially: under test hold realization based on an originating end and one, and described wireless beacon and mobile terminal are originating end and under test hold; Described originating end and under test end are provided with identical token Token, during checking, described originating end generates random number nonce, and random number nonce is sent under test holds, described originating end and under test end utilize identical algorithms to random number nonce and token Token computing, draw operation result respectively, the operation result drawn by originating end again with under test hold the operation result returned to contrast, if two operation results are equal, then represent under test hold legal, if two operation results are unequal, then represent under test hold illegal; Described originating end and the operation result under test held draw all in the following manner: random number nonce and token Token is fused into a binary mediant X, and recycling circulation XOR is by turn that the mediant X of m bit is transformed to the binary number Y that a preset length is n-bit by length; The described calculating process circulating XOR by turn comprises: step 1, gets binary mediant X, and the highest order of described mediant X is MSB:0, and lowest order is MSB:(m-1); Step 2, gets the MSB:0 to MSB:(n-1 of mediant X), be designated as Y0; Step 3, gets the MSB:1 to MSB:(n of mediant X), make XOR with Y0, obtain result and be designated as Y1; Step 4, gets the MSB:2 to MSB:(n+1 of mediant X), make XOR with Y1, obtain result and be designated as Y2; Computing successively ... step h, get the MSB:(m-n of mediant X) to MSB:(m-1), XOR is made with Y (m-n-1), obtain result and be designated as Y (m-n), using the operation result of Y=Y (m-n) as the XOR that circulates by turn.
Preferably, described mediant X, before fusion, first judges random number nonce and token Token whether equal length: if the two length is equal, then the random number nonce of equal length and token Token is fused into mediant X; If the two length is unequal, then after the two being extended to equal length, the random number nonce of equal length and token Token is fused into mediant X.
Preferably, if random number nonce and token Token length unequal, then random number nonce and token Token is extended to the two least common multiple length respectively by the mode repeating to extend.
Preferably, utilized by random number nonce and token Token interspersed fusion computing to be fused into a binary mediant X, described interspersed fusion computing comprises: step a, gets the MSB:0 of random number nonce, as the MSB:0 of mediant X; Step b, gets the MSB:0 of token Token, as the MSB:1 of mediant X; Step c, gets the MSB:1 of random number nonce, as the MSB:2 of mediant X; Steps d, gets the MSB:1 of token Token, as the MSB:3 of mediant X; Computing successively ... step p, gets the MSB-i of random number nonce, as the MSB:2i of mediant X; Step q, gets the MSB:i of token Token, as the MSB-(2i+1) of mediant X.
In wireless beacon anti-counterfeiting method disclosed by the invention, described wireless beacon and mobile terminal are based on wireless communication mode, and the legitimacy of the other side is verified between wireless beacon and mobile terminal by described verification method, only after being mutually verified, mobile terminal can obtain generated code to server, again generated code is write wireless beacon, make the ablation process of generated code safer, effectively reach the effect of anti-counterfeiting.
Accompanying drawing explanation
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 originating end and the flow chart under test holding mutual proof procedure.
Fig. 4 is the flow chart of Beacon hardware anti-counterfeiting method.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in more detail.
The invention discloses a kind of wireless beacon anti-counterfeiting method, as shown in Figure 1, the method realizes based on wireless beacon, mobile terminal and server, and the method comprises the steps:
Steps A, the wireless beacon lacking generated code sends radio broadcasting, and standby communication terminal and this wireless beacon connect;
Step B, described wireless beacon and mobile terminal verify the legitimacy of the other side mutually;
Step C, after being mutually verified, mobile terminal obtains generated code to server, and generated code is write wireless beacon.
In above-mentioned anti-counterfeiting method, described wireless beacon and mobile terminal realize radio communication based on bluetooth, and the legitimacy of the other side is verified between wireless beacon and mobile terminal by described verification method, only after being mutually verified, mobile terminal can obtain generated code to server, again generated code is write wireless beacon, make the ablation process of generated code safer, effectively reach the effect of anti-counterfeiting.
Further, as shown in Figure 2, described step C is specially:
C1, after being mutually verified, wireless beacon transmission wireless beacon ID and chip id thereof, to mobile terminal, wait standby communication terminal to write generated code to wireless beacon;
C2, wireless beacon ID and chip id thereof are sent to server by mobile terminal, and obtain generated code to server;
C3, mobile terminal is by wireless beacon ID and generated code write wireless beacon.
In practical application, after wireless beacon and mobile terminal are verified mutually, the indicator light flicker of wireless beacon, operating personnel are according to the blink states of this indicator light, wireless beacon ID is inputed to mobile terminal, and this wireless beacon ID can be recorded in wireless beacon packing box or its specification.
After mobile terminal and server are verified mutually, the generated code of server response mobile terminal obtains request, particularly, described server background is preset with database, described server receives generated code that mobile terminal sends when obtaining request, whether issue to the generated code corresponding to this wireless beacon of data base querying ID, and judge:
If generated code does not issue, then the generated code of correspondence is sent to mobile terminal by server, be sent to mobile terminal by server again, and in a database the chip id of generated code and wireless beacon ID and wireless beacon bound, to represent that the generated code that this wireless beacon ID is corresponding is issued;
If generated code issues, then server refusal returns generated code to mobile terminal.Thus avoid generated code and repeated to issue, achieve the effect of an a wireless beacon only corresponding generated code.
When after described acquisition for mobile terminal generated code, by wireless beacon ID and generated code write wireless beacon, described wireless beacon disconnects the connection with mobile terminal after receiving wireless beacon ID and generated code, and this wireless beacon is encrypted generated code, again the generated code after wireless beacon ID and encryption is stored in the Flash of wireless beacon, and to mark this wireless beacon be the state having write wireless beacon ID and generated code.
In said process, the ciphering process of described wireless beacon to generated code comprises:
Wireless beacon using wireless beacon ID as random number nonce, setting token Token=Token-HW, described originating end and the operation result derivation method under test held is utilized to draw operation result answer, again by every byte of generated code respectively with answer XOR, generate encrypted result Z, and encrypted result Z is stored in the Flash of wireless beacon as the generated code after encryption.
When the generated code of acquisition for mobile terminal wireless beacon, also comprise generated code decrypting process:
Mobile terminal setting random number nonce=wireless beacon ID, setting token Token=Token-HW, described originating end and the operation result derivation method under test held is utilized to draw answer=f (Token-HW, wireless beacon ID), again by every byte of encrypted result Z respectively with answer XOR, obtain the generated code of wireless beacon.
Above-mentioned encryption, manner of decryption carry out under the condition be mutually verified at wireless beacon and mobile terminal, thus ensure that the information security of generated code encryption, decrypting process, in encryption, decrypting process, due to the XOR that is equal to nothing after carrying out twice XOR to a number, so operation result gets back to former number, the present invention takes full advantage of the These characteristics of XOR, achieves the encryption to generated code, deciphering.
As a kind of optimal way, as shown in Figure 3, described step B mutually verifies and is specially:
Under test hold realization based on an originating end and one, described wireless beacon and mobile terminal are originating end and under test hold;
Described originating end and under test end are provided with identical token Token, during checking, described originating end generates random number nonce, and random number nonce is sent under test holds, described originating end and under test end utilize identical algorithms to random number nonce and token Token computing, draw operation result respectively, the operation result drawn by originating end again with under test hold the operation result returned to contrast, if two operation results are equal, then represent under test hold legal, if two operation results are unequal, then represent under test hold illegal;
Described originating end and the operation result under test held draw all in the following manner: random number nonce and token Token is fused into a binary mediant X, and recycling circulation XOR is by turn that the mediant X of m bit is transformed to the binary number Y that a preset length is n-bit by length;
The described calculating process circulating XOR by turn comprises:
Step 1, gets binary mediant X, and the highest order of described mediant X is MSB:0, and lowest order is MSB:(m-1);
Step 2, gets the MSB:0 to MSB:(n-1 of mediant X), be designated as Y0;
Step 3, gets the MSB:1 to MSB:(n of mediant X), make XOR with Y0, obtain result and be designated as Y1;
Step 4, gets the MSB:2 to MSB:(n+1 of mediant X), make XOR with Y1, obtain result and be designated as Y2;
Computing successively ...
Step h, get the MSB:(m-n of mediant X) to MSB:(m-1), make XOR with Y (m-n-1), obtain result and be designated as Y (m-n), using the operation result of Y=Y (m-n) as the XOR that circulates by turn.
Wherein, high-order significance bit (Most Significant Bit, MSB) is the bit of starting on the left of binary number, and the 1st that namely starts on the left of mediant X is MSB:0, and the 2nd that starts on the left of mediant X is MSB:1, the like ...
In above-mentioned proof procedure, originating end and under test end utilize identical algorithms to random number nonce and token Token computing, originating end and under test holding in calculating process, utilize the mediant X process that circulation XOR is by turn fused into random number nonce and token Token, and obtain operation result, by turn in circulation XOR process, get the MSB:(m-n of mediant X) to MSB:(m-1) position and Y (m-n-1) make repeatedly XOR, obtain operation result Y (m-n), because this operation result is drawn by the repeatedly XOR of different binary number, and originating end and under test hold and only preserve operation result, therefore, even if assailant learns operation result Y and random number nonce, also token Token cannot be derived, the under test end forged is made to pass through checking.In actual applications, wireless beacon and mobile terminal all adopt this verification method to verify the legitimacy of the other side, cannot by verifying between the wireless beacon that assailant is copied and mobile terminal.In addition; under the support of this verification method; the manufacturer of wireless beacon only will not write generated code and the unified firmware including token Token writes each wireless beacon; substantially increase production efficiency, and when wireless beacon comes into operation, utilize mobile terminal to write generated code to each legal wireless beacon by operator; operator is only manufacturer and provides firmware; not providing source code and generated code, available protecting information security, is conducive to technical know-how.
As a kind of optimal way, described mediant X, before fusion, first judges random number nonce and token Token whether equal length:
If the two length is equal, then the random number nonce of equal length and token Token is fused into mediant X;
If the two length is unequal, after then the two being extended to equal length, the random number nonce of equal length and token Token is fused into mediant X, in this step, random number nonce and token Token is extended to respectively the least common multiple length of the two by the mode repeating to extend.Such as: random number nonce is 1011, token Token is 11010011, utilizes the mode repeating to merge, is repeated to be extended for 10111011 by random number nonce, makes the random number nonce after extending equal with token Token length.
Further, the fusion process of mediant X is utilized by random number nonce and token Token interspersed fusion computing to be fused into a binary mediant X, and described interspersed fusion computing comprises:
Step a, gets the MSB:0 of random number nonce, as the MSB:0 of mediant X;
Step b, gets the MSB:0 of token Token, as the MSB:1 of mediant X;
Step c, gets the MSB:1 of random number nonce, as the MSB:2 of mediant X;
Steps d, gets the MSB:1 of token Token, as the MSB:3 of mediant X;
Computing successively ...
Step p, gets the MSB-i of random number nonce, as the MSB:2i of mediant X;
Step q, gets the MSB:i of token Token, as the MSB-(2i+1) of mediant X.
But this is only a kind of optimal way of the present invention, under other modes, equal length can also be extended to the mode that random number nonce and token Token adds 0 with front end, such as random number nonce is 1011, token Token is 11010011, random number nonce can be extended to after 00001011 and token Token is fused into mediant X=0101000110001111.
Embodiment 1:
The interspersed fusion computing that the present invention relates to, it is for generating two isometric binary number X and Y the binary number Z of a double length, and method is as follows:
Get the MSB-0 of X, as the MSB-0 of Z;
Get the MSB-0 of Y, as the MSB-1 of Z;
Get the MSB-1 of X, as the MSB-2 of Z;
Get the MSB-1 of Y, as the MSB-3 of Z;
Carry out according to this, namely get the MSB-i of X, as the MSB-2i of Z, get the MSB-i of Y, as the MSB-(2i+1) of Z;
Example: if X=0xaa, Y=0xbb, then the method calculating Z is as follows:
Binary representation X is 10101010, Y is 10111011, so calculate Z is 1100110111001101, i.e. and Z=0xcdcd.
Embodiment 2:
The XOR of circulation by turn that the present invention relates to, its binary number X for a length being m bit, be transformed to the binary number Y that a designated length is n bit (n < m), computational methods are as follows:
Use binary representation X, a high position is at front low level rear, and namely highest order is MSB:0, and lowest order is MSB:(m-1);
Get the MSB:0 to MSB:(n-1 of X), n bit, is designated as Y0 altogether;
Get the MSB:1 to MSB:(n of X), n bit, makes XOR with Y0, obtains result and be designated as Y1 altogether;
Get the MSB:2 to MSB:(n+1 of X), n bit, makes XOR with Y1, obtains result and be designated as Y2 altogether; The rest may be inferred ...
Get the MSB:(m-n of X) to MSB:(m-1), n bit altogether, make XOR with Y (m-n-1), obtain result and be designated as Y (m-n), Y is taken as Y (m-n)
Example: if X=0x12ab, specifies n=8 position, 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;
So Y=Y8=11000011=0xC3.
Embodiment 3:
The encryption of the generated code that the present invention relates to, in decryption method, hardware ID and Token-HW is used to encrypt generated code, because wireless beacon and mobile terminal verify the legitimacy of the other side by described verification method, therefore, even if when firmware is cloned, this firmware of burning on the imitation hardware that other have same hardware schematic diagram, also wireless beacon cannot be copied, that is, because hardware ID is built-in chip type, each sheet chip has unique hardware ID, even if forged living hardware circuit, but the hardware ID of built-in chip type cannot be forged, so the firmware copied runs on the chip copied, necessarily decipher generated code with the hardware ID of mistake, thus obtain be mistake generated code.In addition, because its calculating process exists irreversibility, so even if assailant knows the hardware ID copying hardware in advance, and understand the realization of cryptographic algorithm, also cannot retrodict out Token-HW.
Applicating example: setting generated code is expressly 0x11223344, Token-HW is 0x12345678, hardware ID=0xaabbcc, then encryption flow:
Answer=f(0x12345678,0xaabbcc)=01100010=0x62;
By every byte of generated code 0x11223344 and 0x62 XOR, namely
0x11^0x62=0x73;
0x22^0x62=0x40;
0x33^0x62=0x51;
0x44^0x62=0x26;
So Y=0x73405126, Y is saved to the Flash of wireless beacon.
Deciphering flow process:
Answer=f(0x12345678,0xaabbcc)=01100010=0x62;
By every byte of the generated code 0x73405126 after encryption and 0x62 XOR, namely
0x73^0x62=11;
0x40^0x62=22;
0x51^0x62=33;
0x26^0x62=44;
So the generated code after deciphering is 0x11223344.
In anti-counterfeiting method disclosed by the invention, under the support of default verification method, operator is only the firmware that manufacturer provides unified, not providing source code and generated code, and available protecting information security, is conducive to technical know-how.In addition, have employed described verification method in wireless beacon anti-counterfeiting method of the present invention, make the ablation process of generated code safer, effectively reach the effect of anti-counterfeiting.
Shown in composition graphs 3 and Fig. 4, the present invention is for Beacon hardware, Beacon hardware wherein and mobile terminal realize radio communication based on bluetooth, and the legitimacy of the other side is verified between Beacon hardware and mobile terminal by described verification method, only after being mutually verified, mobile terminal can obtain generated code to server, then generated code is write Beacon hardware, make the ablation process of generated code safer, effectively reach the effect of Beacon hardware anti-counterfeiting.
The above is preferred embodiment of the present invention, is not limited to the present invention, all make in technical scope of the present invention amendment, equivalent to replace or improvement etc., all should be included in scope that the present invention protects.

Claims (9)

1. a wireless beacon anti-counterfeiting method, is characterized in that, the method realizes based on wireless beacon, mobile terminal and server, and the method comprises the steps:
Steps A, the wireless beacon lacking generated code sends radio broadcasting, and standby communication terminal and this wireless beacon connect;
Step B, described wireless beacon and mobile terminal verify the legitimacy of the other side mutually;
Step C, after being mutually verified, mobile terminal obtains generated code to server, and generated code is write wireless beacon.
2. wireless beacon anti-counterfeiting method as claimed in claim 1, it is characterized in that, described step C is specially:
C1, after being mutually verified, wireless beacon transmission wireless beacon ID and chip id thereof, to mobile terminal, wait standby communication terminal to write generated code to wireless beacon;
C2, wireless beacon ID and chip id thereof are sent to server by mobile terminal, and obtain generated code to server;
C3, mobile terminal is by wireless beacon ID and generated code write wireless beacon.
3. wireless beacon anti-counterfeiting method as claimed in claim 2, it is characterized in that, described server background is preset with database, described server receives generated code that mobile terminal sends when obtaining request, whether issue to the generated code corresponding to this wireless beacon of data base querying ID, and judge:
If generated code does not issue, then the generated code of correspondence is sent to mobile terminal by server, and is bound by the chip id of generated code and wireless beacon ID and wireless beacon in a database, to represent that the generated code that this wireless beacon ID is corresponding is issued;
If generated code issues, then server refusal returns generated code to mobile terminal.
4. wireless beacon anti-counterfeiting method as claimed in claim 3, it is characterized in that, after described acquisition for mobile terminal generated code, by wireless beacon ID and generated code write wireless beacon, described wireless beacon disconnects the connection with mobile terminal after receiving wireless beacon ID and generated code, and this wireless beacon is encrypted generated code, then the generated code after wireless beacon ID and encryption is stored in the Flash of wireless beacon, and to mark this wireless beacon be the state having write wireless beacon ID and generated code.
5. wireless beacon anti-counterfeiting method as claimed in claim 4, it is characterized in that, the ciphering process of described wireless beacon to generated code comprises:
Wireless beacon using wireless beacon ID as random number nonce, setting token Token=Token-HW, described originating end and the operation result derivation method under test held is utilized to draw operation result answer, again by every byte of generated code respectively with answer XOR, generate encrypted result Z, and encrypted result Z is stored in the Flash of wireless beacon as the generated code after encryption.
6. the wireless beacon anti-counterfeiting method as described in any one of claim 1 to 5, it is characterized in that, described step B mutually verifies and is specially:
Under test hold realization based on an originating end and one, described wireless beacon and mobile terminal are originating end and under test hold;
Described originating end and under test end are provided with identical token Token, during checking, described originating end generates random number nonce, and random number nonce is sent under test holds, described originating end and under test end utilize identical algorithms to random number nonce and token Token computing, draw operation result respectively, the operation result drawn by originating end again with under test hold the operation result returned to contrast, if two operation results are equal, then represent under test hold legal, if two operation results are unequal, then represent under test hold illegal;
Described originating end and the operation result under test held draw all in the following manner: random number nonce and token Token is fused into a binary mediant X, and recycling circulation XOR is by turn that the mediant X of m bit is transformed to the binary number Y that a preset length is n-bit by length;
The described calculating process circulating XOR by turn comprises:
Step 1, gets binary mediant X, and the highest order of described mediant X is MSB:0, and lowest order is MSB:(m-1);
Step 2, gets the MSB:0 to MSB:(n-1 of mediant X), be designated as Y0;
Step 3, gets the MSB:1 to MSB:(n of mediant X), make XOR with Y0, obtain result and be designated as Y1;
Step 4, gets the MSB:2 to MSB:(n+1 of mediant X), make XOR with Y1, obtain result and be designated as Y2;
Computing successively ... step h, get the MSB:(m-n of mediant X) to MSB:(m-1), XOR is made with Y (m-n-1), obtain result and be designated as Y (m-n), using the operation result of Y=Y (m-n) as the XOR that circulates by turn.
7. wireless beacon anti-counterfeiting method as claimed in claim 6, is characterized in that, described mediant X, before fusion, first judges random number nonce and token Token whether equal length:
If the two length is equal, then the random number nonce of equal length and token Token is fused into mediant X;
If the two length is unequal, then after the two being extended to equal length, the random number nonce of equal length and token Token is fused into mediant X.
8. wireless beacon anti-counterfeiting method as claimed in claim 7, is characterized in that, if random number nonce and token Token length unequal, then random number nonce and token Token is extended to respectively the least common multiple length of the two by the mode repeating to extend.
9. wireless beacon anti-counterfeiting method as claimed in claim 7, is characterized in that, utilized by random number nonce and token Token interspersed fusion computing to be fused into a binary mediant X, described interspersed fusion computing comprises:
Step a, gets the MSB:0 of random number nonce, as the MSB:0 of mediant X;
Step b, gets the MSB:0 of token Token, as the MSB:1 of mediant X;
Step c, gets the MSB:1 of random number nonce, as the MSB:2 of mediant X;
Steps d, gets the MSB:1 of token Token, as the MSB:3 of mediant X;
Computing successively ... step p, gets the MSB-i of random number nonce, as the MSB:2i of mediant X;
Step q, gets the MSB:i of token Token, as the MSB-(2i+1) of 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 true CN104469773A (en) 2015-03-25
CN104469773B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027458A (en) * 2015-03-30 2016-10-12 Sk普兰尼特有限公司 Method and apparatus for verifying validity of 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027458A (en) * 2015-03-30 2016-10-12 Sk普兰尼特有限公司 Method and apparatus for verifying validity of beacon signal
CN106027458B (en) * 2015-03-30 2021-03-16 Sk 普兰尼特有限公司 Method and apparatus for verifying validity of beacon signals

Also Published As

Publication number Publication date
CN104469773B (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN103503366B (en) Manage the data for authenticating device
KR101362380B1 (en) Method and device for Digital Rights Management
CN103069745B (en) Attribute-based digital signatures
CN101192261A (en) Method and apparatus for generating proxy-signature on right object and issuing proxy signature certificate
CN111292041B (en) Electronic contract generation method, device, equipment and storage medium
CN105099673A (en) Authorization method, authorization requesting method and devices
JP4548441B2 (en) Content utilization system and content utilization method
CN104751337A (en) Product anti-fake method, device and system
CN110599342B (en) Block chain-based identity information authorization method and device
CN104883677A (en) Equipment communication connection method, apparatus and system
CN113034128B (en) Block chain-based data transaction and right confirmation method
CN104361490A (en) Payment method and payment system by sensitive information identification
CN103152157A (en) Secure encrypted method and relevant device
CN101606161A (en) Be used for definite supper-distribution and record the method for the price of product
CN106022145A (en) Cryptograph index-based data query method
CN111340477A (en) Service processing method and device, electronic equipment and storage medium
CN108132977A (en) Ciphertext database querying method and system based on vertical division
CN114491637A (en) Data query method and device, computer equipment and storage medium
CN104426865A (en) Method, device and system for controlling presentation of application
CN103577726A (en) Digital right management method based on equipment and re-transaction method
CN105574439A (en) System disk verifying method and device
CN104469773A (en) Wireless beacon anti-counterfeiting method
CN104392150A (en) Software authorization superposition control device and software authorization superposition control method
CN103384233A (en) Agency conversion method, device and system
TWI475879B (en) Method and apparatus for enciphering/deciphering digital rights management object

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