A digital file encryption method

By collecting user fingerprint and file attribute information, generating keys and using chaotic matrix to scramble and spread the QR code, the problem of insufficient encryption levels of existing QR codes is solved, and the security of electronic files and difficult-to-recognize malicious QR codes are improved.

CN113989091BActive Publication Date: 2025-04-25ZHONGDUN ELECTROMECHANICAL EQUIP CO LTD

Patent Information

Application Number
CN202111185174.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-12
Publication Date
2025-04-25
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

The existing QR code encryption level is insufficient, which makes electronic files easy to be stolen, and malicious QR codes difficult to identify, increasing the risk of personal information and account theft.

Method used

Collect user's fingerprint image and archive attribute information, generate feature description vectors and QR codes, and generate keys through the numerical sequence input by the user and the description vector. The chaotic matrix is ​​generated using the key, and the QR code image is chaotic and diffused, and an encrypted QR code image is generated.

Benefits of technology

By fusing fingerprint information and the key of the user input sequence, a pseudo-random chaotic matrix is ​​generated, and the QR code images are chaotic and diffused, pixel correlation is reduced, encryption security is improved, and original image information is protected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989091B_ABST
    Figure CN113989091B_ABST
Patent Text Reader

Abstract

The invention discloses a method for encrypting digital archives, which uses a key that combines fingerprint information and a user input sequence as the initial state of the system to generate a chaotic matrix, scrambles the positions of image pixels through the pseudo-randomness of the chaotic matrix, and performs a mod operation on the scrambled image and the chaotic matrix at the corresponding position, thereby changing the encrypted pixels, reducing pixel correlation, and protecting the original image information. At the same time, the use of fingerprint information also ensures the uniqueness of the key and improves the security of encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of data encryption, and in particular relates to an encryption method for digital files. Background Art

[0002] At present, the application value and potential risks of personal data generally stored in the archive system are positively correlated. As a record and reflection of personal health and consumption information, these data can help people better manage their health and finances, and provide more powerful analysis basis and data support for disease diagnosis and treatment, and consumer services; at the same time, most of these data involve personal privacy and are extremely sensitive. Once leaked, it will affect the normal life and even personal safety of individuals, and will bring about a series of problems such as sales promotion and fraud. In addition to data storage security issues, the data collection and sharing process is also easily peeped by unauthorized persons, resulting in the leakage of private information. Therefore, how to analyze and utilize user data under the premise of achieving privacy protection is a difficult problem that needs to be solved in the current electronic archive system and even in the field of information systems.

[0003] QR code is the mainstream information encryption method in recent years and is also used in electronic archive systems. When the encryption level of QR code is insufficient, the user's identity information can be easily stolen and sold. Secondly, the barcode production process is very simple and the dissemination channels are wide, which provides great convenience for various terminal viruses and phishing websites. The spreader of viruses or malicious websites is very likely to directly encode the website data into QR code or insert malicious information into the circulated QR code and then spread it into the public channel. The spread malicious QR code is often very similar to the commonly circulated QR code in appearance. It is difficult for victims to detect the difference between the two and face the risk of personal information account being stolen. Therefore, how to improve the security of QR code in electronic archive systems has become an important issue. Summary of the invention

[0004] Aiming at the problem of electronic files being stolen due to the insufficient encryption level of the existing two-dimensional code, the present invention proposes a method for encrypting digital files, which includes the following steps: collecting the fingerprint image of the user, generating a feature description vector after preprocessing; collecting the attribute information of the user file, and generating a two-dimensional code according to the attribute information of the user file; collecting the digital sequence input by the user, fusing the description vector with the digital sequence to generate a key; using the key to generate a chaotic matrix, and performing pixel scrambling on the two-dimensional code image according to the chaotic matrix; performing pixel diffusion on the two-dimensional code image after pixel scrambling, and obtaining an encrypted two-dimensional code image. The key that fuses the fingerprint information and the user input sequence is used as the initial state of the system to generate a chaotic matrix, and the image pixel position is scrambled by the pseudo-randomness of the chaotic matrix, and the scrambled image is subjected to a mod operation with the chaotic matrix at the corresponding position, so that the encrypted pixels are changed, the pixel correlation is reduced, and the original image information is protected. At the same time, the use of fingerprint information also ensures the uniqueness of the key and improves the security of encryption.

[0005] The technical solution adopted by the present invention to solve the above technical problems is: the encryption method includes:

[0006] S1, collect the user's fingerprint image, generate a feature description vector after preprocessing, and the description vector is composed of numbers 0 and 1;

[0007] S2. Collecting user profile attribute information and generating a QR code based on the user profile attribute information;

[0008] S3, collecting a digital sequence input by a user, and fusing the description vector with the digital sequence to generate a key;

[0009] S4, using the key to generate a chaotic matrix, and scrambling the pixels of the two-dimensional code image according to the chaotic matrix;

[0010] S5, performing pixel diffusion on the chaotic matrix of the two-dimensional code image after pixel scrambling to obtain an encrypted two-dimensional code image.

[0011] Furthermore, the image processing includes sequentially performing image grayscale processing, image enhancement processing, image noise reduction processing, and image binarization on the image.

[0012] Furthermore, the grayscale processing process is:

[0013] ;in Represents the gray value, mean and variance before standardization, Standardized grayscale value, mean and variance.

[0014] Furthermore, in the image enhancement process, the image noise reduction process uses a GaBor filter:

[0015] ,in represents the filter direction, represents the frequency of the sine wave, Represent the Gaussian bag space constants on the x-axis and y-axis respectively.

[0016] Furthermore, the binarization process is obtained by comparing the pixel gray value with a threshold value, and the comparison function is: , where N is the pixel gray value threshold.

[0017] Furthermore, the collecting of the digital sequence input by the user and fusing the description vector with the digital sequence to generate a key includes: converting the digital sequence input by the user into 4-bit binary numbers in sequence to form a binary digital sequence, converting the description vector into a description vector sequence and performing an XOR operation with the binary digital sequence to obtain the key, wherein the digital sequence and the description vector sequence have the same length, which is 256 bits.

[0018] Furthermore, the user profile attribute information includes a user name and a profile link address.

[0019] Furthermore, the step of generating a chaotic matrix using a key and performing pixel scrambling on the two-dimensional code image according to the chaotic matrix includes:

[0020] S41, inputting the key into the chaotic system to obtain a chaotic matrix, wherein the chaotic system is: ,in , n is a non-negative integer, when n is 0 is the initial value; is the output value; the first 52 bits and the second 52 bits of the key from the left are respectively used as ;

[0021] S42, the third 52 bits of the key are used as control parameters, and the last 100 bits are evenly divided into 4 interference factors to generate an initial value , input the initial value into the chaotic system to obtain the chaotic matrix ;

[0022] S43, sorting the rows of the chaotic matrix X in order and generating an index matrix M, and then sorting the columns of Q in order and generating an index matrix N;

[0023] S44, set row index i=1;

[0024] S45. Take out the QR code , the pixel values ​​at n positions are converted into pixel values ​​in turn according to the index matrix M Move to the QR code Position; QR code image size is ;

[0025] S46. Repeat S44 and S45 until i=n, ​​and generate a pixel shuffled image matrix T.

[0026] Furthermore, the chaotic matrix of the two-dimensional code image after pixel scrambling is subjected to pixel diffusion to obtain an encrypted two-dimensional code image. The specific diffusion formula is: The matrix C is the result of diffusion, and T is The pixel shuffled image matrix.

[0027] Furthermore, the pixel shuffling and pixel diffusion may be cyclically performed a predetermined number of times.

[0028] The beneficial effects of the present invention are as follows:

[0029] The key that combines fingerprint information and user input sequence is used as the initial state of the system to generate a chaotic matrix. The position of the image pixels is scrambled through the pseudo-randomness of the chaotic matrix. The scrambled image is subjected to a mod operation with the chaotic matrix at the corresponding position, so that the encrypted pixels are changed, the pixel correlation is reduced, and the original image information is protected. At the same time, the use of fingerprint information also ensures the uniqueness of the key and improves the security of encryption.

[0030] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above description and other purposes, features and advantages of the present invention more obvious and easy to understand, the preferred embodiments are specifically cited and described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0032] Figure 1 A flowchart of the encryption method for a digital archive QR code; DETAILED DESCRIPTION

[0033] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0034] In the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be connected, detachably connected, or integrated; it can be mechanically connected or electrically connected; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0035] Example 1

[0036] Encryption methods include:

[0037] S1, collect the user's fingerprint image, generate a feature description vector after preprocessing, and the description vector is composed of numbers 0 and 1;

[0038] S2. Collecting user profile attribute information and generating a QR code based on the user profile attribute information;

[0039] S3, collecting a digital sequence input by a user, and fusing the description vector with the digital sequence to generate a key;

[0040] S4, using the key to generate a chaotic matrix, and scrambling the pixels of the two-dimensional code image according to the chaotic matrix;

[0041] S5, performing pixel diffusion on the chaotic matrix of the two-dimensional code image after pixel scrambling to obtain an encrypted two-dimensional code image.

[0042] Furthermore, the image processing includes sequentially performing image grayscale processing, image enhancement processing, image noise reduction processing, and image binarization on the image.

[0043] Furthermore, the grayscale processing process is:

[0044] ;in Represents the gray value, mean and variance before standardization, Standardized grayscale value, mean and variance.

[0045] Furthermore, in the image enhancement process, the image noise reduction process uses a GaBor filter:

[0046] ,in represents the filter direction, represents the frequency of the sine wave, Represent the Gaussian bag space constants on the x-axis and y-axis respectively.

[0047] Furthermore, the binarization process is obtained by comparing the pixel gray value with a threshold value, and the comparison function is: , where N is the pixel gray value threshold.

[0048] Furthermore, the collecting of the digital sequence input by the user and fusing the description vector with the digital sequence to generate a key includes: converting the digital sequence input by the user into 4-bit binary numbers in sequence to form a binary digital sequence, converting the description vector into a description vector sequence and performing an XOR operation with the binary digital sequence to obtain the key, wherein the digital sequence and the description vector sequence have the same length, which is 256 bits.

[0049] Furthermore, the user profile attribute information includes a user name and a profile link address.

[0050] Furthermore, the step of generating a chaotic matrix using a key and performing pixel scrambling on the two-dimensional code image according to the chaotic matrix includes:

[0051] S41, inputting the key into the chaotic system to obtain a chaotic matrix, wherein the chaotic system is: ,in , n is a non-negative integer, when n is 0 is the initial value; is the output value; the first 52 bits and the second 52 bits of the key from the left are respectively used as ;

[0052] S42, the third 52 bits of the key are used as control parameters, and the last 100 bits are evenly divided into 4 interference factors to generate an initial value , input the initial value into the chaotic system to obtain the chaotic matrix ;

[0053] S43, sorting the rows of the chaotic matrix X in order and generating an index matrix M, and then sorting the columns of Q in order and generating an index matrix N;

[0054] S44, set row index i=1;

[0055] S45. Take out the QR code , the pixel values ​​at n positions are converted into pixel values ​​in turn according to the index matrix M Move to the QR code Position; QR code image size is ;

[0056] S46. Repeat S44 and S45 until i=n, ​​and generate a pixel shuffled image matrix T.

[0057] Furthermore, the chaotic matrix of the two-dimensional code image after pixel scrambling is subjected to pixel diffusion to obtain an encrypted two-dimensional code image. The specific diffusion formula is: The matrix C is the result of diffusion, and T is The pixel shuffled image matrix.

[0058] Furthermore, the pixel shuffling and pixel diffusion may be cyclically performed a predetermined number of times.

[0059] The advantages of the present invention are:

[0060] The key that combines fingerprint information and user input sequence is used as the initial state of the system to generate a chaotic matrix. The position of the image pixels is scrambled through the pseudo-randomness of the chaotic matrix. The scrambled image is subjected to a mod operation with the chaotic matrix at the corresponding position, so that the encrypted pixels are changed, the pixel correlation is reduced, and the original image information is protected. At the same time, the use of fingerprint information also ensures the uniqueness of the key and improves the security of encryption.

[0061] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for encrypting a digital file, characterized in that: The method comprises the following steps: S1, collect the user's fingerprint image, generate a feature description vector after preprocessing, and the description vector is composed of numbers 0 and 1; S2. Collecting user profile attribute information and generating a QR code based on the user profile attribute information; S3, collecting a digital sequence input by a user, and fusing the description vector with the digital sequence to generate a key; S4, using the key to generate a chaotic matrix, and scrambling the pixels of the two-dimensional code image according to the chaotic matrix; S5, performing pixel diffusion on the chaotic matrix in the two-dimensional code image after pixel scrambling to obtain an encrypted two-dimensional code image; The method of generating a chaotic matrix by using a key and scrambling pixels of the two-dimensional code image according to the chaotic matrix comprises: S41, inputting the key into the chaotic system to obtain a chaotic matrix, wherein the chaotic system is: ,in , n is a non-negative integer, when n is 0 is the initial value; is the output value; the first 52 bits and the second 52 bits of the key from the left are respectively used as ; S42, the third 52 bits of the key are used as control parameters, and the last 100 bits are evenly divided into 4 interference factors to generate an initial value , input the initial value into the chaotic system to obtain the chaotic matrix ; S43, sorting the rows of the chaotic matrix X in order and generating an index matrix M, and then sorting the columns of Q in order and generating an index matrix N; S44, set row index i=1; S45. Take out the QR code , the pixel values ​​at n positions are converted into pixel values ​​in turn according to the index matrix M Move to the QR code Position; QR code image size is ; S46. Repeat S44 and S45 until i=n, ​​and generate a pixel shuffled image matrix T.

2. The method for encrypting a digital file according to claim 1, characterized in that: The preprocessing includes sequentially performing image grayscale processing, image enhancement processing, image noise reduction processing, and image binarization on the image.

3. The method for encrypting a digital file according to claim 2, characterized in that: The grayscale processing process is: ;in Represents the gray value, mean and variance before standardization, Standardized grayscale value, mean and variance.

4. The method for encrypting a digital file according to claim 2, characterized in that: The image enhancement process and the image noise reduction process use GaBor filter: ,in represents the filter direction, represents the frequency of the sine wave, Represent the Gaussian bag space constants on the x-axis and y-axis respectively.

5. The method for encrypting a digital file according to claim 2, characterized in that: The binarization process is obtained by comparing the pixel gray value with the threshold value, and the comparison function is: , where N is the pixel gray value threshold.

6. The method for encrypting a digital file according to claim 1, characterized in that: The collecting of the digital sequence input by the user and fusing the description vector with the digital sequence to generate a key includes: converting the digital sequence input by the user into 4-bit binary numbers in sequence to form a binary digital sequence, converting the description vector into a description vector sequence and performing an XOR operation with the binary digital sequence to obtain the key, wherein the digital sequence and the description vector sequence have the same length, which is 256 bits.

7. The method for encrypting a digital file according to claim 1, characterized in that: The user profile attribute information includes user name and profile link address.

8. The method for encrypting a digital file according to claim 1, characterized in that: The chaotic matrix of the two-dimensional code image after pixel scrambling is subjected to pixel diffusion to obtain the encrypted two-dimensional code image. The specific diffusion formula is: Where T is The pixel shuffled image matrix.

9. The method for encrypting a digital file according to claim 1, characterized in that: The pixel shuffling and pixel diffusion may be performed cyclically for a predetermined number of times.

Citation Information

Patent Citations

  • Laser marking multi-encrypted two-dimensional code fingerprint anti-counterfeit authentication method and system

    CN102163291A

  • Image-based confidential information spreading method, device and system

    CN106022011A

Cited By

  • Confidential file calling method and system based on confidential service management

    CN121078184A