CN106301775A - A kind of QR code encryption method based on RSA Algorithm - Google Patents
A kind of QR code encryption method based on RSA Algorithm Download PDFInfo
- Publication number
- CN106301775A CN106301775A CN201610589002.8A CN201610589002A CN106301775A CN 106301775 A CN106301775 A CN 106301775A CN 201610589002 A CN201610589002 A CN 201610589002A CN 106301775 A CN106301775 A CN 106301775A
- Authority
- CN
- China
- Prior art keywords
- code
- information
- encryption
- rsa algorithm
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000003287 optical effect Effects 0.000 claims description 4
- 238000012937 correction Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 238000011161 development Methods 0.000 description 5
- 238000007781 pre-processing Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000008092 positive effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L9/3006—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
- H04L9/302—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
Description
【技术领域】【Technical field】
本发明主要涉及了基于RSA算法与QR码的技术融合,属于QR码的加密识别技术领域,本发明可应用于重要证件证书防伪、票据、物品追溯、物流等各个领域,使用前景十分广泛。The invention mainly relates to the technology fusion based on the RSA algorithm and the QR code, and belongs to the technical field of encrypted identification of the QR code. The invention can be applied to various fields such as anti-counterfeiting of important certificates and certificates, bills, item traceability, logistics, etc., and has a very wide application prospect.
【背景技术】【Background technique】
随着科学技术的迅速发展,智能移动终端得到了广泛的应用,智能手机的应用越来越广泛,同时基于Android系统以及微信技术的QR码的应用也十分广泛。智能手机既能够作为信息的交互设备,也可以成为QR码的识别设备。QR码已经在人们的日常生活中得到广泛应用,成为人们获取信息的快捷工具,用户使用智能手机对特定的QR码扫描就能获取隐含的信息。由于QR码具有存储数据量大、纠错功能强和易识别等优点,同时智能手机终端可作为一种QR码识别设备也极大地促进了QR码的发展。因此,QR码被广泛应用于金融、物流和交通等各个领域。With the rapid development of science and technology, smart mobile terminals have been widely used, smart phones are more and more widely used, and QR codes based on Android system and WeChat technology are also widely used. A smartphone can be used not only as an information interaction device, but also as a QR code recognition device. QR codes have been widely used in people's daily life and become a quick tool for people to obtain information. Users can obtain hidden information by scanning a specific QR code with a smartphone. Because the QR code has the advantages of large amount of stored data, strong error correction function and easy identification, and the smart phone terminal can be used as a QR code identification device, it also greatly promotes the development of the QR code. Therefore, QR codes are widely used in various fields such as finance, logistics, and transportation.
长期以来,假冒伪劣商品危及着企业和消费者的切身利益,严重影响着国家的经济发展。为了更好地适应经济社会的快速发展,更好的解决企事业单位信息传播的安全性、可靠性和可追溯性,进一步提高信息管理的安全性和规范性,同时,由于多数企业在其商品流通的过程中,需要对商品进行追溯和防伪。国家和企业每年都要花费大量的人力和财力用于防伪打假。然而,受制于防伪技术、防伪方式的单一,普通消费者缺乏防伪工具等因素,防伪效果不理想。而QR二维码的出现恰好弥补了这一缺点,它具有多重防伪特性,因此具有极强的保密防伪性能。For a long time, counterfeit and shoddy goods have endangered the vital interests of enterprises and consumers, and seriously affected the country's economic development. In order to better adapt to the rapid development of the economy and society, better solve the security, reliability and traceability of information dissemination in enterprises and institutions, and further improve the security and standardization of information management, at the same time, due to the fact that most enterprises In the process of circulation, it is necessary to trace and anti-counterfeit the goods. Countries and enterprises spend a lot of manpower and financial resources on anti-counterfeiting and anti-counterfeiting every year. However, due to the lack of anti-counterfeiting technology and single anti-counterfeiting methods, ordinary consumers lack anti-counterfeiting tools and other factors, the anti-counterfeiting effect is not ideal. The appearance of QR two-dimensional code just makes up for this shortcoming. It has multiple anti-counterfeiting features, so it has strong security and anti-counterfeiting performance.
基于RSA算法的一种QR码加密方法防伪追溯系统采用RSA算法加密QR码技术给产品做标识,将二维码印刷或标贴于产品包装上,用户只需通过指定的二维码手机软件进行解码检验,即可验证产品真伪,获得详尽的信息。二维码可储存丰富的产品信息,通过加密不易被复制盗用,产品信息来自企业官方发布,查询渠道正规、专业,实现了产品信息防伪的高效性。A QR code encryption method based on RSA algorithm The anti-counterfeit traceability system adopts the RSA algorithm to encrypt the QR code technology to mark the product, print or label the two-dimensional code on the product packaging, and the user only needs to use the designated two-dimensional code mobile phone software By decoding and checking, you can verify the authenticity of the product and obtain detailed information. The two-dimensional code can store a wealth of product information, and it is not easy to be copied and stolen through encryption. The product information comes from the official release of the company, and the query channels are formal and professional, which realizes the high efficiency of product information anti-counterfeiting.
物联网技术的大力发展,给企业产品质量防伪追溯管理,提供了一个更广阔的管理平台。用户通过智能手机扫描二维码识别追溯商品信息,借助基于物联网的二维码防伪应用,从技术上斩断假货的流通途径,基于物联网基础上的QR二维码加密防伪追溯技术,将成为打击假冒伪劣产品、追溯问题产品流向的强有力的“武器”。The vigorous development of Internet of Things technology provides a broader management platform for enterprise product quality anti-counterfeiting and traceability management. Users can scan the QR code to identify and trace product information with their smartphones, and with the help of the QR code anti-counterfeiting application based on the Internet of Things, technically cut off the circulation channel of fake goods. It will become a powerful "weapon" to combat counterfeit and shoddy products and trace the flow of problematic products.
目前,还没有一种具有如此高安全性的RSA加密QR码的识别系统,因此,本发明主要针对以上问题对QR码识别系统提出了改进方案以及识别方法。Currently, there is no such high-security RSA-encrypted QR code recognition system. Therefore, the present invention mainly proposes an improvement scheme and a recognition method for the QR code recognition system for the above problems.
【发明内容】【Content of invention】
本发明主要是针对用户需要对QR码内容加密且要求具有极高的保密效果,提出了一种基于RSA算法的QR码加密方法的识别系统及识别方法。The invention mainly aims at the user's need to encrypt the content of the QR code and requires a very high confidentiality effect, and proposes an identification system and an identification method based on the QR code encryption method based on the RSA algorithm.
一种基于RSA算法的QR码加密方法的识别系统主要包括明文信息加密产生QR码图像,QR码图像的采集设备和基于Android系统的RSA加密QR码的客户端解密识别三部分。明文信息的加密部分主要采用利用私钥对明文信息加密生成QR码图像,QR码的图像采集的硬件设备,具体包括PCB板、镜头、固定器和滤色片、DSP(CCD用)、传感器等部件组成。图像采集通过镜头,将生成的光学图像投射到传感器上,然后光学图像被转换成电信号,电信号再经过模数转换变为数字信号,数字信号经过DSP加工处理,再被送到手机处理器中进行处理,最终转换成移动设备显示器上看到的图像,对采集到的图像进行预处理,利用解密算法获得采集的QR图像中的有效信息。,基于Android系统的RSA加密QR码的客户端解密识别部分主要为使用公钥对智能手机的摄像头的采集的信息进行解密识别并显示给使用者。A recognition system based on an RSA algorithm-based QR code encryption method mainly includes three parts: a QR code image generated by encrypting plaintext information, a QR code image acquisition device, and an Android system-based RSA encrypted QR code client decryption and recognition. The encryption part of the plaintext information mainly uses the private key to encrypt the plaintext information to generate a QR code image, and hardware equipment for QR code image acquisition, including PCB boards, lenses, holders and color filters, DSP (for CCD), sensors, etc. components. The image is collected through the lens, and the generated optical image is projected onto the sensor, and then the optical image is converted into an electrical signal, and the electrical signal is converted into a digital signal through analog-to-digital conversion. The digital signal is processed by DSP and then sent to the mobile phone processor. It is processed in the computer, and finally converted into the image seen on the display of the mobile device, the collected image is preprocessed, and the effective information in the collected QR image is obtained by using the decryption algorithm. , the client decryption and identification part of the RSA encrypted QR code based on the Android system is mainly to use the public key to decrypt and identify the information collected by the camera of the smartphone and display it to the user.
一种针对明文信息利用RSA算法加密产生QR码图像的方法,如流程图1所示。A method for generating a QR code image by using the RSA algorithm to encrypt plaintext information, as shown in flowchart 1.
客户端利用基于Android系统的智能手机识别RSA加密QR码图像模块部分:负责识别整体RSA加密的QR码,当智能手机的摄像头即QR码图像采集设备采集到QR码图像后,首先经过QR码图像预处理,预处理后再经QR码译码得到译码信息,当获得QR码译码信息,RSA加密QR码的识别模块则根据预定规则判定该QR码是为加密模式,若判定为加密模式,则将译码信息交由RSA加密QR码识别模块处理,进行整体解密,从而获得明文信息。The client uses the smartphone based on the Android system to identify the RSA encrypted QR code image module part: it is responsible for identifying the overall RSA encrypted QR code. Preprocessing, after preprocessing, the decoding information is obtained by decoding the QR code. When the decoding information of the QR code is obtained, the recognition module of the RSA encrypted QR code determines that the QR code is in the encrypted mode according to the predetermined rules. If it is determined to be in the encrypted mode , then the decoded information is handed over to the RSA encrypted QR code recognition module for processing, and the overall decryption is performed to obtain the plaintext information.
【本发明的优点和积极效果】[Advantages and positive effects of the present invention]
与现有技术相比,本发明具有如下优点和积极效果:Compared with prior art, the present invention has following advantage and positive effect:
通过使用RSA加密QR码技术,可以满足用户对保密内容的极高要求,加密安全可靠。此外,使用者无需额外的硬件识别设备,使用者仅需使用安装有专用扫描客户端的智能手机,扫描RSA加密QR码图像即可智能识别编码信息。实现成本低,无需购买专用硬件扫描设备。By using the RSA encrypted QR code technology, it can meet the user's extremely high requirements for confidential content, and the encryption is safe and reliable. In addition, the user does not need additional hardware identification equipment, and the user only needs to use a smartphone installed with a dedicated scanning client to scan the RSA encrypted QR code image to intelligently identify the coded information. The implementation cost is low, and there is no need to purchase special hardware scanning equipment.
【附图说明】【Description of drawings】
图1是一种基于RSA算法的QR码的加解密方法流程图。FIG. 1 is a flow chart of a method for encrypting and decrypting a QR code based on the RSA algorithm.
【具体实施方式】【detailed description】
为使本发明的实施方案与意义优势表述得更为清楚,下面结合后文附图,对本发明进行更为详细的说明。In order to express the embodiments, significance and advantages of the present invention more clearly, the present invention will be described in more detail below in conjunction with the accompanying drawings.
本发明设计基于RSA算法的一种QR码加密方法的识别系统主要包括QR码图像的采集设备和基于Android系统的RSA解密QR码的客户端解密识别两部分。QR码的图像采集使用基于安卓智能手机摄像头的硬件组成设备,基于Android系统的RSA加密QR码的客户端解密识别部分主要为使用公钥对智能手机的摄像头的采集的信息进行解密识别并显示给使用者。The invention designs an identification system based on a QR code encryption method based on the RSA algorithm, which mainly includes two parts: a QR code image acquisition device and an Android system-based RSA decryption QR code client decryption and identification part. The image acquisition of the QR code uses the hardware component device based on the camera of the Android smart phone. The decryption and recognition part of the client side of the RSA encrypted QR code based on the Android system is mainly to use the public key to decrypt and identify the information collected by the camera of the smart phone and display it to the user. user.
图1显示了本发明基于RSA算法的一种QR码加密方法原理框图。Fig. 1 has shown the principle block diagram of a kind of QR code encryption method based on RSA algorithm of the present invention.
如图1所示,本发明提出了基于RSA算法的一种QR码加密方法,用户根据需要获取明文信息,若选择加密模式,利用私钥对信息进行加密处理,获得密文信息。将获得密文信息生成QR图像,完成信息的加密和生成对应的QR码。As shown in Figure 1, the present invention proposes a QR code encryption method based on the RSA algorithm. The user obtains plaintext information as needed, and if an encryption mode is selected, the information is encrypted using a private key to obtain ciphertext information. The ciphertext information will be obtained to generate a QR image, and the encryption of the information will be completed and the corresponding QR code will be generated.
如图1所示,本发明对加密后的QR码处理过程如下:As shown in Figure 1, the present invention processes the encrypted QR code as follows:
首先经过QR码图像预处理,预处理后再经QR码译码得到译码信息,当获得QR码译码信息,RSA加密QR码的识别模块则根据预定规则判定该QR码是否为加密模式,若判定为整体加密模式,则将译码信息交RSA加密QR码识别模块处理,进行整体解密,从而获得明文信息。Firstly, the QR code image is preprocessed, and then the QR code is decoded to obtain the decoding information. When the QR code decoding information is obtained, the identification module of the RSA encrypted QR code determines whether the QR code is an encrypted mode according to the predetermined rules. If it is determined to be the overall encryption mode, the decoded information will be processed by the RSA encrypted QR code recognition module for overall decryption, thereby obtaining plaintext information.
1、通过安卓手机摄像头的硬件组成即QR码图像采集设备采集获取QR码图像;1. Acquisition and acquisition of QR code images through the hardware composition of the camera of the Android mobile phone, that is, the QR code image acquisition device;
2、获取到QR码图像后需经过图像预处理,主要包括:灰度化、中值滤波以及二值化,然后是QR码图像的定位,边缘提取,校正QR码图像等;2. After obtaining the QR code image, it needs to go through image preprocessing, mainly including: grayscale, median filter and binarization, and then the positioning of the QR code image, edge extraction, correction of the QR code image, etc.;
3、预处理后再经QR码译码得到译码信息;3. After preprocessing, the decoding information is obtained by decoding the QR code;
4、当获得QR码译码信息,RSA加密QR码的识别模块则根据预定规则判定该QR码是否采用了加密模式,若判定为整体加密模式,则将译码信息交由RSA加密QR码识别模块处理,进行整体解密,从而获得明文信息;若判定该QR码为非加密模式,则将译码信息交由非加密QR码识别模块处理,从而获得明文信息。4. When the QR code decoding information is obtained, the identification module of the RSA encrypted QR code will judge whether the QR code adopts the encryption mode according to the predetermined rules. If it is determined to be the overall encryption mode, the decoding information will be identified by the RSA encrypted QR code The module processes and performs overall decryption to obtain plaintext information; if it is determined that the QR code is in non-encrypted mode, the decoded information will be processed by the non-encrypted QR code recognition module to obtain plaintext information.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610589002.8A CN106301775A (en) | 2016-07-22 | 2016-07-22 | A kind of QR code encryption method based on RSA Algorithm |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610589002.8A CN106301775A (en) | 2016-07-22 | 2016-07-22 | A kind of QR code encryption method based on RSA Algorithm |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106301775A true CN106301775A (en) | 2017-01-04 |
Family
ID=57652104
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610589002.8A Pending CN106301775A (en) | 2016-07-22 | 2016-07-22 | A kind of QR code encryption method based on RSA Algorithm |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106301775A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109034333A (en) * | 2018-08-02 | 2018-12-18 | 武汉大学 | QR code dual anti-counterfeiting method based on rsa encryption and digital watermarking |
| CN113221132A (en) * | 2021-04-02 | 2021-08-06 | 暨南大学 | QR code encryption and decryption method based on NTRU |
| CN113221131A (en) * | 2021-04-02 | 2021-08-06 | 暨南大学 | LWE-based QR code encryption and decryption method |
| CN114157771A (en) * | 2021-11-12 | 2022-03-08 | 广东海洋大学 | Asymmetric reversible image hiding method based on compressed sensing |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103325043A (en) * | 2013-06-20 | 2013-09-25 | 上海天臣控股有限公司 | System and method for tracking and verifying commodity purchased on internet |
| CN103886469A (en) * | 2014-03-31 | 2014-06-25 | 南京理工大学 | Product two-dimension code generation and query system |
| CN103890779A (en) * | 2011-10-10 | 2014-06-25 | 礼元通信株式会社 | QR code automatic recognition device and method |
| CN105009144A (en) * | 2013-12-20 | 2015-10-28 | 普乐投资有限公司 | Authenticity verification system and method |
| CN105144215A (en) * | 2012-11-30 | 2015-12-09 | 莫彼姆有限公司 | Multi-dimensional code translation |
-
2016
- 2016-07-22 CN CN201610589002.8A patent/CN106301775A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103890779A (en) * | 2011-10-10 | 2014-06-25 | 礼元通信株式会社 | QR code automatic recognition device and method |
| CN105144215A (en) * | 2012-11-30 | 2015-12-09 | 莫彼姆有限公司 | Multi-dimensional code translation |
| CN103325043A (en) * | 2013-06-20 | 2013-09-25 | 上海天臣控股有限公司 | System and method for tracking and verifying commodity purchased on internet |
| CN105009144A (en) * | 2013-12-20 | 2015-10-28 | 普乐投资有限公司 | Authenticity verification system and method |
| CN103886469A (en) * | 2014-03-31 | 2014-06-25 | 南京理工大学 | Product two-dimension code generation and query system |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109034333A (en) * | 2018-08-02 | 2018-12-18 | 武汉大学 | QR code dual anti-counterfeiting method based on rsa encryption and digital watermarking |
| CN109034333B (en) * | 2018-08-02 | 2020-05-22 | 武汉大学 | QR code double anti-counterfeiting method based on RSA encryption and digital watermarking |
| CN113221132A (en) * | 2021-04-02 | 2021-08-06 | 暨南大学 | QR code encryption and decryption method based on NTRU |
| CN113221131A (en) * | 2021-04-02 | 2021-08-06 | 暨南大学 | LWE-based QR code encryption and decryption method |
| CN113221132B (en) * | 2021-04-02 | 2022-09-02 | 暨南大学 | QR code encryption and decryption method based on NTRU |
| CN114157771A (en) * | 2021-11-12 | 2022-03-08 | 广东海洋大学 | Asymmetric reversible image hiding method based on compressed sensing |
| CN114157771B (en) * | 2021-11-12 | 2023-10-27 | 广东海洋大学 | Asymmetric reversible image hiding method based on compressed sensing |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103198344B (en) | Tax control secure two-dimensional code coding, decoding processing method | |
| CN107194449B (en) | Printing anti-counterfeiting and information tracing method based on combination of digital watermark and two-dimensional code | |
| US10749682B2 (en) | Anti-counterfeit method | |
| CN102902997B (en) | A kind of Quick Response Code hybrid coding, decoding device and method | |
| CN107918791B (en) | Two-dimensional code generation and decoding method and device in two-dimensional code copying process | |
| US20250094546A1 (en) | Watermarking digital media for content verification with differential detection | |
| CN104077624A (en) | Methods and systems for generating and checking electronic note with anti-counterfeiting two-dimension code | |
| CN104268610B (en) | One kind classification QR code generating methods and read method | |
| CN103646375B (en) | The identifiable method of photo primitiveness that intelligent mobile terminal is taken pictures | |
| TW201610742A (en) | Encrypting and decrypting information | |
| CN108537315A (en) | A kind of generation of safe Quick Response Code and authentication method | |
| CN106301775A (en) | A kind of QR code encryption method based on RSA Algorithm | |
| CN109284618B (en) | Data source data verification method and system | |
| CN104574119B (en) | A kind of method that commodity Jianzhen traces to the source | |
| US20260019255A1 (en) | Cold storage cryptographic authentication apparatus and system | |
| CN103136676A (en) | Two-dimension code anti-counterfeiting system recognized by mobile phone automatically and usage method thereof | |
| CN108596309B (en) | QR code generation and verification method | |
| CN104361494A (en) | Bank counter authorization and certification method and system based on fingerprint recognition | |
| CN106022187A (en) | High-efficient O2O implementation method | |
| CN103971245A (en) | Combined encryption system for commodity electronic forgery proofing | |
| CN104282070A (en) | Invoice fake validation method and system | |
| TWI726326B (en) | Method, device and system for generating and verifying self-protection multidimensional barcode | |
| CN104050574A (en) | Anti-fake method and system | |
| CN103971246A (en) | One-way function bidirectional encryption based electronic commodity security system | |
| CN108646993B (en) | Output file uniqueness guaranteeing method based on biological attribute and fluorescent printing technology |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170104 |