CN103886464A - Anti-fake code generating method - Google Patents

Anti-fake code generating method Download PDF

Info

Publication number
CN103886464A
CN103886464A CN201410084455.6A CN201410084455A CN103886464A CN 103886464 A CN103886464 A CN 103886464A CN 201410084455 A CN201410084455 A CN 201410084455A CN 103886464 A CN103886464 A CN 103886464A
Authority
CN
China
Prior art keywords
operation values
data
secret key
carried out
code
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.)
Pending
Application number
CN201410084455.6A
Other languages
Chinese (zh)
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.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201410084455.6A priority Critical patent/CN103886464A/en
Publication of CN103886464A publication Critical patent/CN103886464A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention provides an anti-fake code generating method. The anti-fake code generating method is characterized by comprising the steps of coding product information according to certain preset rules so as to generate a product serial number, conducting AES encryption algorithm calculation on the product serial number and a secret key so as to obtain enciphered data, dividing the enciphered data into front enciphered data and back enciphered data, processing the secret key according to the preset rules to obtain a DES secret key and an IDEA secret key, conducting DES encryption algorithm calculation on the front enciphered data and the DES secret key so as to obtain logistics anti-fake complete codes, conducting IDEA encryption algorithm calculation on the back enciphered data and the IDEA secret key so as to obtain product anti-fake complete codes, and intercepting a corresponding logistics anti-fake application code and a product anti-fake application code from the logistics anti-fake complete code and the product anti-fake complete code according to the preset length respectively. Consequently, compared with the prior art, the anti-fake code generating method has the advantages of being high in encryption strength and not easy to break.

Description

False proof code generating method
Technical field
The present invention relates to a kind of generation method of security code, be specifically related to a kind of according to the product information of inclusion stream information and secret key generate the logistics Application in Anti-counterfeiting code of predetermined length and the product false proof application code of predetermined length false proof code generating method.
Background technology
Society fake and inferior commodities are spread unchecked; it is the outstanding problem in China's economic life; hit the production and circulation of fake and inferior commodities, concerning purge flow order, protect consumers' interests, protect legal intellecture property, also with to improve Chinese commodity directly related in the prestige of international market.Fake products has not only been encroached on consumers in general's interests, has upset normal market order, and has brought huge economic loss to manufacturer.Each manufacturing enterprise is not encroached on by fake products in order to guard one's interest, mostly meeting antiforge code on product.
At present, although the cryptographic algorithm of generating anti-counterfeiting code has a lot, the Cipher Strength of most of cryptographic algorithm is not very desirable, and enciphering rate is also slower.In prior art, lack the false proof code generating method that a kind of Cipher Strength is high, be difficult for cracking.
Summary of the invention
The present invention carries out in order to solve above-mentioned problem, and object is to provide the false proof code generating method that can generate according to the product information of inclusion stream information and secret key the logistics Application in Anti-counterfeiting code of predetermined length and the product false proof application code of predetermined length that a kind of Cipher Strength is high, be difficult for cracking.
False proof code generating method provided by the invention, there is such feature, specifically comprise the following steps: (1) is encoded and generated product ID with certain pre-defined rule product information, (2) product ID and secret key are carried out to the computing of AES cryptographic algorithm, obtain enciphered data, (3) enciphered data is divided into front enciphered data and rear enciphered data, (4) secret key is obtained to the secret key of DES and the secret key of IDEA according to pre-defined rule processing, (5) front enciphered data and the secret key of DES are carried out to the computing of des encryption algorithm, obtain the false proof complete code of logistics, (6) rear enciphered data and the secret key of IDEA are carried out to the computing of IDEA cryptographic algorithm, obtain product false proof complete code, and (7) intercept out respectively corresponding logistics Application in Anti-counterfeiting code and product false proof application code according to predetermined length from the false proof complete code of logistics and product false proof complete code.
In false proof code generating method of the present invention, can also there is such feature: wherein, AES cryptographic algorithm comprises the following steps: a1. determines iterations Nr according to the length of the length of product ID and secret key, a2. secret key is carried out to 10 expansions and obtain 10 groups of secret keys of expansion of taking turns secret key composition, a3. product ID and secret key step-by-step are carried out to XOR and obtain the 1st operation values, a4. the 1st operation values is carried out to Nr-1 AES encryption iteration and obtain the 5th operation values, a5. the 5th operation values is carried out to S box replacement operator and obtain the 6th operation values, a6. the every row of the 6th operation values is circulated and moves byte manipulation and obtain the 7th operation values, and a7. takes turns secret key step-by-step to the 7th operation values and the 10th group and carries out XOR and obtain enciphered data.
In false proof code generating method of the present invention, can also there is such feature: wherein, single AES in Nr-1 AES encryption iteration encrypts iteration and comprises the following steps: b1. carries out S box replacement operator to the 1st operation values and obtains the 2nd operation values, b2. the every row of the 2nd operation values is circulated and moves byte manipulation and obtain the 3rd operation values, b3. the 3rd operation values is mixed to rank transformation operation and obtain the 4th operation values, b4. determine that according to the secret key of expansion this encrypts the secret key of wheel of iteration, and b5. carries out XOR by the 4th operation values with the secret key step-by-step of wheel and obtains the 5th operation values.
In false proof code generating method of the present invention, can also there is such feature: wherein, des encryption algorithm comprises the following steps: e1. carries out IP in-place computation to front enciphered data and obtains the 8th operation values, and the 8th operation values is divided into left data and right data, e2. the secret key of DES is carried out to secret key conversion and obtain the secret key group of DES that 16 secret keys of DES form, e3. left data and right data are carried out to 16 des encryption iteration and obtain new left data and new right data, and e4. carries out last permutation function computing by the new data being made up of new left data and new right data and obtains the false proof complete code of logistics.
In false proof code generating method of the present invention, can also there is such feature: wherein, single des encryption iteration in 16 des encryption iteration comprises the following steps: f1. expands replacement operator to right data and obtains the 9th operation values, f2. determine the secret key of DES of this encryption iteration according to the secret key group of DES, f3. the 9th operation values and the secret key of DES are carried out to XOR and obtain the 10th computing knot value, and the 10th operation values is divided into eight data blocks, f4. eight data blocks are carried out respectively to S box replacement operator and obtain corresponding eight output data, f5. the 11st operation values being become by eight output data groups is carried out to P box replacement operator and obtain the 12nd operation values, f6. the 12nd operation values and left data are carried out to XOR and obtain the 13rd operation values, and f7. is using the 13rd operation values as new left data, using left data as new right data, enter next round iteration.
In false proof code generating method of the present invention, can also there is such feature: wherein, IDEA cryptographic algorithm comprises the following steps: g1. carries out computing to the secret key of IDEA and obtains the secret key group of IDEA that 52 secret keys of IDEA form, g2. rear enciphered data is divided into the 1st data, the 2nd data, the 3rd data and the 4th data, g3. to the 1st data, the 2nd data, the 3rd data and the 4th data are carried out 8 IDEA encryption iteration and are obtained new the 1st data, new the 2nd data, new the 3rd data and Xin 4 data, g4. the secret key of new the 1st data and 49IDEA is done to mould 2161 multiplications and obtain the 1st subdata, the secret key of new the 3rd data and 50IDEA is done to mould 216 to be added computing and obtains the 2nd subdata, the secret key of new the 2nd data and 51IDEA is done to mould 216 to be added computing and obtains the 3rd subdata, the secret key of new the 4th data and 52IDEA is done to mould 2161 multiplications and obtain the 4th subdata, and g5. is by the 1st subdata, the 2nd subdata, the 3rd subdata and the 4th subdata are integrated in order and are obtained product false proof complete code.
In false proof code generating method of the present invention, can also there is such feature: wherein, single IDEA in 8 IDEA encryption iteration encrypts iteration and comprises the following steps: h1. determines the secret key of 1IDEA of this iteration according to the secret key group of IDEA, the secret key of 2IDEA, the secret key of 3IDEA, the secret key of 4IDEA, the 5IDEA secret key of son and the secret key of 6IDEA, h2. the 1st data and the 1st sub secret key are done to mould 2161 multiplications and obtain the 14th operation values, the 2nd data and the 2nd sub secret key are done to mould 216 to be added computing and obtains the 15th operation values, the 3rd data and the 3rd sub secret key are done to mould 216 to be added computing and obtains the 16th operation values, the 4th data and the 4th sub secret key are done to mould 2161 multiplications and obtain the 17th operation values, h3. the 14th operation values and the 16th operation values are carried out to XOR and obtain the 18th operation values, the 15th operation values and the 17th operation values are carried out to XOR and obtain the 19th operation values, h4. the secret key of the 18th operation values and 5IDEA is done to mould 2161 multiplications and obtain the 20th operation values, the 19th operation values and the 20th operation values are done to mould 216 to be added computing and obtains the 21st operation values, the secret key of the 21st operation values and 6IDEA is carried out to mould 2161 multiplications and obtain the 2nd operation values, the 20th operation values and the 22nd operation values are carried out to mould 216 to be added computing and obtains the 23rd operation values, h5. the 14th operation values and the 22nd operation values are carried out to XOR and obtain the 24th operation values, the 16th operation values and the 22nd operation values are carried out to XOR and obtain the 25th operation values, the 15th operation values and the 23rd operation values are carried out to XOR and obtain the 26th operation values, the 17th operation values and the 23rd operation values are carried out to XOR and obtain the 27th operation values, and h6. is by the 24th operation values, the 26th operation values, the 25th operation values and the 27th operation values are successively as new the 1st data, new the 2nd data, new the 3rd data and Xin 4 data, enter next round iteration.
In false proof code generating method of the present invention, can also there is such feature: wherein, product information comprises specification code, board code, flag code, order of classes or grades at school code, date of manufacture and time, production code member and logistics information.
The effect of invention
According to false proof code generating method involved in the present invention, owing to first adopting aes algorithm to be encrypted to product ID, the result of then aes algorithm being encrypted is divided into two parts, a part adopts DES algorithm to be encrypted and obtains the false proof complete code of logistics, from the false proof complete code of logistics, intercept out logistics Application in Anti-counterfeiting code, another part adopts IDEA algorithm to be encrypted and obtains product false proof complete code, from product false proof complete code, intercept out product Application in Anti-counterfeiting code, therefore compared with prior art false proof code generating method of the present invention to have Cipher Strength high, the feature that is difficult for cracking.In addition, because the present invention generates the logistics Application in Anti-counterfeiting code of predetermined length and the product false proof application code of predetermined length according to the product information of inclusion stream information, the length of logistics Application in Anti-counterfeiting code and the length of product false proof application code that generate can change as required, and therefore the present invention also has the feature that dirigibility is strong, changeability is high.
Accompanying drawing explanation
Fig. 1 is that in the embodiment of the present invention, security code generates method flow diagram;
Fig. 2 is product information coding rule schematic diagram in the embodiment of the present invention;
Fig. 3 is AES cryptographic algorithm process flow diagram in the embodiment of the present invention;
Fig. 4 is des encryption algorithm flow chart in the embodiment of the present invention; And
Fig. 5 is IDEA cryptographic algorithm process flow diagram in the embodiment of the present invention.
Embodiment
For technological means, creation characteristic that the present invention is realized, reach object and effect is easy to understand, following examples are specifically addressed the false proof code generating method of the present invention by reference to the accompanying drawings.
Fig. 1 is that in the embodiment of the present invention, security code generates method flow diagram.
As shown in Figure 1, false proof code generating method 100 is to generate the logistics Application in Anti-counterfeiting code of predetermined length and the product false proof application code of predetermined length according to the product information of inclusion stream information and 128 s' secret key K.Here, product information comprises specification code, board code, flag code, order of classes or grades at school code, date of manufacture and time, production code member and logistics information.
Logistics Application in Anti-counterfeiting code is one group of 16 character string being directly printed in commodity external packing, character string is by A-F, 0-9 character composition, by authorized user by website to commodity circulation information as wholesale dealer, the information such as dealer are inquired about and are upgraded, thereby reach the object that the process of circulation of commodity is managed and monitored, in the time that consumer inquires about commodity true and false information, according to demand, also can give the circulation information of consumer's display of commodity simultaneously.
Product false proof application code is printed in commodity packaging, but scraping one deck coverlay off just can see, one group of 20 character string that it is made up of character 0-9, be divided into 4 sections, every section of 5 characters, carry out commodity true and false inquiry by consumer by the mode such as website, phone, Query Result shows authenticity of products information, can show the information such as production and circulation simultaneously.
The false proof code generating method that elaborates the present embodiment below in conjunction with process flow diagram generates the process of the logistics Application in Anti-counterfeiting code of 16 and 20 s' product false proof application code according to the product information of inclusion stream information.
Fig. 1 is that in the embodiment of the present invention, security code generates method flow diagram.
Fig. 2 is product information coding rule schematic diagram in the embodiment of the present invention.
Step S-1:
Product information is encoded according to the coding rule shown in Fig. 2, generate the product ID D of 128, then enter step S-2.
Fig. 3 is AES cryptographic algorithm process flow diagram in the embodiment of the present invention.
Step S-2:
Product ID D and secret key K are carried out to AES cryptographic algorithm computing as shown in Figure 3.The concrete ciphering process of AES is:
Determine iterations Nr according to the length of the length of product ID D and secret key K, the product ID D of 128 and 128 s' secret key K determines that iterations is 10 times.
Step S-2a: secret key K is carried out to 10 expansions and obtain 10 groups of secret key E of expansion that take turns secret key composition.
Step S-2b: product ID D and secret key K step-by-step are carried out to XOR and obtain the 1st operation values C1.
Step S-2c: the 1st operation values C1 is carried out to 9 AES encryption iteration and obtain the 5th operation values C5.
Step S-2d: the 5th operation values C5 is carried out to S box replacement operator and obtain the 6th operation values C6.
Step S-2e: the every row of the 6th operation values C6 is circulated and moves byte manipulation and obtain the 7th operation values C7, i.e. 1 of the second row ring shift left, 2 of the third line ring shift lefts, 3 of the third line ring shift lefts.
Step S-2f: the 7th operation values and the 10th group are taken turns to secret key E[10] step-by-step carries out XOR, obtains described enciphered data M.
Wherein, the single AES encryption iteration in 10 AES encryption iteration comprises the following steps:
Step S-2c1: the 1st operation values C1 is carried out to S box replacement operator and obtain the 2nd operation values C2.
Step S-2c2: the every row of the 2nd operation values C2 is circulated and moves byte manipulation and obtain the 3rd operation values C3, i.e. 1 of the second row ring shift left, 2 of the third line ring shift lefts, 3 of the third line ring shift lefts.
Step S-2c3: the 3rd operation values C3 is mixed to rank transformation operation and obtain the 4th operation values C4.
Determine the secret key E[i of wheel of this encryption iteration according to the secret key E of expansion].
Step S-2c4: to the 4th operation values C4 and the secret key E[i of wheel] step-by-step carries out XOR and obtains the 5th operation values C5.
AES cryptographic algorithm finishes to obtain enciphered data M, then enters step S-3.
Step S-3:
Enciphered data M is divided into two parts, and front enciphered data M1 and rear enciphered data M2, then enter step S-4.
Step S-4:
To secret key K process obtain for the secret key of DES of des encryption and for IDEA encrypt the secret key of IDEA, from secret key K, get here front 64 as the secret key of DES, rear 64 as the secret key of IDEA, then enter step S-5.
Fig. 4 is des encryption algorithm flow chart in the embodiment of the present invention.
Step S-5:
Front enciphered data M1 and the secret key of DES are carried out to des encryption algorithm computing as shown in Figure 4.The concrete ciphering process of DES is:
Step S-5a: front enciphered data M1 is carried out to IP in-place computation and obtain the 8th operation values C8, and the 8th operation values C8 is divided into left data L and right data R.
Step S-5b: the secret key of DES is carried out to secret key conversion and obtain the secret key group of the DES DS that 16 secret keys of DES form.
Step S-5c: left data L and right data R are carried out to 16 des encryption iteration and obtain new left data NL and new right data NR.
Step S-5d: the new data N being made up of new left data NL and new right data NR is carried out to last permutation function computing and obtain the false proof complete code of logistics.
Wherein, the single des encryption iteration in 16 des encryption iteration comprises the following steps:
Step S-5c1: right data L is expanded to replacement operator and obtain the 9th operation values C9.
Determine the secret key DS[i of DES of this encryption iteration according to the secret key group of DES DS].
Step S-5c2: by the 9th operation values C9 and the secret key DS[i of DES] carry out XOR and obtain the 10th computing knot value C10, and the 10th operation values C10 is divided into eight data blocks.
Step S-5c3: eight data blocks are carried out respectively to S box replacement operator and obtain corresponding eight output data.
Step S-5c4: the 11st operation values C11 being become by eight output data groups is carried out to P box replacement operator and obtain the 12nd operation values C12.
Step S-5c5: the 12nd operation values C12 and left data L are carried out to XOR and obtain the 13rd operation values C13.
Step S-5c6: using the 13rd operation values C13 as new left data NL, using left data L as new right data NR, enter next round iteration.
Des encryption algorithm finishes to obtain the false proof complete code of logistics, then enters step S-6.
Fig. 5 is IDEA cryptographic algorithm process flow diagram in the embodiment of the present invention.
Step S-6:
Rear enciphered data M2 and the secret key of IDEA are carried out to IDEA cryptographic algorithm computing as shown in Figure 5.The concrete ciphering process of IDEA is:
Step S-6a: the secret key of IDEA is carried out to computing and obtain the secret key group IS of IDEA that 52 secret keys of IDEA form.
Step S-6b: rear enciphered data M2 is divided into the 1st data X1, the 2nd data X2, the 3rd data X3 and the 4th data X4.
Step S-6c: the 1st data X1, the 2nd data X2, the 3rd data X3 and the 4th data X4 are carried out to 8 IDEA encryption iteration and obtain new the 1st data NX1, new the 2nd data NX2, new the 3rd data NX3 and Xin 4 data NX4.
Step S-6d: to the secret key S[49 of new the 1st data NX1 and 49IDEA] do mould 2161 multiplications and obtain the 1st subdata Z1; To the secret key S[50 of new the 3rd data NX3 and 50IDEA] do mould 216 and add computing and obtain the 2nd subdata Z2; To the secret key S[51 of new the 2nd data NX2 and 51IDEA] do mould 216 and add computing and obtain the 3rd subdata Z3; To the secret key S[52 of new the 4th data NX4 and 52IDEA] do mould 2161 multiplications and obtain the 4th subdata Z4.
Step S-6e. is integrated in order and is obtained product false proof complete code by the 1st subdata Z1, the 2nd subdata Z2, the 3rd subdata Z3 and the 4th subdata Z4.
Wherein, the single IDEA encryption iteration in 8 IDEA encryption iteration comprises the following steps:
Determine the secret key IS[1 of 1IDEA of this iteration according to the secret key group IS of IDEA], the secret key IS[2 of 2IDEA], the secret key IS[3 of 3IDEA], the secret key IS[4 of 4IDEA], the secret key IS[5 of 5IDEA] and the sub secret key IS[6 of 6IDEA];
Step S-6c1: to the secret key IS[1 of the 1st data X1 and 1IDEA] do mould 2161 multiplications and obtain the 14th operation values C14; To the secret key IS[2 of the 2nd data X2 and 2IDEA] do mould 216 and add computing and obtain the 15th operation values C15; To the secret key IS[3 of the 3rd data X3 and 3IDEA] do mould 216 and add computing and obtain the 16th operation values C16; To the secret key IS[4 of the 4th data X4 and 4IDEA] do mould 2161 multiplications and obtain the 17th operation values C17.
Step S-6c2: the 14th operation values C14 and the 16th operation values C16 are carried out to XOR and obtain the 18th operation values C18; The 15th operation values C15 and the 17th operation values C17 are carried out to XOR and obtain the 19th operation values C19.
Step S-6c3: to the secret key S[5 of the 18th operation values C18 and 5IDEA] do mould 2161 multiplications and obtain the 20th operation values C20; The 19th operation values C19 and the 20th operation values C20 are done to mould 216 to be added computing and obtains the 21st operation values C21; To the secret key S[6 of the 21st operation values C21 and 6IDEA] do mould 2161 multiplications and obtain the 22nd operation values C22; The 20th operation values C20 and the 22nd operation values C22 are done to mould 216 to be added computing and obtains the 23rd operation values C23.
Step S-6c4: the 14th operation values C14 and the 22nd operation values C22 are carried out to XOR and obtain the 24th operation values C24; The 16th operation values C16 and the 22nd operation values C22 are carried out to XOR and obtain the 25th operation values C25; The 15th operation values C15 and the 23rd operation values C23 are carried out to XOR and obtain the 26th operation values C26; The 17th operation values C17 and the 23rd operation values C23 are carried out to XOR and obtain the 27th operation values C27.
Step S-6c5: successively as new the 1st data NX1, new the 2nd data NX2, new the 3rd data NX3 and Xin 4 data NX4, enter next round iteration by the 24th operation values C24, the 26th operation values C26, the 25th operation values C25 and the 27th operation values C27.
IDEA cryptographic algorithm finishes to obtain product false proof complete code, then enters step S-7.
Step S-7:
The false proof complete code of logistics obtaining from encryption and product false proof complete code, intercept out the logistics Application in Anti-counterfeiting code of 16 and the product false proof application code of 20.
The effect of embodiment and effect
The false proof code generating method that the present embodiment provides, owing to first adopting aes algorithm to be encrypted to product ID, the result of then aes algorithm being encrypted is divided into two parts, a part adopts DES algorithm to be encrypted and obtains the false proof complete code of logistics, from the false proof complete code of logistics, intercept out logistics Application in Anti-counterfeiting code, another part adopts IDEA algorithm to be encrypted and obtains product false proof complete code, from product false proof complete code, intercept out product Application in Anti-counterfeiting code, therefore compared with prior art false proof code generating method of the present invention to have Cipher Strength high, the feature that is difficult for cracking.
False proof code generating method in the present embodiment, to generate the logistics Application in Anti-counterfeiting code of 16 and the product false proof application code of 20 according to the product information of inclusion stream information, in the present invention, the length of logistics Application in Anti-counterfeiting code and the length of product false proof application code can change as required, and therefore the present invention has the advantages that dirigibility is strong, changeability is high.
Above-mentioned embodiment is preferred case of the present invention, is not used for limiting the scope of the invention.

Claims (8)

1. a false proof code generating method that generates respectively the logistics Application in Anti-counterfeiting code of predetermined length and the product false proof application code of predetermined length according to the product information of inclusion stream information and secret key, is characterized in that, specifically comprises the following steps:
(1) described product information is encoded and generated product ID with certain pre-defined rule;
(2) described product ID and described secret key are carried out to the computing of AES cryptographic algorithm, obtain enciphered data;
(3) described enciphered data is divided into front enciphered data and rear enciphered data;
(4) described secret key is obtained to the secret key of DES and the secret key of IDEA according to pre-defined rule processing;
(5) described front enciphered data and the secret key of described DES are carried out to the computing of des encryption algorithm, obtain the false proof complete code of logistics;
(6) described rear enciphered data and the secret key of described IDEA are carried out to the computing of IDEA cryptographic algorithm, obtain product false proof complete code; And
(7) from the false proof complete code of described logistics and described product false proof complete code, intercept out corresponding logistics Application in Anti-counterfeiting code and product false proof application code respectively according to described predetermined length.
2. false proof code generating method according to claim 1, is characterized in that:
Wherein, described AES cryptographic algorithm comprises the following steps:
A1. determine iterations Nr according to the length of the length of described product ID and described secret key;
A2. described secret key is carried out to 10 expansions and obtain 10 groups of secret keys of expansion of taking turns secret key composition;
A3. described product ID and described secret key step-by-step are carried out to XOR and obtain the 1st operation values;
A4. described the 1st operation values is carried out to Nr-1 AES encryption iteration and obtain the 5th operation values;
A5. described the 5th operation values is carried out to S box replacement operator and obtain the 6th operation values;
A6. the every row of described the 6th operation values is circulated and moves byte manipulation and obtain the 7th operation values; And
A7. carry out XOR and obtain described enciphered data taking turns secret key step-by-step described in described the 7th operation values and the 10th group.
3. false proof code generating method according to claim 2, is characterized in that:
Wherein, the single AES encryption iteration that described Nr-1 AES encrypts in iteration comprises the following steps:
B1. described the 1st operation values is carried out to S box replacement operator and obtain the 2nd operation values;
B2. the every row of described the 2nd operation values is circulated and moves byte manipulation and obtain the 3rd operation values;
B3. described the 3rd operation values is mixed to rank transformation operation and obtain the 4th operation values;
B4. determine the secret key of wheel of this encryption iteration according to the secret key of described expansion; And
B5. by described the 4th operation values and describedly take turns secret key step-by-step and carry out XOR and obtain the 5th operation values.
4. false proof code generating method according to claim 1, is characterized in that:
Wherein, described des encryption algorithm comprises the following steps:
E1. described front enciphered data is carried out to IP in-place computation and obtain the 8th operation values, and described the 8th operation values is divided into left data and right data;
E2. the secret key of described DES is carried out to secret key conversion and obtain the secret key group of DES that 16 secret keys of DES form;
E3. described left data and described right data are carried out to 16 des encryption iteration and obtain new left data and new right data; And
E4. the new data being made up of described new left data and described new right data is carried out to last permutation function computing and obtain the false proof complete code of described logistics.
5. false proof code generating method according to claim 4, is characterized in that:
Wherein, the single des encryption iteration in described 16 des encryption iteration comprises the following steps:
F1. described right data are expanded to replacement operator and obtain the 9th operation values;
F2. determine the secret key of DES of this encryption iteration according to the secret key group of described DES;
F3. described the 9th operation values and the secret key of described DES are carried out to XOR and obtain the 10th computing knot value, and described the 10th operation values is divided into eight data blocks;
F4. described eight data blocks are carried out respectively to S box replacement operator and obtain corresponding eight output data;
F5. the 11st operation values being become by described eight output data groups is carried out to P box replacement operator and obtain the 12nd operation values;
F6. described the 12nd operation values and described left data are carried out to XOR and obtain the 13rd operation values; And
F7. using described the 13rd operation values as new left data, using described left data as new right data, enter next round iteration.
6. false proof code generating method according to claim 1, is characterized in that:
Wherein, described IDEA cryptographic algorithm comprises the following steps:
G1. the secret key of described IDEA is carried out to computing and obtain the secret key group of IDEA that 52 secret keys of IDEA form;
G2. described rear enciphered data is divided into the 1st data, the 2nd data, the 3rd data and the 4th data;
G3. described the 1st data, described the 2nd data, described the 3rd data and described the 4th data are carried out to 8 IDEA encryption iteration and obtain new the 1st data, new the 2nd data, new the 3rd data and Xin 4 data;
G4. the secret key of described new the 1st data and described 49IDEA is done to mould 2161 multiplications and obtain the 1st subdata, the secret key of described new the 3rd data and described 50IDEA is done to mould 216 to be added computing and obtains the 2nd subdata, the secret key of described new the 2nd data and described 51IDEA is done to mould 216 and add computing and obtain the 3rd subdata, described new the 4th data and the secret key of described 52IDEA are done to mould 2161 multiplications and obtain the 4th subdata; And
G5. integrate in order and obtain described product false proof complete code by described the 1st subdata, described the 2nd subdata, described the 3rd subdata and described the 4th subdata.
7. false proof code generating method according to claim 6, is characterized in that:
Wherein, the single IDEA encryption iteration that described 8 IDEA encrypt in iteration comprises the following steps:
H1. determine the secret key of 1IDEA, the secret key of 2IDEA, the secret key of 3IDEA, the secret key of 4IDEA, the 5IDEA secret key of son and the secret key of 6IDEA of this iteration according to the secret key group of described IDEA;
H2. described the 1st data and described the 1st sub secret key are done to mould 2161 multiplications and obtain the 14th operation values, described the 2nd data and described the 2nd sub secret key are done to mould 216 to be added computing and obtains the 15th operation values, described the 3rd data and described the 3rd sub secret key are done to mould 216 and add computing and obtain the 16th operation values, described the 4th data and described the 4th sub secret key are done to mould 2161 multiplications and obtain the 17th operation values;
H3. described the 14th operation values and described the 16th operation values are carried out to XOR and obtain the 18th operation values, described the 15th operation values and described the 17th operation values are carried out to XOR and obtain the 19th operation values;
H4. the secret key of described the 18th operation values and described 5IDEA is done to mould 2161 multiplications and obtain the 20th operation values, described the 19th operation values and described the 20th operation values are done to mould 216 to be added computing and obtains the 21st operation values, the secret key of described the 21st operation values and described 6IDEA is carried out to mould 2161 multiplications and obtain the 2nd operation values, described the 20th operation values and described the 22nd operation values are carried out to mould 216 and add computing and obtain the 23rd operation values;
H5. described the 14th operation values and described the 22nd operation values are carried out to XOR and obtain the 24th operation values, described the 16th operation values and described the 22nd operation values are carried out to XOR and obtain the 25th operation values, described the 15th operation values and described the 23rd operation values are carried out to XOR and obtain the 26th operation values, described the 17th operation values and described the 23rd operation values are carried out to XOR and obtain the 27th operation values; And
H6. using described the 24th operation values, described the 26th operation values, described the 25th operation values and described the 27th operation values successively as new the 1st data, new the 2nd data, new the 3rd data and Xin 4 data, enter next round iteration.
8. false proof code generating method according to claim 1, is characterized in that:
Wherein, described product information comprises specification code, board code, flag code, order of classes or grades at school code, date of manufacture and time, production code member and described logistics information.
CN201410084455.6A 2014-03-10 2014-03-10 Anti-fake code generating method Pending CN103886464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410084455.6A CN103886464A (en) 2014-03-10 2014-03-10 Anti-fake code generating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410084455.6A CN103886464A (en) 2014-03-10 2014-03-10 Anti-fake code generating method

Publications (1)

Publication Number Publication Date
CN103886464A true CN103886464A (en) 2014-06-25

Family

ID=50955343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410084455.6A Pending CN103886464A (en) 2014-03-10 2014-03-10 Anti-fake code generating method

Country Status (1)

Country Link
CN (1) CN103886464A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573781A (en) * 2014-12-05 2015-04-29 中国科学院信息工程研究所 Encoding and decoding method of two-dimensional code

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020091935A1 (en) * 2000-08-11 2002-07-11 Sony Corporation, A Corporation Of Japan Storage and retrieval of encrypted content on storage media
CN1677921A (en) * 2004-03-31 2005-10-05 华为技术有限公司 Method for enciphering data through programmable device
CN1697369A (en) * 2005-06-14 2005-11-16 河北工业大学 Method for enciphering and deciphering code of packet, and encipherer and decipherer
EP0706275B1 (en) * 1994-09-15 2006-01-25 International Business Machines Corporation System and method for secure storage and distribution of data using digital signatures
CN101388086A (en) * 2007-09-14 2009-03-18 段娟 Digital coding method for products anti-counterfeiting physical distribution monitoring system
CN102968726A (en) * 2012-10-23 2013-03-13 杭州杰德科技有限公司 Two-dimensional code network anti-fake method with secondary encryption characteristics

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0706275B1 (en) * 1994-09-15 2006-01-25 International Business Machines Corporation System and method for secure storage and distribution of data using digital signatures
US20020091935A1 (en) * 2000-08-11 2002-07-11 Sony Corporation, A Corporation Of Japan Storage and retrieval of encrypted content on storage media
CN1677921A (en) * 2004-03-31 2005-10-05 华为技术有限公司 Method for enciphering data through programmable device
CN1697369A (en) * 2005-06-14 2005-11-16 河北工业大学 Method for enciphering and deciphering code of packet, and encipherer and decipherer
CN101388086A (en) * 2007-09-14 2009-03-18 段娟 Digital coding method for products anti-counterfeiting physical distribution monitoring system
CN102968726A (en) * 2012-10-23 2013-03-13 杭州杰德科技有限公司 Two-dimensional code network anti-fake method with secondary encryption characteristics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李文勇: "嵌入式农产品追溯码加密算法设计与实现", 《农业工程学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573781A (en) * 2014-12-05 2015-04-29 中国科学院信息工程研究所 Encoding and decoding method of two-dimensional code
CN104573781B (en) * 2014-12-05 2018-01-30 中国科学院信息工程研究所 A kind of Quick Response Code encoding and decoding method

Similar Documents

Publication Publication Date Title
JP6783877B2 (en) Cryptographic text query methods and systems for fully homomorphic encryption
CN102546181B (en) Cloud storage encrypting and deciphering method based on secret key pool
CN101536398B (en) Cryptographic method for a white-box implementation
CN106850221B (en) Information encryption and decryption method and device
CN104486073B (en) A kind of encryption and decryption method of character type data
CN106548353B (en) Commodity anti-counterfeiting code generation and verification method
CN110197076B (en) Software optimization implementation method of SM4 encryption algorithm
CN101996298A (en) Encrypting method and decrypting method corresponding to same
CN103824197B (en) Security code generating means
CN103095449B (en) A kind of dynamic encryption decryption method based on stream cipher
CN105354717B (en) A kind of colour commodity counterfeit prevention code generating method
CN105099666A (en) White-box cryptography system for confusing wheel boundary and method
CN112163230B (en) Commodity anti-counterfeiting code generation method based on Chinese character encryption
CN101848081A (en) S box and construction method thereof
Ahmad et al. Designing chaos based strong substitution box
CN109218008A (en) A kind of template attack method for SM4 key schedule
CN112217627B (en) Layered encrypted commodity anti-counterfeiting code generation method
CN107707352B (en) A kind of embedded encryption method
CN107534550B (en) Cryptographic apparatus, cryptographic method, computing apparatus, and computer-readable storage medium
CN103886464A (en) Anti-fake code generating method
CN101479774B (en) Cipher processing apparatus, data converting method, data converting program, recording medium and integrated circuit
KR101584220B1 (en) Encoding Method for Maintaining Sorting Order of Encrypted Data
Dolmatov GOST R 34.11-94: Hash Function Algorithm
CN104871476A (en) Method and apparatus for a computable, large, variable and secure substitution box
CN103824198B (en) Security code generates checking system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140625

RJ01 Rejection of invention patent application after publication