CN103824198B - Security code generates checking system - Google Patents

Security code generates checking system Download PDF

Info

Publication number
CN103824198B
CN103824198B CN201410084451.8A CN201410084451A CN103824198B CN 103824198 B CN103824198 B CN 103824198B CN 201410084451 A CN201410084451 A CN 201410084451A CN 103824198 B CN103824198 B CN 103824198B
Authority
CN
China
Prior art keywords
code
product
security code
false proof
obtains
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.)
Expired - Fee Related
Application number
CN201410084451.8A
Other languages
Chinese (zh)
Other versions
CN103824198A (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.)
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 CN201410084451.8A priority Critical patent/CN103824198B/en
Publication of CN103824198A publication Critical patent/CN103824198A/en
Application granted granted Critical
Publication of CN103824198B publication Critical patent/CN103824198B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The security code generation checking system that the present invention is provided, has the feature that, including:Security code generates subsystem, product false proof application code and the logistics Application in Anti-counterfeiting code of predetermined length based on the product information generation predetermined length comprising logistics information, security code verifies subsystem, the product information corresponding with security code to be verified is obtained based on security code to be verified, storage part, and input display part.Security code of the present invention generates checking system, product ID is encrypted using aes algorithm first, then the result that aes algorithm is encrypted is divided into two parts, a part is encrypted using DES algorithms and obtains the false proof complete code of logistics, effluent stream Application in Anti-counterfeiting code is intercepted from the false proof complete code of logistics, another part is encrypted using IDEA algorithms and obtains product false proof complete code, product Application in Anti-counterfeiting code is intercepted out from product false proof complete code, security code generating means of the invention have that Cipher Strength is high, be difficult the characteristics of cracking compared with prior art.

Description

Security code generates checking system
Technical field
The present invention relates to a kind of Antiforge system, and in particular to a kind of logistics that predetermined length can be generated according to product information Application in Anti-counterfeiting code and predetermined length product false proof application code and can interpolate that the true and false of security code to be verified so that obtain phase The security code generation checking system of the product information of matching.
Background technology
Today's society fake and inferior commodities are spread unchecked, and are the outstanding problems in China's economic life, hit fake and inferior commodities Production and circulation, concerning purge flow order, protect consumers' interests, protect legal intellectual property, also with improve China business Prestige of the product in international market is directly related.Fake products has not only encroached on the interests of consumers in general, has upset normal city Field order, and bring huge economic loss to manufacturer.Each manufacturing enterprise is not produced to guard one's interest by personation Product are encroached on, mostly meeting antiforge code on product.Consumer is when verifying that product is true and false, it is only necessary to scrape the covering of security code off Layer, security code is input into by forms such as website, phone, SMSs, and the true and false result of the product can be learnt by inquiry.Fortune With Information Technology Methods, effective, easy social commodity counterfeit prevention system is set up, be the technology and social engineering for demanding perfection urgently.
At present, although the AES of generation security code has a lot, but the Cipher Strength of most of AES is not very Ideal, enciphering rate is also slower.Lack that a kind of Cipher Strength is high in the prior art, be difficult to crack for generate security code plus Decryption method and corresponding security code checking system.
The content of the invention
The present invention is carried out to solve above-mentioned problem, it is therefore intended that provided that a kind of Cipher Strength is high, be difficult to crack Can according to comprising logistics information product information generation predetermined length logistics Application in Anti-counterfeiting code and predetermined length product Application in Anti-counterfeiting code and can interpolate that the true and false of security code to be verified and then obtain the product matched with security code to be verified and believe The security code generation checking system of breath.
The security code generation checking system that the present invention is provided, has the feature that, including:Security code generates subsystem, The logistics of product false proof application code and predetermined length based on the product information generation predetermined length comprising logistics information is false proof should With code, security code checking subsystem, based on the security code to be verified acquisition product information corresponding with security code to be verified, storage Portion, comprising product information storage part, code storage portion and picture storage part, and input display part, wherein, picture storage Portion at least stores the picture that the picture and security code of generation security code are verified, and security code generation subsystem is included:Input display Portion at least show the picture of generation security code as generation side input display part, the picture of the generation security code have for from The product information choice box of the corresponding product information of input, and generation button are selected in product information storage part, coding is obtained Portion, the product product information that acquisition is transfused to, and carry out the corresponding product serial of coding generation according to certain pre-defined rule Number, key generating unit, once generation button be pressed, key generating unit at random generation be respectively used to aes algorithm, DES algorithms, with And the AES keys of IDEA algorithms, DES keys and IDEA keys, AES obtains encryption unit, obtains product ID and AES is secret AES encryption algorithm computing is carried out after key, encryption data is obtained, AES cutting parts, by encryption data be divided into preceding encryption data and after Encryption data, DES obtains encryption unit, and des encryption algorithm computing is carried out after encryption data and DES keys before obtaining, and obtains logistics False proof complete code, DES interceptions portion intercepts out the logistics Application in Anti-counterfeiting code of predetermined length from the false proof complete code of logistics, and IDEA is obtained Encryption unit is taken, IDEA encryption algorithm computing is carried out after encryption data and IDEA keys after acquisition, obtain product false proof complete code, with And IDEA interceptions portion, the product false proof application code of predetermined length, the input display of generation side are intercepted out from product false proof complete code Portion shows product false proof application code and logistics Application in Anti-counterfeiting code, and product information storage part is by product, product ID and product Information carries out one-to-one corresponding storage, and code storage portion is by product false proof application code, product false proof complete code, IDEA keys, logistics Application in Anti-counterfeiting code, the false proof complete code of logistics, DES keys and AES keys carry out corresponding storage, security code checking subsystem Comprising:Input display part at least shows the picture that security code is verified as checking side input display part, and the security code is verified Picture have for being input into the security code input frame of security code to be verified, and checking button, retrieve judging part, once checking Button is pressed, and according to the security code to be verified being transfused to, whether code storage portion is retrieved and code storage portion is judged In the presence of with security code identical product false proof application code to be verified, warning portion, for retrieve judging part be judged as in the absence of when, Send and show the non-existent personation warning message of product false proof application code, information acquiring section, when retrieval judging part is judged as existing When, obtain the product false proof complete code corresponding with security code to be verified, IDEA keys, logistics from code storage portion false proof completely Code, DES keys and AES keys, DES obtain decryption part, and DES decryption is carried out after obtaining the false proof complete code of logistics and DES keys Algorithm computing, obtains preceding encryption data, and IDEA obtains decryption part, and IDEA is carried out after obtaining product false proof complete code and IDEA keys Decipherment algorithm computing, obtains rear encryption data, and in order be integrated into for preceding encryption data and rear encryption data and add by AES integration portion Ciphertext data, AES obtains decryption part, and AES decipherment algorithm computings are carried out after obtaining encryption data and AES keys, obtains product serial Number, and information acquiring section, obtain corresponding with product ID from product information storage part according to the product ID for obtaining Product information, checking side input display part show the product information being obtained.
In security code of the invention generation checking system, can also have the feature that:Wherein, product information is included Product specification, machine number, order of classes or grades at school number, date of manufacture, mark and logistics information.
In security code of the invention generation checking system, can also have the feature that, also include:Boot portion, bag Containing start picture, for storing the setting up password storage part of setting up password, and control unit is judged, wherein, start picture is included Prompt message for pointing out user input setting up password, and be input into for being input into the setting up password of setting up password to be verified Frame, judges control unit for judging that setting up password storage part is opened with the presence or absence of identical according to the setting up password to be verified that is transfused to Dynamic password, when it is present, control security code generation subsystem starts, when in the absence of when, control warning portion send show to start it is close The startup false alarm message of code mistake.
In security code of the invention generation checking system, can also have the feature that, wherein:Security code checking System also includes time acquisition unit, and for obtaining query time, code storage portion is by query time and product false proof application code one One correspondence storage.
In security code of the invention generation checking system, can also have the feature that, wherein:Retrieval judging part is also For in the case where judging that code storage portion is present with security code identical product false proof application code to be verified, further retrieving Code storage portion is judged with the presence or absence of the query time corresponding with security code to be verified, and warning portion is additionally operable in retrieval judging part In the presence of being judged as, the warning message of inquiry and query time for showing that security code to be verified had been queried are sent.
The effect of invention and effect
Checking system is generated according to security code involved in the present invention, in security code generation subsystem, due to right first Product ID is encrypted using aes algorithm, and the result that aes algorithm is encrypted then is divided into two parts, and a part uses DES Algorithm is encrypted and obtains the false proof complete code of logistics, and effluent stream Application in Anti-counterfeiting code, another portion are intercepted from the false proof complete code of logistics Divide to be encrypted using IDEA algorithms and obtain product false proof complete code, product Application in Anti-counterfeiting is intercepted out from product false proof complete code Code, and the encryption key of AES, DES, IDEA tri- kinds of AESs is all randomly generated, therefore compared with prior art The security code generation checking system of invention has that Cipher Strength is high, be difficult the characteristics of cracking.Further, since security code in the present invention Generation subsystem is the logistics Application in Anti-counterfeiting code and predetermined length according to the product information generation predetermined length comprising logistics information Product false proof application code, the logistics Application in Anti-counterfeiting code and the length of product false proof application code for being generated can change as needed, Therefore the present invention has the characteristics of flexibility is strong, changeability is high.
Brief description of the drawings
Fig. 1 is security code generation system architecture diagram in embodiments of the invention;
Fig. 2 is the picture view of generation security code in embodiments of the invention;
Fig. 3 is the picture view that security code is verified in embodiments of the invention;
Fig. 4 is the storage rule schematic diagram of product information storage part in embodiments of the invention;
Fig. 5 is the storage rule schematic diagram in code storage portion in embodiments of the invention;
Fig. 6 is the product process figure of security code in embodiments of the invention;
Fig. 7 is product information coding rule schematic diagram in embodiments of the invention;
Fig. 8 is AES encryption algorithm flow chart in embodiments of the invention;
Fig. 9 is des encryption algorithm flow chart in embodiments of the invention;
Figure 10 is IDEA encryption algorithm flow chart in embodiments of the invention;And
Figure 11 is the checking flow chart of security code in embodiments of the invention.
Specific embodiment
In order that technological means, creation characteristic, reached purpose and effect that the present invention is realized are easy to understand, it is real below Example combination accompanying drawing is applied to be specifically addressed security code of the present invention generation checking system.
Fig. 1 is security code generation system architecture diagram in embodiments of the invention.
As shown in figure 1, security code generation checking system 100 includes that boot portion 1, security code generation subsystem 2, security code is tested Card subsystem 3, storage part 4, input display part 5 and control unit 6.
Boot portion 1 is used for controlling security code generation subsystem 2 to start.Security code generation subsystem 2 is used for according to inclusion The logistics Application in Anti-counterfeiting code and the product false proof application code of predetermined length of the product information generation predetermined length of stream information.Security code Checking subsystem 3 is used to judge the true and false of security code to be verified, to continue acquisition and false proof code-phase to be verified in the case of genuine The product information of matching.
Fig. 2 is the picture view of generation security code in embodiments of the invention.
Fig. 3 is the picture view that security code is verified in embodiments of the invention.
Storage part 4 includes product information storage part 41, code storage portion 42 and picture storage part 43.Picture storage part The picture 432 that 43 pictures 431 and security code as shown in Figure 3 at least storing generation security code as shown in Figure 2 are verified.
As shown in Fig. 2 the prompt message 4311 of the picture 431 comprising prompting input product information of generation security code, from product The product information choice box 4312 of the corresponding product information of input is selected in product information storage part 41, button 4313 is generated, is used for Display box 4314, setting up password input prompt message 4315, the startup of display logistics Application in Anti-counterfeiting code and product false proof application code Password Input frame 4316 and preservation button 4317.
As shown in figure 3, prompt message of the picture 432 comprising prompting input security code to be verified that security code is verified 4321st, security code input frame 4322 to be verified, checking button 4323 and the display for showing the product information of the result Region 4324.
Fig. 4 is the storage rule schematic diagram of product information storage part in embodiments of the invention.
Fig. 5 is the storage rule schematic diagram in code storage portion in embodiments of the invention.
As shown in Figure 4 and Figure 5, product ID and product information are carried out one-to-one corresponding and deposit by product information storage part 41 Storage, code storage portion 42 is prevented by product false proof application code, product false proof complete code, IDEA keys, logistics Application in Anti-counterfeiting code, logistics Pseudo- complete code, DES keys and AES keys carry out corresponding storage.In security code checking subsystem 3, code storage portion 42 Product false proof application code and query time are corresponded into storage.
Control unit 6 and boot portion 1, security code generation subsystem 2, security code checking subsystem 3, storage part 4 and input Display part 5 is connected, and realizes overall control.
In the present embodiment, product information includes product specification, machine number, order of classes or grades at school number, date of manufacture, mark and thing Stream information.Logistics Application in Anti-counterfeiting code is one group of 16 character string being directly printed in commodity external packing, and character string is by A-F, 0-9 Character is constituted, by authorized user by website to commodity circulation information such as whole seller, the information such as dealer carry out inquiry with Update, so as to the purpose that the process of circulation reached to commodity is managed and monitors, when consumer query commodity true and false information, According to demand, while the circulation information of consumer's display of commodity can also be given.Product false proof application code is printed in commodity packaging, But scraping one layer of cover layer off can just see, one group of 20 character string that it is made up of character 0-9 are divided into 4 sections, every section 5 Individual character, commodity true and false inquiry is carried out by consumer by modes such as website, phones, and Query Result shows authenticity of products information, The information such as production and circulation can be shown simultaneously.
Boot portion 1 is included:Start picture, setting up password storage part and judge control unit.
Start picture is included on the picture 431 of generation security code, including for pointing out carrying for user input setting up password Show information 4315 and the setting up password input frame 4316 for being input into setting up password to be verified.Setting up password storage part with Storage setting up password.Judge control unit for being judged to open according to the setting up password to be verified being input into setting up password input frame 4316 Dynamic password storage portion whether there is identical setting up password, and when it is present, control security code generation subsystem 2 starts, when not depositing When, control warning portion 32 sends the startup false alarm message for showing setting up password mistake.
Security code generation subsystem 2 is included:Security code generation side control unit 201, input display part 5 as generation side it is defeated Enter display part 21, obtain coding unit 22, key generating unit 23, AES acquisition encryption unit 24, the acquisition encryption of AES cutting parts 25, DES Portion 26, DES interceptions portion 27, IDEA obtain encryption unit 28 and IDEA interceptions portion 29.Wherein, security code generation side control unit 201 For controlling security code to generate subsystem 2, and it is connected with control unit 6, realizes control unit 6 to security code generation subsystem 2 Control.
The security code that the present embodiment is elaborated with reference to flow chart generates subsystem 2 according to comprising logistics information Product information generates the logistics Application in Anti-counterfeiting code of 16 and the process of the product false proof application code of 20.
Fig. 6 is the product process figure of security code in embodiments of the invention.
Step S1-1:
The picture 431 of the generation side input display security code generation of display part 21, allows user in product information choice box 4312 The corresponding product information of middle selection input, and generation button 4313 is pressed, subsequently into step S1-2.
Step S1-2:
The random generation of key generating unit 23 is respectively used to carry out 128 s' of aes algorithm, DES algorithms and IDEA algorithms AES keys, the DES keys of 64 and the IDEA keys of 64, subsequently into step S1-3.
Fig. 7 is product information coding rule schematic diagram in embodiments of the invention.
Step S1-3:
The product information of input is selected in the acquisition product information of coding generating unit 22 choice box 4312, according to as shown in Figure 6 Coding rule carry out the coding generation product ID D of 128, subsequently into step S1-4.
Fig. 8 is AES encryption algorithm flow chart in embodiments of the invention.
Step S1-4:
AES obtains encryption unit 24 and obtains product ID D and AES key, carries out AES encryption algorithm fortune as shown in Figure 8 Calculate.The detailed process of AES encryption algorithm is:
The length of length and AES keys according to product ID D determines the product serial of iterations Nr, i.e., 128 The AES keys of number D and 128 determine that iterations is 10 times.
Step S1-4a:10 extensions are carried out to AES keys and obtains 10 groups of extension key E of wheel key composition.
Step S1-4b:XOR is carried out to product ID D and the step-by-step of AES keys and obtains the 1st operation values C1.
Step S1-4c:9 AES encryption iteration are carried out to the 1st operation values C1 and obtains the 5th operation values C5.
Step S1-4d:S box replacement operators are carried out to the 5th operation values C5 and obtains the 6th operation values C6.
Step S1-4e:The shifting byte manipulation that is circulated often capable to the 6th operation values C6 obtains the 7th operation values C7, i.e. the second row Ring shift left 1, the third line ring shift left 2, the third line ring shift left 3.
Step S1-4f:XOR is carried out to the 7th operation values and the step-by-step of the 10th group of wheel key E [10], the encryption is obtained Data M.
Wherein, the single AES encryption iteration in 10 AES encryption iteration is comprised the following steps:
Step S1-4c1:S box replacement operators are carried out to the 1st operation values C1 and obtains the 2nd operation values C2.
Step S1-4c2:The shifting byte manipulation that is circulated often capable to the 2nd operation values C2 obtains the 3rd operation values C3, i.e., second Row ring shift left 1, the third line ring shift left 2, the third line ring shift left 3.
Step S1-4c3:Mixed rank transformation operation is carried out to the 3rd operation values C3 and obtains the 4th operation values C4.
Wheel key E [i] of this encryption iteration is determined according to extension key E.
Step S1-4c4:XOR is carried out with wheel key E [i] step-by-step to the 4th operation values C4 and obtains the 5th operation values C5.
AES encryption algorithm terminates to obtain encryption data M, subsequently into step S1-5.
Step S1-5:
AES cutting parts 25 will be divided into two parts through the encrypted encryption data M of aes algorithm, i.e., preceding encryption data M1 and Encryption data M2 afterwards, subsequently into step S1-6.
Fig. 9 is des encryption algorithm flow chart in embodiments of the invention.
Step S1-6:
DES obtains encryption unit 26 and obtains preceding encryption data M1 and DES keys, carries out des encryption algorithm fortune as shown in Figure 9 Calculate, the detailed process of des encryption algorithm is:
Step S1-6a:IP in-place computations are carried out to preceding encryption data M1 and obtains the 8th operation values C8, and by the 8th operation values C8 It is divided into left data L and right data R.
Step S1-6b:Key conversion is carried out to DES keys and obtains 16 DES key groups DS of DES keys composition.
Step S1-6c:16 des encryption iteration are carried out to left data L and right data R and obtains new left data NL and new right number According to NR.
Step S1-6d:The new data N being made up of new left data NL and new right data NR is carried out into last permutation function computing to obtain To the false proof complete code of logistics.
Wherein, the single des encryption iteration in 16 des encryption iteration is comprised the following steps:
Step S1-6c1:Replacement operator is extended to right data L and obtains the 9th operation values C9.
DES keys DS [i] of this encryption iteration are determined according to DES key groups DS.
Step S1-6c2:9th operation values C9 and DES keys DS [i] are carried out into XOR and obtains the 10th computing knot value C10, and the 10th operation values C10 is divided into eight data blocks.
Step S1-6c3:Eight data blocks are carried out with S box replacement operators respectively and obtains corresponding eight output datas.
Step S1-6c4:The 11st operation values C11 to being made up of eight output datas carries out P box replacement operators and obtains the 12nd Operation values C12.
Step S1-6c5:XOR is carried out with left data L to the 12nd operation values C12 and obtains the 13rd operation values C13.
Step S1-6c6:Using the 13rd operation values C13 as new left data NL, left data L as new right data NR enters Next round iteration.
Des encryption algorithm terminates to obtain the false proof complete code of logistics, subsequently into step S1-6.
Step S1-7:
DES interceptions portion 27 intercepts out the logistics of 16 from the false proof complete code of the logistics obtained through des encryption algorithm for encryption Application in Anti-counterfeiting code, subsequently into step S1-7.
Figure 10 is IDEA encryption algorithm flow chart in embodiments of the invention.
Step S1-8:
IDEA obtains encryption data M2 and IDEA key after encryption unit 28 is obtained, and carries out IDEA encryption as shown in Figure 10 and calculates Method computing, the detailed process of IDEA encryption algorithm is:
Step S1-8a:Computing is carried out to IDEA keys and obtains 52 sub- key group IS of IDEA of the sub- key compositions of IDEA.
Step S1-8b:Rear encryption data M2 is divided into the 1st data X1, the 2nd data X2, the 3rd data X3 and the 4th data X4。
Step S1-8c:1st data X1, the 2nd data X2, the 3rd data X3 and the 4th data X4 are carried out by 8 IDEA encryptions and changed In generation, obtains new 1st data NX1, new 2nd data NX2, the new data NX4 of 3rd data NX3 and Xin 4.
Step S1-8d:The multiplication of mould 216 1 is done to the sub- key S [49] of new 1st data NX1 and 49IDEA and obtains the 1st son Data Z1;Mould 216 is done to the sub- key S [50] of new 3rd data NX3 and 50IDEA plus computing obtains the 2nd subdata Z2;To new The 2 sub- key S [51] of data NX2 and 51IDEA do mould 216 plus computing obtains the 3rd subdata Z3;To new 4th data NX4 and The sub- key S [52] of 52IDEA are done the multiplication of mould 216 1 and obtain the 4th subdata Z4.
Step S1-8e:Entered in order by the 1st subdata Z1, the 2nd subdata Z2, the 3rd subdata Z3 and the 4th subdata Z4 Row integration obtains product false proof complete code.
Wherein, the single IDEA encryption iteration in 8 IDEA encryption iteration is comprised the following steps:
The sub- key IS [1] of the 1IDEA of current iteration, the sub- key IS of 2IDEA are determined according to the sub- key group IS of IDEA [2], the sub- key IS [3] of 3IDEA, the sub- key IS [4] of 4IDEA, the sub- key IS [5] of 5IDEA and the sub- key IS of 6IDEA [6];
Step S1-8c1:The multiplication of mould 216 1 is done to the 1st sub- key IS [1] of data X1 and 1IDEA and obtains the 14th computing Value C14;Mould 216 is done to the 2nd sub- key IS [2] of data X2 and 2IDEA plus computing obtains the 15th operation values C15;To the 3rd data The sub- key IS [3] of X3 and 3IDEA do mould 216 plus computing obtains the 16th operation values C16;It is secret to the 4th data X4 and 4IDEA Key IS [4] does the multiplication of mould 216 1 and obtains the 17th operation values C17.
Step S1-8c2:XOR is carried out to the 14th operation values C14 and the 16th operation values C16 and obtains the 18th operation values C18;XOR is carried out to the 15th operation values C15 and the 17th operation values C17 and obtains the 19th operation values C19.
Step S1-8c3:The multiplication of mould 216 1 is done to the 18th sub- key S [5] of operation values C18 and 5IDEA and obtains the 20th Operation values C20;Mould 216 is done to the 19th operation values C19 and the 20th operation values C20 plus computing obtains the 21st operation values C21;To the 21st The sub- key S [6] of operation values C21 and 6IDEA are done the multiplication of mould 216 1 and obtain the 22nd operation values C22;To the 20th operation values C20 Mould 216 is done with the 22nd operation values C22 plus computing obtains the 23rd operation values C23.
Step S1-8c4:XOR is carried out to the 14th operation values C14 and the 22nd operation values C22 and obtains the 24th operation values C24;XOR is carried out to the 16th operation values C16 and the 22nd operation values C22 and obtains the 25th operation values C25;To the 15th operation values C15 and the 23rd operation values C23 carry out XOR and obtain the 26th operation values C26;To the 17th operation values C17 and the 23rd operation values C23 carries out XOR and obtains the 27th operation values C27.
Step S1-8c5:By the 24th operation values C24, the 26th operation values C26, the 25th operation values C25 and the 27th operation values C27 Successively as new 1st data NX1, new 2nd data NX2, the new data NX4 of 3rd data NX3 and Xin 4, into next round iteration.
IDEA encryption algorithm terminates to obtain product false proof complete code, subsequently into step S1-9.
Step S1-9:
IDEA interceptions portion 29 intercepts out the product of 20 from the product false proof complete code obtained through IDEA encryption algorithm for encryption Product Application in Anti-counterfeiting code, subsequently into step S1-10.
Step S1-10:
The display box 4314 generated in the picture 431 of security code is shown through AES encryption algorithm, des encryption algorithm, IDEA The logistics Application in Anti-counterfeiting code and product false proof application code of AES generation.
So far the logistics Application in Anti-counterfeiting code and the product of 20 according to the product information generation 16 comprising logistics information are completed The process of product Application in Anti-counterfeiting code.
Security code checking subsystem 3 is included:Security code checking side control unit 301, input display part 5 as checking side it is defeated Enter display part 30, retrieval judging part 31, warning portion 32, information acquiring section 33, DES acquisition decryption part 34, IDEA acquisition decryption part 35th, AES integration portion 36, AES obtains decryption part 37, information acquiring section 38 and time acquisition unit 39.Wherein, security code checking Side control unit 301 is used to control security code to verify subsystem 3, and is connected with control unit 6, realizes that control unit 6 is tested security code Demonstrate,prove the control of subsystem 3.
The security code checking subsystem 103 that the present embodiment is elaborated with reference to flow chart judges security code to be verified It is true and false and be judged as it is true after further obtain the process of corresponding product information.
Figure 11 is security code checking flow chart in embodiments of the invention.
Step S2-1:
Input display part 30 in checking side shows the picture that security code as shown in Figure 4 is verified, and makes user defeated in security code Enter and be input into security code to be verified in frame 4321.Checking button 4323 is pressed, subsequently into step S2-2.
Step S2-2:
The security code to be verified that retrieval judging part 31 is input into according to security code input frame 4321 enters to code storage portion 42 Row retrieval, and judge code storage portion 42 whether there is with security code identical product false proof application code to be verified, into step Rapid S2-3.
Step S2-3:
When code storage portion 42 does not exist with security code identical product false proof application code to be verified, warning portion 32 sends Show the non-existent personation warning message of security code to be verified.
When code storage portion 42 is present with security code identical product false proof application code to be verified, further determine whether In the presence of the query time corresponding with product false proof application code, when it is present, warning portion 32 sends and has shown security code to be verified The warning message of inquiry that was queried simultaneously shows query time, when in the absence of when, information acquiring section 33 is from code storage portion 42 Obtain the product false proof complete code corresponding with security code to be verified, IDEA keys, the false proof complete code of logistics, DES keys and AES keys, subsequently into step S2-4.
Step S2-4:
DES obtains decryption part 34 and obtains the false proof complete code of logistics and DES keys and carries out DES decipherment algorithm computings, obtain through The decrypted preceding encryption data M1 of DES decipherment algorithms, subsequently into step S2-5.
Step S2-5:
IDEA obtains the acquisition product false proof complete code of decryption part 35 and IDEA keys and carries out IDEA decipherment algorithm computings, obtains Through IDEA decipherment algorithms it is decrypted after encryption data M2, subsequently into step S2-6.
Step S2-6:
AES integration portion 36 is by through the decrypted preceding encryption data M1 of DES decipherment algorithms and decrypted through IDEA decipherment algorithms Rear encryption data M2 be integrated into encryption data M in order, subsequently into step S2-7.
Step S2-7:
AES is obtained after the acquisition of decryption part 37 encryption data M and AES key carries out AES decipherment algorithm computings and is obtained product sequence Row number D, subsequently into step S2-8.
Step S2-8:
Information acquiring section 38 according to the product ID D that decrypted algorithm is obtained obtained from product information storage unit 41 with Product ID D corresponding product information, subsequently into step S2-9.
Step S2-9:
Viewing area 4324 shows the product information that information acquiring section 38 is obtained in the picture 432 that security code is verified.
So far complete to judge the true and false of security code to be verified and be judged as that true continuation afterwards obtains corresponding product The process of product information.
The effect of embodiment and effect
The security code generation checking system that the present embodiment is provided, in security code generation subsystem, due to first to product Sequence number is encrypted using aes algorithm, and the result that aes algorithm is encrypted then is divided into two parts, and a part uses DES algorithms It is encrypted and obtains the false proof complete code of logistics, effluent stream Application in Anti-counterfeiting code is intercepted from the false proof complete code of logistics, another part is adopted It is encrypted with IDEA algorithms and obtains product false proof complete code, product Application in Anti-counterfeiting code is intercepted out from product false proof complete code, And the encryption key of tri- kinds of AESs of AES, DES, IDEA is all randomly generated, therefore the present invention compared with prior art Security code generation checking system have that Cipher Strength is high, be difficult the characteristics of cracking.
In the present embodiment security code generation checking system, due in the present invention security code generation subsystem be according to comprising The product information of logistics information generates the logistics Application in Anti-counterfeiting product false proof application code of the code with 20 of 16, is given birth in the present invention Into logistics Application in Anti-counterfeiting code and the length of product false proof application code can change as needed, therefore the present invention has flexibility By force, the characteristics of changeability is high.
Security code generation checking system in the present embodiment, due to starting security code life by starting key with boot portion Into subsystem, therefore the system has auto-lock function, and security code generation subsystem can be started when the setting up password of input is correct System, setting up password fault warning message is sent when the setting up password mistake of input.
Above-mentioned implementation method is preferred case of the invention, is not intended to limit protection scope of the present invention.

Claims (5)

1. a kind of security code generates checking system, it is characterised in that including:
Security code generate subsystem, based on comprising logistics information product information generation predetermined length product false proof application code and The logistics Application in Anti-counterfeiting code of predetermined length;
Security code verifies subsystem, and the product information corresponding with the security code to be verified is obtained based on security code to be verified;
Storage part, comprising product information storage part, code storage portion and picture storage part;And
Input display part,
Wherein, the picture storage part at least stores the picture that the picture and security code of generation security code are verified,
The security code generation subsystem is included:
The input display part at least shows the picture of the generation security code as generation side input display part, and the generation is prevented The picture of pseudo-code has the product information selection for selecting the corresponding product information of input from the product information storage part Frame, and generation button;
Coding unit, the product information that acquisition is transfused to are obtained, and it is relative to carry out coding generation according to certain pre-defined rule The product ID answered;
Key generating unit, once it is described generation button be pressed, the key generating unit at random generation be respectively used to aes algorithm, The AES keys of DES algorithms and IDEA algorithms, DES keys and IDEA keys;
AES obtains encryption unit, and AES encryption algorithm computing is carried out after obtaining the product ID and the AES keys, is added Ciphertext data;
AES cutting parts, preceding encryption data and rear encryption data are divided into by the encryption data;
DES obtains encryption unit, and des encryption algorithm computing is carried out after obtaining the preceding encryption data and the DES keys, obtains thing Flow false proof complete code;
DES interceptions portion, intercepts out the logistics Application in Anti-counterfeiting code of predetermined length from the false proof complete code of the logistics,
IDEA obtains encryption unit, and IDEA encryption algorithm computing is carried out after obtaining the rear encryption data and the IDEA keys, obtains To product false proof complete code;And
IDEA interceptions portion, intercepts out the product false proof application code of predetermined length from the product false proof complete code,
The generation side input display part shows the product false proof application code and logistics Application in Anti-counterfeiting code,
The product information storage part is corresponded the product, the product ID and the product information Storage,
The code storage portion is by the product false proof application code, the product false proof complete code, the IDEA keys, the thing Stream Application in Anti-counterfeiting code, the false proof complete code of the logistics, the DES keys and the AES keys carry out corresponding storage,
The security code checking subsystem is included:
The input display part at least shows the picture that security code is verified, the security code quilt as checking side input display part The picture of checking has the security code input frame for being input into security code to be verified, and checking button;
Retrieval judging part, once the checking button is pressed, according to the security code described to be verified being transfused to, to the coding Storage part is retrieved and judged that the code storage portion whether there is to be prevented with product described in the security code identical to be verified Pseudo- application code;
Warning portion, for when the retrieval judging part is judged as not existing, sending and showing that the product false proof application code is not deposited Personation warning message;
Information acquiring section, in the presence of the retrieval judging part is judged as, obtains to be verified with described from the code storage portion The corresponding product false proof complete code of security code, the IDEA keys, the false proof complete code of the logistics, the DES keys, And the AES keys;
DES obtains decryption part, and DES decipherment algorithm computings are carried out after obtaining the false proof complete code of logistics and the DES keys, obtains To the preceding encryption data;
IDEA obtains decryption part, and IDEA decipherment algorithm fortune is carried out after obtaining the product false proof complete code and the IDEA keys Calculate, obtain the rear encryption data;
AES integration portion, encryption data is integrated into by the preceding encryption data and the rear encryption data in order;
AES obtains decryption part, and AES decipherment algorithm computings are carried out after obtaining the encryption data and the AES keys, obtains described Product ID;And
Information acquiring section, obtains and the product serial according to the product ID for obtaining from the product information storage part Number corresponding product information,
The checking side input display part shows the product information being obtained,
Wherein, the AES obtains encryption unit, the AES cutting parts, the DES and obtains encryption unit, the DES interceptions portion, described IDEA obtains encryption unit and the IDEA interceptions portion is directly parallel with one another being arranged on the security code generation side control unit 's.
2. security code according to claim 1 generates checking system, it is characterised in that:
Wherein, the product information includes product specification, machine number, order of classes or grades at school number, date of manufacture, mark and the logistics letter Breath.
3. security code according to claim 1 generates checking system, it is characterised in that also include:
Boot portion, comprising start picture, for storing the setting up password storage part of setting up password, and judges control unit,
Wherein, the start picture includes the prompt message for pointing out setting up password described in user input, and for being input into The setting up password input frame of setting up password to be verified,
It is described to judge that control unit is used to judge that the setting up password storage part is according to the setting up password described to be verified being transfused to It is no to there is setting up password described in identical, when it is present, control security code generation subsystem to start, when in the absence of when, control Make the warning portion and send the startup false alarm message for showing the setting up password mistake.
4. security code according to claim 1 generates checking system, it is characterised in that:
Wherein, the security code checking subsystem also includes time acquisition unit, for obtaining query time,
The query time is corresponded and stored by the code storage portion with the product false proof application code.
5. security code according to claim 4 generates checking system, it is characterised in that:
Wherein, it is described retrieval judging part be additionally operable to judge the code storage portion in the presence of and the security code identical to be verified In the case of the product false proof application code, further retrieval judges the code storage portion with the presence or absence of to be verified with described The corresponding query time of security code,
The warning portion be additionally operable to it is described retrieval judging part be judged as in the presence of, send show the security code to be verified by The warning message of inquiry inquired about and the query time.
CN201410084451.8A 2014-03-10 2014-03-10 Security code generates checking system Expired - Fee Related CN103824198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410084451.8A CN103824198B (en) 2014-03-10 2014-03-10 Security code generates checking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410084451.8A CN103824198B (en) 2014-03-10 2014-03-10 Security code generates checking system

Publications (2)

Publication Number Publication Date
CN103824198A CN103824198A (en) 2014-05-28
CN103824198B true CN103824198B (en) 2017-07-11

Family

ID=50759247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410084451.8A Expired - Fee Related CN103824198B (en) 2014-03-10 2014-03-10 Security code generates checking system

Country Status (1)

Country Link
CN (1) CN103824198B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706007B (en) * 2019-10-11 2023-04-07 工业和信息化部装备工业发展中心 Data anti-counterfeiting method and product certificate verification method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388086A (en) * 2007-09-14 2009-03-18 段娟 Digital coding method for products anti-counterfeiting physical distribution monitoring system
CN102184506A (en) * 2011-05-10 2011-09-14 南通大学 Digital anti-counterfeiting method based on chaos password encryption
CN102968726A (en) * 2012-10-23 2013-03-13 杭州杰德科技有限公司 Two-dimensional code network anti-fake method with secondary encryption characteristics
CN103199995A (en) * 2013-04-26 2013-07-10 福建伊时代信息科技股份有限公司 File encryption method and device

Family Cites Families (2)

* 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
CN102201100B (en) * 2011-05-10 2013-04-24 朱清明 Object anti-counterfeiting method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388086A (en) * 2007-09-14 2009-03-18 段娟 Digital coding method for products anti-counterfeiting physical distribution monitoring system
CN102184506A (en) * 2011-05-10 2011-09-14 南通大学 Digital anti-counterfeiting method based on chaos password encryption
CN102968726A (en) * 2012-10-23 2013-03-13 杭州杰德科技有限公司 Two-dimensional code network anti-fake method with secondary encryption characteristics
CN103199995A (en) * 2013-04-26 2013-07-10 福建伊时代信息科技股份有限公司 File encryption method and device

Also Published As

Publication number Publication date
CN103824198A (en) 2014-05-28

Similar Documents

Publication Publication Date Title
JP6783877B2 (en) Cryptographic text query methods and systems for fully homomorphic encryption
CN101536398B (en) Cryptographic method for a white-box implementation
CN1777097B (en) Enciphered data issuing method, enciphering device and deciphering device
CN104363215B (en) A kind of encryption method and system based on attribute
CN106548353B (en) Commodity anti-counterfeiting code generation and verification method
CN103684765B (en) Method and device for ciphering and deciphering data in management system
CN110457930A (en) The attribute base encryption method and system of the hiding traceable revocation malicious user of strategy
CN102075544A (en) Encryption system, encryption method and decryption method for local area network shared file
CN108881291A (en) A kind of weight properties base encryption method based on layered authorization mechanism
CN106603246A (en) SM2 digital signature segmentation generation method and system
CN101201886A (en) Three-he-code for recognizing commodity
CN106598882A (en) Secure memory data protection method and device
CN107005408A (en) Public key encryption system
CN105117635A (en) Local data security protection system and method
CN106850229A (en) SM2 digital signature generation method and system based on the secret segmentation of product
CN103824197B (en) Security code generating means
EP3382929B1 (en) Technique to generate symmetric encryption algorithms
CN106487659A (en) Information ciphering method and device, information decryption method and device and terminal
US11438156B2 (en) Method and system for securing data
CN108270545A (en) A kind of improved DES data encryption algorithm based on mobile Internet
CN103824198B (en) Security code generates checking system
CN107070900B (en) It can search for re-encryption method based on what is obscured
CN103220130B (en) The encryption of digital chaotic secure communication and decryption method
CN105763322A (en) Obfuscatable encryption key-insulated digital signature making method and system
CN103971247B (en) A kind of combined ciphering system for commodity counterfeit prevention

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170711

Termination date: 20200310