CN106685957B - A kind of encryption method of label data, decryption method, apparatus and system - Google Patents

A kind of encryption method of label data, decryption method, apparatus and system Download PDF

Info

Publication number
CN106685957B
CN106685957B CN201611234722.9A CN201611234722A CN106685957B CN 106685957 B CN106685957 B CN 106685957B CN 201611234722 A CN201611234722 A CN 201611234722A CN 106685957 B CN106685957 B CN 106685957B
Authority
CN
China
Prior art keywords
data
verification
label data
call number
label
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
CN201611234722.9A
Other languages
Chinese (zh)
Other versions
CN106685957A (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.)
SHENZHEN ZHONGYUANDA SMARTECH Co Ltd
Original Assignee
SHENZHEN ZHONGYUANDA SMARTECH 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 SHENZHEN ZHONGYUANDA SMARTECH Co Ltd filed Critical SHENZHEN ZHONGYUANDA SMARTECH Co Ltd
Priority to CN201611234722.9A priority Critical patent/CN106685957B/en
Publication of CN106685957A publication Critical patent/CN106685957A/en
Application granted granted Critical
Publication of CN106685957B publication Critical patent/CN106685957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • H04L2209/805Lightweight hardware, e.g. radio-frequency identification [RFID] or sensor

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention belongs to label data encryption and decryption technique fields, provide the encryption method, decryption method, apparatus and system of a kind of label data.It is summed by each byte to label data and determines the corresponding verification call number of label data, and the corresponding check bit data of verification call number are searched from verification tables of data, label data and check bit data are then obtained into encryption label data with preset-key progress XOR operation and are sent;It is obtained including label data and the verification label data for verifying data by receiving end after receiving encryption label data with preset-key progress XOR operation, then the corresponding verification call number of label data is determined according to the sum of each byte of label data, the corresponding data of verification call number are searched from checklist, when the corresponding data of verification call number are consistent with verification data, that is, it can determine that label data is correct label data.Therefore, the present invention verifies label data using check bit, and the anti-interference ability of label data can be improved.

Description

A kind of encryption method of label data, decryption method, apparatus and system
Technical field
The invention belongs to label data encryption and decryption technique field more particularly to a kind of encryption methods of label data, solution Decryption method, apparatus and system.
Background technique
Radio frequency identification (Radio Frequency Identification, RFID) technology, is that one kind passes through radio Number identification specific objective simultaneously reads and writes the communication technology of related data.Label and base station are as the data transmitting in Radio Frequency Identification Technology And reception device, together constitute radio-frequency recognition system.Label launches outward label data as data sending apparatus, and base station The label data of label transmitting is received as data sink.Wireless communication modes, mark are used in view of radio-frequency recognition system The safety of label data just seems abnormal important, and therefore, the mode that existing label generallys use encryption emits label data.But It is that the cipher mode of existing label data is easy to appear data corruption and data in the transmitting and receive process of label data The phenomenon that string is read, leads to the poor anti jamming capability of label data.
Therefore, there is label data poor anti jamming capability in the cipher mode of existing label data.
Summary of the invention
The present invention provides the encryption method, decryption method, apparatus and system of a kind of label data, it is intended to solve existing label Existing for data encryption mode the problem of label data poor anti jamming capability.
First aspect present invention provides a kind of encryption method of label data, and the encryption method includes:
The sum of each byte according to original tag data determines the corresponding verification call number of the original tag data;
The corresponding check bit data of the verification call number are searched from default verification tables of data;
By the original tag data and the check bit data, XOR operation is carried out with preset-key and obtains encryption mark Sign data;
The encryption label data is sent to receiving end.
Second aspect of the present invention provides a kind of decryption method of label data, and the decryption method includes:
Receive the encryption label data that transmitting terminal is sent;
The encryption label data and preset-key are subjected to XOR operation and obtain verification label data;Wherein, the school Standard inspection label data include label data and verification data;
The sum of each byte according to the label data determines the corresponding verification call number of the label data;
The corresponding data of the verification call number are searched from default checklist;
Judge whether the corresponding data of the verification call number and the verification data are consistent;
When the corresponding data of the verification call number are consistent with the verification data, determine that the label data is correct Original tag data;When the corresponding data of the verification call number and the verification data are inconsistent, the label is determined Data are incorrect original tag data.
Third aspect present invention provides a kind of encryption device of label data, and the encryption device includes:
Call number determining module determines the original tag data pair for the sum of each byte according to original tag data The verification call number answered;
Check bit data search module, for searching the corresponding verification of the verification call number from default verification tables of data Position data;
XOR operation module, for being carried out with preset-key by the original tag data and the check bit data XOR operation obtains encryption label data;
Data transmission blocks, for the encryption label data to be sent to receiving end.
Fourth aspect present invention provides a kind of decryption device of label data, and the decryption device includes:
Data reception module, for receiving the encryption label data of transmitting terminal transmission;
XOR operation module obtains verification label for the encryption label data and preset-key to be carried out XOR operation Data;Wherein, the verification label data includes label data and verification data;
Call number determining module determines that the label data is corresponding for the sum of each byte according to the label data Verify call number;
Data search module, for searching the corresponding data of the verification call number from default checklist;
Judgment module, for judging whether the corresponding data of the verification call number and the verification data are consistent;
When the corresponding data of the verification call number are consistent with the verification data, the judgment module determines the mark Label data are correct original tag data;When the corresponding data of the verification call number and the verification data are inconsistent, The judgment module determines that the label data is incorrect original tag data.
Fifth aspect present invention provides a kind of encrypting and decrypting system of label data, and the encrypting and decrypting system includes above-mentioned Encryption device and above-mentioned decryption device.
In the present invention, it is summed by each byte to original tag data and determines the corresponding verification rope of original tag data Quotation marks, and the corresponding check bit data of verification call number are searched from verification tables of data, then by original tag data and verification Position data obtain encryption label data with preset-key progress XOR operation and send;It receiving end will after receiving encryption label data It carries out XOR operation with preset-key and obtains including label data and the verification label data for verifying data, then according to label The sum of each byte of data determines the corresponding verification call number of label data, and the corresponding number of verification call number is searched from checklist According to, when verify the corresponding data of call number it is consistent with verification data when, that is, can determine label data for correct original tag number According to.Therefore, mark can be improved by verifying using check bit to original tag data during encrypting and decrypting in the present invention Sign the anti-interference ability of data.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of implementation flow chart of the encryption method of label data provided in an embodiment of the present invention;
Fig. 2 is a kind of another implementation flow chart of the encryption method of label data provided in an embodiment of the present invention;
Fig. 3 is a kind of implementation flow chart of the decryption method of label data provided in an embodiment of the present invention;
Fig. 4 is a kind of another implementation flow chart of the decryption method of label data provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of the encryption device of label data provided in an embodiment of the present invention;
Fig. 6 is a kind of another structural schematic diagram of the encryption device of label data provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the decryption device of label data provided in an embodiment of the present invention;
Fig. 8 is a kind of structural block diagram of the encrypting and decrypting system of label data provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Referring to Fig. 1, Fig. 1 is a kind of implementation process of the encryption method of label data provided in an embodiment of the present invention, this The executing subject of the encryption method of label data is transmitting terminal in embodiment, and transmitting terminal can be active label, but be not limited to This.For ease of description, only parts related to embodiments of the present invention are shown, and details are as follows:
As shown in Figure 1, a kind of encryption method of label data, the encryption method the following steps are included:
S101: the corresponding verification call number of original tag data is determined according to the sum of each byte of original tag data.
It sums first to each byte of original tag data, determines that original tag data are corresponding according to the result of summation Verify call number.In embodiments of the present invention, corresponding with original tag data in the presence of one as long as original tag data determine Verification call number, the sum of the verification call number and corresponding each byte of original tag data are closely related.For example, If the result of each byte summation of original tag data is 07, it is determined that the verification call number of original tag data is 07.Example Such as, if the result of original tag data each byte summation is 2C2, it is determined that the verification call number of original tag data is C2。
S102: the corresponding check bit data of verification call number are searched from default verification tables of data.
0th column 1st column 2nd column 3rd column 4th column 5th column 6th column 7th column 8th column 9th column A column Column b Column c D column E column Line f
0th row 0xB8 0xB9 0xBA 0xBB 0xB4 0xB5 0xB6 0xBB 0xB0 0xB1 0xB2 0xB3 0x6C 0x6C 0x6A 0x6F
1st row 0x68 0x69 0x6A 0x6B 0x64 0x65 0x66 0x6B 0x60 0x61 0x62 0x63 0x1C 0x1C 0x1A 0x1F
2nd row 0x18 0x19 0x1A 0x1B 0x14 0x15 0x16 0x1B 0x10 0x11 0x12 0x13 0x0C 0x0C 0x0A 0x0F
3rd row 0x08 0x09 0x0A 0x0B 0x04 0x05 0x06 0x0B 0x00 0x01 0x02 0x03 0x3C 0x3C 0x3A 0x3F
4th row 0x38 0x39 0x3A 0x3B 0x34 0x35 0x36 0x3B 0x30 0x31 0x32 0x33 0x2C 0x2C 0x2A 0x2F
5th row 0x28 0x29 0x2A 0x2B 0x24 0x25 0x26 0x2B 0x20 0x21 0x22 0x23 0xCC 0xCC 0xCA 0xCF
6th row 0xC8 0xC9 0xCA 0xCB 0xC4 0xC5 0xC6 0xCB 0xC0 0xC1 0xC2 0xC3 0xCC 0xCC 0xCA 0xCF
7th row 0xC8 0xC9 0xCA 0xCB 0xC4 0xC5 0xC6 0xCB 0xC0 0xC1 0xC2 0xC3 0xFC 0xFC 0xFA 0xFF
Eighth row 0xF8 0xF9 0xFA 0xFB 0xF4 0xF5 0xF6 0xFB 0xF0 0xF1 0xF2 0xF3 0xAC 0xAC 0xAA 0xAF
9th row 0xA8 0xA9 0xAA 0xAB 0xA4 0xA5 0xA6 0xAB 0xA0 0xA1 0xA2 0xA3 0x9C 0x9C 0x9A 0x9F
Line a 0x98 0x99 0x9A 0x9B 0x94 0x95 0x96 0x9B 0x90 0x91 0x92 0x93 0x8C 0x8C 0x8A 0x8F
Line b 0x88 0x89 0x8A 0x8B 0x84 0x85 0x86 0x8B 0x80 0x81 0x82 0x83 0xBC 0xBC 0xBA 0xBF
Line c 0xB8 0xB9 0xBA 0xBB 0xB4 0xB5 0xB6 0xBB 0xB0 0xB1 0xB2 0x83 0xAC 0xAC 0xAA 0xAF
Line D 0xA8 0xA9 0xAA 0xAB 0xA4 0xA5 0xA6 0xAB 0xA0 0xA1 0xA2 0xA3 0x5C 0x5C 0x5A 0x5F
E row 0x58 0x59 0x5A 0x5B 0x54 0x55 0x56 0x5B 0x50 0x51 0x52 0x53 0x4C 0x4C 0x4A 0x4F
Line f 0x48 0x49 0x4A 0x4B 0x44 0x45 0x46 0x4B 0x40 0x41 0x42 0x43 0xBC 0xBC 0xBA 0xBF
Table 1
Table 1 shows verification tables of data provided in an embodiment of the present invention.The tables of data is the tables of data of 16 rows, 16 column, number It is hexadecimal data according to the data in table.The first row of tables of data is defined to the tenth behavior the 0th row to the 9th row, the tenth A line is to the 16th behavior line a, line b, line c, line D, E row, line f;Similarly, the first row of tables of data is defined extremely Tenth is classified as the 0th column to the 9th column, and the 11st column to the 16th are classified as A column, column b, column c, D column, E column, F Column.In embodiments of the present invention, above-mentioned verification tables of data is also possible to other kinds of definition, however it is not limited to above-mentioned definition.But It is that during use, transmitting terminal should be consistent with the definition type of the verification tables of data of receiving end.
Referring to the verification tables of data that 16 rows 16 shown in table of the embodiment of the present invention 1 arrange, for example, true according to above-mentioned steps S101 The verification call number of fixed original tag data is 07, and the data that the 0th row the 7th arranges are searched from verification tables of data shown in table 1, are led to It crosses lookup verification data to learn, the data for verifying the 0th row the 7th column in tables of data are 0xBB, then corresponding with verification call number 07 Check bit data are BB.
Referring to the verification tables of data that 16 rows 16 shown in table of the embodiment of the present invention 1 arrange, for example, true according to above-mentioned steps S101 The verification call number of fixed original tag data is C2, and the data that line c the 2nd arranges are searched from verification tables of data shown in table 1, It is learnt by searching for verification data, verifying the data that line c the 2nd arranges in tables of data is 0xBA, then corresponding with verification call number C2 Check bit data be BA.
S103: by original tag data and check bit data, XOR operation is carried out with preset-key and obtains encryption label Data.
Original tag data and check bit data and preset-key are subjected to XOR operation and obtain the number of tags by encryption According to, i.e., encryption label data.In embodiments of the present invention, which can freely define in advance, but in use process In should remain unchanged, and transmitting terminal and receiving end should be consistent, for example, it is assumed that the preset-key is CC0311880011。
For example, by one of original tag data and corresponding verification call number 07, with preset-key CC0311880011 carries out XOR operation and obtains encryption label data;Another original tag data and corresponding verification Call number C2 carries out XOR operation with preset-key CC0311880011 and obtains encryption label data.
S104: encryption label data is sent to receiving end.
After above-mentioned steps S103 obtains encryption label data, transmitting terminal launches above-mentioned encryption label data It goes, is received for receiving end.
Referring to Fig. 2, Fig. 2 is a kind of another realization stream of the encryption method of label data provided in an embodiment of the present invention Journey, the executing subject of the encryption method of label data is transmitting terminal in the present embodiment, and transmitting terminal can be but and unlimited with active label In this.For ease of description, only parts related to embodiments of the present invention are shown, and details are as follows:
As an embodiment of the present invention, as shown in Fig. 2, step S101: true according to the sum of each byte of original tag data Determine the corresponding verification call number of original tag data specifically:
S1011:, will be former when the result that each byte of original tag data is added summation is less than or equal to preset threshold Each byte of beginning label data is added the result of summation as verification call number.
The preset threshold and verification tables of data shown in table 1 in above-described embodiment are closely related, in verification tables of data Data amount check.In embodiments of the present invention, as shown in Figure 1, the verification tables of data is the tables of data of 16 rows 16 column, the i.e. check number There are a hexadecimal data of 256 (decimal systems) according to table.When the result that each byte of original tag data is added summation is less than Or when being equal to 256, each byte of original tag data is added the result of summation i.e. as verification call number.Certainly, school It tests tables of data to be not limited to verify tables of data shown in above-mentioned table 1, can also be other customized tables of data, as long as using It is consistent in the process in transmitting terminal and receiving end.For example, also can define the check number that verification tables of data is 10 rows 10 column According to table.
Assuming that original tag data are as follows: 07000000000000, then the data of each byte of original tag data are respectively as follows: 07,00,00,00,00,00,00, each byte of original tag data is separately summed, i.e., are as follows:
07+00+00+00+00+00+00
=(0+0+0+0+0+0+0) * 16+ (7+0+0+0+0+0+0) * 1=07
That is, being 07 according to the verification call number that the original tag data that above-mentioned operation determines are 07000000000000.
S1012: when the result that each byte of original tag data is added summation is greater than preset threshold, by original tag number According to each byte be added summation result preset byte as verification call number.It is in embodiment, when original mark in the present invention When each byte for signing data is added the result summed greater than 256, each byte of original tag data is added to the knot of summation One, the end byte of fruit is as verification call number.
Assuming that original tag data are as follows: D34A2FFF79B8C6, then the data of each byte of original tag data are respectively as follows: Each byte of original tag data is separately summed, i.e., by D3,4A, 2F, FF, 79, B8, C6 are as follows:
D3+4A+2F+FF+79+B8+C6
=(D+4+2+F+7+B+C) * 16+ (3+A+F+F+9+8+6) * 1
=40*16+66*1
=2*16*16+8*16+4*16+2*1
=2*16*16+C*16+2*1
=2C2
The result 2C2 of above-mentioned original tag data D34A2FFF79B8C6 summation is greater than 256, therefore, takes the end one of 2C2 A byte C2 is C2 as verification call number, i.e. the verification call number of original tag data D34A2FFF79B8C6.
Further, step S103 can be specifically included: S1031 and S1032.
S1031: verification position data and original tag data are spliced to form verification label data.
(original tag data are illustrated by taking the original tag data 07000000000000 in above-mentioned steps S101 as an example The step of after D34A2FFF79B8C6 with it is following identical, be no longer described in detail).Original tag data 07000000000000 are right The verification call number answered is 07, i.e., the check bit data that the 0th row the 7th arranges is searched from verification tables of data shown in table 1, by looking into Verification tables of data is looked for learn, the data for verifying the 0th row the 7th column in tables of data are 0xBB, then school corresponding with verification call number 07 Testing a data is BB.Original tag data 07000000000000 and check bit data BB are spliced to form verification label data 07000000000000BB。
In embodiments of the present invention, however it is not limited to it is above-mentioned will verification position data splice it is this to the end of original tag data Merging mode.For example, it is also possible to before verification position data BB is placed on original tag data 07000000000000, the two splicing Form verification label data BB07000000000000.Herein only for verifying label data 07000000000000BB, BB07000000000000 is similar, is no longer described in detail.
S1032: high-ranking officers test label data and preset-key carries out XOR operation and obtains encryption label data.
Verification label data 07000000000000BB that above-mentioned steps are obtained and preset-key CC0311880011 into Row XOR operation.
07000000000000BB and CC0311880011 is subjected to XOR operation and obtains encryption label data, because two The length of data is different, therefore the two carries out circulation XOR operation, it may be assumed that
07000000000000BB and CC0311880011CC03 carries out XOR operation, in the process for carrying out XOR operation In, original tag data 07000000000000BB and ciphering key C0311880011CC03 are converted into binary system first, then XOR operation is carried out again.That is:
07000000000000BB is converted to binary system are as follows: 0000011100000000000000000000000000000 000000000000000000010111011, ciphering key C0311880011CC03 is converted to binary system are as follows: 1100110000000 011000100011000100000000000000100011100110000000011, above-mentioned binary data is subjected to exclusive or Operation:
0000011100000000000000000000000000000000000000000000000010111011⊕11 00110000000011000100011000100000000000000100011100110000000011
=11,001,011,000,000,110,001,000,110,001,000,000,000,000,001,000,111,001,100 10111000, it will The result of above-mentioned exclusive or is converted to hexadecimal are as follows: CB0311880011CCB8, i.e. encryption label data are CB0311880011CCB8。
Therefore, by above-mentioned operation, obtaining encryption label data is CB0311880011CCB8.
In embodiments of the present invention, it is summed by each byte to original tag data and determines that original tag data are corresponding Call number is verified, and searches the corresponding check bit data of verification call number from verification tables of data, then by original tag data And check bit data obtain encryption label data with preset-key progress XOR operation and send.Therefore, the present invention is by adding Check bit and original tag data are merged during close, and carry out operation with preset-key, passes through above-mentioned ciphering process The anti-interference ability of label data can be improved.
Referring to Fig. 3, Fig. 3 is a kind of implementation process of the decryption method of label data provided in an embodiment of the present invention, this The executing subject of the decryption method of label data is receiving end in embodiment, and receiving end can be base station, and but it is not limited to this.For Convenient for explanation, only parts related to embodiments of the present invention are shown, details are as follows:
The decryption method of label data as shown in Figure 3 a kind of the following steps are included:
S201: the encryption label data that transmitting terminal is sent is received.
Receiving end receives the encryption label data that transmitting terminal is sent.In embodiments of the present invention, for example, receiving above-mentioned transmitting Hold the encryption label data CB0311880011CCB8 sent.
S202: encryption label data and preset-key are subjected to XOR operation and obtain verification label data;Wherein, verification mark Label data include label data and verification data.
The encryption label data CB0311880011CCB8 and preset-key CC0311880011 that above-mentioned steps are received It carries out XOR operation and obtains verification label data, which includes label data and verification data.It is obtained according to above-mentioned The verification label data arrived splits verification label data, and transmitting terminal is will to verify position data to be incorporated into original tag number According to the last byte as original tag data of end, therefore, receiving end will verify to be consistent with transmitting terminal One, the end byte of label data is as verification data, using the data before verification data as label data.
The encryption label data CB0311880011CCB8 and preset-key CC0311880011 that above-mentioned steps are received XOR operation obtains verification label data, because the length of two data is different, the two carries out circulation XOR operation, in addition, also Binary system will be both converted by, which needing, carries out XOR operation, it may be assumed that
CB0311880011CCB8⊕CC0311880011
=CB0311880011CCB8 ⊕ CC0311880011CC03
It is converted into binary system and carries out XOR operation are as follows:
1100101100000011000100011000100000000000000100011100110010111000⊕11 00110000000011000100011000100000000000000100011100110000000011
=00,000,111,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 10111011,
Converting hexadecimal for above-mentioned binary result is that 07000000000000BB is to get to label data 07000000000000BB。
According to label data 07000000000000BB obtained above, it is consistent, connects with the mode that merges of transmitting terminal Receiving end using end the last byte BB of label data 07000000000000BB as verification data, will verification data BB it Preceding 07000000000000 is used as label data.
It therefore, is 07000000000000BB, label data according to the verification label data that above-mentioned steps S202 is obtained are as follows: 07000000000000, verification data are BB.
S203: the corresponding verification call number of label data is determined according to the sum of each byte of label data.
It is 07000000000000BB, label data according to the verification label data that above-mentioned steps S202 is obtained are as follows: 07000000000000, verification data are BB.
The result of each byte of label data 07000000000000 summation is 07, it is determined that label data 07000000000000 verification call number is 07.
S204: the corresponding data of verification call number are searched from default checklist.
It is illustrated by taking above-mentioned label data 07000000000000 as an example.According to above-mentioned steps, label data 07000000000000 verification call number is 07, and tables of data is verified according to shown in table 1, and the data of the 0th row the 7th column are 0xBB, therefore verifying the corresponding verification data of call number 07 is BB.
S205: judge to verify the corresponding data of call number and whether verification data are consistent.
When the corresponding data of verification call number are consistent with verification data, determine that label data is correct original tag number According to.
It is BB according to the corresponding data of verification call number 07 that above-mentioned steps obtain, which obtains with above-mentioned steps S202 Verification data BB it is consistent, it can determine that label data 07000000000000 that receiving end obtains is correct original tag Data.
When verifying the corresponding data of call number and inconsistent verification data, determine that label data is incorrect original mark Sign data.
Data are caused to change if crosstalk occurs for the encryption label data of transmitting terminal transmitting, receiving end receives encryption If the verification label data being decrypted after label data are as follows: 07000000000001BB, then label data be 07000000000001, verification data are BB, and label data is that the result of 07000000000001 byte summation is 08, then such as The data of the column of 0th row the 8th shown in table 1 are as follows: 0xB0.
It so, is B0, the data and verification data BB according to the corresponding data of verification call number 08 that above-mentioned steps obtain It is inconsistent, it can to determine that the label data 07000000000001 that receiving end obtains is incorrect original tag data.Then Receiving end can abandon the incorrect label data.
Referring to Fig. 4, Fig. 4 is a kind of another realization stream of the decryption method of label data provided in an embodiment of the present invention Journey, the executing subject of the decryption method of label data is receiving end in the present embodiment, and receiving end can be base station, but be not limited to This.
Wherein, the difference of the decryption method of the label data in the present embodiment and embodiment shown in Fig. 3 is step S203, step S201, S202, S204, S205 please refer to the correlation of S201, S202, S204, S205 in embodiment shown in Fig. 3 Description, does not repeat herein.
As shown in figure 4, step S203: determining that the corresponding verification of label data indexes according to the sum of each byte of label data Number specifically:
S2031: when the result that each byte of label data is added summation is less than or equal to preset threshold, by number of tags According to each byte be added summation result as verification call number.
For example, being illustrated for label data 07000000000000.When transmitting terminal is carried out to 07000000000000 Encryption obtains encryption label data CB0311880011CCB8, and receiving end carries out encryption label data CB0311880011CCB8 Decryption obtains verification label data 07000000000000BB, and high-ranking officers test after label data 07000000000000BB is split and obtain Label data 07000000000000 and verification data BB.Then each byte of label data 07000000000000 is added summation Result be 07, less than 256, therefore, by the 07 verification call number as label data 07000000000000.
S2032: when the result that each byte of label data is added summation is greater than preset threshold, by each word of label data Section is added the preset byte of the result of summation as verification call number.
For example, being illustrated for label data D34A2FFF79B8C6.When transmitting terminal carries out D34A2FFF79B8C6 Encryption obtains encryption label data, and receiving end is decrypted encryption label data to obtain verification label data D34A2FFF79B8C6BA, high-ranking officers test after label data D34A2FFF79B8C6BA is split and obtain label data D34A2FFF79B8C6 and verification data BA.Then the result of each byte addition summation of label data D34A2FFF79B8C6 is 2C2 is greater than 256, therefore, using one, the end byte C2 of label data D34A2FFF79B8C6 summed result as verification rope Quotation marks.
In embodiments of the present invention, receiving end obtains it with preset-key progress XOR operation after receiving encryption label data To including label data and the verification label data for verifying data, number of tags is then determined according to the sum of each byte of label data According to corresponding verification call number, the corresponding data of verification call number are searched from checklist, when the corresponding data of verification call number When consistent with verification data, that is, it can determine that label data is correct original tag data.Therefore, the present invention passes through decrypted Original tag data are verified using check bit in journey, the anti-interference ability of label data can be improved.
Referring to Fig. 5, Fig. 5 is a kind of structure of the encryption device of label data provided in an embodiment of the present invention, the present invention The encryption device of label data is transmitting terminal in embodiment, and transmitting terminal can be active label, and but it is not limited to this.For the ease of Illustrate, only parts related to embodiments of the present invention are shown, and details are as follows:
Modules included by encryption device in Fig. 5 are used to execute each step in Fig. 1 corresponding embodiment, specifically The associated description in Fig. 1 and Fig. 1 corresponding embodiment is please referred to, details are not described herein again.As shown in figure 5, a kind of label data Encryption device, the encryption device include:
Call number determining module 301 determines original tag data pair for the sum of each byte according to original tag data The verification call number answered.
Check bit data search module 302, for searching the corresponding verification of verification call number from default verification tables of data Position data.
XOR operation module 303, for carrying out exclusive or fortune with preset-key for original tag data and check bit data Calculation obtains encryption label data.
Data transmission blocks 304 are sent to receiving end for that will encrypt label data.
Referring to Fig. 6, Fig. 6 is a kind of structure of the encryption device of label data provided in an embodiment of the present invention, the present invention The encryption device of label data is transmitting terminal in embodiment, and transmitting terminal can be active label, and but it is not limited to this.For the ease of Illustrate, only parts related to embodiments of the present invention are shown, and details are as follows:
Modules included by encryption device in Fig. 6 are used to execute each step in Fig. 2 corresponding embodiment, specifically The associated description in Fig. 2 and Fig. 2 corresponding embodiment is please referred to, details are not described herein again.As shown in fig. 6, in the encryption device XOR operation module includes:
Data concatenation unit 3031 is spliced to form verification label data for that will verify position data and original tag data.
XOR operation unit 3032 tests label data for high-ranking officers and preset-key carries out XOR operation and obtains encryption label Data.
Referring to Fig. 7, Fig. 7 is a kind of structure of the decryption device of label data provided in an embodiment of the present invention, the present invention The decryption device of label data is receiving end in embodiment, and receiving end can be base station, and but it is not limited to this.For the ease of saying Bright, only parts related to embodiments of the present invention are shown, and details are as follows:
Modules included by encryption device in Fig. 7 are used to execute each step in Fig. 4 corresponding embodiment, specifically The associated description in Fig. 4 and Fig. 4 corresponding embodiment is please referred to, details are not described herein again.As shown in fig. 7, a kind of label data Device is decrypted, which includes:
Data reception module 401, for receiving the encryption label data of transmitting terminal transmission;
XOR operation module 402 carries out XOR operation and obtains verification label for that will encrypt label data and preset-key Data;Wherein, verification label data includes label data and verification data.
Call number determining module 403 determines the corresponding verification of label data for the sum of each byte according to label data Call number.
Data search module 404, for searching the corresponding data of verification call number from default checklist.
Judgment module 405, for judging whether the corresponding data of verification call number and verification data are consistent.
When the corresponding data of verification call number are consistent with verification data, judgment module determines that label data is correctly former Beginning label data;When verifying the corresponding data of call number and inconsistent verification data, judgment module determines that label data is not Correct original tag data.
Referring to Fig. 8, Fig. 8 is a kind of structure of the encrypting and decrypting system of label data provided in an embodiment of the present invention, it is Convenient for explanation, only parts related to embodiments of the present invention are shown, details are as follows:
As shown in figure 8, a kind of encrypting and decrypting system of label data, which includes 810 He of encryption device Decrypt device 820.Wherein, encryption device 810 is encryption device described in any of the above-described embodiment, and decryption device 820 is above-mentioned Decryption device described in any embodiment.In embodiments of the present invention, encryption device can be active label, but be not limited to This;Decrypting device can be base station, and but it is not limited to this.
In embodiments of the present invention, it is summed by each byte to original tag data and determines that original tag data are corresponding Call number is verified, and searches the corresponding check bit data of verification call number from verification tables of data, then by original tag data And check bit data obtain encryption label data with preset-key progress XOR operation and send;Receiving end receives encryption number of tags It is carried out XOR operation to obtain with preset-key after to include label data and the verification label data that verifies data, then root The sum of each byte according to label data determines the corresponding verification call number of label data, and verification call number pair is searched from checklist The data answered can determine that label data is correctly original when the corresponding data of verification call number are consistent with verification data Label data.Therefore, the present invention is by verifying original tag data using check bit during encrypting and decrypting, can be with Improve the anti-interference ability of label data.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (11)

1. a kind of encryption method of label data, which is characterized in that the encryption method includes:
The sum of each byte according to original tag data determines the corresponding verification call number of the original tag data;
The corresponding check bit data of the verification call number are searched from default verification tables of data;
By the original tag data and the check bit data, XOR operation is carried out with preset-key and obtains encryption number of tags According to the preset-key remains unchanged in use, and is consistent in transmitting terminal and receiving end;
The encryption label data is sent to receiving end.
2. encryption method as described in claim 1, which is characterized in that described true according to the sum of each byte of original tag data Determine the corresponding verification call number of the original tag data specifically:
It, will be described original when the result that each byte of the original tag data is added summation is less than or equal to preset threshold Each byte of label data is added the result of summation as verification call number;
When the result that each byte of the original tag data is added summation is greater than the preset threshold, by the original tag Each byte of data is added the preset byte of the result of summation as verification call number.
3. encryption method as described in claim 1, which is characterized in that described by the original tag data and the verification Position data carry out XOR operation with preset-key and obtain encryption label data specifically:
The check bit data and the original tag data are spliced to form verification label data;
The verification label data and preset-key are subjected to XOR operation and obtain encryption label data.
4. a kind of decryption method of label data, which is characterized in that the decryption method includes:
Receive the encryption label data that transmitting terminal is sent;
The encryption label data and preset-key are subjected to XOR operation and obtain verification label data;Wherein, the verification mark Label data include label data and verification data;
The sum of each byte according to the label data determines the corresponding verification call number of the label data;
The corresponding data of the verification call number are searched from default checklist;
Judge whether the corresponding data of the verification call number and the verification data are consistent;
When the corresponding data of the verification call number are consistent with the verification data, determine that the label data is correctly former Beginning label data;When the corresponding data of the verification call number and the verification data are inconsistent, the label data is determined For incorrect original tag data.
5. decryption method as claimed in claim 4, which is characterized in that each byte by the label data is added summation Result as verification call number:
When the result that each byte of the label data is added summation is less than or equal to preset threshold, by the label data Each byte be added summation result as verification call number;
When the result that each byte of the label data is added summation is greater than the preset threshold, by the label data Each byte be added summation result preset byte as verification call number.
6. a kind of encryption device of label data, which is characterized in that the encryption device includes:
Call number determining module determines that the original tag data are corresponding for the sum of each byte according to original tag data Verify call number;
Check bit data search module, for searching the corresponding verification digit of the verification call number from default verification tables of data According to;
XOR operation module, for carrying out exclusive or with preset-key for the original tag data and the check bit data Operation obtains encryption label data, and the preset-key remains unchanged in use, and keeps in transmitting terminal and receiving end Unanimously;
Data transmission blocks, for the encryption label data to be sent to receiving end.
7. encryption device as claimed in claim 6, which is characterized in that the call number determining module is specifically used for:
When the result that each byte of the original tag data is added summation is less than or equal to preset threshold, the call number Each byte of the original tag data is added the result of summation as verification call number by determining module;
When the result that each byte of the original tag data is added summation is greater than the preset threshold, the call number is determined Each byte of the original tag data is added the preset byte for the result summed as verification call number by module.
8. encryption device as claimed in claim 6, which is characterized in that the XOR operation module includes:
Data concatenation unit, for the check bit data and the original tag data to be spliced to form verification label data;
XOR operation unit obtains encryption number of tags for the verification label data and preset-key to be carried out XOR operation According to.
9. a kind of decryption device of label data, which is characterized in that the decryption device includes:
Data reception module, for receiving the encryption label data of transmitting terminal transmission;
XOR operation module obtains verification number of tags for the encryption label data and preset-key to be carried out XOR operation According to;Wherein, the verification label data includes label data and verification data;
Call number determining module determines the corresponding verification of the label data for the sum of each byte according to the label data Call number;
Data search module, for searching the corresponding data of the verification call number from default checklist;
Judgment module, for judging whether the corresponding data of the verification call number and the verification data are consistent;
When the corresponding data of the verification call number are consistent with the verification data, the judgment module determines the number of tags According to for correct original tag data;It is described when the corresponding data of the verification call number and the verification data are inconsistent Judgment module determines that the label data is incorrect original tag data.
10. decryption device as claimed in claim 9, which is characterized in that the call number determining module is specifically used for:
When the result that each byte of the label data is added summation is less than or equal to preset threshold, the call number is determined Each byte of the label data is added the result of summation as verification call number by module;
When the result that each byte of the label data is added summation is greater than the preset threshold, the call number is determined Each byte of the label data is added the preset byte for the result summed as verification call number by module.
11. a kind of encrypting and decrypting system of label data, which is characterized in that the encrypting and decrypting system includes such as claim 6 To encryption device described in 8 any one and the decryption device as described in claim 9 to 10 any one.
CN201611234722.9A 2016-12-28 2016-12-28 A kind of encryption method of label data, decryption method, apparatus and system Active CN106685957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611234722.9A CN106685957B (en) 2016-12-28 2016-12-28 A kind of encryption method of label data, decryption method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611234722.9A CN106685957B (en) 2016-12-28 2016-12-28 A kind of encryption method of label data, decryption method, apparatus and system

Publications (2)

Publication Number Publication Date
CN106685957A CN106685957A (en) 2017-05-17
CN106685957B true CN106685957B (en) 2019-10-08

Family

ID=58871806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611234722.9A Active CN106685957B (en) 2016-12-28 2016-12-28 A kind of encryption method of label data, decryption method, apparatus and system

Country Status (1)

Country Link
CN (1) CN106685957B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007222B (en) * 2021-10-20 2024-03-15 北京龙智数科科技服务有限公司 Illegal data authentication method, illegal data authentication device, computer equipment and storage medium
CN116955352B (en) * 2023-05-22 2024-06-11 广州生产力促进中心有限公司 Label management method and system based on geometric series

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063601B (en) * 2009-11-12 2015-04-01 中兴通讯股份有限公司 Radio frequency identification system, radio frequency identification method and reader
CN101833681B (en) * 2010-04-02 2013-03-20 深圳市科陆电子科技股份有限公司 Electronic label system
CN105808653B (en) * 2016-02-26 2019-08-09 广州品唯软件有限公司 A kind of data processing method and device based on user tag system

Also Published As

Publication number Publication date
CN106685957A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
WO2010078825A1 (en) Secure key system
Ivanov et al. Reversed genetic algorithms for generation of bijective s-boxes with good cryptographic properties
CN106685957B (en) A kind of encryption method of label data, decryption method, apparatus and system
US5724427A (en) Method and apparatus for autokey rotor encryption
CN104301113B (en) One kind is based on the multiduty digital signature method of many certificates and system
CN110198214B (en) Identity generation method, identity verification method and identity verification device
CN101923802B (en) Sequential cipher realization method and device
Zhou et al. Practical key-recovery attacks on round-reduced Ketje Jr, Xoodoo-AE and Xoodyak
Tews et al. Breaking dvb-csa
CN109801210A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN101625653A (en) Method for processing and checking local data in multi-media product
US20150089319A1 (en) Inband management of ethernet links
CN105847883B (en) A kind of program stream method for pushing and device based on users to trust grade
CN110061848B (en) Method for safely importing secret key of payment terminal, payment terminal and system
US20230336354A1 (en) Data transmission method and data transmission device
CN103051682A (en) Method and system for wireless interaction of vehicle-mounted terminal
Maghrebi et al. Optimal first-order masking with linear and non-linear bijections
do Nascimento et al. FlexAEAD-A lightweight cipher with integrated authentication
CN104038757A (en) Method and system for testing digital television terminal
Kuznetsov et al. A new cost function for heuristic search of nonlinear substitutions
CN113987589B (en) Method and device for processing data, computer readable storage medium and device
Tang et al. Awareness and control of personal data Based on the Cyber-I privacy model
CN111930184A (en) Method, device and system for realizing external equipment simulation keyboard
CN114189324B (en) Message security signature method, system, equipment and storage medium
Maximov A new stream cipher Mir-1

Legal Events

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