WO2017016447A1 - 二维码掩膜加密和解密方法及系统 - Google Patents

二维码掩膜加密和解密方法及系统 Download PDF

Info

Publication number
WO2017016447A1
WO2017016447A1 PCT/CN2016/090999 CN2016090999W WO2017016447A1 WO 2017016447 A1 WO2017016447 A1 WO 2017016447A1 CN 2016090999 W CN2016090999 W CN 2016090999W WO 2017016447 A1 WO2017016447 A1 WO 2017016447A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional code
key
server
identifier
mask pattern
Prior art date
Application number
PCT/CN2016/090999
Other languages
English (en)
French (fr)
Inventor
蒋声障
吴卫东
Original Assignee
福建联迪商用设备有限公司
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 福建联迪商用设备有限公司 filed Critical 福建联迪商用设备有限公司
Priority to BR112018001696-9A priority Critical patent/BR112018001696A2/pt
Priority to EP16829813.1A priority patent/EP3309992A4/en
Publication of WO2017016447A1 publication Critical patent/WO2017016447A1/zh
Priority to US15/871,184 priority patent/US10659220B2/en

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C5/00Ciphering apparatus or methods not provided for in the preceding groups, e.g. involving the concealment or deformation of graphic data such as designs, written or printed messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding

Definitions

  • the present invention relates to the field of two-dimensional code encryption technology, and in particular, to a two-dimensional code mask encryption and decryption method and system.
  • the Chinese invention patent of CN102243714B discloses a two-dimensional code encryption system, which comprises a user terminal device expressing a user ID through a first area of a two-dimensional code, and passing the user's password through a two-dimensional code.
  • the second area indicates; the client computer receives the two-dimensional code sent by the user terminal device, decodes the ID and password corresponding to the two-dimensional code, and sends the decoded ID and password to the management server; the management server checks the received ID. Whether the password is consistent with the data stored in the user database, and transmits the verification result to the client computer; the client computer receives the inspection result sent by the management server.
  • the attacker can regenerate or modify the data by intercepting the target two-dimensional code image and retaining the area where the user name and password are located, and the user name and password are Keeping with the original image, this server can't recognize the true and false, so it can't solve the anti-counterfeiting attack.
  • the Chinese invention patent with the nickname CN103401679B discloses a method for encrypting and decoding a two-dimensional code.
  • the two-dimensional code is encrypted and decoded by using a symmetric encryption method, wherein a two-dimensional code corresponds to an identifier, and a ciphertext composed of the identifier is added in front of or behind the encrypted original text information to generate a two-dimensional code. After the information is encrypted, the two-dimensional code is generated.
  • the two-dimensional code scan code can obtain the encrypted original text information and the ciphertext composed of the identifier.
  • the encryption method database has no protection measures. Once the encryption method database is leaked, the attacker can be very Convenient for attack.
  • the technical problem to be solved by the present invention is to provide a high-security two-dimensional code mask encryption and decryption method and system.
  • the two-dimensional code generating device generates a target two-dimensional code, an initial mask pattern, and a key including the function graphic and the identifier;
  • the two-dimensional code generating device sends the identifier and the key to the server;
  • the server receives the identifier and the key and stores it;
  • the two-dimensional code generating device encrypts the initial mask pattern using a key and embeds the target two-dimensional code to obtain the encrypted two-dimensional code;
  • the two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the function graphic and the identifier of the two-dimensional code.
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier
  • the server sends a key to the two-dimensional code decoding device according to the identifier
  • the two-dimensional code decoding device receives a key transmitted by the server
  • the two-dimensional code decoding device generates an initial mask pattern according to the function graphic and the identifier
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code based on the key and the initial mask pattern to obtain a target two-dimensional code.
  • the beneficial effects of the present invention are: pre-storing a generation rule of generating an initial mask pattern according to a function pattern of the two-dimensional code in the two-dimensional code generating device and the two-dimensional code decoding device, and encrypting the initial mask pattern with a key
  • an encryption rule for encrypting the target two-dimensional code by using the encrypted mask pattern marking the target two-dimensional code and key with the identifier, generating the initial mask pattern, encrypting the initial mask pattern with the key, and using
  • the encrypted mask pattern is encrypted in the two-dimensional code generating device and the two-dimensional code decoding device, and is transmitted between the two-dimensional code generating device and the server and between the two-dimensional code decoding device and the server. Only the logo and key are used, the security is high, and the burden on the peer server is small.
  • a two-dimensional code mask encryption and decryption method [0022] The two-dimensional code generating device generates a target two-dimensional code including an identifier, an initial mask pattern, and a key;
  • the two-dimensional code generating means transmits the identifier, the initial mask pattern and the key to the server;
  • the server receives the identifier, the initial mask graphic and the key and stores the key;
  • the two-dimensional code generating device encrypts the initial mask pattern using a key and embeds the target two-dimensional code to obtain the encrypted two-dimensional code;
  • the two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the identifier
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier
  • the server sends a key and an initial mask pattern to the two-dimensional code decoding device according to the identifier
  • the two-dimensional code decoding device receives the key and the initial mask pattern sent by the server;
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain a target two-dimensional code.
  • the present invention has the following advantages: in the two-dimensional code generating device and the two-dimensional code decoding device, pre-stores the encryption of the initial mask pattern with the key and the encryption of the target two-dimensional code with the encrypted mask pattern. Rules, using the identifier to mark the target two-dimensional code, the initial mask pattern, the key, encrypting the initial mask pattern with the key, and encrypting the target two-dimensional code with the encrypted mask pattern are generated in the two-dimensional code The device and the two-dimensional code decoding device are internally performed, and only the identification, the initial mask pattern, and the key are transmitted between the two-dimensional code generating device and the server and between the two-dimensional code decoding device and the server, and the security is high.
  • a two-dimensional code mask encryption and decryption system comprising a two-dimensional code generating device, a two-dimensional code decoding device and a server, the two-dimensional code generating device comprising a first generating module, a first transmitting module, and an encryption module And the embedding module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, a second generating module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending Module
  • a first generation module configured to generate a target two-dimensional code including the function graphic and the identifier by the two-dimensional code generating device
  • a first sending module configured to send the identifier and the key to the server by the two-dimensional code generating device
  • a first receiving module configured to receive, by the server, the identifier and the key, and store the identifier
  • an encryption module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code
  • an obtaining module configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and decode the function graphic and the identifier of the two-dimensional code
  • a second sending module configured to send, by the two-dimensional code decoding device, the identifier to the server
  • a second receiving module configured to receive, by the server, the identifier
  • a third sending module configured to send, by the server, the key to the two-dimensional code decoding device according to the two-dimensional code function graphic information and the identifier;
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key sent by the server
  • a second generation module configured to generate, by the two-dimensional code decoding device, an initial mask pattern according to the function graphic and the identifier
  • the decryption module is configured to: the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain the target two-dimensional code.
  • the beneficial effects of the present invention are: the two-dimensional code generating device sends the identifier and the key to the server, the two-dimensional code decoding device sends an identifier to the server, and the server sends the key to the two-dimensional code decoding device according to the identifier,
  • the generation, encryption, and encryption of the initial mask pattern are performed inside the two-dimensional code generating device and the two-dimensional code decoding device, and are transmitted between the two-dimensional code generating device, the server, and the two-dimensional code decoding device. Only the identification and the key are high in security, and the burden on the peer server is small.
  • the target two-dimensional code corresponding to each of the identifiers may be unique, or may be batch, and is convenient to use.
  • a two-dimensional code mask encryption and decryption system comprising a two-dimensional code generating device, a two-dimensional code decoding device and a server, the two-dimensional code generating device comprising a generating module, a first transmitting module, an encryption module, and an embedding
  • the module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending module;
  • a generating module configured to generate, by the two-dimensional code generating device, the target two-dimensional code including the identifier, the initial mask graphic, and the key;
  • a first sending module configured to send, by the two-dimensional code generating device, the identifier, the initial mask graphic, and the key to the server;
  • an encryption module configured to: the two-dimensional code generating device encrypts the initial mask pattern by using a key;
  • an embedding module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code;
  • an obtaining module configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and obtain the identifier
  • a second sending module configured to send the identifier to the server by the two-dimensional code decoding device
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key and an initial mask pattern sent by the server;
  • a decrypting module configured to encrypt the two-dimensional code decoding device according to the key and the initial mask pattern The second two-dimensional code is decrypted to obtain the target two-dimensional code;
  • a first receiving module configured to receive, by the server, the identifier, the initial mask graphic, and the key, and store the same
  • a second receiving module configured to receive the identifier by the server
  • the third sending module is configured to send, by the server, the key and the initial mask pattern to the two-dimensional code decoding device according to the identifier.
  • the beneficial effects of the present invention are: the two-dimensional code generating device sends the identifier, the initial mask pattern and the key to the server, the two-dimensional code decoding device sends an identifier to the server, and the server sends the initial mask pattern according to the identifier and
  • the key is given to the two-dimensional code decoding device, and the encryption of the initial mask pattern and the encryption of the target two-dimensional code are performed inside the two-dimensional code generating device and the two-dimensional code decoding device, and the two-dimensional code generating device, the server and the second Only the identification, the initial mask pattern and the key are transmitted between the dimension code decoding devices, and the security is high.
  • the target two-dimensional code corresponding to each of the identifiers may be unique or batch, and the drawing is convenient.
  • FIG. 1 is a flowchart of a two-dimensional code mask encryption method according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of a two-dimensional code mask encryption method according to Embodiment 2 of the present invention.
  • the most critical idea of the present invention is that only the identification and the key, or the initial mask pattern, transmitted between the two-dimensional code generating device, the server, and the two-dimensional code decoding device are high in security.
  • a specific embodiment of the invention is:
  • the two-dimensional code generating device generates a target two-dimensional code, an initial mask pattern, and a key including the function graphic and the identifier;
  • the two-dimensional code generating device transmits the identifier and the key to the server;
  • the server receives the identifier and the key and stores it;
  • the two-dimensional code generating device encrypts the initial mask pattern using a key and embeds the target two-dimensional code to obtain the encrypted two-dimensional code;
  • the two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the function graphic and the identifier of the two-dimensional code.
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier
  • the server sends a key to the two-dimensional code decoding device according to the identifier
  • the two-dimensional code decoding device receives the key transmitted by the server
  • the two-dimensional code decoding device generates an initial mask pattern according to the function pattern and the identifier
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain the target two-dimensional code.
  • the two-dimensional code generating device generates a target two-dimensional code including an identifier, an initial mask pattern, and a key;
  • the two-dimensional code generating device transmits the identifier, the initial mask pattern, and the key to the server;
  • the server receives the identifier, the initial mask graphic and the key and stores the key;
  • the two-dimensional code generating device encrypts the initial mask pattern using a key and embeds the target two-dimensional code to obtain the encrypted two-dimensional code; [0084] The two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the obtained identifier;
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier
  • the server transmits a key and an initial mask pattern to the two-dimensional code decoding device according to the identifier
  • the two-dimensional code decoding device receives the key and the initial mask pattern sent by the server;
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain the target two-dimensional code.
  • the method further includes establishing a secure channel between the two-dimensional code generating device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and sends the public key pair to the two-dimensional code generating device;
  • the two-dimensional code generating device receives the public key pair
  • the two-dimensional code generating device encrypts the identity ID and the work key with a public key pair and sends the same to the server;
  • the server receives the encrypted identity ID and work key
  • the server decrypts the encrypted identity ID and the work key with a private key pair to obtain an identity ID and a work key.
  • a secure channel is established between the two-dimensional code generating device and the server by a pair of public key pairs, a pair of private key pairs, and a work key, and the identity transmitted between the two-dimensional code generating device and the server
  • the ID and the work key are encrypted with a public key pair, and the decrypted identity ID and work key are decrypted to require a private key pair, so even if the attacker intercepts the encrypted identity ID and work key And knowing the public key, it is also difficult to decrypt the encrypted identity ID and work key, and the security is high.
  • the method further includes establishing a secure channel between the two-dimensional code decoding device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and transmits the public key pair to the two-dimensional code decoding device;
  • the two-dimensional code decoding device receives the public key pair
  • the two-dimensional code decoding device encrypts the identity ID and the work key with a public key pair and sends the same to the server;
  • the server receives the encrypted identity ID and work key
  • the server decrypts the encrypted identity ID and the work key with a private key pair to obtain an identity ID and a work key. [0105] wherein the work key is used to encrypt and decrypt the data transmission between the two-dimensional code decoding device and the server
  • a secure channel is established between the two-dimensional code decoding device and the server by a pair of public key pairs, a pair of private key pairs, and a work key, and the identity transmitted between the two-dimensional code decoding device and the server
  • the ID and the work key are encrypted with a public key pair, and the decrypted identity ID and work key are decrypted to require a private key pair, so even if the attacker intercepts the encrypted identity ID and work key And knowing the public key, it is also difficult to decrypt the encrypted identity ID and work key, and the security is high.
  • the two-dimensional code generating device encrypts the initial mask pattern by using a key, and then embeds the target two-dimensional code to obtain the encrypted two-dimensional code, which is specifically:
  • the two-dimensional code generating device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern
  • the two-dimensional code generating device performs an exclusive-OR operation on the encrypted mask pattern and the target two-dimensional code to obtain an encrypted two-dimensional code
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain a target two-dimensional code, which is specifically:
  • the two-dimensional code decoding device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern
  • the two-dimensional code decoding device performs an exclusive-OR operation on the encrypted mask pattern and the encrypted two-dimensional code to obtain a target two-dimensional code.
  • the two-dimensional code generating device encrypts the initial mask pattern with a key and then obtains the encrypted two-dimensional code by an exclusive OR operation with the target two-dimensional code, and the key pair of the two-dimensional code decoding device
  • the initial mask pattern is encrypted and then the target two-dimensional code is obtained by an exclusive OR operation with the encrypted two-dimensional code.
  • the encryption and decryption process of the target two-dimensional code is the same operation process, as long as the two-dimensional code generating device and the two-dimensional code are decoded.
  • the protocol for storing the encryption rules in the device can realize the successful encryption and decryption of the two-dimensional code.
  • the initial mask pattern is consistent with the size of the target two-dimensional code, and the area corresponding to the functional pattern of the target two-dimensional code on the mask pattern is set to a light color
  • Functional graphics include position detection graphics, position detection graphics separators, positioning graphics, correction graphics, auxiliary correction graphics, identification graphics,
  • the two-dimensional code generating device encrypts the initial mask pattern using a key, specifically: [0116] sequentially skipping the area of the mask pattern corresponding to the function pattern of the target two-dimensional code, extracting bit data of the initial mask pattern to form an initial data string, and recording the position and number of the skipped area;
  • the encrypted data string and the functional area are sequentially spliced according to the position and the number of the skipped areas to form an encrypted mask pattern.
  • the initial mask pattern is used as the encrypted image of the target two-dimensional code, which is consistent with the target two-dimensional code size and avoids the functional graphics on the target two-dimensional code, and has a reasonable structure setting, which is convenient for the target two-dimensional code and Identification, positioning and correction of the encrypted two-dimensional code;
  • To encrypt the initial mask pattern it is necessary to skip the area corresponding to the function pattern of the target two-dimensional code, avoiding the positioning pattern, correction pattern, and auxiliary correction of the target two-dimensional code.
  • the graphic and the identification graphic are encrypted to cause the target two-dimensional code to be unrecognizable, and the method is reasonable, and is convenient for the identification, positioning and correction of the target two-dimensional code.
  • the method further includes: presetting a threshold of the time, recording the key in the storage time in the server, if the storage time exceeds the threshold, the server does not send the key to the second Dimension code decoding device.
  • the threshold value is preset in the server. If the storage time of the key exceeds the threshold, the key has expired, and the target two-dimensional code has expired, the server does not The key is sent to the two-dimensional code decoding device, and the two-dimensional code decoding device cannot decrypt the encrypted two-dimensional code.
  • the method is reasonable, and is convenient for setting the validity period of the target two-dimensional code, and is convenient to use.
  • the first embodiment of the present invention is:
  • a secure channel is established between the two-dimensional code generating device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and transmits the public key pair to the two-dimensional code generating device;
  • the two-dimensional code generating device receives the public key pair
  • the two-dimensional code generating device encrypts the identity ID and the work key with a public key pair and sends the same to the server;
  • the server receives the encrypted identity ID and work key
  • the server decrypts the encrypted identity ID and the work key with the private key pair to obtain the identity ID and the work key.
  • the two-dimensional code generating device generates the target two-dimensional code including the function graphic and the identifier, and the initial mask.
  • the two-dimensional code generating device transmits the identifier and the key to the server;
  • the server receives the identifier and the key and stores it;
  • the two-dimensional code generating device encrypts the initial mask pattern by using a key, and then embeds the target two-dimensional code to obtain the encrypted two-dimensional code, which is specifically:
  • the two-dimensional code generating device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern
  • the two-dimensional code generating device performs an exclusive-OR operation on the encrypted mask pattern and the target two-dimensional code to obtain an encrypted two-dimensional code
  • a secure channel is established between the two-dimensional code decoding device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and transmits the public key pair to the two-dimensional code decoding device;
  • the two-dimensional code decoding device receives the public key pair
  • the two-dimensional code decoding device encrypts the identity ID and the work key with a public key pair and sends the same to the server;
  • the server receives the encrypted identity ID and work key
  • the server decrypts the encrypted identity ID and the work key with a private key pair to obtain an identity ID and a work key.
  • the two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the function graphic and the identifier
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier
  • the server sends a key to the two-dimensional code decoding device according to the identifier
  • the two-dimensional code decoding device receives a key transmitted by the server
  • the two-dimensional code decoding device generates an initial mask pattern according to the function pattern and the identifier
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain a target two-dimensional code, which is specifically:
  • the two-dimensional code decoding device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern
  • the two-dimensional code decoding device performs an exclusive-OR operation on the encrypted mask pattern and the encrypted two-dimensional code to obtain a target two-dimensional code.
  • the second embodiment of the present invention is: [0154] A two-dimensional code mask encryption and decryption method
  • a secure channel is established between the two-dimensional code generating device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and sends the public key pair to the two-dimensional code generating device;
  • the two-dimensional code generating device receives the public key pair
  • the two-dimensional code generating device encrypts the identity ID and the work key with a public key pair and sends the same to the server;
  • the server receives the encrypted identity ID and work key
  • the server decrypts the encrypted identity ID and the work key with the private key pair to obtain the identity ID and the work key.
  • the two-dimensional code generating device generates a target two-dimensional code including an identifier, an initial mask pattern, and a key, wherein the initial mask pattern is consistent with the target two-dimensional code size, and the target two-dimensional image is on the mask pattern
  • the corresponding areas of the function graphics of the code are set to a light color, and the function graphics of the target two-dimensional code include a position detection pattern, a position detection pattern separator, a positioning pattern, a correction pattern, an auxiliary correction pattern, and an identification pattern;
  • the two-dimensional code generating device transmits the identifier, the initial mask pattern, and the key to the server;
  • the server receives the identifier, the initial mask graphic and the key and stores the key;
  • the two-dimensional code generating device encrypts the initial mask pattern by using a key and embeds the target two-dimensional code to obtain the encrypted two-dimensional code, which is specifically:
  • the two-dimensional code generating device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern:
  • the two-dimensional code generating device performs an exclusive-OR operation on the encrypted mask pattern and the target two-dimensional code to obtain an encrypted two-dimensional code
  • a secure channel is established between the two-dimensional code decoding device and the server, specifically:
  • the server generates a pair of public key pairs and a pair of private key pairs and transmits the public key pair to the two-dimensional code decoding device;
  • the two-dimensional code decoding device receives the public key pair
  • the two-dimensional code decoding device encrypts the identity ID and the work key with a public key pair and sends the same to the server; [0174] The server receives the encrypted identity ID and work key;
  • the server decrypts the encrypted identity ID and work key with a private key pair to obtain an identity ID and a work key.
  • the two-dimensional code decoding device acquires the encrypted two-dimensional code and decodes the identifier
  • the two-dimensional code decoding device transmits the identifier to the server
  • the server receives the identifier according to the identifier
  • the server presets the inter-turn threshold, and records the key in the storage time in the server. If the storage time exceeds the inter-turn threshold, the server does not send the key to the two-dimensional code decoding device. And if the storage time does not exceed the inter-turn threshold, the server sends the key and the initial mask pattern to the two-dimensional code decoding device according to the identifier;
  • the two-dimensional code decoding device receives the key and the initial mask pattern sent by the server;
  • the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain a target two-dimensional code, which is specifically:
  • the two-dimensional code decoding device encrypts the initial mask pattern using a key to obtain an encrypted mask pattern:
  • the two-dimensional code decoding device performs an exclusive-OR operation on the encrypted mask pattern and the encrypted two-dimensional code to obtain a target two-dimensional code.
  • a two-dimensional code mask encryption and decryption system includes a two-dimensional code generating device, a two-dimensional code decoding device, and a server, and the two-dimensional code generating device includes a first generating module, a first transmitting module, and an encryption module.
  • the embedding module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, a second generating module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending Module
  • a first generation module configured to generate a target two-dimensional code including the function graphic and the identifier by the two-dimensional code generating device , initial mask pattern, key;
  • the first sending module is configured to send, by the two-dimensional code generating device, the identifier and the key to the server;
  • a first receiving module configured to receive, by the server, the identifier and the key, and store the identifier
  • an encryption module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code;
  • an obtaining module configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and decode the function graphic and the identifier of the two-dimensional code
  • a second sending module configured to send, by the two-dimensional code decoding device, the identifier to the server
  • a second receiving module configured to receive, by the server, the identifier
  • a third sending module configured to send, by the server, the key to the two-dimensional code decoding device according to the identifier
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key sent by the server
  • a second generation module configured to generate, by the two-dimensional code decoding device, an initial mask pattern according to the function graphic and the identifier
  • a decryption module configured to: the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain the target two-dimensional code.
  • Embodiment 3 of the present invention is:
  • a two-dimensional code mask encryption and decryption system comprising a two-dimensional code generating device, a two-dimensional code decoding device and a server, the two-dimensional code generating device comprising a first generating module, a first transmitting module, and an encryption module And the embedding module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, a second generating module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending Module
  • a first generation module configured to generate a target two-dimensional code including the function graphic and the identifier by the two-dimensional code generating device
  • the first sending module is configured to send, by the two-dimensional code generating device, the identifier and the key to the server;
  • the first receiving module is configured to receive, by the server, the identifier and the key, and store the identifier;
  • an encryption module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code; [0207] an obtaining module, configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and decode the function graphic and the identifier of the two-dimensional code;
  • a second sending module configured to send, by the two-dimensional code decoding device, the identifier to the server
  • a second receiving module configured to receive, by the server, the identifier
  • a third sending module configured to send, by the server, the key to the two-dimensional code decoding device according to the identifier
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key sent by the server
  • a second generation module configured to generate, by the two-dimensional code decoding device, an initial mask pattern according to the function graphic and the identifier
  • the decryption module is configured to: the two-dimensional code decoding device decrypts the encrypted two-dimensional code according to the key and the initial mask pattern to obtain the target two-dimensional code.
  • a two-dimensional code mask encryption and decryption system comprising: a two-dimensional code generating device, a two-dimensional code decoding device, and a server, wherein the two-dimensional code generating device includes a generating module, a first transmitting module, an encryption module, and an embedding The module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending module;
  • a generating module configured to generate, by the two-dimensional code generating device, the target two-dimensional code including the identifier, the initial mask graphic, and the key;
  • a first sending module configured to send, by the two-dimensional code generating device, the identifier, the initial mask graphic, and the key to the server;
  • an encryption module configured to encrypt the initial mask pattern by using the key by the two-dimensional code generating device
  • an embedding module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code;
  • an obtaining module configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and obtain the identifier
  • a second sending module configured to send the identifier to the server by the two-dimensional code decoding device
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key and an initial mask pattern sent by the server;
  • a decrypting module configured by the two-dimensional code decoding device to encrypt according to the key and the initial mask pattern The second two-dimensional code is decrypted to obtain the target two-dimensional code;
  • a first receiving module configured to receive, by the server, the identifier, an initial mask graphic, and a key
  • a second receiving module configured to receive, by the server, the identifier
  • the third sending module is configured to send, by the server, the key and the initial mask pattern to the two-dimensional code decoding device according to the identifier.
  • Embodiment 4 of the present invention is:
  • a two-dimensional code mask encryption and decryption system comprising a two-dimensional code generating device, a two-dimensional code decoding device and a server, the two-dimensional code generating device comprising a generating module, a first transmitting module, an encryption module, and an embedding
  • the module, the two-dimensional code decoding device includes an acquiring module, a second sending module, a third receiving module, and a decrypting module, where the server includes a first receiving module, a second receiving module, and a third sending module;
  • a generating module configured to generate, by the two-dimensional code generating device, the target two-dimensional code including the identifier, the initial mask graphic, and the key;
  • a first sending module configured to send, by the two-dimensional code generating device, the identifier, the initial mask graphic, and the key to the server;
  • an encryption module configured to: the two-dimensional code generating device encrypts the initial mask pattern by using a key
  • an embedding module configured to: after the two-dimensional code generating device encrypts the initial mask pattern by using a key, embedding the target two-dimensional code to obtain the encrypted two-dimensional code;
  • an obtaining module configured to acquire the encrypted two-dimensional code by the two-dimensional code decoding device, and obtain the identifier
  • a second sending module configured to send the identifier to the server by the two-dimensional code decoding device
  • a third receiving module configured to receive, by the two-dimensional code decoding device, a key and an initial mask pattern sent by the server;
  • a decrypting module configured to encrypt the two-dimensional code decoding device according to the key and the initial mask pattern The second two-dimensional code is decrypted to obtain the target two-dimensional code;
  • a first receiving module configured to receive, by the server, the identifier, the initial mask graphic, and the key, and store the same
  • a second receiving module configured to receive, by the server, the identifier according to the identifier
  • the third sending module is configured to send, by the server, the key and the initial mask pattern to the two-dimensional code decoding device according to the identifier.
  • the two-dimensional code mask encryption method and system establish a secure channel between the two-dimensional code generating device and the server and the two-dimensional code decoding device and the server, thereby improving the system usage environment.
  • Security between the two-dimensional code generating device and the server and between the two-dimensional code decoding device and the server Only the identification, the key or the initial mask pattern is transmitted, the generation of the initial mask pattern and the encryption of the target two-dimensional code are performed in the two-dimensional code generating device, and the decrypted process of the encrypted two-dimensional code is in the two-dimensional code decoding device.
  • the two-dimensional code decoding device can also generate an initial mask pattern according to the two-dimensional code function graphic information, and has high security; the setting of the key validity of the key can be set in the server, and the use is convenient;
  • the target two-dimensional code, the key, the two-dimensional code function graphic information or the initial mask pattern is marked, and the target two-dimensional code corresponding to each of the identifiers may be unique, or may be batch, and the initial mask graphic is encrypted.
  • the area skips the area corresponding to the functional area of the target two-dimensional code, and facilitates the identification, positioning, and correction of the target two-dimensional code and the encrypted two-dimensional code.
  • the system has high security, small server burden, and convenient use.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Storage Device Security (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种二维码掩膜加密和解密方法及系统,所述方法为:二维码生成装置生成包含有标识的目标二维码、初始掩膜图形、密钥;二维码生成装置发送所述标识、初始掩膜图形和密钥至服务器;服务器接收到所述标识、初始掩膜图形和密钥并存储;二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的二维码;二维码解码装置获取加密后的二维码及标识;二维码解码装置将标识发送给服务器;服务器根据接收所述标识;服务器根据所述标识发送密钥和初始掩膜图形至二维码解码装置;二维码解码装置接收服务器发送的密钥和初始掩膜图形;二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维码。所述系统安全性高。

Description

说明书 发明名称:二维码掩膜加密和解密方法及系统 技术领域
[0001] 本发明涉及二维码加密技术领域, 特别涉及一种二维码掩膜加密和解密方法及 系统。
背景技术
[0002] 二维码应用越来越广泛, 但二维码给人们带来方便的同吋, 也逐渐出现了安全 隐患, 例如手机扫描二维码后话费被偷走等事件吋有发生。
[0003] 公幵号为 CN102243714B的中国发明专利公幵了一种二维码加密系统, 包括用 户终端设备将用户 ID通过二维码的第一区域表示, 将用户的密码通过二维码的 第二区域表示; 客户端计算机接收用户终端设备发送的二维码, 解码出该二维 码对应的 ID以及密码, 并将解码出的 ID以及密码发送至管理服务器; 管理服务 器检验所接收到的 ID、 密码与用户数据库中存储的数据是否一致, 将检验结果 传送至客户端计算机; 客户端计算机接收管理服务器发送的检验结果。 虽然在 二维码中指定区域添加了用户 ID及用户密码, 但攻击者可以通过截获目标二维 码图像, 并保留所述用户名和密码所在区域, 重新生成或修改数据, 是的用户 名与密码保持与原图像一致, 此吋服务器不能识别真假, 因此不能解决防伪攻 击。
[0004] 公幵号为 CN103401679B的中国发明专利公幵了一种二维码的加密与解码方法
, 采用对称加密的方式实现二维码的加密与解码, 其中一个二维码对应一个标 识, 在加密后的原文信息的前面或者后面加上标识组成的密文用于生成二维码 , 将原文信息加密后才生成二维码, 对二维码扫码可得到加密后的原文信息加 上标识组成的密文, 其加密方式数据库没有保护措施, 一旦加密方式数据库被 泄露, 则攻击者可以很方便进行攻击。
技术问题
[0005] 本发明所要解决的技术问题是: 提供一种安全性高的二维码掩膜加密和解密方 法及系统。 问题的解决方案
技术解决方案
[0006] 为了解决上述技术问题, 本发明采用的技术方案为:
[0007] 一种二维码掩膜加密和解密方法,
[0008] 二维码生成装置生成包含有功能图形和标识的目标二维码、 初始掩膜图形、 密 钥;
[0009] 二维码生成装置发送所述标识和密钥至服务器;
[0010] 服务器接收到所述标识和密钥并存储;
[0011] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码;
[0012] 二维码解码装置获取加密后的二维码并解码得到所述二维码的功能图形及标识
[0013] 二维码解码装置将所述标识发送给服务器;
[0014] 服务器接收所述标识;
[0015] 服务器根据所述标识发送密钥至二维码解码装置;
[0016] 二维码解码装置接收服务器发送的密钥;
[0017] 二维码解码装置根据所述功能图形及标识生成初始掩膜图形;
[0018] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码。
[0019] 本发明的有益效果在于: 在二维码生成装置和二维码解码装置中预存储根据二 维码的功能图形生成初始掩膜图形的生成规则、 用密钥对初始掩膜图形加密以 及用加密后的掩膜图形对目标二维码加密的加密规则, 用标识来对目标二维码 、 密钥进行标记, 初始掩膜图形的生成、 用密钥对初始掩膜图形加密以及用加 密后的掩膜图形对目标二维码加密均在二维码生成装置和二维码解码装置内部 进行, 在二维码生成装置与服务器之间以及在二维码解码装置与服务器之间传 送的只有标识和密钥, 安全性高, 同吋服务器的负担小。
[0020]
[0021] 一种二维码掩膜加密和解密方法: [0022] 二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形、 密钥;
[0023] 二维码生成装置发送所述标识、 初始掩膜图形和密钥至服务器;
[0024] 服务器接收到所述标识、 初始掩膜图形和密钥并存储;
[0025] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码;
[0026] 二维码解码装置获取加密后的二维码并解码得到所述标识;
[0027] 二维码解码装置将标识发送给服务器;
[0028] 服务器接收所述标识;
[0029] 服务器根据所述标识发送密钥和初始掩膜图形至二维码解码装置;
[0030] 二维码解码装置接收服务器发送的密钥和初始掩膜图形;
[0031] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码。
[0032] 本发明的有益效果在于: 在二维码生成装置和二维码解码装置中预存储用密钥 对初始掩膜图形加密以及用加密后的掩膜图形对目标二维码加密的加密规则, 用标识来对目标二维码、 初始掩膜图形、 密钥进行标记, 用密钥对初始掩膜图 形加密以及用加密后的掩膜图形对目标二维码加密均在二维码生成装置和二维 码解码装置内部进行, 在二维码生成装置与服务器之间以及在二维码解码装置 与服务器之间传送的只有标识、 初始掩膜图形和密钥, 安全性高。
[0033]
[0034] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括第一生成模块、 第一发送模块、 加密模块、 嵌 入模块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 第二生成模块、 解密模块, 所述服务器包括第一接收模块、 第二接收模块、 第 三发送模块;
[0035] 第一生成模块, 用于二维码生成装置生成包含有功能图形和标识的目标二维码
、 初始掩膜图形、 密钥;
[0036] 第一发送模块, 用于二维码生成装置发送所述标识和密钥至服务器;
[0037] 第一接收模块, 用于服务器接收到所述标识和密钥并存储; [0038] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码;
[0039] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述二维码的 功能图形及标识;
[0040] 第二发送模块, 用于二维码解码装置将所述标识发送给服务器;
[0041] 第二接收模块, 用于服务器接收所述标识;
[0042] 第三发送模块, 用于服务器根据所述二维码功能图形信息及标识发送密钥至二 维码解码装置;
[0043] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥;
[0044] 第二生成模块, 用于二维码解码装置根据所述功能图形及标识生成初始掩膜图 形;
[0045] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码。
[0046] 本发明的有益效果在于: 二维码生成装置将标识和密钥发送给服务器, 二维码 解码装置向服务器发送标识, 服务器根据所述标识发送密钥给二维码解码装置 , 对初始掩膜图形的生成、 加密以及对目标二维码的加密均在二维码生成装置 和二维码解码装置内部进行, 在二维码生成装置、 服务器和二维码解码装置之 间传送的只有标识和密钥, 安全性高, 同吋服务器的负担小, 每个所述标识对 应的目标二维码可以是唯一的, 也可以是批量的, 使用便捷。
[0047]
[0048] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括生成模块、 第一发送模块、 加密模块、 嵌入模 块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 解密 模块, 所述服务器包括第一接收模块、 第二接收模块、 第三发送模块;
[0049] 生成模块, 用于二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形 、 密钥;
[0050] 第一发送模块, 用于二维码生成装置发送所述标识、 初始掩膜图形和密钥至服 务器; [0051] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密;
[0052] 嵌入模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码;
[0053] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述标识; [0054] 第二发送模块, 用于二维码解码装置将标识发送给服务器;
[0055] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥和初始掩膜图形; [0056] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码;
[0057] 第一接收模块, 用于服务器接收所述标识、 初始掩膜图形和密钥并存储; [0058] 第二接收模块, 用于服务器接收所述标识;
[0059] 第三发送模块, 用于服务器根据所述标识发送密钥和初始掩膜图形至二维码解 码装置。
发明的有益效果
有益效果
[0060] 本发明的有益效果在于: 二维码生成装置将标识、 初始掩膜图形和密钥发送给 服务器, 二维码解码装置向服务器发送标识, 服务器根据所述标识发送初始掩 膜图形和密钥给二维码解码装置, 对初始掩膜图形的加密以及对目标二维码的 加密均在二维码生成装置和二维码解码装置内部进行, 在二维码生成装置、 服 务器和二维码解码装置之间传送的只有标识、 初始掩膜图形和密钥, 安全性高 , 每个所述标识对应的目标二维码可以是唯一的, 也可以是批量的, 使用便捷 对附图的简要说明
附图说明
[0061] 图 1为本发明实施例一的二维码掩膜加密方法流程图;
[0062] 图 2为本发明实施例二的二维码掩膜加密方法流程图。
具体实施方式 [0063] 为详细说明本发明的技术内容、 所实现目的及效果, 以下结合实施方式并配合 附图予以说明。
[0064] 本发明最关键的构思在于: 在二维码生成装置、 服务器和二维码解码装置之间 传送的只有标识和密钥, 或者初始掩膜图形, 安全性高。
[0065] 本发明的具体实施方式为:
[0066] 请参照图 1, 一种二维码掩膜加密和解密方法,
[0067] 二维码生成装置生成包含有功能图形和标识的目标二维码、 初始掩膜图形、 密 钥;
[0068] 二维码生成装置发送所述标识和密钥至服务器;
[0069] 服务器接收到所述标识和密钥并存储;
[0070] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码;
[0071] 二维码解码装置获取加密后的二维码并解码得到所述二维码的功能图形及标识
[0072] 二维码解码装置将所述标识发送给服务器;
[0073] 服务器接收所述标识;
[0074] 服务器根据所述标识发送密钥至二维码解码装置;
[0075] 二维码解码装置接收服务器发送的密钥;
[0076] 二维码解码装置根据所述功能图形及标识生成初始掩膜图形;
[0077] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码。
[0078]
[0079] 请参照图 2, 一种二维码掩膜加密和解密方法:
[0080] 二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形、 密钥;
[0081] 二维码生成装置发送所述标识、 初始掩膜图形和密钥至服务器;
[0082] 服务器接收到所述标识、 初始掩膜图形和密钥并存储;
[0083] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码; [0084] 二维码解码装置获取加密后的二维码并解码得到所述标识;
[0085] 二维码解码装置将标识发送给服务器;
[0086] 服务器接收所述标识;
[0087] 服务器根据所述标识发送密钥和初始掩膜图形至二维码解码装置;
[0088] 二维码解码装置接收服务器发送的密钥和初始掩膜图形;
[0089] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码。
[0090]
[0091] 进一步的, 还包括二维码生成装置与服务器之间建立安全通道, 具体为:
[0092] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码生成装置;
[0093] 二维码生成装置接收到公钥对;
[0094] 二维码生成装置用公钥对对身份 ID和工作密钥加密后发送至服务器;
[0095] 服务器接收到加密后的身份 ID和工作密钥;
[0096] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥
[0097] 其中工作密钥用于对二维码生成装置与服务器之间的数据传输进行加密、 解密
, 形成安全通道。
[0098] 由上述描述可知, 通过一对公钥对、 一对私钥对和工作密钥在二维码生成装置 与服务器之间建立安全通道, 二维码生成装置与服务器之间传送的身份 ID和工 作密钥是用公钥对进行加密的, 而加密后的身份 ID和工作密钥的解密是需要私 钥对才可以的, 因此, 即使攻击者截获加密后的身份 ID和工作密钥并且知道公 钥, 也很难对加密后的身份 ID和工作密钥进行解密, 安全性高。
[0099] 进一步的, 还包括二维码解码装置与服务器之间建立安全通道, 具体为:
[0100] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码解码装置;
[0101] 二维码解码装置接收到公钥对;
[0102] 二维码解码装置用公钥对对身份 ID和工作密钥加密后发送至服务器;
[0103] 服务器接收到加密后的身份 ID和工作密钥;
[0104] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥 [0105] 其中工作密钥用于对二维码解码装置与服务器之间的数据传输进行加密、 解密
, 形成安全通道。
[0106] 由上述描述可知, 通过一对公钥对、 一对私钥对和工作密钥在二维码解码装置 与服务器之间建立安全通道, 二维码解码装置与服务器之间传送的身份 ID和工 作密钥是用公钥对进行加密的, 而加密后的身份 ID和工作密钥的解密是需要私 钥对才可以的, 因此, 即使攻击者截获加密后的身份 ID和工作密钥并且知道公 钥, 也很难对加密后的身份 ID和工作密钥进行解密, 安全性高。
[0107] 进一步的, 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得 到加密后的二维码, 具体为:
[0108] 二维码生成装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形;
[0109] 二维码生成装置将加密后的掩膜图形与目标二维码进行异或运算得到加密后的 二维码;
[0110] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码, 具体为:
[0111] 二维码解码装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形;
[0112] 二维码解码装置将加密后的掩膜图形与加密后的二维码进行异或运算得到目标 二维码。
[0113] 由上述描述可知, 二维码生成装置用密钥对初始掩膜图形加密然后通过与目标 二维码的异或运算得到加密后的二维码, 二维码解码装置用密钥对初始掩膜图 形加密然后通过与加密后的二维码的异或运算得到目标二维码, 目标二维码的 加密和解密过程是相同的运算过程, 只要二维码生成装置与二维码解码装置中 存储加密规则的协议, 即可实现二维码的成功加密和解密。
[0114] 进一步的, 所述初始掩膜图形与目标二维码大小一致, 且在掩膜图形上与目标 二维码的功能图形相对应的区域均设置为浅色, 所述目标二维码的功能图形包 括位置探测图形、 位置探测图形分隔符、 定位图形、 校正图形、 辅助校正图形 、 标识图形,
[0115] 二维码生成装置使用密钥对初始掩膜图形加密, 具体为: [0116] 按序跳过掩膜图形上与目标二维码的功能图形相对应的区域将初始掩膜图形的 比特数据提取出来组成初始数据串, 并记录跳过的区域的位置和数量;
[0117] 使用密钥对初始数据串进行加密运算得到加密后的数据串;
[0118] 根据跳过的区域的位置和数量按序将加密后的数据串与功能区域拼接起来组成 加密后的掩膜图形。
[0119] 由上述描述可知, 初始掩膜图形作为目标二维码的加密图形, 与目标二维码大 小一致且避幵目标二维码上的功能图形, 结构设置合理, 方便目标二维码与加 密后的二维码的识别、 定位和校正; 对初始掩膜图形进行加密吋需要跳过目标 二维码的功能图形所对应的区域, 避免目标二维码的定位图形、 校正图形、 辅 助校正图形及标识图形被加密引起无法识别目标二维码, 所述方法合理, 便于 目标二维码的识别、 定位和校正。
[0120] 进一步的, 还包括: 预设吋间阀值, 记录所述密钥在服务器中的存储吋间, 若 所述存储吋间超过吋间阀值, 则服务器不将密钥发送给二维码解码装置。
[0121] 由上述描述可知, 在服务器中预设吋间阀值, 若密钥的存储吋间超过吋间阀值 , 则说明密钥已过期, 所述目标二维码已经失效, 则服务器不将密钥发送给二 维码解码装置, 二维码解码装置不能对加密后的二维码进行解密, 所述方法合 理, 便于对目标二维码的有效期进行设定, 使用便捷。
[0122]
[0123] 请参照图 1, 本发明的实施例一为:
[0124] 一种二维码掩膜加密和解密方法,
[0125] 二维码生成装置与服务器之间建立安全通道, 具体为:
[0126] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码生成装置;
[0127] 二维码生成装置接收到公钥对;
[0128] 二维码生成装置用公钥对对身份 ID和工作密钥加密后发送至服务器;
[0129] 服务器接收到加密后的身份 ID和工作密钥;
[0130] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥 [0131] 二维码生成装置生成包含有功能图形和标识的目标二维码、 初始掩膜图形、 密 钥;
[0132] 二维码生成装置发送所述标识和密钥至服务器;
[0133] 服务器接收到所述标识和密钥并存储;
[0134] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码, 具体为:
[0135] 二维码生成装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形;
[0136] 二维码生成装置将加密后的掩膜图形与目标二维码进行异或运算得到加密后的 二维码;
[0137] 二维码解码装置与服务器之间建立安全通道, 具体为:
[0138] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码解码装置;
[0139] 二维码解码装置接收到公钥对;
[0140] 二维码解码装置用公钥对对身份 ID和工作密钥加密后发送至服务器;
[0141] 服务器接收到加密后的身份 ID和工作密钥;
[0142] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥
[0143] 二维码解码装置获取加密后的二维码并解码得到所述功能图形及标识;
[0144] 二维码解码装置将所述标识发送给服务器;
[0145] 服务器接收所述标识;
[0146] 服务器根据所述标识发送密钥至二维码解码装置;
[0147] 二维码解码装置接收服务器发送的密钥;
[0148] 二维码解码装置根据所述功能图形及标识生成初始掩膜图形;
[0149] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码, 具体为:
[0150] 二维码解码装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形;
[0151] 二维码解码装置将加密后的掩膜图形与加密后的二维码进行异或运算得到目标 二维码。
[0152]
[0153] 请参照图 2, 本发明的实施例二为: [0154] 一种二维码掩膜加密和解密方法,
[0155] 二维码生成装置与服务器之间建立安全通道, 具体为:
[0156] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码生成装置;
[0157] 二维码生成装置接收到公钥对;
[0158] 二维码生成装置用公钥对对身份 ID和工作密钥加密后发送至服务器;
[0159] 服务器接收到加密后的身份 ID和工作密钥;
[0160] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥
[0161] 二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形、 密钥, 所述初 始掩膜图形与目标二维码大小一致, 且在掩膜图形上与目标二维码的功能图形 相对应的区域均设置为浅色, 所述目标二维码的功能图形包括位置探测图形、 位置探测图形分隔符、 定位图形、 校正图形、 辅助校正图形、 标识图形;
[0162] 二维码生成装置发送所述标识、 初始掩膜图形和密钥至服务器;
[0163] 服务器接收到所述标识、 初始掩膜图形和密钥并存储;
[0164] 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到加密后的 二维码, 具体为:
[0165] 二维码生成装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形:
[0166] 按序跳过掩膜图形上与目标二维码的功能图形相对应的区域将初始掩膜图形的 比特数据提取出来组成初始数据串, 并记录跳过的区域的位置和数量;
[0167] 使用密钥对初始数据串进行加密运算得到加密后的数据串;
[0168] 根据跳过的区域的位置和数量按序将加密后的数据串与功能区域拼接起来组成 加密后的掩膜图形;
[0169] 二维码生成装置将加密后的掩膜图形与目标二维码进行异或运算得到加密后的 二维码;
[0170] 二维码解码装置与服务器之间建立安全通道, 具体为:
[0171] 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码解码装置;
[0172] 二维码解码装置接收到公钥对;
[0173] 二维码解码装置用公钥对对身份 ID和工作密钥加密后发送至服务器; [0174] 服务器接收到加密后的身份 ID和工作密钥;
[0175] 服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID和工作密钥
[0176] 二维码解码装置获取加密后的二维码并解码得到所述标识;
[0177] 二维码解码装置将标识发送给服务器;
[0178] 服务器根据接收所述标识;
[0179] 服务器中预设吋间阀值, 记录所述密钥在服务器中的存储吋间, 若所述存储吋 间超过吋间阀值, 则服务器不将密钥发送给二维码解码装置; 若所述存储吋间 未超过吋间阀值, 服务器根据所述标识发送密钥和初始掩膜图形至二维码解码 装置;
[0180] 二维码解码装置接收服务器发送的密钥和初始掩膜图形;
[0181] 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到目标二维 码, 具体为:
[0182] 二维码解码装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形:
[0183] 按序跳过掩膜图形上与目标二维码的功能图形相对应的区域将初始掩膜图形的 比特数据提取出来组成初始数据串, 并记录跳过的区域的位置和数量;
[0184] 使用密钥对初始数据串进行加密运算得到加密后的数据串;
[0185] 根据跳过的区域的位置和数量按序将加密后的数据串与功能区域拼接起来组成 加密后的掩膜图形;
[0186] 二维码解码装置将加密后的掩膜图形与加密后的二维码进行异或运算得到目标 二维码。
[0187]
[0188] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括第一生成模块、 第一发送模块、 加密模块、 嵌 入模块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 第二生成模块、 解密模块, 所述服务器包括第一接收模块、 第二接收模块、 第 三发送模块;
[0189] 第一生成模块, 用于二维码生成装置生成包含有功能图形和标识的目标二维码 、 初始掩膜图形、 密钥;
[0190] 第一发送模块, 用于二维码生成装置发送所述标识和密钥至服务器;
[0191] 第一接收模块, 用于服务器接收到所述标识和密钥并存储;
[0192] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码;
[0193] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述二维码的 功能图形及标识;
[0194] 第二发送模块, 用于二维码解码装置将所述标识发送给服务器;
[0195] 第二接收模块, 用于服务器接收所述标识;
[0196] 第三发送模块, 用于服务器根据所述标识发送密钥至二维码解码装置;
[0197] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥;
[0198] 第二生成模块, 用于二维码解码装置根据所述功能图形及标识生成初始掩膜图 形;
[0199] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码。
[0200]
[0201] 本发明的实施例三为:
[0202] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括第一生成模块、 第一发送模块、 加密模块、 嵌 入模块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 第二生成模块、 解密模块, 所述服务器包括第一接收模块、 第二接收模块、 第 三发送模块;
[0203] 第一生成模块, 用于二维码生成装置生成包含有功能图形和标识的目标二维码
、 初始掩膜图形、 密钥;
[0204] 第一发送模块, 用于二维码生成装置发送所述标识和密钥至服务器;
[0205] 第一接收模块, 用于服务器接收到所述标识和密钥并存储;
[0206] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码; [0207] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述二维码的 功能图形及标识;
[0208] 第二发送模块, 用于二维码解码装置将所述标识发送给服务器;
[0209] 第二接收模块, 用于服务器接收所述标识;
[0210] 第三发送模块, 用于服务器根据所述标识发送密钥至二维码解码装置;
[0211] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥;
[0212] 第二生成模块, 用于二维码解码装置根据所述功能图形及标识生成初始掩膜图 形;
[0213] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码。
[0214]
[0215] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括生成模块、 第一发送模块、 加密模块、 嵌入模 块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 解密 模块, 所述服务器包括第一接收模块、 第二接收模块、 第三发送模块;
[0216] 生成模块, 用于二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形 、 密钥;
[0217] 第一发送模块, 用于二维码生成装置发送所述标识、 初始掩膜图形和密钥至服 务器;
[0218] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密;
[0219] 嵌入模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码;
[0220] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述标识; [0221] 第二发送模块, 用于二维码解码装置将标识发送给服务器;
[0222] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥和初始掩膜图形; [0223] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码;
[0224] 第一接收模块, 用于服务器接收所述标识、 初始掩膜图形和密钥并存储; [0225] 第二接收模块, 用于服务器接收所述标识;
[0226] 第三发送模块, 用于服务器根据所述标识发送密钥和初始掩膜图形至二维码解 码装置。
[0227] 本发明的实施例四为:
[0228] 一种二维码掩膜加密和解密系统, 包括二维码生成装置、 二维码解码装置和服 务器, 所述二维码生成装置包括生成模块、 第一发送模块、 加密模块、 嵌入模 块, 所述二维码解码装置包括获取模块、 第二发送模块、 第三接收模块、 解密 模块, 所述服务器包括第一接收模块、 第二接收模块、 第三发送模块;
[0229] 生成模块, 用于二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形 、 密钥;
[0230] 第一发送模块, 用于二维码生成装置发送所述标识、 初始掩膜图形和密钥至服 务器;
[0231] 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密;
[0232] 嵌入模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维 码得到加密后的二维码;
[0233] 获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述标识; [0234] 第二发送模块, 用于二维码解码装置将标识发送给服务器;
[0235] 第三接收模块, 用于二维码解码装置接收服务器发送的密钥和初始掩膜图形; [0236] 解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解 密得到目标二维码;
[0237] 第一接收模块, 用于服务器接收所述标识、 初始掩膜图形和密钥并存储; [0238] 第二接收模块, 用于服务器根据接收所述标识;
[0239] 第三发送模块, 用于服务器根据所述标识发送密钥和初始掩膜图形至二维码解 码装置。
[0240]
[0241] 综上所述, 本发明提供的二维码掩膜加密方法及系统, 在二维码生成装置与服 务器以及在二维码解码装置与服务器之间建立安全通道, 提高系统使用环境的 安全性; 在二维码生成装置与服务器之间以及在二维码解码装置与服务器之间 传送的只有标识、 密钥或者初始掩膜图形, 初始掩膜图形的生成及目标二维码 的加密在二维码生成装置中进行, 加密后的二维码的解密过程在二维码解码装 置中进行, 二维码解码装置也可根据二维码功能图形信息生成初始掩膜图形, 安全性高; 在服务器中可对密钥的吋间有效性进行设定, 使用便捷; 用标识来 对目标二维码、 密钥、 二维码功能图形信息或者初始掩膜图形进行标记, 每个 所述标识对应的目标二维码可以是唯一的, 也可以是批量的, 初始掩膜图形的 加密区域跳过目标二维码的功能区域对应的区域, 方便目标二维码及加密后的 二维码的识别、 定位及校正, 所述系统安全性高, 服务器的负担小, 使用便捷

Claims

权利要求书
[权利要求 1] 一种二维码掩膜加密和解密方法, 其特征在于,
二维码生成装置生成包含有功能图形和标识的目标二维码、 初始掩膜 图形、 密钥;
二维码生成装置发送所述标识和密钥至服务器; 服务器接收到所述标识和密钥并存储;
二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到 加密后的二维码;
二维码解码装置获取加密后的二维码并解码得到所述二维码的功能图 形及标识;
二维码解码装置将所述标识发送给服务器;
服务器接收所述标识;
服务器根据所述标识发送密钥至二维码解码装置; 二维码解码装置接收服务器发送的密钥;
二维码解码装置根据所述功能图形及标识生成初始掩膜图形; 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到 目标二维码。
[权利要求 2] —种二维码掩膜加密和解密方法, 其特征在于,
二维码生成装置生成包含有标识的目标二维码、 初始掩膜图形、 密钥 二维码生成装置发送所述标识、 初始掩膜图形和密钥至服务器; 服务器接收到所述标识、 初始掩膜图形和密钥并存储;
二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到 加密后的二维码;
二维码解码装置获取加密后的二维码并解码得到所述标识; 二维码解码装置将标识发送给服务器;
服务器接收所述标识;
服务器根据所述标识发送密钥和初始掩膜图形至二维码解码装置; 二维码解码装置接收服务器发送的密钥和初始掩膜图形; 二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到 目标二维码。
[权利要求 3] 根据权利要求 1或 2所述的二维码掩膜加密和解密方法, 其特征在于, 还包括二维码生成装置与服务器之间建立安全通道, 具体为: 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码生成装 置;
二维码生成装置接收到公钥对;
二维码生成装置用公钥对对身份 ID和工作密钥加密后发送至服务器; 服务器接收到加密后的身份 ID和工作密钥;
服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID 和工作密钥。
[权利要求 4] 根据权利要求 1或 2所述的二维码掩膜加密和解密方法, 其特征在于, 还包括二维码解码装置与服务器之间建立安全通道, 具体为: 服务器生成一对公钥对和一对私钥对并将公钥对发送至二维码解码装 置;
二维码解码装置接收到公钥对;
二维码解码装置用公钥对对身份 ID和工作密钥加密后发送至服务器 服务器接收到加密后的身份 ID和工作密钥;
服务器用私钥对对加密后的身份 ID和工作密钥进行解密得到身份 ID 和工作密钥。
[权利要求 5] 根据权利要求 1或 2所述的二维码掩膜加密和解密方法, 其特征在于, 二维码生成装置使用密钥对初始掩膜图形加密后嵌入目标二维码得到 加密后的二维码, 具体为:
二维码生成装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形 二维码生成装置将加密后的掩膜图形与目标二维码进行异或运算得到 加密后的二维码;
二维码解码装置根据密钥和初始掩膜图形对加密后的二维码解密得到 目标二维码, 具体为:
二维码解码装置使用密钥对初始掩膜图形加密得到加密后的掩膜图形 二维码解码装置将加密后的掩膜图形与加密后的二维码进行异或运算 得到目标二维码。
[权利要求 6] 根据权利要求 1或 2所述的二维码掩膜加密和解密方法, 其特征在于, 所述初始掩膜图形与目标二维码大小一致, 且在掩膜图形上与目标二 维码的功能图形相对应的区域均设置为浅色, 所述目标二维码的功能 图形包括位置探测图形、 位置探测图形分隔符、 定位图形、 校正图形 、 辅助校正图形、 标识图形,
二维码生成装置使用密钥对初始掩膜图形加密, 具体为:
按序跳过掩膜图形上与目标二维码的功能图形相对应的区域将初始掩 膜图形的比特数据提取出来组成初始数据
串 , 并记录跳过的区域的位置和数 使用密钥对初始数据串 进行加密运 算得到加密后的数据串 ; 根据跳过的区域的位置和数量按序将加密后的数据 串 与功能区域拼接起来组成加密后 的掩膜图形。
[权利要求 7] 根据权利要求 1或 2所述的二维码掩膜加密和解密方法, 其特征在于, 还包括: 预设吋间阀值, 记录所述密钥在服务器中的存储吋间, 若所 述存储吋间超过吋间阀值, 则服务器不将密钥发送给二维码解码装置
[权利要求 8] —种二维码掩膜加密和解密系统, 其特征在于, 包括二维码生成装置
、 二维码解码装置和服务器, 所述二维码生成装置包括第一生成模块 、 第一发送模块、 加密模块、 嵌入模块, 所述二维码解码装置包括获 取模块、 第二发送模块、 第三接收模块、 第二生成模块、 解密模块, 所述服务器包括第一接收模块、 第二接收模块、 第三发送模块; 第一生成模块, 用于二维码生成装置生成包含有功能图形和标识的目 标二维码、 初始掩膜图形、 密钥;
第一发送模块, 用于二维码生成装置发送所述标识和密钥至服务器; 第一接收模块, 用于服务器接收到所述标识和密钥并存储; 加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入 目标二维码得到加密后的二维码;
获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述 二维码的功能图形及标识;
第二发送模块, 用于二维码解码装置将所述标识发送给服务器; 第二接收模块, 用于服务器接收所述标识;
第三发送模块, 用于服务器根据所述标识发送密钥至二维码解码装置 第三接收模块, 用于二维码解码装置接收服务器发送的密钥; 第二生成模块, 用于二维码解码装置根据所述功能图形及标识生成初 始掩膜图形;
解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的 二维码解密得到目标二维码。
[权利要求 9] 一种二维码掩膜加密和解密系统, 其特征在于, 包括二维码生成装置
、 二维码解码装置和服务器, 所述二维码生成装置包括生成模块、 第 一发送模块、 加密模块、 嵌入模块, 所述二维码解码装置包括获取模 块、 第二发送模块、 第三接收模块、 解密模块, 所述服务器包括第一 接收模块、 第二接收模块、 第三发送模块;
生成模块, 用于二维码生成装置生成包含有标识的目标二维码、 初始 掩膜图形、 密钥;
第一发送模块, 用于二维码生成装置发送所述标识、 初始掩膜图形和 密钥至服务器;
加密模块, 用于二维码生成装置使用密钥对初始掩膜图形加密; 嵌入模块, 用于二维码生成装置使用密钥对初始掩膜图形加密后嵌入 目标二维码得到加密后的二维码;
获取模块, 用于二维码解码装置获取加密后的二维码并解码得到所述 标识;
第二发送模块, 用于二维码解码装置将标识发送给服务器; 第三接收模块, 用于二维码解码装置接收服务器发送的密钥和初始掩 膜图形;
解密模块, 用于二维码解码装置根据密钥和初始掩膜图形对加密后的 二维码解密得到目标二维码;
第一接收模块, 用于服务器接收所述标识、 初始掩膜图形和密钥并存 储;
第二接收模块, 用于服务器接收所述标识;
第三发送模块, 用于服务器根据所述标识发送密钥和初始掩膜图形至 二维码解码装置。
PCT/CN2016/090999 2015-07-28 2016-07-22 二维码掩膜加密和解密方法及系统 WO2017016447A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
BR112018001696-9A BR112018001696A2 (pt) 2015-07-28 2016-07-22 método e sistema para criptografar e descriptografar máscara de código bidimensional
EP16829813.1A EP3309992A4 (en) 2015-07-28 2016-07-22 Two-dimensional code mask encryption and decryption method and system
US15/871,184 US10659220B2 (en) 2015-07-28 2018-01-15 Method and system for encrypting and decrypting two-dimensional code mask

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510449982.7 2015-07-28
CN201510449982.7A CN105007155B (zh) 2015-07-28 2015-07-28 二维码掩膜加密和解密方法及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/871,184 Continuation US10659220B2 (en) 2015-07-28 2018-01-15 Method and system for encrypting and decrypting two-dimensional code mask

Publications (1)

Publication Number Publication Date
WO2017016447A1 true WO2017016447A1 (zh) 2017-02-02

Family

ID=54379684

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/090999 WO2017016447A1 (zh) 2015-07-28 2016-07-22 二维码掩膜加密和解密方法及系统

Country Status (5)

Country Link
US (1) US10659220B2 (zh)
EP (1) EP3309992A4 (zh)
CN (1) CN105007155B (zh)
BR (1) BR112018001696A2 (zh)
WO (1) WO2017016447A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897112A (zh) * 2022-04-18 2022-08-12 上海美的茵信息技术有限公司 一种基于二维码方式的用于诊断设备的诊断数据传递方法、装置和计算机设备和存储介质
WO2024040474A1 (zh) * 2022-08-24 2024-02-29 京东方科技集团股份有限公司 加密图像水印处理方法及装置、显示设备

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007155B (zh) * 2015-07-28 2017-12-08 福建联迪商用设备有限公司 二维码掩膜加密和解密方法及系统
JP6035407B1 (ja) * 2015-11-20 2016-11-30 株式会社トッパンTdkレーベル 二次元コード生成方法、二次元コード生成装置、プログラム、二次元コード、二次元コード読み取り方法、二次元コード読み取り装置、及び、二次元コード管理システム
CN105701655A (zh) * 2016-03-02 2016-06-22 上海皇和信息科技有限公司 基于usb加密摄像头的扫码支付系统及方法
CN107294964B (zh) * 2017-06-16 2022-01-11 北京鼎九信息工程研究院有限公司 一种信息传输的方法
CN109886008A (zh) * 2017-12-06 2019-06-14 英业达科技有限公司 二维条码加密与解密方法
CN110414243B (zh) * 2018-04-26 2020-12-25 杭州海康威视数字技术股份有限公司 一种二维码加密方法、装置及二维码解密方法、装置
CN111625802B (zh) * 2019-02-27 2023-08-22 深圳光峰科技股份有限公司 在投影仪无连接互联网情况下的投影仪授权使用方法
CN111177763A (zh) * 2020-01-03 2020-05-19 玉溪市电子政务内网信息技术中心 一种文件多重加密的二维码电子加密解密管理系统及方法
CN111506884A (zh) * 2020-04-15 2020-08-07 腾讯科技(深圳)有限公司 用户邀请方法、装置、计算机设备及计算机可读存储介质
CN113542237A (zh) * 2021-06-29 2021-10-22 深圳市华百安智能技术有限公司 一种健康码识别验证系统及方法
CN113610206B (zh) * 2021-08-19 2023-10-13 北京印刷学院 一种二维码及其加解密方法
CN115001676B (zh) * 2022-06-02 2022-12-02 深圳市爱克信智能股份有限公司 一种二维码加密方法、解密方法、系统、终端及存储介质
CN115204340A (zh) * 2022-09-14 2022-10-18 北京紫光青藤微系统有限公司 用于生成二维码的方法、装置、电子设备及存储介质
CN115760136A (zh) * 2022-11-09 2023-03-07 佛山市郴通线束科技有限公司 一种汽车线束的真伪认证方法、装置、系统和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025778A (zh) * 2000-07-25 2007-08-29 有限会社信息安全 保密信息记录媒介、保护方法、保护存储方法及信息访问报警系统
CN101795336A (zh) * 2009-01-30 2010-08-04 夏普株式会社 图像生成、处理、读取、形成装置和图像生成、处理方法
CN104376356A (zh) * 2014-12-02 2015-02-25 合肥城市云数据中心有限公司 一种带有加密功能的二维码生成方法
CN104766003A (zh) * 2015-04-08 2015-07-08 福建联迪商用设备有限公司 一种以条码形式传递密码的方法及系统
CN105007155A (zh) * 2015-07-28 2015-10-28 福建联迪商用设备有限公司 二维码掩膜加密和解密方法及系统

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060284411A1 (en) * 2004-12-16 2006-12-21 Wu Judy W Digitally printed anti-copy document and processes and products therefor
US20100031014A1 (en) * 2006-12-06 2010-02-04 Shuji Senda Information concealing device, method, and program
JP5014013B2 (ja) * 2007-08-02 2012-08-29 株式会社リコー 画像処理装置
JP2012027558A (ja) 2010-07-20 2012-02-09 Realsoft Inc 2次元コードおよび該2次元コードを利用した個人認証システム
CN102118710A (zh) * 2011-03-08 2011-07-06 上海红松信息技术有限公司 手机终端之间数据传输系统及其传输方法
US9084005B2 (en) * 2011-10-26 2015-07-14 Cisco Technology, Inc. Two-dimensional barcode system
GB201222638D0 (en) * 2012-12-14 2013-01-30 Omarco Network Solutions Ltd Improvements relating to identifier authentication
US9412283B2 (en) * 2012-12-31 2016-08-09 Piyush Bhatnagar System, design and process for easy to use credentials management for online accounts using out-of-band authentication
CN103401679B (zh) 2013-07-18 2015-02-04 湖北荆楚网络科技股份有限公司 一种二维码的加密与解码方法
CN104717056A (zh) * 2013-12-11 2015-06-17 中国移动通信集团安徽有限公司 一种二维码加密、解密方法及加密、解密装置
CN104253694B (zh) * 2014-09-27 2018-03-27 杭州电子科技大学 一种用于网络数据传输的保密方法
US10397691B2 (en) * 2017-06-20 2019-08-27 Cubic Corporation Audio assisted dynamic barcode system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025778A (zh) * 2000-07-25 2007-08-29 有限会社信息安全 保密信息记录媒介、保护方法、保护存储方法及信息访问报警系统
CN101795336A (zh) * 2009-01-30 2010-08-04 夏普株式会社 图像生成、处理、读取、形成装置和图像生成、处理方法
CN104376356A (zh) * 2014-12-02 2015-02-25 合肥城市云数据中心有限公司 一种带有加密功能的二维码生成方法
CN104766003A (zh) * 2015-04-08 2015-07-08 福建联迪商用设备有限公司 一种以条码形式传递密码的方法及系统
CN105007155A (zh) * 2015-07-28 2015-10-28 福建联迪商用设备有限公司 二维码掩膜加密和解密方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3309992A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897112A (zh) * 2022-04-18 2022-08-12 上海美的茵信息技术有限公司 一种基于二维码方式的用于诊断设备的诊断数据传递方法、装置和计算机设备和存储介质
WO2024040474A1 (zh) * 2022-08-24 2024-02-29 京东方科技集团股份有限公司 加密图像水印处理方法及装置、显示设备

Also Published As

Publication number Publication date
CN105007155B (zh) 2017-12-08
EP3309992A4 (en) 2018-07-04
EP3309992A1 (en) 2018-04-18
BR112018001696A2 (pt) 2018-11-06
US20180152290A1 (en) 2018-05-31
US10659220B2 (en) 2020-05-19
CN105007155A (zh) 2015-10-28

Similar Documents

Publication Publication Date Title
WO2017016447A1 (zh) 二维码掩膜加密和解密方法及系统
KR101366243B1 (ko) 인증을 통한 데이터 전송 방법 및 그 장치
KR101874721B1 (ko) 신분 인증 시스템, 장치, 방법 및 신분 인증 요청 장치
EP3132368B1 (en) Method and apparatus of verifying usability of biological characteristic image
EP3476078B1 (en) Systems and methods for authenticating communications using a single message exchange and symmetric key
CN102664898A (zh) 一种基于指纹识别的加密传输方法、装置及系统
CN104243494B (zh) 一种数据处理方法
CN107294964B (zh) 一种信息传输的方法
CN106452750B (zh) 一种用于移动设备的量子加密通信方法
TW201409990A (zh) 利用指紋資訊認證的通信方法
CN103237010B (zh) 以加密方式提供数字内容的服务器端
CN101894232B (zh) 一种应用在身份鉴别中的安全输入法
CN105791258A (zh) 一种数据传输方法、终端及开放平台
CN108401494B (zh) 一种传输数据的方法及系统
CN103338106A (zh) 文件的加密方法、解密方法、加密装置、以及解密装置
CN103237011B (zh) 数字内容加密传送方法以及服务器端
CN105191332B (zh) 用于在未压缩的视频数据中嵌入水印的方法和设备
KR101358375B1 (ko) 스미싱 방지를 위한 문자메시지 보안 시스템 및 방법
CN105279447A (zh) 数据加密方法、解密方法及装置
CN104113410A (zh) 一种基于多表加密法的数据加密传输方法及装置
CN108882182B (zh) 短信加解密装置
KR102308248B1 (ko) 양자난수 기반의 양자암호화칩이 탑재된 비화게이트웨이 및 이를 이용한 IoT디바이스간 비화통신 서비스 제공방법
KR101305576B1 (ko) 안전한 디지털 정보의 전달을 위한 데이터 전송 시스템, 데이터 전송 방법, 데이터 해독 시스템 및 데이터 해독 방법
CN102761417A (zh) 终端数据传输的处理方法及终端
CN108352990B (zh) 一种传输数据的方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16829813

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016829813

Country of ref document: EP

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112018001696

Country of ref document: BR

REG Reference to national code

Ref country code: BR

Ref legal event code: B01E

Ref document number: 112018001696

Country of ref document: BR

Free format text: SOLICITA-SE APRESENTAR A TRADUCAO SIMPLES DA FOLHA DE ROSTO DA CERTIDAO DE DEPOSITO DA PRIORIDADE CN201510449982.7, DE 28/07/2015; OU DECLARACAO DE QUE OS DADOS DO PEDIDO INTERNACIONAL ESTAO FIELMENTE CONTIDOS NA PRIORIDADE REIVINDICADA, CONTENDO TODOS OS DADOS IDENTIFICADORES DESTA (TITULARES, NUMERO DE REGISTRO, DATA E TITULO), CONFORME ART. 25 DA RESOLUCAO 77/2013, UMA VEZ QUE O DOCUMENTO APRESENTADO NAO POSSUI OS DADOS DA MESMA.

ENP Entry into the national phase

Ref document number: 112018001696

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20180126