[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109635905B - Two-dimensional code generation method, device and system - Google Patents

Two-dimensional code generation method, device and system Download PDF

Info

Publication number
CN109635905B
CN109635905B CN201811492167.9A CN201811492167A CN109635905B CN 109635905 B CN109635905 B CN 109635905B CN 201811492167 A CN201811492167 A CN 201811492167A CN 109635905 B CN109635905 B CN 109635905B
Authority
CN
China
Prior art keywords
data
dimensional code
encrypted
secret
encrypted data
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
CN201811492167.9A
Other languages
Chinese (zh)
Other versions
CN109635905A (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.)
Nanjing Zhongfu Information Technology Co Ltd
Original Assignee
Nanjing Zhongfu Information 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 Nanjing Zhongfu Information Technology Co Ltd filed Critical Nanjing Zhongfu Information Technology Co Ltd
Priority to CN201811492167.9A priority Critical patent/CN109635905B/en
Publication of CN109635905A publication Critical patent/CN109635905A/en
Application granted granted Critical
Publication of CN109635905B publication Critical patent/CN109635905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a two-dimension code generation method, a device and a system, which comprises the steps of firstly obtaining data to be encrypted; according to a preset secret level division rule, carrying out secret level division on the data to be encrypted to obtain a plurality of secret level data; then, encrypting the plurality of security level data through corresponding public keys respectively to obtain a plurality of corresponding encrypted data; and generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm. The invention generates the two-dimensional code by encrypting the classified data in the classified mode through the public key, improves the practicability of the two-dimensional code in the scene that information needs to be classified in the classified mode, and is simultaneously beneficial to the storage of more data by the two-dimensional code.

Description

Two-dimensional code generation method, device and system
Technical Field
The invention relates to the technical field of two-dimensional code encryption, in particular to a two-dimensional code generation method, a device and a system.
Background
The existing two-dimensional code technology is of a universal type, namely all users belong to the same security level and can see the same data information, such a scene can be applicable to some public places, but the scene which needs to distinguish the security level of the information is not practical, for example, a supermarket, a customer and a supermarket administrator have different authorities to know commodity information, the customer wants to see the price, the production place and the production date of the commodity, and the administrator wants to see the stock and the sales condition of the commodity. Therefore, the conventional two-dimensional code technology is poor in practicability in a scene where information needs to be classified in a secret level.
Disclosure of Invention
In view of the above, the present invention provides a two-dimensional code generating method, device and system, so as to improve the practicability of the two-dimensional code generating technology.
In a first aspect, an embodiment of the present invention provides a two-dimensional code generation method, where the method includes: acquiring data to be encrypted; according to a preset secret level division rule, carrying out secret level division on data to be encrypted to obtain a plurality of secret level data; encrypting the plurality of security level data through corresponding public keys respectively to obtain a plurality of corresponding encrypted data; and generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where after generating two-dimensional codes corresponding to multiple pieces of encrypted data, the method further includes: scanning the two-dimensional code, and obtaining a plurality of encrypted data through a two-dimensional code analysis algorithm; and respectively decrypting the plurality of encrypted data through corresponding private keys to obtain a plurality of corresponding security level data.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the encrypting the multiple pieces of classified data with the corresponding public keys to obtain corresponding multiple pieces of encrypted data includes: obtaining a public key corresponding to each secret level data according to an RSA algorithm; and encrypting each secret grade data according to the corresponding public key to obtain a plurality of encrypted data.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the step of generating a plurality of two-dimensional codes corresponding to encrypted data by using a preset two-dimensional code generation algorithm includes: carrying out outer-layer encryption on the plurality of encrypted data to obtain two-dimensional code data; performing data code words and error correction code words on the two-dimensional code data to obtain corrected two-dimensional code data; and carrying out inner layer encryption on the corrected two-dimensional code data to generate a two-dimensional code.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the two-dimensional code includes a two-dimensional barcode and a matrix two-dimensional code.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the decrypting the plurality of encrypted data with the corresponding private keys to obtain a plurality of corresponding secret-level data includes: obtaining a private key corresponding to each encrypted data according to an RSA algorithm; and decrypting each encrypted data according to the relative private key to obtain a plurality of secret level data.
In a second aspect, an embodiment of the present invention further provides a two-dimensional code generating apparatus, where the apparatus includes: the data acquisition module is used for acquiring data to be encrypted; the secret level dividing module is used for performing secret level division on data to be encrypted according to a preset secret level dividing rule to obtain a plurality of secret level data; the data encryption module is used for encrypting the plurality of security level data through the corresponding public keys respectively to obtain a plurality of corresponding encrypted data; and the two-dimension code generation module is used for generating a plurality of two-dimension codes corresponding to the encrypted data through a preset two-dimension code generation algorithm.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the apparatus further includes: the two-dimensional code scanning module is used for scanning the two-dimensional code and obtaining a plurality of encrypted data through a two-dimensional code analysis algorithm; and the data decryption module is used for decrypting the plurality of encrypted data respectively through corresponding private keys to obtain a plurality of corresponding security-level data.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the data encryption module is further configured to: obtaining a public key corresponding to each secret level data according to an RSA algorithm; and encrypting each secret-level data according to the corresponding public key to obtain a plurality of encrypted data.
In a third aspect, an embodiment of the present invention further provides a two-dimensional code generation system, where the system includes a two-dimensional code production end and a two-dimensional code usage end; the two-dimensional code production end encrypts data to be encrypted through a public key and generates a two-dimensional code; and the two-dimension code using end scans the two-dimension code and decrypts the encrypted data to obtain corresponding security data.
The embodiment of the invention has the following beneficial effects:
the invention provides a two-dimension code generation method, a device and a system, which comprises the steps of firstly obtaining data to be encrypted; according to a preset secret level division rule, carrying out secret level division on the data to be encrypted to obtain a plurality of secret level data; then, encrypting the plurality of security level data through corresponding public keys respectively to obtain a plurality of corresponding encrypted data; and generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm. The invention generates the two-dimensional code by encrypting the classified data in the classified mode through the public key, improves the practicability of the two-dimensional code in the scene that information needs to be classified in the classified mode, and is simultaneously beneficial to the storage of more data by the two-dimensional code.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention as set forth above.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a two-dimensional code generation method according to an embodiment of the present invention;
fig. 2 is a flowchart of a two-dimensional code generation method for two secret-level data according to an embodiment of the present invention;
fig. 3 is a flowchart of another two-dimensional code generation method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of two-dimensional code generation according to an embodiment of the present invention;
fig. 5 is a flowchart of a two-dimensional code decryption method according to an embodiment of the present invention;
fig. 6 is a flowchart of a two-dimensional code scanning verification method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a two-dimensional code generating device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The existing two-dimensional code technology is basically of a universal type, namely all users belong to the same security level and can see the same data information, and the existing two-dimensional code technology is poor in practicability in scenes in which information needs to be classified.
To facilitate understanding of the embodiment, a detailed description is first given of a two-dimensional code generation method disclosed in the embodiment of the present invention.
Referring to a flowchart of a two-dimensional code generation method shown in fig. 1, the method includes the specific steps of:
step S102, obtaining data to be encrypted.
The data to be encrypted is usually the information data in a scene that the information data needs to be classified according to the security level, and the information data can be classified into different security level data according to the different security levels, so that users with different security levels can obtain the data which can be obtained in the authority of the users.
And step S104, performing secret level division on the data to be encrypted according to a preset secret level division rule to obtain a plurality of secret level data.
The preset security classification rule may be to perform security classification on the data to be encrypted according to the user type, for example, in a supermarket, the information of the goods that the customer and the administrator of the supermarket wish to see are different, so the information of the goods may be classified into two security classifications, one security classification data includes the price, the place of production, the date of production, and the like that the customer wishes to see, and the other security classification data includes the stock of the goods and the sales condition, and the like that the administrator of the supermarket wishes to see.
And step S106, encrypting the plurality of secret-level data by the corresponding public keys respectively to obtain a plurality of corresponding encrypted data.
The obtained data with encryption is encrypted in a grading way, wherein each secret level data is encrypted by adopting different public keys, for example, two secret level data are respectively low secret level data and high secret level data, and the low secret level data is encrypted by adopting a public key 1 to obtain encrypted data 1; and encrypting the high-density data by adopting a public key 2 to obtain encrypted data 2, wherein the encryption algorithm can adopt an RSA algorithm.
The RSA algorithm may be referred to as an asymmetric algorithm encryption technique, in which the encryption key is a public key (equivalent to the public key) and the decryption key is a private key for security, and the encryption and decryption algorithm of the RSA algorithm is public, that is, the content encrypted by the public key can be decrypted and can only be decrypted by the private key, and the content encrypted by the private key can be decrypted and can only be decrypted by the public key, that is, the pair of the public key and the private key of the RSA algorithm can be used for encryption and decryption, and the content encrypted by one party can be decrypted and can only be decrypted by the other party.
And S108, generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm.
The step of generating the two-dimensional code by the preset two-dimensional code generation algorithm comprises the following steps: performing outer-layer encryption on the plurality of encrypted data to obtain two-dimensional code data; performing data code words and error correction code words on the two-dimensional code data to obtain corrected two-dimensional code data; and carrying out inner-layer encryption on the corrected two-dimensional code data to generate a two-dimensional code.
The plurality of encrypted data are processed by a two-dimensional code generation algorithm to generate a corresponding two-dimensional code, for example, the two-dimensional code is obtained by processing the encrypted data 1 and the encrypted data 2 corresponding to the low-security-level data and the high-security-level data by the two-dimensional code generation algorithm, as shown in fig. 2, which is a flowchart of a two-dimensional code generation method for two-security-level data.
The two-dimensional code user scans the two-dimensional code obtained by the two-dimensional code authenticator, the scanned data are put into a background of the user, the corresponding private key is obtained from the two-dimensional code authenticator through the security authority of the user, and the data of the two-dimensional code are decrypted through the private key so as to obtain the data which can be obtained in the security authority of the user.
The embodiment of the invention provides a two-dimension code generation method, which comprises the steps of firstly obtaining data to be encrypted; according to a preset secret level division rule, carrying out secret level division on the data to be encrypted to obtain a plurality of secret level data; then, encrypting the plurality of security level data through corresponding public keys respectively to obtain a plurality of corresponding encrypted data; and generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm. The invention generates the two-dimensional code by encrypting the classified data in the classified mode through the public key, improves the practicability of the two-dimensional code in the scene that information needs to be classified in the classified mode, and is simultaneously beneficial to the storage of more data by the two-dimensional code.
The embodiment of the invention also provides another two-dimensional code generation method, which is realized on the basis of the method shown in the figure 1; referring to a flowchart of another two-dimensional code generation method shown in fig. 3, the method includes the specific steps of:
step S302, data to be encrypted is obtained.
And step S304, performing secret level division on the data to be encrypted according to a preset secret level division rule to obtain a plurality of secret level data.
And step S306, obtaining the public key corresponding to each secret data according to the RSA algorithm.
The RSA algorithm is a public key encryption algorithm based on a very simple number theory fact: multiplying two large prime numbers is quite easy, but it is extremely difficult to factor their products. The product can therefore be disclosed as an encryption key, i.e. a public key, while two large prime numbers are combined into a private key; the public key is distributable for anyone to use, and the private key is owned by oneself for decryption.
And determining a public key corresponding to each secret level data by using an RSA algorithm so as to encrypt the data of each secret level.
And step S308, encrypting each secret data according to the corresponding public key to obtain a plurality of encrypted data.
And each secret level data corresponds to different public keys, and each secret level data is encrypted according to the corresponding public key to obtain encrypted data corresponding to all the secret level data.
And S310, performing outer-layer encryption on the plurality of encrypted data to obtain two-dimensional code data.
Step S312, data code words and error correction code words are carried out on the two-dimensional code data, and the corrected two-dimensional code data are obtained.
And step S314, carrying out inner-layer encryption on the corrected two-dimensional code data to generate a two-dimensional code.
As shown in fig. 4, which is a schematic diagram of two-dimensional code generation, first, a text (equivalent to the encrypted data) or a picture is subjected to outer layer encryption to obtain two-dimensional code data, then, the two-dimensional code data is subjected to data code words, equivalent to encoding of the two-dimensional code data, and then, error correction (equivalent to error correction code words) is performed on the encoded data to obtain corrected two-dimensional code data; and then, carrying out inner-layer encryption on the corrected two-dimensional code data, and finally generating the two-dimensional code. The two-dimensional code packet comprises a two-dimensional bar code (PDF417 code) and a matrix two-dimensional code (QR).
In the embodiment, the two-dimensional code data is encrypted in a distinguishing manner to achieve the effect of classifying the encryption level; meanwhile, the existing two-dimensional code technology is improved from the data encryption direction, although the existing two-dimensional code stores a small amount of data, the algorithm is improved, and the data stored in the two-dimensional code will increase by orders of magnitude in the future, so that the encryption of the two-dimensional code data is very important.
Corresponding to the above two-dimensional code generation method embodiment, refer to a flowchart of a two-dimensional code decryption method shown in fig. 5; after the method is applied to generating the two-dimensional codes corresponding to the plurality of encrypted data, the method specifically comprises the following steps:
step S502, scanning the two-dimensional code, and obtaining a plurality of encrypted data through a two-dimensional code analysis algorithm.
Firstly, determining an image of two-dimensional code information through a positioning graph and a separator on a two-dimensional code; the positioning graph determines coordinates of modules in the two-dimensional code symbol, and the modules in the two-dimensional code are fixed and comprise a correction graph, version information, data and an error correction code; the separator can separate the graph from the two-dimensional code information image; graying the two-dimension code information pixels, and then removing noise points of the two-dimension code information pixels; then binarizing the two-dimension code information pixels; and finally, decoding and correcting the two-dimensional code to obtain corresponding encrypted data.
Step S504, decrypting the plurality of encrypted data with the corresponding private keys respectively to obtain a plurality of corresponding security level data.
The steps further include: obtaining a private key corresponding to each encrypted data according to an RSA algorithm; and decrypting each encrypted data according to the corresponding private key to obtain a plurality of security level data.
For example, referring to a flowchart of a two-dimensional code scanning verification method shown in fig. 6, scanning a two-dimensional code, and obtaining two-dimensional code data through a two-dimensional code analysis algorithm, where the two-dimensional code data includes two encrypted data, namely encrypted level data 1 and encrypted data 2; the encrypted data 1 is decrypted by using a private key 1 to obtain low-security-level data, the encrypted data 2 is decrypted by using a private key 2 to obtain high-security-level data, and the decryption algorithm can adopt an RSA algorithm.
And the user scans the two-dimensional code, and then decrypts the corresponding encrypted data in the two-dimensional code through the own security authority, namely a private key corresponding to the security data which can be obtained by the user, so as to obtain the security data corresponding to the own security authority.
The embodiment provides a two-dimensional code decryption algorithm, the RSA algorithm can be used for decrypting data with different security levels respectively, and the two-dimensional code decryption algorithm has better practicability in scenes in which information needs to be classified according to the security levels, and is also beneficial to the development of a two-dimensional code technology.
Corresponding to the above method embodiment, referring to fig. 7, a schematic structural diagram of a two-dimensional code generating apparatus is shown, where the apparatus includes:
a data obtaining module 70, configured to obtain data to be encrypted;
the secret level dividing module 71 is configured to perform secret level division on data to be encrypted according to a preset secret level dividing rule to obtain a plurality of secret level data;
the data encryption module 72 is configured to encrypt the plurality of security level data by corresponding public keys, respectively, to obtain a plurality of corresponding encrypted data;
and the two-dimension code generating module 73 is configured to generate a plurality of two-dimension codes corresponding to the encrypted data through a preset two-dimension code generating algorithm.
Further, the apparatus further comprises: the two-dimensional code scanning module is used for scanning the two-dimensional code and obtaining a plurality of encrypted data through a two-dimensional code analysis algorithm; and the data decryption module is used for decrypting the plurality of encrypted data through corresponding private keys respectively to obtain a plurality of corresponding security level data.
Further, the data encryption module is further configured to: obtaining a public key corresponding to each secret grade data according to an RSA algorithm; and encrypting each secret-level data according to the corresponding public key to obtain a plurality of encrypted data.
The two-dimensional code generation device provided by the embodiment of the invention has the same technical characteristics as the two-dimensional code generation method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment also provides a two-dimensional code generation system corresponding to the method embodiment, and the system comprises a two-dimensional code production end and a two-dimensional code using end; the two-dimensional code production end encrypts data to be encrypted through a public key and generates a two-dimensional code; and the two-dimension code using end scans the two-dimension code and decrypts the encrypted data to obtain corresponding security data.
The computer program product of the two-dimensional code generation method, apparatus, and system provided in the embodiments of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, which are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and/or the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A two-dimensional code generation method is characterized by comprising the following steps:
acquiring data to be encrypted;
according to a preset secret level division rule, carrying out secret level division on the data to be encrypted to obtain a plurality of secret level data; wherein the secret level division rule comprises a user type;
encrypting the plurality of confidential data respectively through corresponding public keys to obtain a plurality of corresponding encrypted data;
generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm;
the step of generating a plurality of two-dimensional codes corresponding to the encrypted data through a preset two-dimensional code generation algorithm includes: carrying out outer-layer encryption on a plurality of encrypted data to obtain two-dimensional code data; performing data code words and error correction code words on the two-dimensional code data to obtain corrected two-dimensional code data; carrying out inner-layer encryption on the corrected two-dimensional code data to generate the two-dimensional code;
the step of encrypting the plurality of classified data by the corresponding public keys to obtain a plurality of corresponding encrypted data includes:
obtaining a public key corresponding to each secret data according to an RSA algorithm;
and encrypting each piece of classified data according to the corresponding public key to obtain a plurality of pieces of encrypted data.
2. The method of claim 1, wherein after generating the two-dimensional codes corresponding to the plurality of encrypted data, the method further comprises:
scanning the two-dimensional code, and obtaining a plurality of encrypted data through a two-dimensional code analysis algorithm;
and respectively decrypting the plurality of encrypted data through corresponding private keys to obtain a plurality of corresponding secret-level data.
3. The method of claim 1, wherein the two-dimensional code comprises a two-dimensional barcode and a matrix two-dimensional code.
4. The method according to claim 2, wherein the step of decrypting the plurality of encrypted data with corresponding private keys to obtain a plurality of corresponding classified data comprises:
obtaining a private key corresponding to each encrypted data according to an RSA algorithm;
and decrypting each encrypted data according to the corresponding private key to obtain a plurality of confidential data.
5. A two-dimensional code generation apparatus, characterized in that the apparatus comprises:
the data acquisition module is used for acquiring data to be encrypted;
the secret level dividing module is used for performing secret level division on the data to be encrypted according to a preset secret level dividing rule to obtain a plurality of secret level data; wherein the classification rule comprises a user type;
the data encryption module is used for encrypting the plurality of security level data through corresponding public keys respectively to obtain a plurality of corresponding encrypted data;
the two-dimension code generation module is used for generating a plurality of two-dimension codes corresponding to the encrypted data through a preset two-dimension code generation algorithm;
the two-dimensional code generation module is also used for carrying out outer-layer encryption on the plurality of encrypted data to obtain two-dimensional code data; performing data code words and error correction code words on the two-dimensional code data to obtain corrected two-dimensional code data; carrying out inner-layer encryption on the corrected two-dimensional code data to generate the two-dimensional code;
the data encryption module is also used for obtaining a public key corresponding to each secret data according to an RSA algorithm; and encrypting each piece of classified data according to the corresponding public key to obtain a plurality of pieces of encrypted data.
6. The apparatus of claim 5, further comprising:
the two-dimension code scanning module is used for scanning the two-dimension code and obtaining a plurality of encrypted data through a two-dimension code analysis algorithm;
and the data decryption module is used for decrypting the plurality of encrypted data through corresponding private keys respectively to obtain a plurality of corresponding security level data.
7. The apparatus of claim 5, wherein the data encryption module is further configured to:
obtaining a public key corresponding to each secret data according to an RSA algorithm;
and encrypting each secret grade data according to the corresponding public key to obtain a plurality of encrypted data.
8. A two-dimension code generation system is characterized by comprising a two-dimension code production end and a two-dimension code using end; the two-dimensional code production end encrypts data to be encrypted through a public key and generates a two-dimensional code; and the two-dimension code using end scans the two-dimension code and decrypts the encrypted data to obtain corresponding confidential data.
CN201811492167.9A 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system Active CN109635905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811492167.9A CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811492167.9A CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Publications (2)

Publication Number Publication Date
CN109635905A CN109635905A (en) 2019-04-16
CN109635905B true CN109635905B (en) 2022-09-02

Family

ID=66071683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811492167.9A Active CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Country Status (1)

Country Link
CN (1) CN109635905B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266683A (en) * 2019-06-18 2019-09-20 北京阿尔山区块链联盟科技有限公司 Digital asset sharing method, device and electronic equipment
CN112100206A (en) * 2020-11-13 2020-12-18 支付宝(杭州)信息技术有限公司 Digital label generation method, device, equipment and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938497A (en) * 2010-09-26 2011-01-05 深圳大学 Multistage security file structure as well as file access control and secret key management user terminal, service terminal, system and method thereof
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code
CN106022196A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Information sharing method and intelligent terminal
CN106027460A (en) * 2015-03-16 2016-10-12 布谷鸟知识产权有限责任公司 Electronic communication method and method for accessing data of third-party database system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938497A (en) * 2010-09-26 2011-01-05 深圳大学 Multistage security file structure as well as file access control and secret key management user terminal, service terminal, system and method thereof
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code
CN106027460A (en) * 2015-03-16 2016-10-12 布谷鸟知识产权有限责任公司 Electronic communication method and method for accessing data of third-party database system
CN106022196A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Information sharing method and intelligent terminal

Also Published As

Publication number Publication date
CN109635905A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN106330464B (en) A kind of identity identifying method, equipment and system
Askar et al. Image encryption algorithm based on chaotic economic model
Wang et al. 2D barcodes for visual cryptography
Alajmi et al. Steganography of encrypted messages inside valid QR codes
Anees et al. A robust watermarking scheme for online multimedia copyright protection using new chaotic map
Dua et al. 3D chaotic map-cosine transformation based approach to video encryption and decryption
Fu et al. A new two-level information protection scheme based on visual cryptography and QR code with multiple decryptions
Zheng et al. An image encryption algorithm based on multichaotic system and DNA coding
CN109635905B (en) Two-dimensional code generation method, device and system
Idakwo et al. An extensive survey of digital image steganography: State of the art
Kshirsagar et al. Anatomized study of security solutions for multimedia: deep learning-enabled authentication, cryptography and information hiding
Rose et al. A secure verifiable scheme for secret image sharing
Shivani et al. Providing security and privacy to huge and vulnerable songs repository using visual cryptography
Gupta et al. Image steganography using LSB substitution facilitated by shared password
Sharma et al. Multi-image steganography and authentication using crypto-stego techniques
Li et al. The maximum matching degree sifting algorithm for steganography pretreatment applied to IoT
Mandal Reversible steganography and authentication via transform encoding
Yu et al. A Novel Three‐Layer QR Code Based on Secret Sharing Scheme and Liner Code
Shivani et al. Novel basis matrix creation and preprocessing algorithms for friendly progressive visual secret sharing with space-efficient shares
CN112669068B (en) Market research data transmission method and system based on big data
Sarkar et al. Blockchain-based authenticable (k, n) multi-secret image sharing scheme
Lee et al. The Usefulness Of Visual Cryptography Techniques: A Literature Review.
Akiwate Secure and efficient image cryptography technique using choas and DNA encoding methodology
Kaur et al. PSIS-based blind watermarking scheme (PSISBW) with tamper detection
Erlangga et al. Increasing Secret Data Hiding Capacity in QR Code Using Subcells

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