CN113011542A - Encryption method, identification method and identification device of two-dimensional code - Google Patents

Encryption method, identification method and identification device of two-dimensional code Download PDF

Info

Publication number
CN113011542A
CN113011542A CN201911331944.6A CN201911331944A CN113011542A CN 113011542 A CN113011542 A CN 113011542A CN 201911331944 A CN201911331944 A CN 201911331944A CN 113011542 A CN113011542 A CN 113011542A
Authority
CN
China
Prior art keywords
dimensional code
encryption
code
key
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911331944.6A
Other languages
Chinese (zh)
Inventor
谢明军
汪光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Parca Technology Co ltd
Original Assignee
Shenzhen Parca Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Parca Technology Co ltd filed Critical Shenzhen Parca Technology Co ltd
Priority to CN201911331944.6A priority Critical patent/CN113011542A/en
Publication of CN113011542A publication Critical patent/CN113011542A/en
Pending legal-status Critical Current

Links

Images

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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/06046Constructional details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2129Authenticate client device independently of the user
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention is suitable for the technical field of two-dimension code safety, and provides a two-dimension code encryption method, which comprises the following steps: setting the two-dimensional code into an information area and an encryption area; and encrypting the encryption area according to a preset encryption strategy. The invention also provides a two-dimensional code identification method, which comprises the following steps: acquiring a two-dimensional code image through code scanning equipment; analyzing a secret key of the two-dimensional code image; and judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and otherwise, not acquiring the two-dimension code information. Therefore, the invention can improve the safety of the two-dimension code application and reduce the risk of randomly acquiring the information.

Description

Encryption method, identification method and identification device of two-dimensional code
Technical Field
The invention relates to the technical field of two-dimension code safety, in particular to an encryption method, an identification method and an identification device of a two-dimension code.
Background
At present, data acquisition terminal equipment is divided into one dimension and two dimensions. Any module or data acquisition terminal equipment can read the information of the scanned code as long as the specification of the scanned code can be identified by the scanning module set by the data acquisition terminal. Therefore, a phenomenon occurs that once the two-dimensional code exists, the information of the two-dimensional code can be read by taking the device with which the two-dimensional code is scanned. If the two-dimensional code is applied to the production and assembly links of high-end manufacturing industry, the information contained in the two-dimensional code is not wanted to be acquired and known by the same owners. Information privacy issues arise.
In view of the above, the prior art is obviously inconvenient and disadvantageous in practical use, and needs to be improved.
Disclosure of Invention
In view of the above-mentioned drawbacks, an object of the present invention is to provide an encryption method, an identification method, and an identification device for a two-dimensional code, which can improve the security of two-dimensional code information.
In order to achieve the above object, the present invention provides a method for encrypting a two-dimensional code, including:
setting the two-dimensional code into an information area and an encryption area;
and encrypting the encryption area according to a preset encryption strategy.
According to the two-dimensional code encryption method, the encryption processing step of the encryption area according to the preset encryption strategy comprises the following steps:
and generating a key by adopting 16-system coding to the encryption area.
According to the encryption method of the two-dimensional code, the number of the bits of the secret key is seven.
The invention also provides a two-dimensional code identification method, which comprises the following steps:
acquiring a two-dimensional code image through code scanning equipment;
analyzing a secret key of the two-dimensional code image;
and judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and otherwise, not acquiring the two-dimension code information.
According to the identification method of the two-dimensional code, the method comprises the following steps: and setting at least one module ID corresponding to the two-dimensional code key.
According to the identification method of the two-dimensional code, the module ID is an 8-bit hexadecimal combination.
The invention also provides a device for identifying the two-dimensional code, which comprises:
the image acquisition unit is used for acquiring a two-dimensional code image, and the two-dimensional code comprises an information area and an encryption area;
the key analysis unit is used for analyzing the encryption area to obtain the key of the two-dimensional code;
and the matching processing unit is used for matching the module ID of the identification device with the key, and if the module ID is matched with the key, the identification device acquires the information of the information area.
The invention also provides a device for identifying the two-dimensional code, which further comprises:
and the storage unit is used for storing at least one module ID corresponding to the two-dimensional code key.
The invention is suitable for the technical field of two-dimension code safety, and provides a two-dimension code encryption method, which comprises the following steps: setting the two-dimensional code into an information area and an encryption area; and encrypting the encryption area according to a preset encryption strategy. The invention also provides a two-dimensional code identification method, which comprises the following steps: acquiring a two-dimensional code image through code scanning equipment; analyzing a secret key of the two-dimensional code image; and judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and otherwise, not acquiring the two-dimension code information. Therefore, the invention can improve the safety of the two-dimension code application and reduce the risk of randomly acquiring the information.
Drawings
FIG. 1 is a flow chart of an encryption method of the present invention;
fig. 2 is a flowchart of a two-dimensional code recognition method according to an embodiment of the invention;
FIG. 3 is a schematic view of the identification device of the present invention;
fig. 4 is a schematic diagram of a two-dimensional code structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, the present invention provides a two-dimensional code encryption method, which includes the following steps:
s101, setting the two-dimensional code into an information area and an encryption area;
and S102, encrypting the encryption area according to a preset encryption strategy.
In an embodiment, with reference to fig. 4, the black square frame is an encrypted two-dimensional code. Wherein, the irregular small graph is an encrypted 16-bit system code. The rest space in the black frame is the content information code, which is the information area. The area where the irregular small patterns are located is the encryption area.
The invention adopts 16-system coding processing to the encryption area, generates a key and has seven bits of encryption key.
Correspondingly, referring to fig. 2, the present invention provides a two-dimensional code identification method, which includes:
step S201, acquiring a two-dimensional code image through code scanning equipment;
step S202, analyzing a key of the two-dimensional code image;
step S203, judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and if not, not acquiring the two-dimension code information.
In a specific application, at least one module ID corresponding to the two-dimensional code key is set in advance in the code scanning device, that is: and establishing a corresponding relation between the code scanning equipment and the two-dimensional code. Preferably, the correspondence between the two-dimensional code key and the module ID may be a many-to-many relationship, and one two-dimensional code key may correspond to a plurality of code scanning devices (module IDs), so that the code scanning devices may acquire two-dimensional code information in which the correspondence is established. The module ID of the present invention is preferably 8-bit 16-ary encoded.
Referring to fig. 3, the present invention provides a two-dimensional code recognition apparatus, which includes:
the image obtaining unit 10 is configured to obtain a two-dimensional code image, where the two-dimensional code includes an information area and an encryption area.
And the key analysis unit 20 is configured to analyze the encryption area to obtain the key of the two-dimensional code.
And a matching processing unit 30, configured to match the module ID of the identification apparatus with the key, and if the module ID of the identification apparatus matches the key, the identification apparatus acquires information of the information area. If the two-dimensional codes cannot be matched, the information of the two-dimensional codes cannot be read, and therefore the information safety of the two-dimensional codes is guaranteed.
And the storage unit 40 is used for storing at least one module ID corresponding to the two-dimensional code key. The paired library files are independently stored in independent registers of the driver IC.
In one embodiment of the invention, after code scanning identification, the code scanning identification equipment checks the verification extraction key; and generates a log file (both success and failure states): and recording the times and time for extracting the calling key.
In summary, the present invention is applicable to the technical field of two-dimension code security, and provides a method for encrypting a two-dimension code, where the method includes: setting the two-dimensional code into an information area and an encryption area; and encrypting the encryption area according to a preset encryption strategy. The invention also provides a two-dimensional code identification method, which comprises the following steps: acquiring a two-dimensional code image through code scanning equipment; analyzing a secret key of the two-dimensional code image; and judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and otherwise, not acquiring the two-dimension code information. Therefore, the invention can improve the safety of the two-dimension code application and reduce the risk of randomly acquiring the information.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A two-dimensional code encryption method is characterized by comprising the following steps:
setting the two-dimensional code into an information area and an encryption area;
and encrypting the encryption area according to a preset encryption strategy.
2. The two-dimensional code encryption method according to claim 1, wherein the encryption processing step for encrypting the encryption area according to a preset encryption policy comprises:
and generating a key by adopting 16-system coding to the encryption area.
3. The two-dimensional code encryption method according to claim 2, wherein the number of bits of the key is seven bits.
4. A two-dimensional code recognition method is characterized by comprising the following steps:
acquiring a two-dimensional code image through code scanning equipment;
analyzing a secret key of the two-dimensional code image;
and judging whether the secret key is matched with a module ID preset by the code scanning equipment, if so, acquiring two-dimension code information, and otherwise, not acquiring the two-dimension code information.
5. The method for identifying the two-dimensional code according to claim 4, wherein the method comprises: and setting at least one module ID corresponding to the two-dimensional code key.
6. The method for identifying two-dimensional code according to claim 5, wherein the module ID is 8-bit hexadecimal combination.
7. An identification device of a two-dimensional code, comprising:
the image acquisition unit is used for acquiring a two-dimensional code image, and the two-dimensional code comprises an information area and an encryption area;
the key analysis unit is used for analyzing the encryption area to obtain the key of the two-dimensional code;
and the matching processing unit is used for matching the module ID of the identification device with the key, and if the module ID is matched with the key, the identification device acquires the information of the information area.
8. The apparatus for recognizing a two-dimensional code according to claim 7, further comprising:
and the storage unit is used for storing at least one module ID corresponding to the two-dimensional code key.
CN201911331944.6A 2019-12-21 2019-12-21 Encryption method, identification method and identification device of two-dimensional code Pending CN113011542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911331944.6A CN113011542A (en) 2019-12-21 2019-12-21 Encryption method, identification method and identification device of two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911331944.6A CN113011542A (en) 2019-12-21 2019-12-21 Encryption method, identification method and identification device of two-dimensional code

Publications (1)

Publication Number Publication Date
CN113011542A true CN113011542A (en) 2021-06-22

Family

ID=76382668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911331944.6A Pending CN113011542A (en) 2019-12-21 2019-12-21 Encryption method, identification method and identification device of two-dimensional code

Country Status (1)

Country Link
CN (1) CN113011542A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012027558A (en) * 2010-07-20 2012-02-09 Realsoft Inc Two-dimensional code and individual authentication system using two-dimensional code
US9338164B1 (en) * 2014-04-14 2016-05-10 Symantec Corporation Two-way authentication using two-dimensional codes
CN105719120A (en) * 2016-04-25 2016-06-29 成都蓉科联创科技有限责任公司 Method for encrypting privacy information on express waybills
CN107332660A (en) * 2017-06-28 2017-11-07 深圳市对接平台科技发展有限公司 A kind of Novel movable data encryption security system
US20180212765A1 (en) * 2015-07-29 2018-07-26 Hitachi, Ltd. Confidential information setting method, confidential information setting system, and confidential information setting apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012027558A (en) * 2010-07-20 2012-02-09 Realsoft Inc Two-dimensional code and individual authentication system using two-dimensional code
US9338164B1 (en) * 2014-04-14 2016-05-10 Symantec Corporation Two-way authentication using two-dimensional codes
US20180212765A1 (en) * 2015-07-29 2018-07-26 Hitachi, Ltd. Confidential information setting method, confidential information setting system, and confidential information setting apparatus
CN105719120A (en) * 2016-04-25 2016-06-29 成都蓉科联创科技有限责任公司 Method for encrypting privacy information on express waybills
CN107332660A (en) * 2017-06-28 2017-11-07 深圳市对接平台科技发展有限公司 A kind of Novel movable data encryption security system

Similar Documents

Publication Publication Date Title
CN104835046B (en) A kind of data false distinguishing method for two-dimension code safe verification
CN111191414B (en) Page watermark generation method, identification method, device, equipment and storage medium
JP5315054B2 (en) Secure protection of biometric templates
CN107864118B (en) Login verification method, system and computer readable storage medium
US9059852B2 (en) Validating a user's identity utilizing information embedded in a image file
EP3132368B1 (en) Method and apparatus of verifying usability of biological characteristic image
US10091196B2 (en) Method and apparatus for authenticating user by using information processing device
CN109214159B (en) User information protection system and method for terminal face recognition cloud service
EP2842076A1 (en) Two-dimensional barcodes having a plurality of different regions
CN112307520A (en) Electronic seal adding and verifying method and system
CN112802138B (en) Image processing method and device, storage medium and electronic equipment
CN104660401A (en) Authentication method, authentication system and terminal
CN105162604A (en) Feature image identification based verification method and system, and verification server
CN110602040A (en) Virtual gateway access and authentication method for Internet of things
CN115114598A (en) Watermark generation method, and method and device for file tracing by using watermark
CN105490809B (en) Information acquisition method and device, terminal and server
CN113011542A (en) Encryption method, identification method and identification device of two-dimensional code
CN110619228B (en) File decryption method, file encryption method, file management system and storage medium
CN110968275A (en) The anti-counterfeiting tracing system and method for the printed document
WO2017207998A1 (en) Method of associating a person with a digital object
CN115987492A (en) Data authentication method and system based on invariant features
CN107798373B (en) Two-dimensional code anti-copying method and system
CN107682161B (en) Offline authentication method and device for two-dimensional code
CN108133165A (en) A kind of Quick Response Code card reader encryption method
KR102425613B1 (en) File history tracking system in collaboration tools through steganography and method of the same

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210622

RJ01 Rejection of invention patent application after publication