CN106548353B - Commodity anti-counterfeiting code generation and verification method - Google Patents

Commodity anti-counterfeiting code generation and verification method Download PDF

Info

Publication number
CN106548353B
CN106548353B CN201610866588.8A CN201610866588A CN106548353B CN 106548353 B CN106548353 B CN 106548353B CN 201610866588 A CN201610866588 A CN 201610866588A CN 106548353 B CN106548353 B CN 106548353B
Authority
CN
China
Prior art keywords
code
ciphertext
enterprise
verification
counterfeiting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610866588.8A
Other languages
Chinese (zh)
Other versions
CN106548353A (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.)
Kunming University of Science and Technology
Original Assignee
Kunming University of 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 Kunming University of Science and Technology filed Critical Kunming University of Science and Technology
Priority to CN201610866588.8A priority Critical patent/CN106548353B/en
Publication of CN106548353A publication Critical patent/CN106548353A/en
Application granted granted Critical
Publication of CN106548353B publication Critical patent/CN106548353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种商品防伪码生成与验证方法,其防伪码的生成首先由生产中心根据产品的基本信息包括企业码A1和序列码A2生成0级明文A,然后生产中心再根据企业码A1获取该企业码对应的企业密钥K1,并基于企业密钥K1对序列码明文A2进行加密,得到加密后的密文B1。密文B1和明文A1组成了1级密文B;此时,生产中心再根据生产密钥K2对1级密文B进行加密,得到2级密文C,再混淆加密后产生密文D,且D由D1、D2和D3组成。最后,D经过网站密钥K3加密后得到防伪码E。本发明的防伪码可满足唯一性、保密性和无规律性,且能帮助消费者验证该商品的真伪以及该商品相关的所有特征信息,如出厂日期、生产地和保修期等。

Figure 201610866588

The invention discloses a method for generating and verifying a commodity anti-counterfeiting code. The generation of the anti-counterfeiting code is first generated by the production center according to the basic information of the product, including the enterprise code A1 and the serial code A2, to generate a level 0 plaintext A, and then the production center generates the 0-level plaintext A according to the enterprise code A1. The enterprise key K1 corresponding to the enterprise code is obtained, and the plaintext A2 of the serial code is encrypted based on the enterprise key K1 to obtain the encrypted ciphertext B1. The ciphertext B1 and the plaintext A1 form the first-level ciphertext B; at this time, the production center encrypts the first-level ciphertext B according to the production key K2 to obtain the second-level ciphertext C, and then confuses and encrypts it to generate the ciphertext D, And D consists of D1, D2 and D3. Finally, D obtains the anti-counterfeiting code E after being encrypted by the website key K3. The anti-counterfeiting code of the present invention can satisfy uniqueness, confidentiality and irregularity, and can help consumers to verify the authenticity of the commodity and all relevant characteristic information of the commodity, such as the date of manufacture, place of production and warranty period.

Figure 201610866588

Description

Commodity anti-counterfeiting code generation and verification method
Technical Field
The invention relates to a commodity anti-counterfeiting code generation and verification method, and belongs to the technical field of commodity anti-counterfeiting.
Background
Along with the development of social economy, the improvement of the material demand of people and the concern of the product quality problem become the topics which can not be avoided by the society, the counterfeit commodities not only infringe the rights and interests of consumers, but also bring huge economic loss to commodity producers, and the anti-counterfeiting problem of the products is more and more emphasized in order to protect the products of the manufacturers from being infringed by unqualified merchants.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an anti-counterfeiting code with uniqueness, confidentiality and irregularity, and to verify the anti-counterfeiting code by a special verification method, thereby overcoming the defects of the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme; a commodity anti-counterfeiting code generation and verification method. The method comprises the following steps:
(1) composing basic information (4-bit enterprise code and 4-16 bit sequence code) of the anti-counterfeiting code into 0-level plaintext A;
(2) and the production center acquires the enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and encrypts the sequence code plaintext A2 based on K1 to obtain an encrypted ciphertext B1. Ciphertext B1 and plaintext A1 constitute level 1 ciphertext B;
(3) generating 1 5-bit random code R according to a system clock at the current moment, and obtaining a 3-bit verification code D2 by the R through a specific verification algorithm;
(4) encrypting the 1-level ciphertext B by the production center according to the production key K2 to obtain a 2-level ciphertext C;
(5) under the control of the random verification code D2, a ciphertext confusion code D1 is obtained by confusing the 2-level ciphertext C;
(6) obtaining a 1-bit verification code D3 by a ciphertext confusion code D1 and a 3-bit random verification code D2 through a specific verification algorithm;
(7) the production center encrypts the confusion ciphertext D consisting of the D1, the D2 and the D3 for the last time according to the website key K3 to obtain a final anti-counterfeiting code E;
(8) and storing the random code R into a database record corresponding to the 0-level plaintext A for future anti-counterfeiting code verification.
In the method for generating and verifying the anti-counterfeiting code of the commodity, the 0-level plaintext a in the step (2) includes a 4-bit enterprise code a1 and a sequence code a2, and the length N of a2 is: a number between 4 and 16, including 4 and 16 (since the sequence code may consist of numbers less than 4 bits, the sequence code length needs to be provided here);
in the method for generating and verifying the merchandise security code, the enterprise key K1 in step (2) is a primary key and is a key corresponding to the enterprise code a1, and different enterprise codes may correspond to different K1 and are composed of N-digit numbers or letters (expressed in the form of a character string);
in the method for generating and verifying the commodity anti-counterfeiting code, the random code R in the step (3) is composed of 5 digits (represented in an integer form), and in order to avoid the behavior of deducing the random number seed by possible malicious guess (deducing the random code according to a limited number of random verification codes and then deducing the random number seed according to the random code), the seed value is set according to the system time, and the random number seed is replaced according to the current system time after a certain time interval. In the invention, in order to prevent guessing random number attack behaviors as far as possible, QueryPerformancefrequency and QueryPerformancecounter functions are adopted to obtain system time in a Windows/C environment. And the seed value is replaced again according to the system time after a certain number of anti-counterfeiting codes are generated. Random numbers are then generated from the function with srand () using a standard C/C + + library.
In the method for generating and verifying the merchandise anti-counterfeiting code, the 3-bit verification code D2 in the step (3) needs to be mapped into 1 random verification code D2 with 3 bits by the 5-bit random code R. The more simply used algorithm is considered to be the modulus calculation.
In the method for generating and verifying the anti-counterfeiting code of the commodity, the production key K2 in the step (4) is a secondary key, and the key set by an anti-counterfeiting code generator is used with the K1 in a set. When K1 is replaced, it can be replaced at the same time. Consists of N +4 digits or letters (expressed in the form of character strings);
in the method for generating and verifying the commodity anti-counterfeiting code, the ciphertext confusion code D1 in the step (5) is controlled by the random verification code D2 (the length of D2 is fixed to be 3).
The commodity anti-counterfeiting code generation and verification method comprises the step (6) of checking a sequence check code D3 by adopting an algorithm similar to an identity card check code counting algorithm (ISO 7064:1983.MOD 11-2).
In the method for generating and verifying the merchandise anti-counterfeiting code, the website key K3 in the step (7) is a three-level key, belongs to a website verification key, and is not replaceable once set and consists of N +8 digits or letters (represented in a character string form).
According to the commodity anti-counterfeiting code generation and verification method, the anti-counterfeiting code verification comprises the following steps:
(1) the production center decrypts the anti-counterfeiting code E according to the website key K3 to obtain an obfuscated ciphertext D, and decomposes the D into D1, D2 and D3;
(2) obtaining a 1-bit verification code AD by a specific verification algorithm (verification is carried out by adopting an identity card check code counting algorithm (ISO 7064:1983.MOD 11-2) similar algorithm) by using a ciphertext confusion code D1 and a 3-bit random verification code D2, comparing the AD with the D3, entering the next step if the AD and the D3 are equal to each other, and otherwise, judging that the anti-counterfeiting code is a pseudo code, and stopping the verification process;
(3) under the control of the random verification code D2, the ciphertext confusion code D1 is subjected to confusion removal to obtain a 2-level ciphertext C;
(4) the production center decrypts the 2-level ciphertext C according to the production key K2 to obtain a 1-level ciphertext B, and decomposes the B into an enterprise code A1 and a sequence encryption code B1;
(5) judging whether the enterprise code A1 is a valid enterprise code, if so, entering the next step, otherwise, judging that the anti-counterfeiting code is a pseudo code, and stopping the verification process;
(6) and the production center acquires the enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and decrypts the sequence encryption code B1 based on K1 to obtain a sequence code plaintext A2. The enterprise code A1 and the sequence code plaintext A2 form 0-level plaintext A;
(7) according to the enterprise code A1, inquiring whether the sequence code plaintext A2 is a legal sequence code or not in the database, if so, entering the next step (the validity period of the sequence code plaintext A2 can be simultaneously inquired, and if the commodity inquiry corresponding to the sequence code exceeds the validity period, a prompt is given), otherwise, judging that the anti-counterfeiting code is a counterfeiting code, and stopping the verification process;
(8) acquiring a random code R corresponding to the plaintext A from a database record according to the level 0 plaintext A;
(9) and comparing the KD with the D2 by using the 3-bit random verification code KD obtained by the specific verification algorithm (the 5-bit random code R is mapped into 1 3-bit random verification code KD, and the simple algorithm is considered to be modular calculation), and finally judging the anti-counterfeiting code to be true if the KD is equal to the D2, otherwise, judging the anti-counterfeiting code to be the anti-counterfeiting code. The verification process ends.
The invention has the beneficial effects that: compared with the prior art, the method can generate a group of anti-counterfeiting codes with the length variable along with the length of the sequence codes by means of traditional encryption algorithm, special random code verification, check code verification, code word confusion processing and the like under the control of a specific key according to the enterprise codes of production enterprises and the sequence codes corresponding to the commodities. And the anti-counterfeiting code can meet the requirements of uniqueness, confidentiality and irregularity. Under the condition of reasonable computing resources, according to a limited number of anti-counterfeiting codes, under the condition that an anti-counterfeiting code generation software system, database information and a secret key are not disclosed, the anti-counterfeiting codes which can pass anti-counterfeiting verification are difficult to manufacture.
Drawings
FIG. 1 is a flow chart of the generation of merchandise anti-counterfeiting codes in the invention;
FIG. 2 is a flow chart of the merchandise anti-counterfeit code verification in the present invention;
FIG. 3 is a flow chart b of the merchandise anti-counterfeit code verification in the present invention.
Detailed Description
The invention is further described below in conjunction with specific real-time modes.
Example 1: as shown in fig. 1, the encryption algorithm of the present invention comprises the following steps:
(1) composing basic information of the anti-counterfeiting code into 0-level plaintext A; length N of enterprise code a1 and sequence code a2, a2, comprising 4 bits: a number between 4 and 16, including 4 and 16 (since the sequence code may consist of numbers less than 4 bits, the sequence code length needs to be provided here); level 0 plaintext a may be generated based on the requirements of the enterprise, where the enterprise code a1 may consist of the manufacturer code, the serial code a2 may consist of the serial number and the date of manufacture, such as 001100556420160427, where the manufacturer code: 0011, serial No.: 005564, date 2016, 04, month 27, and may also contain various codes for other information.
(2) The production center obtains an N-bit enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and encrypts a sequence code plaintext A2 based on K1 to obtain an encrypted ciphertext B1. Ciphertext B1 and plaintext A1 constitute level 1 ciphertext B;
(3) generating 1 5-bit random code R according to a system clock at the current moment, and obtaining a 3-bit verification code D2 by the R through a specific verification algorithm;
the random code is obtained by setting the seed of srand () to increase from 0, the generated random number is gradually increased, the random number is increased from 38 to 32766 (serial number 0-10022), then from 1 to 32765(20056), then from 0 to 32767(30091), then from 2 to 32765(40125), then from 1 to 32764(50159), and then from 0 to 32766 (60194); if the selected random code R is 26743,
it is necessary to map the random code R of 5 bits to the random authentication code D2 of 1 3-bit number. Generated by a random authentication code generation algorithm-modulo. The largest 3-bit prime number 997 is modulo.
D2=R%997 =26743%997=821。
(4) Encrypting the 1-level ciphertext B by the production center according to the K2 of the N +4 bits of the production key to obtain a 2-level ciphertext C;
(5) under the control of the random verification code D2, a ciphertext confusion code D1 is obtained by confusing the 2-level ciphertext C;
the invention adopts a circular expansion mode to expand the random verification code D2 into a key with the same length as the code word C to be confused. For example, C length is 14, D2= {8,2,1}, and after extension D2' = {8,2,1,8,2,1,8,2,1,8,2 }.
D2' is then encrypted with the secondary ciphertext C via an obfuscation algorithm to form ciphertext obfuscated code D1.
(6) Obtaining a 1-bit verification code D3 by a ciphertext confusion code D1 and a 3-bit random verification code D2 through a specific verification algorithm;
the verification method is characterized in that each code son of the ciphertext obfuscated code D1 and the random verification code D2 is multiplied by a multiplier factor (continuously circulating from right to left, wherein 1 corresponds to a verification bit): 1, 2, 4, 8, 5, 10, 9, 7, 3, 6, and the weight (multiplier factor) is calculated as follows: w is ai=r(i-1)(mod M) where r =2, M = 11) then sums all the products to sum, plus the column check code D3 value, whose sum must satisfy modulo 11 by 1. Namely: 1 ≡ (sum + D3) (mod 11), and D3 was obtained. Using 0821 as an example, if the multiplier factors are 5, 8, 4, 2, sum =5 × 0 +8 × 8 +4 × 2 + 2 × 1=74, 1 ≡ sum + D3 (mod 11), then the serial check code D3= 4.
(7) The production center encrypts the confusion ciphertext D consisting of the D1, the D2 and the D3 for the last time according to the website key K3 to obtain a final anti-counterfeiting code E;
(8) and storing the random code R into a database record corresponding to the 0-level plaintext A for future anti-counterfeiting code verification.
The invention adopts a classic encryption algorithm for encryption.
The enterprise key K1 used in the present invention is a key corresponding to the enterprise code a 1. Different enterprises correspond to different enterprise keys.
The production key K2 used in the present invention is a key set by the anti-counterfeit code generator.
The website key K3 used in the present invention is a website authentication key.
As shown in fig. 2-3: when the anti-counterfeiting code is verified, the verified anti-counterfeiting code E, the random code R, the enterprise key K1, the production key K2 and the website key K3 must be matched with data in an encryption algorithm, and the verification steps are as follows:
(1) the production center decrypts the anti-counterfeiting code E according to the website key K3 to obtain an obfuscated ciphertext D, and decomposes the D into D1, D2 and D3;
(2) obtaining a 1-bit verification code AD by a specific verification algorithm (verification is carried out by adopting an identity card check code counting algorithm (ISO 7064:1983.MOD 11-2) similar algorithm) by using a ciphertext confusion code D1 and a 3-bit random verification code D2, comparing the AD with the D3, entering the next step if the AD and the D3 are equal to each other, and otherwise, judging that the anti-counterfeiting code is a pseudo code, and stopping the verification process;
(3) under the control of the random verification code D2, the ciphertext confusion code D1 is subjected to confusion removal to obtain a 2-level ciphertext C;
(4) the production center decrypts the 2-level ciphertext C according to the production key K2 to obtain a 1-level ciphertext B, and decomposes the B into an enterprise code A1 and a sequence encryption code B1;
(5) judging whether the enterprise code A1 is a valid enterprise code, if so, entering the next step, otherwise, judging that the anti-counterfeiting code is a pseudo code, and stopping the verification process;
(6) and the production center acquires the enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and decrypts the sequence encryption code B1 based on K1 to obtain a sequence code plaintext A2. The enterprise code A1 and the sequence code plaintext A2 form 0-level plaintext A;
(7) according to the enterprise code A1, inquiring whether the sequence code plaintext A2 is a legal sequence code or not in the database, if so, entering the next step (the validity period of the sequence code plaintext A2 can be simultaneously inquired, and if the commodity inquiry corresponding to the sequence code exceeds the validity period, a prompt is given), otherwise, judging that the anti-counterfeiting code is a counterfeiting code, and stopping the verification process;
(8) acquiring a random code R corresponding to the plaintext A from a database record according to the level 0 plaintext A;
(9) and comparing the KD with the D2 by using the 3-bit random verification code KD obtained by the specific verification algorithm (the 5-bit random code R is mapped into 1 3-bit random verification code KD, and the simple algorithm is considered to be modular calculation), and finally judging the anti-counterfeiting code to be true if the KD is equal to the D2, otherwise, judging the anti-counterfeiting code to be the anti-counterfeiting code. The verification process ends.
The decryption algorithm in the invention adopts the inverse algorithm of the classical encryption algorithm to decrypt.
In the encryption and decryption process, the key used can be any combination of numbers, letters and symbols, but since the multi-representation encryption and decryption algorithm requires pure numbers, the key needs to be converted into numbers before encryption and decryption.
The mathematical method of the confusion resolution algorithm adopted in the invention is the same as the decryption method, namely, the inverse algorithm of the confusion algorithm is decrypted.
The embodiments of the present invention are not limited to the above-described examples, and various changes can be made without departing from the spirit and scope of the present invention.

Claims (4)

1.一种商品防伪码生成与验证方法,其特征在于:包括以下步骤,1. a kind of commodity anti-counterfeiting code generation and verification method, it is characterized in that: comprise the following steps, (1)将企业码A1和序列码A2组成0级明文A,企业码A1为4位数字码,序列码A2为4~16的数字码;(1) The enterprise code A1 and the serial code A2 are composed of level 0 plaintext A, the enterprise code A1 is a 4-digit digital code, and the serial code A2 is a digital code from 4 to 16; (2)由生产中心根据企业码A1获取该企业码对应的企业密钥K1,并基于K1对序列码A2进行加密,得到加密后的密文B1,密文B1和企业码A1组成1级密文B;(2) The production center obtains the enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and encrypts the serial code A2 based on K1 to obtain the encrypted ciphertext B1. The ciphertext B1 and the enterprise code A1 form a level 1 password. text B; (3)根据当前时刻系统时钟产生1个5位随机码R,并由R经取模得到3位数的验证码D2;(3) Generate a 5-digit random code R according to the system clock at the current moment, and obtain a 3-digit verification code D2 by modulo R; (4)由生产中心根据生产密钥K2对1级密文B进行加密,得到2级密文C;(4) The production center encrypts the first-level ciphertext B according to the production key K2, and obtains the second-level ciphertext C; (5)采用循环扩展的方式将随机验证码D2扩展为与待混淆码字C等长的密钥D2',然后D2'与2级密文C经混淆算法加密形成密文混淆码D1;(5) The random verification code D2 is expanded into a key D2' of the same length as the code word C to be obfuscated by means of cyclic expansion, and then D2' and the second-level ciphertext C are encrypted by the obfuscation algorithm to form the ciphertext obfuscation code D1; (6)由密文混淆码D1和随机验证码D2经验证后得到1位验证码D3;(6) The 1-digit verification code D3 is obtained after verification by the ciphertext obfuscated code D1 and the random verification code D2; (7)由生产中心根据网站密钥K3对由D1、D2和D3组成的混淆密文D进行最后一次加密,得到最终的防伪码E;(7) The production center encrypts the obfuscated ciphertext D composed of D1, D2 and D3 for the last time according to the website key K3 to obtain the final anti-counterfeiting code E; (8)将随机码R保存到与0级明文A对应的数据库记录中。(8) Save the random code R to the database record corresponding to the level 0 plaintext A. 2.根据权利要求1所述的商品防伪码生成与验证方法,其特征在于:所述企业密钥K1是与企业码A1对应的一级密钥,由N位数字或字母组成;生产密钥K2是由防伪码生成商设置的二级密钥,由N+4位数字或字母组成,与K1成套使用,当K1更换时同时更换;网站密钥K3是三级密钥,属于网站验证密钥,网站密钥K3一经设置后不可更换,由N+8位数字或字母组成。2. The product anti-counterfeiting code generation and verification method according to claim 1, characterized in that: the enterprise key K1 is a primary key corresponding to the enterprise code A1, and consists of N digits or letters; K2 is the secondary key set by the anti-counterfeiting code generator, which consists of N+4 digits or letters. It is used in a set with K1 and is replaced when K1 is replaced; the website key K3 is the third-level key, which belongs to the website verification key. Once set, the website key K3 cannot be replaced and consists of N+8 digits or letters. 3.根据权利要求1所述的商品防伪码生成与验证方法,其特征在于:所述步骤(3)中随机码R由5位数字组成,采用在Windows/C环境下QueryPerformanceFrequency和QueryPerformanceCounter函数来获取系统时间,并在每产生一定数量的防伪码后根据系统时间重新更换种子值,然后采用标准C/C++库自带srand()函数产生随机数。3. The product anti-counterfeiting code generation and verification method according to claim 1, characterized in that: in the step (3), the random code R consists of 5 digits, and is obtained by using QueryPerformanceFrequency and QueryPerformanceCounter functions under Windows/C environment System time, and after each generation of a certain number of anti-counterfeiting codes, the seed value is replaced according to the system time, and then the random number is generated by the srand() function of the standard C/C++ library. 4.根据权利要求1所述的商品防伪码生成与验证方法,其特征在于:所述防伪码验证包括以下步骤:4. The method for generating and verifying a commodity anti-counterfeiting code according to claim 1, wherein the verification of the anti-counterfeiting code comprises the following steps: (1)由生产中心根据网站密钥K3对防伪码E进行解密,得到混淆密文D,并将D分解为D1、D2和D3;(1) The production center decrypts the anti-counterfeiting code E according to the website key K3, obtains the obfuscated ciphertext D, and decomposes D into D1, D2 and D3; (2)由密文混淆码D1和3位的随机验证码D2经身份证校验码计算法后得到1位验证码AD,将AD和D3进行比较,如果相等则进入下一步,否则判定该防伪码为伪码,验证流程中止;(2) The 1-digit verification code AD is obtained from the ciphertext obfuscated code D1 and the 3-digit random verification code D2 through the ID card verification code calculation method, and AD and D3 are compared. If they are equal, go to the next step, otherwise determine the The anti-counterfeiting code is a pseudo code, and the verification process is terminated; (3)在随机验证码D2控制下,对密文混淆码D1进行解混淆得到2级密文C;(3) Under the control of the random verification code D2, de-obfuscate the ciphertext obfuscation code D1 to obtain the second-level ciphertext C; (4)由生产中心根据生产密钥K2对2级密文C进行解密,得到1级密文B,并将B分解为企业码A1和密文B1;(4) The production center decrypts the second-level ciphertext C according to the production key K2 to obtain the first-level ciphertext B, and decomposes B into the enterprise code A1 and the ciphertext B1; (5)判别企业码A1是否为有效企业码,是则进入下一步,否则判定该防伪码为伪码,验证流程中止;(5) Determine whether the enterprise code A1 is a valid enterprise code, and if so, go to the next step, otherwise determine that the anti-counterfeiting code is a pseudo code, and the verification process is terminated; (6)由生产中心根据企业码A1获取该企业码对应的企业密钥K1,并基于K1对密文B1进行解密,得到序列码A2,企业码A1和序列码A2组成了0级明文A;(6) The production center obtains the enterprise key K1 corresponding to the enterprise code according to the enterprise code A1, and decrypts the ciphertext B1 based on K1 to obtain the serial code A2. The enterprise code A1 and the serial code A2 form a level 0 plaintext A; (7)根据企业码A1,在数据库中查询序列码A2是否为其合法序列码,如果是则进入下一步,否则判定该防伪码为伪码,验证流程中止;(7) According to the enterprise code A1, check whether the serial code A2 is a legal serial code in the database, if so, go to the next step, otherwise, determine that the anti-counterfeiting code is a pseudo code, and the verification process is terminated; (8)根据0级明文A从数据库记录中获取其对应的随机码R;(8) Obtain the corresponding random code R from the database record according to the 0-level plaintext A; (9)由R经取模计算得到的3位随机验证码KD,将KD和D2进行比较,如果相等则最终判断该防伪码为真,否则判定该防伪码为伪码,验证流程结束。(9) The 3-digit random verification code KD obtained by the modulo calculation of R, compare KD and D2, if they are equal, the anti-counterfeiting code is finally judged to be true, otherwise, the anti-counterfeiting code is judged to be a pseudo code, and the verification process ends.
CN201610866588.8A 2016-09-30 2016-09-30 Commodity anti-counterfeiting code generation and verification method Active CN106548353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610866588.8A CN106548353B (en) 2016-09-30 2016-09-30 Commodity anti-counterfeiting code generation and verification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610866588.8A CN106548353B (en) 2016-09-30 2016-09-30 Commodity anti-counterfeiting code generation and verification method

Publications (2)

Publication Number Publication Date
CN106548353A CN106548353A (en) 2017-03-29
CN106548353B true CN106548353B (en) 2020-04-07

Family

ID=58368167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610866588.8A Active CN106548353B (en) 2016-09-30 2016-09-30 Commodity anti-counterfeiting code generation and verification method

Country Status (1)

Country Link
CN (1) CN106548353B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563768B (en) * 2017-07-31 2020-06-30 贺强宏 Digital anti-counterfeiting coding method with universality and high-strength characteristics
CN109359276B (en) * 2018-09-29 2024-07-16 上海中商网络股份有限公司 Anti-counterfeiting code generation method, device, equipment and storage medium
CN109861810B (en) * 2019-03-19 2022-04-15 天津中德应用技术大学 Data encryption method and decryption method based on chaotic block encryption algorithm
CN110223091A (en) * 2019-06-19 2019-09-10 四川五丰科技有限公司 A kind of traceability anti-fake system and its method
CN111062456A (en) * 2019-12-25 2020-04-24 李蕴光 Two-dimensional code encryption algorithm
CN111400779A (en) * 2020-01-07 2020-07-10 李蕴光 High-dimensional data encryption method and system
CN112787814A (en) * 2021-01-20 2021-05-11 四川湖山电器股份有限公司 Upper computer communication encryption method and system
CN113159251A (en) * 2021-04-07 2021-07-23 张琴 Strong-encryption anti-counterfeiting anti-channel conflict commodity code and manufacturing method thereof
CN114742017B (en) * 2022-04-01 2023-05-12 上海中商网络股份有限公司 Method, device, equipment and storage medium for generating product anti-counterfeiting code
CN117291218B (en) * 2023-09-22 2024-03-29 广东龙眼数字科技有限公司 Application method and device of manufacturing anti-counterfeiting code and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136906A (en) * 2011-04-29 2011-07-27 贵阳高新华美龙技术有限公司 Encryption algorithm for rapidly generating anti-counterfeiting code
CN102437910A (en) * 2011-10-18 2012-05-02 国家超级计算深圳中心(深圳云计算中心) Data encryption/decryption checking method and system
CN105450399A (en) * 2015-12-23 2016-03-30 山东省农业机械科学研究院 Anti-fake tracing method based on hyper-elliptic curve cryptosystem

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136906A (en) * 2011-04-29 2011-07-27 贵阳高新华美龙技术有限公司 Encryption algorithm for rapidly generating anti-counterfeiting code
CN102437910A (en) * 2011-10-18 2012-05-02 国家超级计算深圳中心(深圳云计算中心) Data encryption/decryption checking method and system
CN105450399A (en) * 2015-12-23 2016-03-30 山东省农业机械科学研究院 Anti-fake tracing method based on hyper-elliptic curve cryptosystem

Also Published As

Publication number Publication date
CN106548353A (en) 2017-03-29

Similar Documents

Publication Publication Date Title
CN106548353B (en) Commodity anti-counterfeiting code generation and verification method
US12069038B2 (en) Encryption and decryption techniques using shuffle function
US7580895B2 (en) Product protection gateway and method for checking the authenticity of products
AU2019419934A1 (en) Methods and systems for preparing and performing an object authentication
CA2754268C (en) Split key secure access system
CN109274480B (en) Data authentication method and quantum key distribution system based on HMAC-SM3 algorithm
US20170149565A9 (en) Format-preserving cryptographic systems
CN101201886A (en) Three-he-code for recognizing commodity
CN114430321B (en) DFA self-adaptive security-based black box traceable key attribute encryption method and device
US10922292B2 (en) Metamorphic storage of passcodes
CN113612615B (en) Audit privacy protection authentication method based on SM9 cryptographic algorithm
CN103942500B (en) Hash ciphertext re-encryption method based on noise and decryption method after re-encryption
CN105282090A (en) Public URL encryption coding method for preventing illegal access on internet
KR101862279B1 (en) System architecture and method for ensuring network information security
CN112804050A (en) Multi-source data query system and method
CN107852328B (en) Enhanced obfuscation or randomization for secure product identification and verification
CN110188545B (en) Data encryption method and device based on chained database
US20230254136A1 (en) Apparatus and methods for validating user data
CN114491591B (en) A data use authorization method, device, and storage medium for anonymous query
CN101424142B (en) Lock, unlocking method thereof, lock administrative center and control method thereof
CN110445756B (en) Method for realizing searchable encryption audit logs in cloud storage
CN111030819A (en) Authentication method, system, terminal and storage medium based on encryption and decryption algorithm
CN105450399B (en) An anti-counterfeit traceability method based on hyperelliptic cryptography
JP6735062B2 (en) Random number sequence generation device, method and program
CN116579005A (en) User data safety storage management method

Legal Events

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