CN114037035B - Encryption tag anti-counterfeiting method based on magnetic image - Google Patents

Encryption tag anti-counterfeiting method based on magnetic image Download PDF

Info

Publication number
CN114037035B
CN114037035B CN202111306097.5A CN202111306097A CN114037035B CN 114037035 B CN114037035 B CN 114037035B CN 202111306097 A CN202111306097 A CN 202111306097A CN 114037035 B CN114037035 B CN 114037035B
Authority
CN
China
Prior art keywords
magnetic
private key
information
encrypted
magnetic image
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
CN202111306097.5A
Other languages
Chinese (zh)
Other versions
CN114037035A (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.)
Henan University of Technology
Original Assignee
Henan University of 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 Henan University of Technology filed Critical Henan University of Technology
Priority to CN202111306097.5A priority Critical patent/CN114037035B/en
Publication of CN114037035A publication Critical patent/CN114037035A/en
Application granted granted Critical
Publication of CN114037035B publication Critical patent/CN114037035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06187Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with magnetically detectable marking
    • G06K19/06196Constructional details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Inspection Of Paper Currency And Valuable Securities (AREA)

Abstract

The invention discloses an encryption tag anti-counterfeiting method based on a magnetic image, which adopts an encryption two-dimensional code generated based on unique magnetic image coding to realize tag anti-counterfeiting, generates a public key and private key pair based on an asymmetric encryption key generation algorithm, encrypts unique object images and specific information by using the public key, forms a two-dimensional code aiming at encrypted ciphertext information, and uses the private key as a decryption key to restore information hidden by the two-dimensional code.

Description

Encryption tag anti-counterfeiting method based on magnetic image
Technical Field
The invention relates to the technical field of image anti-counterfeiting, in particular to an encryption label anti-counterfeiting method based on a magnetic image.
Background
At present, most of the anti-counterfeit labels on the market adopt single anti-counterfeit means, such as laser holographic anti-counterfeit, printing ink anti-counterfeit, bar code anti-counterfeit and other technologies, so that the anti-counterfeit labels have the problems of insufficient anti-counterfeit capability and easy imitation, but the problem can be effectively solved if the magnetic image detection technology is applied to the anti-counterfeit labels.
Therefore, how to improve the anti-counterfeit capability of the label is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the invention provides an encryption tag anti-counterfeiting method based on a magnetic image, which adopts a magnetic image detection technology, utilizes the characteristics of containing more information by a two-dimensional code and being capable of being rapidly identified, combines the encryption technology to form a novel combined anti-counterfeiting technology, is not only beneficial to preventing food safety accidents, but also provides a novel method for the anti-counterfeiting industry.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
an encryption label anti-counterfeiting method based on a magnetic image comprises the following steps:
step 1: creating an original magnetic image, and converting the original magnetic image into a character string format to obtain original magnetic image information;
step 2: extracting magnetic characteristic information parameters from the original magnetic image information;
step 3: performing data processing coding on the magnetic characteristic information parameters to obtain a magnetic characteristic random number;
step 4: the magnetic characteristic random number is used as a private key password to generate a public-private key pair; the private key cipher encrypts a private key in the public-private key pair;
step 5: encrypting the original magnetic image information by using an encryption algorithm to obtain a ciphertext by using a public key in the public-private key pair, generating an encrypted two-dimensional code according to the ciphertext, and manufacturing an anti-counterfeiting label by using the encrypted two-dimensional code; adding the encrypted two-dimensional code into the anti-counterfeiting label to realize label anti-counterfeiting based on the magnetic image;
step 6: and acquiring tag information by adopting a magnetic image acquisition device, decrypting the tag information by utilizing the private key to obtain a decrypted image, and comparing the decrypted image with the original magnetic image hidden by the anti-counterfeit tag to realize anti-counterfeit identification.
Preferably, the magnetic characteristic parameter data processing in the step 3 includes translation and rotation.
Preferably, the original magnetic image is a BMP image.
Preferably, the tag identification device is provided with a magnetic detection device and a private key; the magnetic detection device collects the encrypted two-dimensional code information, decrypts and restores the magnetic image hidden by the encrypted two-dimensional code by using the private key, and compares the magnetic image with the original magnetic image to judge whether the label is a genuine product or not.
Preferably, the encryption algorithm adopts an RSA algorithm, the encryption and decryption of data are realized through the public and private key pair, the public key PK= { e, n } is used for encryption, and the private key SK { d, n } is used for decryption.
Preferably, the magnetic image acquisition device comprises a magnetic head module, an amplifying circuit board, an STM32 singlechip and an interface; the TMR sensor is arranged in the magnetic head module and connected with the amplifying circuit board, the amplifying circuit board is connected with the STM32 singlechip, the STM32 singlechip is connected with an interface, and the interface is connected with a power supply and a PC; an AD converter is arranged in the STM32 singlechip.
Preferably, the tag processing system comprises a key pair generating module, an information encrypting module, a two-dimensional code generating module, an information inputting module and an ink-jet printing information interface module; the key pair generation module generates a public and private key pair according to the magnetic characteristic random number; the information encryption module encrypts a private key in the public-private key pair by taking the magnetic characteristic random number as the private key cipher, and the public key in the public-private key pair encrypts the original magnetic image information by adopting an encryption algorithm to obtain a ciphertext; the information input module receives article related information; the two-dimension code generation module generates an encrypted two-dimension code according to the ciphertext and the article related information; and the ink-jet printing information interface module transmits the encrypted two-dimensional code to an ink-jet system to manufacture an anti-counterfeiting label.
Preferably, the interface is provided with a filtering module for filtering the power supply of the power supply.
Preferably, the magnetic head module adopts a bridge circuit to output signals, a capacitance filtering unit is arranged, and soft magnetic signals collected by the TMR sensor are filtered by the capacitance filtering unit and then output to the amplifying circuit board by the bridge circuit.
Preferably, the anti-counterfeiting label sequentially comprises a protective layer, an encrypted two-dimensional code layer, a magnetic ink layer, an adhesive layer and a substrate from top to bottom; and the encrypted two-dimensional code layer is sprayed with the encrypted two-dimensional code.
Compared with the prior art, the invention discloses an encryption tag anti-counterfeiting method based on a magnetic image, which realizes tag anti-counterfeiting by adopting an encryption two-dimensional code generated based on unique magnetic image coding, generates a public key and private key pair based on an asymmetric encryption key generation algorithm, encrypts unique article magnetic images and specific information of articles by utilizing the public key, and forms a two-dimensional code aiming at encrypted ciphertext information. The private key is used as a decryption key to restore the information hidden by the two-dimensional code. The authenticity of the grain is identified by comparing the images through the designed magnetic image acquisition device. The encryption tag anti-counterfeiting method and device based on the magnetic image can accurately collect the magnetic signals of the magnetic tag and realize tag anti-counterfeiting.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a magnetic head module according to the present invention;
FIG. 2 is a schematic diagram of the anti-counterfeit label structure provided by the invention;
fig. 3 is a schematic diagram of a circuit structure of an amplifying circuit board provided by the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention discloses an encryption label anti-counterfeiting method based on a magnetic image, which comprises the following steps of:
s1: creating an original magnetic image, and converting the original magnetic image into a character string format to obtain original magnetic image information;
s2: extracting magnetic characteristic information parameters from the original magnetic image information;
s3: performing data processing coding on the magnetic characteristic information parameters to obtain a magnetic characteristic random number;
s4: the magnetic characteristic random number is used as a private key password to generate a public-private key pair; the private key cipher encrypts the private key in the public and private key pair;
s5: the public key in the public-private key pair adopts an encryption algorithm to encrypt the original magnetic image information to obtain a ciphertext, an encrypted two-dimensional code is generated according to the ciphertext, and an anti-counterfeiting label 2 is manufactured by utilizing the encrypted two-dimensional code; the encrypted two-dimensional code is added into the anti-counterfeiting label 2, so that label anti-counterfeiting based on a magnetic image is realized;
s6: the magnetic image acquisition device is used for acquiring label information, the label information is decrypted by using the private key, and the decrypted image is compared with the original magnetic image hidden by the anti-counterfeit label 2, so that anti-counterfeit identification is realized.
In order to further optimize the technical scheme, the magnetic characteristic parameter data processing in the step S3 comprises translation and rotation.
In order to further optimize the technical scheme, the original magnetic image is a BMP chart.
In order to further optimize the technical scheme, the tag identification device is provided with a magnetic detection device and a private key; the magnetic detection device collects the encrypted two-dimensional code information, decrypts and restores the magnetic image hidden by the encrypted two-dimensional code by using the private key, compares the magnetic image with the original magnetic image, and judges whether the label is a genuine product or not.
In order to further optimize the technical scheme, the encryption algorithm adopts an RSA algorithm, encryption and decryption of data are realized through a public-private key pair, a public key PK= { e, n } is used for encryption, and a private key SK { d, n } is used for decryption. Regarding an RSA encryption algorithm, a C++ call openssl library is adopted to realize the encryption of magnetic images in three steps, wherein the first step is as follows: generating a public-private key pair; the RSA_generation_key and the RSA_generation_key_ex function are called to generate an RSA key, the RSA_print_fp is called to print key information, and an RSA encryption key pair is generated; and a second step of: private key conversion; invoking a PEM_write_bio_PKCS8PrivateKey function to convert a private key into a PEM format with password protection and recording a corresponding public key, wherein the password is a magnetic characteristic random number; third section: encrypting and decrypting; a text File is created in the directory by using an openssl tool, a public-private key pair generated before is defined by an OPENSSLKEY 'test.key' and a PUBLICKEY 'test_pub.key', and then the encrypter_File function and the decrypt_File function are called to Encrypt the File by using the public key and Decrypt the File by using the private key respectively.
In order to further optimize the technical scheme, the magnetic image acquisition device comprises a magnetic head module 1, an amplifying circuit board, an STM32 singlechip and an interface; the magnetic head module 1 is internally provided with a TMR sensor which is connected with an amplifying circuit board, the amplifying circuit board is connected with an STM32 singlechip, the STM32 singlechip is connected with an interface, and the interface is connected with a power supply and a PC; an AD converter is arranged in the STM32 singlechip.
In order to further optimize the technical scheme, the circuit structure of the amplifying circuit board comprises a TMR sensor access module, a signal amplifying module, a voltage regulating module and an output module as shown in fig. 3; the voltage regulation module regulates the reference voltage to within 1.5% error.
In order to further optimize the technical scheme, the tag processing system comprises a key pair generating module, an information encrypting module, a two-dimensional code generating module, an information input module and an ink-jet printing information interface module; the key pair generation module generates a public and private key pair according to the magnetic characteristic random number; the information encryption module encrypts a private key in a public-private key pair by taking the magnetic characteristic random number as a private key cipher, and the public key in the public-private key pair encrypts the original magnetic image information by adopting an encryption algorithm to obtain a ciphertext; the information input module receives article related information; the two-dimension code generation module generates an encrypted two-dimension code according to the ciphertext and the article related information; and the ink-jet printing information interface module transmits the encrypted two-dimensional code to an ink-jet system to manufacture the anti-counterfeiting label.
In order to further optimize the technical scheme, the interface is provided with a filtering module for filtering power supply of the power supply.
In order to further optimize the technical scheme, the magnetic head module 1 adopts a bridge circuit to output signals, a capacitance filtering unit is arranged, and soft magnetic signals collected by the TMR sensor are filtered by the capacitance filtering unit and then output to the amplifying circuit board by the bridge circuit.
In order to further optimize the technical scheme, the anti-counterfeiting label 2 sequentially comprises a protective layer, an encrypted two-dimensional code layer, a magnetic ink layer, an adhesive layer and a substrate from top to bottom; and the encrypted two-dimensional code layer is sprayed with the encrypted two-dimensional code.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An encryption label anti-counterfeiting method based on a magnetic image is characterized by comprising the following steps of:
step 1: creating an original magnetic image, and converting the original magnetic image into a character string format to obtain original magnetic image information;
step 2: extracting magnetic characteristic information parameters from the original magnetic image information;
step 3: performing data processing coding on the magnetic characteristic information parameters to obtain a magnetic characteristic random number;
step 4: the magnetic characteristic random number is used as a private key password to generate a public-private key pair; the private key cipher encrypts a private key in the public-private key pair;
step 5: encrypting the original magnetic image information by using an encryption algorithm to obtain a ciphertext by using a public key in the public-private key pair, generating an encrypted two-dimensional code according to the ciphertext, and manufacturing an anti-counterfeiting label by using the encrypted two-dimensional code;
step 6: and acquiring tag information by adopting a magnetic image acquisition device, decrypting the tag information by utilizing the private key to obtain a decrypted image, and comparing the decrypted image with the original magnetic image hidden by the anti-counterfeit tag to realize anti-counterfeit identification.
2. The method for anti-counterfeit of an encrypted tag based on a magnetic image according to claim 1, wherein said processing of said magnetic characteristic information parameter data in said step 3 comprises translation and rotation.
3. The method for preventing counterfeit of an encrypted tag based on a magnetic image according to claim 1, wherein said tag reader is provided with a magnetic detection device and a private key; the magnetic detection device collects the encrypted two-dimensional code information, decrypts and restores the magnetic image hidden by the encrypted two-dimensional code by using the private key, and compares the magnetic image with the original magnetic image to judge whether the label is a genuine product or not.
4. The anti-counterfeiting method for the encrypted tag based on the magnetic image according to claim 1, wherein the encryption algorithm adopts an RSA algorithm, encryption and decryption of data are achieved through the public and private key pair, a public key PK= { e, n } is used for encryption, and a private key SK { d, n } is used for decryption.
5. The encryption tag anti-counterfeiting method based on the magnetic image according to claim 1, wherein the magnetic image acquisition device comprises a magnetic head module, an amplifying circuit board, an STM32 singlechip and an interface; the TMR sensor is arranged in the magnetic head module and connected with the amplifying circuit board, the amplifying circuit board is connected with the STM32 singlechip, the STM32 singlechip is connected with an interface, and the interface is connected with a power supply and a PC; an AD converter is arranged in the STM32 singlechip.
6. The magnetic image-based encryption tag anti-counterfeiting method according to claim 1, wherein the tag processing system comprises a key pair generation module, an information encryption module, a two-dimensional code generation module, an information input module and an inkjet printing information interface module; the key pair generation module generates a public and private key pair according to the magnetic characteristic random number; the information encryption module encrypts a private key in the public-private key pair by taking the magnetic characteristic random number as the private key cipher, and the public key in the public-private key pair encrypts the original magnetic image information by adopting an encryption algorithm to obtain a ciphertext; the information input module receives article related information; the two-dimension code generation module generates an encrypted two-dimension code according to the ciphertext and the article related information; and the ink-jet printing information interface module transmits the encrypted two-dimensional code to an ink-jet system to manufacture an anti-counterfeiting label.
7. The method for preventing counterfeit of an encrypted tag based on a magnetic image according to claim 5, wherein the interface is provided with a filtering module for filtering the power supplied by the power supply.
8. The anti-counterfeiting method for the encrypted tag based on the magnetic image according to claim 5, wherein the magnetic head module adopts a bridge circuit to output signals, a capacitance filtering unit is arranged, and soft magnetic signals collected by the TMR sensor are filtered by the capacitance filtering unit and then output to the amplifying circuit board by the bridge circuit.
9. The anti-counterfeiting method for the encrypted label based on the magnetic image according to claim 1, wherein the anti-counterfeiting label comprises a protective layer, an encrypted two-dimensional code layer, a magnetic ink layer, an adhesive layer and a substrate from top to bottom in sequence; and the encrypted two-dimensional code layer is sprayed with the encrypted two-dimensional code.
CN202111306097.5A 2021-11-05 2021-11-05 Encryption tag anti-counterfeiting method based on magnetic image Active CN114037035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111306097.5A CN114037035B (en) 2021-11-05 2021-11-05 Encryption tag anti-counterfeiting method based on magnetic image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111306097.5A CN114037035B (en) 2021-11-05 2021-11-05 Encryption tag anti-counterfeiting method based on magnetic image

Publications (2)

Publication Number Publication Date
CN114037035A CN114037035A (en) 2022-02-11
CN114037035B true CN114037035B (en) 2024-01-26

Family

ID=80142940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111306097.5A Active CN114037035B (en) 2021-11-05 2021-11-05 Encryption tag anti-counterfeiting method based on magnetic image

Country Status (1)

Country Link
CN (1) CN114037035B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979474A (en) * 2022-05-16 2022-08-30 青岛崂应海纳光电环保集团有限公司 Anti-counterfeiting photo generation method, anti-counterfeiting verification method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932148A (en) * 2012-10-25 2013-02-13 成都市易恒信科技有限公司 System and method for preventing safety two-dimensional code counterfeiting on basis of combination of public key (CPK) authentication
CN103020684A (en) * 2012-12-07 2013-04-03 北京印刷学院 Anti-counterfeiting device, anti-counterfeiting recognition device and system for commodity packaging
CN103034884A (en) * 2012-12-07 2013-04-10 北京印刷学院 Commodity packaging anti-fake device and device and system for anti-fake recognition with built-in secret key

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932148A (en) * 2012-10-25 2013-02-13 成都市易恒信科技有限公司 System and method for preventing safety two-dimensional code counterfeiting on basis of combination of public key (CPK) authentication
CN103020684A (en) * 2012-12-07 2013-04-03 北京印刷学院 Anti-counterfeiting device, anti-counterfeiting recognition device and system for commodity packaging
CN103034884A (en) * 2012-12-07 2013-04-10 北京印刷学院 Commodity packaging anti-fake device and device and system for anti-fake recognition with built-in secret key

Also Published As

Publication number Publication date
CN114037035A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
JP3701325B2 (en) Method and apparatus for creating and authenticating secure documents
EP1520369B1 (en) Biometric authentication system
CN102902997B (en) A kind of Quick Response Code hybrid coding, decoding device and method
JP4951627B2 (en) A method of marking symbols on small products and products manufactured by this method
CN201181472Y (en) Hardware key device and movable memory system
JP5739876B2 (en) Unique identifiers, methods for providing unique identifiers, and use of unique identifiers
JP2020516092A (en) Composite two-dimensional barcode, electronic certificate medium, generation, reading device and method
CN101295343A (en) Two-dimensional code multi-enciphering anti-fake printing method
CN103778590B (en) Using digital picture storage and the method and apparatus of transmission information
WO2017045594A1 (en) Anti-counterfeit method
CN103020682B (en) Books Quick Response Code identification generation apparatus, Quick Response Code identification recognition device and system
CN103020684A (en) Anti-counterfeiting device, anti-counterfeiting recognition device and system for commodity packaging
CN102004986A (en) Product anti-counterfeiting method based on digital signature and public key system and verifying method
CN103034884A (en) Commodity packaging anti-fake device and device and system for anti-fake recognition with built-in secret key
CN106533697A (en) Random number generating and extracting method and application thereof to identity authentication
CN114037035B (en) Encryption tag anti-counterfeiting method based on magnetic image
CN104574119B (en) A kind of method that commodity Jianzhen traces to the source
CN104285230A (en) Method for coding and decoding information associated with an item
CN101246548A (en) Biological information storage method and system
CN102842053B (en) A kind of false proof figure code label and manufacture method thereof
CN113761488A (en) Content network copyright tracing encryption system and encryption method
CN101859360A (en) File security processing method, corresponding software and decryption reading device
CN104424568A (en) Authentication false-proof traceability system employing circuit core chip ID number as identification
CN109614805A (en) A kind of generation that document is anti-fake and recognition methods and printing driving and system
CN101320433A (en) Anti-counterfeit method by graded encryption

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