A method for encrypting and encoding an identification and a method for resolving an identification

Through the combination of symmetric encryption and asymmetric encryption, encoded images are generated and processed, which solves the problem of insufficient security of encoded images data, and realizes efficient data encryption and decoding, reducing the risk of data leakage.

CN118659929BActive Publication Date: 2024-12-17BEIJING SHENZHOU LOONGSON ANCHUANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411127856.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-17
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The existing coded image technology has shortcomings in data security, which can easily lead to data leakage and low decoding efficiency.

Method used

Using a combination of symmetric encryption and asymmetric encryption, the message data is symmetrically encrypted through random numbers, and asymmetric encryption algorithm is used to generate private keys and public keys, and the encrypted data is asymmetrically encrypted, and the hash algorithm is used. Generate summary information and generate encoded images. At the same time, encrypting and exorbiting the encoded image by reversing the key will improve the data security and decoding efficiency.

Benefits of technology

It significantly improves the security of the encoded image, reduces the risk of message data leakage, and improves the decoding efficiency of the decoding end, so that the decoding end can accurately obtain the key and verification information for decryption without obtaining other data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659929B_ABST
    Figure CN118659929B_ABST
Patent Text Reader

Abstract

The present application provides an identification encryption and encoding method and an identification resolution method, the method comprising: obtaining message data, symmetrically encrypting the message data based on a symmetric key to obtain first encrypted data; generating a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypting the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and symmetric key ciphertext; encoding based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding coded image; generating a reversal key, and encrypting the coded image based on the reversal key to obtain a transformed coded image; generating a unique identifier, and performing an XOR operation on the transformed coded image based on the unique identifier to obtain a target coded image. At present, methods for generating coded images based on data all have the problem of insufficient security. Through the above method, the security of message data is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing and encryption and decryption technology, and in particular to an identification encryption and encoding method and an identification resolution method. Background Art

[0002] Industrial Internet identification needs to be realized through coded images, which are the "identity cards" of machines or objects. Coded images need to be decoded through image decoding technology to obtain information in the coded image, such as address, object, spatial location, etc. For example, by parsing the coded image of an object, the server address that stores its associated information can be obtained. Image decoding technology can accurately and efficiently obtain the information corresponding to the coded image in a complex network environment.

[0003] At present, the technologies of coded images such as QR code, Hanxin code, QR code, Longbei code and GM code are mature and widely used in various fields such as payment, information collection, advertising, etc. However, when using these coded images, the security of data is often ignored. Summary of the invention

[0004] The present application provides an identification encryption and encoding method and an identification resolution method.

[0005] The present invention provides an encryption and encoding method for an identifier, the method comprising:

[0006] Obtaining message data, and symmetrically encrypting the message data based on a symmetric key to obtain first encrypted data, wherein the symmetric key is a random number;

[0007] Generate a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext;

[0008] Encoding is performed based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, wherein the summary information is obtained by operating the message data using a hash algorithm;

[0009] generating a reversal key, and encrypting the coded image based on the reversal key to obtain a transformed coded image, wherein the transformed coded image can be restored to the coded image based on the reversal key;

[0010] A unique identifier is generated, and an XOR operation is performed on the transform coded image based on the unique identifier to obtain a target coded image.

[0011] Wherein, the second encrypted data is written into a first preset area of ​​the encoded image during the encoding, and the first preset area is used to store text information;

[0012] The symmetric key ciphertext and the public key are written into a second preset area of ​​the encoded image during the encoding, and the second preset area is used to store key information:

[0013] The summary information is written into a third preset area of ​​the encoded image during the encoding, and the third preset area is used to store verification information.

[0014] The step of encrypting the coded image based on the reversal key to obtain a transformed coded image includes:

[0015] Traversing all pixels in the encoded image, the size of the encoded image being determined based on the reversal key;

[0016] Determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the horizontal coordinate after transformation;

[0017] Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate;

[0018] Determine a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate;

[0019] After the traversal is completed, the transform coded image is obtained.

[0020] The step of performing an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image includes:

[0021] generating an encryption matrix based on the unique identifier, wherein the size of the encryption matrix is ​​the same as the size of the transform coded image;

[0022] An XOR operation is performed on the transform coded image based on the encryption matrix to obtain a target coded image.

[0023] Another aspect of the present application embodiment provides an identification encryption and encoding system, the system comprising:

[0024] A first acquisition module, used to obtain message data, and symmetrically encrypt the message data based on a symmetric key to obtain first encrypted data, wherein the symmetric key is a random number;

[0025] A first computing module, configured to generate a private key and a public key by using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext;

[0026] an encoding module, configured to perform encoding based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, wherein the summary information is obtained by operating the message data using a hash algorithm;

[0027] The first computing module is also used to generate a reversal key, and encrypt the encoded image based on the reversal key to obtain a transformed encoded image, and the transformed encoded image can be restored to the encoded image based on the reversal key; and to generate a unique identifier, and perform an XOR operation on the transformed encoded image based on the unique identifier to obtain a target encoded image.

[0028] In another aspect, the present invention provides an electronic device, comprising: a first acquisition device and a first processor, wherein the first acquisition device and the first processor are electrically connected;

[0029] The first acquisition device obtains message data, and symmetrically encrypts the message data based on a symmetric key to obtain first encrypted data;

[0030] The first processor generates a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypts the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and symmetric key ciphertext; encodes based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image; generates a reversal key, and encrypts the encoded image based on the reversal key to obtain a transformed encoded image; and generates a unique identifier, and performs an XOR operation on the transformed encoded image based on the unique identifier to obtain a target encoded image.

[0031] Another aspect of the present invention provides an identification resolution method, the method comprising:

[0032] Obtaining a target coded image, and identifying the target coded image to obtain a unique identifier, wherein the unique identifier is printed on an edge of the target coded image;

[0033] Performing an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image;

[0034] Obtaining a reversal key based on the unique identifier, and decrypting the transform coded image based on the reversal key to obtain a coded image;

[0035] Decoding the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information;

[0036] Decrypting the second encrypted data and the symmetric key ciphertext based on the public key to obtain the first encrypted data and the symmetric key;

[0037] Decrypting the first encrypted data based on the symmetric key to obtain decrypted data;

[0038] Using a hash algorithm to calculate the decrypted data to obtain verification information;

[0039] If the verification information is the same as the summary information, the decrypted data is determined to be message data.

[0040] The decrypting the transformed coded image based on the reversal key to obtain the coded image comprises:

[0041] Traversing all pixels in the transform coded image;

[0042] Determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the horizontal coordinate after transformation;

[0043] Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate;

[0044] Determine a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate;

[0045] After the transform coded image is traversed by the inverted key times, the coded image is obtained.

[0046] Another aspect of the present invention provides an identification resolution system, the system comprising:

[0047] A second acquisition module is used to obtain a target coded image and identify the target coded image to obtain a unique identifier;

[0048] A second computing module is configured to perform an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image; and obtain a reversal key based on the unique identifier, and decrypt the transformed coded image based on the reversal key to obtain a coded image;

[0049] A decoding module, used for decoding the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information;

[0050] The second computing module is also used to decrypt the second encrypted data and the symmetric key ciphertext based on the public key to obtain decrypted data; use a hash algorithm to operate the decrypted data to obtain verification information; and when the verification information is the same as the summary information, determine the decrypted data as message data.

[0051] In another aspect, the present invention provides an electronic device, comprising: a second acquisition device and a second processor, wherein the second acquisition device and the second processor are electrically connected;

[0052] The second acquisition device obtains a target coded image, and identifies the target coded image to obtain a unique identifier;

[0053] The second processor performs an XOR operation on the target encoded image based on the unique identifier to obtain a transformed encoded image; obtains a reversal key based on the unique identifier, and decrypts the transformed encoded image based on the reversal key to obtain an encoded image; decodes the encoded image to obtain second encrypted data, a symmetric key ciphertext, a public key and summary information; decrypts the second encrypted data and the symmetric key ciphertext based on the public key to obtain first encrypted data and a symmetric key; decrypts the first encrypted data based on the symmetric key to obtain decrypted data; uses a hash algorithm to operate on the decrypted data to obtain verification information; and when the verification information is the same as the summary information, determines the decrypted data as message data.

[0054] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0056] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0057] Figure 1 A flow chart showing an identification encryption and encoding method according to an embodiment of the present application is shown;

[0058] Figure 2 A flowchart of an identification encryption and encoding method according to another embodiment of the present application is shown;

[0059] Figure 3 A flowchart of an identification encryption and encoding method according to another embodiment of the present application is shown;

[0060] Figure 4 A flowchart of an identification resolution method according to an embodiment of the present application is shown;

[0061] Figure 5A flowchart of an identification resolution method according to another embodiment of the present application is shown;

[0062] Figure 6 A schematic diagram of the structure of an identification encryption and encoding system according to an embodiment of the present application is shown;

[0063] Figure 7 A schematic diagram of the structure of an identity resolution system according to an embodiment of the present application is shown;

[0064] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown;

[0065] Fig. 9 A schematic diagram of the structure of an electronic device according to another embodiment of the present application is shown. DETAILED DESCRIPTION

[0066] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0067] In order to improve the security of the encoded image and reduce the risk of message data leakage, an embodiment of the present application provides an identification encryption and encoding method, such as Figure 1 As shown, the method includes:

[0068] Step 101: obtain message data, and symmetrically encrypt the message data based on a symmetric key to obtain first encrypted data, where the symmetric key is a random number.

[0069] The message data may be certain product information data, or the address of query information data.

[0070] In this embodiment, the product information data includes at least one of the following data:

[0071] The first type is basic information data, such as product name, product model, product specifications, production date, validity period or shelf life, production batch, etc.;

[0072] The second type is production process data, such as raw material information (source, batch, quality test results), production process parameters (temperature, pressure, speed, etc.), production equipment status data (start-up time, running time, fault records), production process flow records (start and end time of each process), etc.;

[0073] The third type is quality inspection data, such as inspection items and standards, inspection results, quality abnormality records, quality improvement records, etc.;

[0074] The fourth type is IoT device data, such as sensor data (temperature, humidity, vibration, pressure, etc.), real-time monitoring data (device operating status, energy consumption, location tracking), data collection timestamp, etc.;

[0075] The fifth type is maintenance and care data, such as equipment maintenance records, maintenance and care plans, fault diagnosis and repair records, predictive maintenance data (failure prediction based on historical data), etc.

[0076] The sixth type is environmental and safety data, such as environmental monitoring data (workshop temperature, humidity, air quality), safety records (safety incidents, accident reports), and compliance data (compliance with regulatory standards).

[0077] In other implementations, the product information data may also include any other data related to the product.

[0078] The address for querying information data is generally a web page address, and the web page address can be used to enter the corresponding web page to query product information data, or query product positioning information, etc.

[0079] After obtaining the message data, a random number is generated as the symmetric key of the symmetric encryption algorithm.

[0080] A symmetric encryption algorithm means that after a certain original data is encrypted using a symmetric key, the encrypted original data can be decrypted using the symmetric key to obtain the original data.

[0081] In this embodiment, the symmetric encryption algorithm may be AES algorithm (Advanced Encryption Standard algorithm), SM1 algorithm (a symmetric encryption algorithm), SM4 algorithm (a symmetric encryption algorithm), etc. In other implementations, any other symmetric encryption algorithm may be selected, such as DES algorithm (Data Encryption Standard algorithm), 3DES algorithm (Triple Data Encryption Standard algorithm), Blowfish algorithm (a symmetric encryption algorithm), Twofish algorithm (a symmetric encryption algorithm), etc. to implement symmetric encryption.

[0082] Step 102: Generate a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext.

[0083] Asymmetric encryption algorithms use algorithms to determine a private key and a public key, which are a pair. If the message data is encrypted based on the public key, it can only be decrypted based on the corresponding private key; if the message data is encrypted based on the private key, it can only be decrypted based on the corresponding public key.

[0084] In this embodiment, the asymmetric encryption algorithm may be RSA algorithm (Rivest Shamir Adleman, an asymmetric encryption algorithm), SM2 algorithm (an asymmetric encryption algorithm), SM9 algorithm (an asymmetric encryption algorithm), etc. In other implementations, any other asymmetric encryption algorithm may be selected, such as ECC algorithm (Elliptic Curve Cryptography, an asymmetric encryption algorithm), DSA algorithm (Digital Signature Algorithm, an asymmetric encryption algorithm), etc. to implement asymmetric encryption.

[0085] Step 103: Encode based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, where the summary information is obtained by operating the message data using a hash algorithm.

[0086] The message data is operated using a hash algorithm to obtain the corresponding summary information, which is used for verification during subsequent analysis.

[0087] Encoding is performed based on the second encrypted data, the symmetric key ciphertext, the public key and the summary information to obtain a corresponding encoded image.

[0088] In this embodiment, the hash algorithm may be SHA-256 algorithm (Secure Hash Algorithm 256-bit, a hash algorithm), SM3 algorithm (a hash algorithm), etc. In other implementations, any other hash algorithm, such as SHA-2 algorithm (Secure Hash Algorithm 2, a hash algorithm), RIPEMD-160 algorithm (RACEIntegrity Primitives Evaluation Message Digest, a hash algorithm), etc., may also be used to determine the summary information.

[0089] In this embodiment, the coded image may be various coded images in the Chinese MA identification code system, such as a QR code, a Hanxin code, a Longbei code, a GM code (General Merchandise Code), and other coded images.

[0090] Step 104: Generate a reversal key, and encrypt the coded image based on the reversal key to obtain a transformed coded image. The transformed coded image can be restored to the coded image based on the reversal key.

[0091] In this embodiment, the PVO algorithm, Lshape algorithm, Logistic mapping model equation, etc. can be used to generate a reversal key, and the coded image is encrypted based on the reversal key to obtain a transformed coded image. In other implementations, any other reversible image encryption algorithm can also be used to implement it.

[0092] Step 105: Generate a unique identifier, and perform an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image.

[0093] A unique identifier corresponding to the message data is generated, and an XOR operation is performed on the transformed coded image based on the unique identifier to obtain a target coded image.

[0094] In the above scheme, before encoding the message data into a coded image, the message data is first symmetrically encrypted using a random number, which improves the security of the message data while realizing one object one code and one code one secret. Then, the private key generated by the asymmetric encryption algorithm is used to asymmetrically encrypt the symmetrically encrypted message data and the symmetrically encrypted key, which significantly improves the security of the message data. After encryption, the encrypted message data, the encrypted symmetrically encrypted key, the public key and the summary information are encoded to obtain the corresponding coded image, so that the decoding end only needs to scan the coded image to obtain the key for decryption and the summary information for verification, without obtaining other data, thereby improving the decoding efficiency of the decoding end. After the coded image is generated, the coded image is encrypted using a reversible encryption method, and the coded image is XORed using the unique identifier corresponding to the coded image, further improving the security of the message data.

[0095] In an example of the present application, a method for encrypting and encoding a logo is also provided, wherein the second encrypted data is written into a first preset area of ​​the encoded image during the encoding, and the first preset area is used to store text information;

[0096] The symmetric key ciphertext and the public key are written into a second preset area of ​​the encoded image during the encoding, and the second preset area is used to store key information:

[0097] The summary information is written into a third preset area of ​​the encoded image during the encoding, and the third preset area is used to store verification information.

[0098] For example, the QR code includes a data area, a data code area and a version information area. The data area is a first preset area for storing text information. The data code area is a second preset area for storing key information. The version information area is a third preset area for storing verification information.

[0099] In the above scheme, different types of data are stored in different areas of the encoded image during encoding, so that the decoder only needs to parse different areas of the encoded image during decoding to obtain the corresponding data without further processing the decoded data.

[0100] In an example of the present application, a method for encrypting and encoding an identification is also provided, such as Figure 2 As shown, the encrypting the coded image based on the reversal key to obtain a transformed coded image includes:

[0101] Step 201, traverse all pixels in the encoded image, the size of the encoded image is determined based on the reversal key.

[0102] It should be noted that the size of the coded image is related to the reversal key. In this embodiment, the reversal key can be determined first, and then the size of the coded image can be determined based on the reversal key. The size of the coded image can also be determined first, and then the reversal key can be determined based on the size of the coded image. The determination method can be determined by a mapping table or an experiment (first determine the coded image, and then continuously transform the coded image, and record the number of transformations until the coded image is restored).

[0103] Step 202: determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the transformed horizontal coordinate.

[0104] For example, if the total number of pixels in the encoded image is 16, the coordinates of the current pixel are (2, 3), and the horizontal coordinates of the transformed pixel are , equal to 5.

[0105] Step 203: determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate.

[0106] Continuing with the above example, the ordinate of the transformed pixel is , which is equal to 8.

[0107] Step 204 : determining a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate.

[0108] Continuing with the above example, the horizontal coordinate of the transformed pixel is 5 and the vertical coordinate is 8, so the position of the current pixel is moved to the coordinates (5, 8).

[0109] Step 205: After the traversal is completed, the transform coded image is obtained.

[0110] After performing the above transformation on all pixels, a transform coded image is obtained.

[0111] It should be noted that the number of transformations for the coded image needs to be greater than or equal to 1 and less than the number of cycles. Correspondingly, during decoding, the number of transformations for the coded image is the number of cycles minus the number of transformations during encoding.

[0112] For example, when encoding, the encoded image is transformed three times, and the number of cycles is 6. Then, when decoding, the encoded image needs to be transformed three more times to obtain the original encoded image.

[0113] In the above scheme, the generated coded image is further encrypted by using a graphic block scrambling method. When decoding, it cannot be read by a conventional decoding method, which further improves the security of the message data.

[0114] In an example of the present application, a method for encrypting and encoding an identification is also provided, such as Figure 3 As shown, performing an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image includes:

[0115] Step 301: Generate an encryption matrix based on the unique identifier, where the size of the encryption matrix is ​​the same as the size of the transform coded image.

[0116] For example, the transform coded image is 4 4 size, the unique identifier is 25, then the encryption matrix is ​​determined by extension based on the unique identifier. .

[0117] It should be pointed out that the method is not limited to the extension method, and any method that can generate an encryption matrix with the same size as the transform coded image based on the unique identifier is acceptable.

[0118] Step 302: Perform an XOR operation on the transform coded image based on the encryption matrix to obtain a target coded image.

[0119] To perform an XOR operation on two data, you need to first convert the two values ​​into binary data with the same number of bits, and then perform an XOR operation on the values ​​between the same number of bits in the two binary data. When the two values ​​are the same, the result is 0, and when the two data are different, the result is 1.

[0120] For example, a value is 100 and another value is 55. After 100 is converted to binary, it is 01100100, and after 55 is converted to binary, it is 00110111. The result of the XOR operation of the two binary values ​​is 01010011. After the result is converted to a decimal value, the result of the XOR operation of the two values ​​is 83.

[0121] In the above scheme, the transform coded image is further encrypted by the unique identifier, and the unique identifier is printed on the edge of the target coded image. Even if a third party can obtain the unique identifier, it cannot decode the target coded image based on the unique identifier because it does not know the encryption method. This further improves the security of the message data.

[0122] In an example of the present application, a method for encrypting and encoding an identification is also provided, the method further comprising:

[0123] During encoding, the public key may not be encoded together, but the public key may be converted into digital watermark information, and the converted digital watermark information may be printed on the encoded image.

[0124] In order to improve the security of the encoded image and accurately decode the encoded image to obtain the corresponding message data, an embodiment of the present application provides an identification resolution method, such as Figure 4 As shown, the method includes:

[0125] Step 401, obtain a target coded image, identify the target coded image, and obtain a unique identifier, wherein the unique identifier is printed on the edge of the target coded image.

[0126] Step 402: Perform an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image.

[0127] An encryption matrix is ​​generated based on the unique identifier, and an XOR operation is performed between the encryption matrix and the target coded image to obtain a transformed coded image.

[0128] It should be noted that, during decoding, the method of generating the encryption matrix based on the unique identifier needs to be consistent with the method of generating the encryption matrix based on the unique identifier during encoding.

[0129] Step 403: Obtain a reversal key based on the unique identifier, and decrypt the transform coded image based on the reversal key to obtain a coded image.

[0130] The reversal key is determined from the mapping table based on the unique identifier, and the mapping table is determined during encoding. The transformed encoded image is decoded based on the reversal key to obtain the encoded image.

[0131] Step 404: decode the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information.

[0132] Step 405: decrypt the second encrypted data and the symmetric key ciphertext based on the public key to obtain the first encrypted data and the symmetric key.

[0133] Based on the public key obtained by decoding, the second encrypted data and the symmetric key ciphertext are decrypted to obtain the first encrypted data and the symmetric key.

[0134] It should be pointed out that the decryption method based on the public key needs to correspond to the asymmetric encryption method used during encoding.

[0135] Step 406: decrypt the first encrypted data based on the symmetric key to obtain decrypted data.

[0136] The first encrypted data is decrypted based on the symmetric key obtained after decryption to obtain decrypted data.

[0137] It should be pointed out that the decryption method based on the symmetric key needs to correspond to the symmetric encryption method used during encoding.

[0138] Step 407: Use a hash algorithm to operate on the decrypted data to obtain verification information.

[0139] The message data is operated using a hash algorithm to obtain verification information.

[0140] It should be noted that the hash algorithm used to calculate the decrypted data needs to be consistent with the hash algorithm used to determine the summary information during encoding.

[0141] Step 408: If the verification information is the same as the summary information, the decrypted data is determined to be message data.

[0142] When the verification information is the same as the summary information, it indicates that the decrypted data has not been tampered with or data loss has occurred, and the decrypted data is determined to be message data.

[0143] In the above scheme, accurate message data can be parsed from the target coded image through the decoding and decryption process that is opposite to the encoding process. By using the hash algorithm to operate the decrypted data to obtain the verification information, and comparing the verification information with the summary information, it can be determined whether the message data has been tampered with or data loss has occurred, further improving the accuracy of the obtained message data.

[0144] In an example of the present application, a method for resolving an identity is also provided, such as Figure 5 As shown, the decrypting the transformed coded image based on the reversal key to obtain the coded image includes:

[0145] Step 501, traverse all pixels in the transform coded image.

[0146] Step 502: determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the horizontal coordinate after transformation.

[0147] For example, if the total number of pixels in the encoded image is 16, the coordinates of the current pixel are (2, 3), and the horizontal coordinates of the transformed pixel are , equal to 5.

[0148] Step 503: determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate.

[0149] Continuing with the above example, the ordinate of the transformed pixel is , which is equal to 8.

[0150] Step 504: determine a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate.

[0151] Continuing with the above example, the horizontal coordinate of the transformed pixel is 5 and the vertical coordinate is 8, so the position of the current pixel is moved to the coordinates (5, 8).

[0152] Step 505, after the transform coded image is traversed by the inverted key times, the coded image is obtained.

[0153] The reversal key is the number of cycles, or the number of remaining transformations required. After the transformed coded image is transformed by the reversal key times, the transformed coded image is restored to the coded image.

[0154] In an example of the present application, a method for identity resolution is also provided, the method further comprising:

[0155] If the public key is converted into digital watermark information during encoding, and the digital watermark information is printed on the encoded image, then after the encoded image is obtained, the digital watermark information needs to be identified and converted into a public key.

[0156] In order to implement the above-mentioned identification encryption and encoding method, Figure 6 As shown, an example of the present application provides an identification encryption and encoding system, the system comprising:

[0157] The first acquisition module 10 is used to obtain message data, and symmetrically encrypt the message data based on a symmetric key to obtain first encrypted data, where the symmetric key is a random number;

[0158] A first computing module 20, configured to generate a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext;

[0159] An encoding module 30, configured to perform encoding based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, wherein the summary information is obtained by operating the message data using a hash algorithm;

[0160] The first computing module 20 is also used to generate a reversal key, and encrypt the encoded image based on the reversal key to obtain a transformed encoded image, and the transformed encoded image can be restored to the encoded image based on the reversal key; and to generate a unique identifier, and perform an XOR operation on the transformed encoded image based on the unique identifier to obtain a target encoded image.

[0161] Among them, the encoding module 30 is also used to write the second encrypted data into the first preset area of ​​the encoded image during the encoding, and the first preset area is used to store text information; when encoding, write the symmetric key ciphertext and the public key into the second preset area of ​​the encoded image, and the second preset area is used to store key information; and when encoding, write the summary information into the third preset area of ​​the encoded image, and the third preset area is used to store verification information.

[0162] Among them, the first calculation module 20 is also used to traverse all pixel points in the encoded image, the size of which is determined based on the reversal key; determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the encoded image as the transformed horizontal coordinate; determine the remainder of the sum of the horizontal coordinate of the current pixel point and twice the vertical coordinate and the total number of pixel points in the encoded image as the transformed vertical coordinate; determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and after the traversal is completed, obtain the transformed encoded image.

[0163] Among them, the first calculation module 20 is also used to generate an encryption matrix based on the unique identifier, the size of the encryption matrix is ​​the same as the size of the transform coded image; and perform an XOR operation on the transform coded image based on the encryption matrix to obtain a target coded image.

[0164] In order to implement the above-mentioned identification resolution method, Figure 7 As shown, an example of the present application provides an identity resolution system, the system comprising:

[0165] The second acquisition module 40 is used to obtain a target coded image and identify the target coded image to obtain a unique identifier;

[0166] The second calculation module 50 is used to perform an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image; and obtain a reversal key based on the unique identifier, and decrypt the transformed coded image based on the reversal key to obtain a coded image;

[0167] A decoding module 60, used to decode the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information;

[0168] The second computing module 50 is further used to decrypt the second encrypted data and the symmetric key ciphertext based on the public key to obtain decrypted data; use a hash algorithm to operate the decrypted data to obtain verification information; and when the verification information is the same as the summary information, determine the decrypted data as message data.

[0169] Among them, the second calculation module 50 is also used to traverse all pixel points in the transformed coded image; determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the coded image as the transformed horizontal coordinate; determine the remainder of the sum of the horizontal coordinate of the current pixel point and twice the vertical coordinate and the total number of pixel points in the coded image as the transformed vertical coordinate; determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtain the coded image after the transformed coded image is traversed by the inversion key times.

[0170] In order to implement the above-mentioned identification encryption and encoding method, Figure 8 As shown, the present application also provides an electronic device and a readable storage medium.

[0171] Figure 8 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0172] like Figure 8As shown, the electronic device 600 includes a first acquisition device 601 and a first processor 602, and the first acquisition device 601 and the first processor 602 are electrically connected;

[0173] The first acquisition device 601 obtains message data, and symmetrically encrypts the message data based on a symmetric key to obtain first encrypted data;

[0174] The first processor 602 generates a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypts the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and symmetric key ciphertext; encodes based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image; generates a reversal key, and encrypts the encoded image based on the reversal key to obtain a transformed encoded image; and generates a unique identifier, and performs an XOR operation on the transformed encoded image based on the unique identifier to obtain a target encoded image.

[0175] Among them, when encoding, the first processor 602 writes the second encrypted data into the first preset area of ​​the encoded image; when encoding, writes the symmetric key ciphertext and the public key into the second preset area of ​​the encoded image; when encoding, writes the summary information into the third preset area of ​​the encoded image.

[0176] Among them, the first processor 602 traverses all pixel points in the encoded image, the size of which is determined based on the reversal key; determines the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the encoded image as the transformed horizontal coordinate; determines the remainder of the sum of the horizontal coordinate of the current pixel point and twice the vertical coordinate and the total number of pixel points in the encoded image as the transformed vertical coordinate; determines the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and after the traversal is completed, obtains the transformed encoded image.

[0177] The first processor 602 generates an encryption matrix based on the unique identifier, the size of the encryption matrix is ​​the same as the size of the transform coded image; and performs an XOR operation on the transform coded image based on the encryption matrix to obtain a target coded image.

[0178] In order to implement the above-mentioned identification resolution method, Fig. 9 As shown, the present application also provides an electronic device and a readable storage medium.

[0179] Fig. 9A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0180] like Fig. 9 As shown, the electronic device 700 includes a second acquisition device 701 and a second processor 702, and the second acquisition device 701 and the second processor 702 are electrically connected;

[0181] The second acquisition device 701 obtains a target coded image, and identifies the target coded image to obtain a unique identifier;

[0182] The second processor 702 performs an XOR operation on the target encoded image based on the unique identifier to obtain a transformed encoded image; obtains a reversal key based on the unique identifier, and decrypts the transformed encoded image based on the reversal key to obtain an encoded image; decodes the encoded image to obtain second encrypted data, a symmetric key ciphertext, a public key and summary information; decrypts the second encrypted data and the symmetric key ciphertext based on the public key to obtain first encrypted data and a symmetric key; decrypts the first encrypted data based on the symmetric key to obtain decrypted data; uses a hash algorithm to operate on the decrypted data to obtain verification information; and when the verification information is the same as the summary information, determines the decrypted data as message data.

[0183] Among them, the second processor 702 traverses all pixel points in the transformed coded image; determines the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the coded image as the transformed horizontal coordinate; determines the remainder of the sum of the horizontal coordinate of the current pixel point and twice the vertical coordinate and the total number of pixel points in the coded image as the transformed vertical coordinate; determines the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtains the coded image after the transformed coded image is traversed by the inverted key times.

[0184] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), integrated systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0185] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0186] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0187] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0188] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0189] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0190] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0191] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0192] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for encrypting and encoding an identification, the method comprising: Obtaining message data, and symmetrically encrypting the message data based on a symmetric key to obtain first encrypted data, wherein the symmetric key is a random number; Generate a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext; Encoding is performed based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, wherein the summary information is obtained by operating the message data using a hash algorithm; generating a reversal key, and encrypting the coded image based on the reversal key to obtain a transformed coded image, wherein the transformed coded image can be restored to the coded image based on the reversal key; Generate a unique identifier, and perform an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image; Wherein, the second encrypted data is written into a first preset area of ​​the encoded image during the encoding, and the first preset area is used to store text information; The symmetric key ciphertext and the public key are written into a second preset area of ​​the encoded image during the encoding, and the second preset area is used to store key information: The summary information is written into a third preset area of ​​the coded image during the encoding, and the third preset area is used to store verification information; The step of encrypting the coded image based on the reversal key to obtain a transformed coded image includes: Traversing all pixels in the encoded image, the size of the encoded image being determined based on the reversal key; Determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the horizontal coordinate after transformation; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; After the traversal is completed, the transform coded image is obtained.

2. The method according to claim 1, wherein performing an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image comprises: generating an encryption matrix based on the unique identifier, wherein the size of the encryption matrix is ​​the same as the size of the transform coded image; An XOR operation is performed on the transform coded image based on the encryption matrix to obtain a target coded image.

3. A system for encrypting and encoding an identification, the system comprising: A first acquisition module, used to obtain message data, and symmetrically encrypt the message data based on a symmetric key to obtain first encrypted data, wherein the symmetric key is a random number; A first computing module, configured to generate a private key and a public key by using an asymmetric encryption algorithm, and asymmetrically encrypt the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and a symmetric key ciphertext; an encoding module, configured to perform encoding based on the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image, wherein the summary information is obtained by operating the message data using a hash algorithm; The first calculation module is further used to generate a reversal key, and encrypt the coded image based on the reversal key to obtain a transformed coded image, and the transformed coded image can be restored to the coded image based on the reversal key; and generating a unique identifier, and performing an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image; The encoding module is further configured to, during the encoding, write the second encrypted data into a first preset area of ​​the encoded image, the first preset area being used to store text information; during the encoding, write the symmetric key ciphertext and the public key into a second preset area of ​​the encoded image, the second preset area being used to store key information; and during the encoding, write the summary information into a third preset area of ​​the encoded image, the third preset area being used to store verification information; The first calculation module is further used to traverse all pixel points in the encoded image, the size of the encoded image is determined based on the reversal key; and determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the encoded image as the transformed horizontal coordinate; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtain the transformed coded image after the traversal is completed.

4. An electronic device, comprising: A first acquisition device and a first processor, wherein the first acquisition device and the first processor are electrically connected; The first acquisition device obtains message data, and symmetrically encrypts the message data based on a symmetric key to obtain first encrypted data; The first processor generates a private key and a public key using an asymmetric encryption algorithm, and asymmetrically encrypts the first encrypted data and the symmetric key based on the private key to obtain second encrypted data and symmetric key ciphertext; and encodes the second encrypted data, the symmetric key ciphertext, the public key and summary information to obtain a corresponding encoded image; generating a reversal key, and encrypting the coded image based on the reversal key to obtain a transformed coded image; and generating a unique identifier, and performing an XOR operation on the transform coded image based on the unique identifier to obtain a target coded image; The first processor writes the second encrypted data into a first preset area of ​​the encoded image during the encoding, the first preset area being used to store text information; writes the symmetric key ciphertext and the public key into a second preset area of ​​the encoded image during the encoding, the second preset area being used to store key information; and writes the summary information into a third preset area of ​​the encoded image during the encoding, the third preset area being used to store verification information; The first processor traverses all pixels in the encoded image, the size of which is determined based on the reversal key; and determines the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the transformed horizontal coordinate; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtain the transformed coded image after the traversal is completed.

5. A method for identity resolution, the method comprising: Obtaining a target coded image, and identifying the target coded image to obtain a unique identifier, wherein the unique identifier is printed on an edge of the target coded image; Performing an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image; Obtaining a reversal key based on the unique identifier, and decrypting the transform coded image based on the reversal key to obtain a coded image; Decoding the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information; Decrypting the second encrypted data and the symmetric key ciphertext based on the public key to obtain the first encrypted data and the symmetric key; Decrypting the first encrypted data based on the symmetric key to obtain decrypted data; Using a hash algorithm to calculate the decrypted data to obtain verification information; If the verification information is the same as the summary information, determining the decrypted data as message data; The decrypting the transformed coded image based on the reversal key to obtain the coded image comprises: Traversing all pixels in the transform coded image; Determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixels in the encoded image as the horizontal coordinate after transformation; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine a transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; After the transform coded image is traversed by the inverted key times, the coded image is obtained.

6. An identity resolution system, the system comprising: A second acquisition module is used to obtain a target coded image and identify the target coded image to obtain a unique identifier; A second calculation module, configured to perform an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image; and obtaining a reversal key based on the unique identifier, and decrypting the transform coded image based on the reversal key to obtain a coded image; A decoding module, used for decoding the encoded image to obtain second encrypted data, symmetric key ciphertext, public key and summary information; The second computing module is further configured to decrypt the second encrypted data and the symmetric key ciphertext based on the public key to obtain the first encrypted data and the symmetric key; Decrypting the first encrypted data based on the symmetric key to obtain decrypted data; operating the decrypted data using a hash algorithm to obtain verification information; and determining the decrypted data as message data when the verification information is the same as the summary information; The second calculation module is further used to traverse all pixel points in the transformed coded image; determine the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the coded image as the transformed horizontal coordinate; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtain the encoded image after the transformed encoded image is traversed by the inverted key for times.

7. An electronic device comprising: a second acquisition device and a second processor, wherein the second acquisition device and the second processor are electrically connected; The second acquisition device obtains a target coded image, and identifies the target coded image to obtain a unique identifier; The second processor performs an XOR operation on the target coded image based on the unique identifier to obtain a transformed coded image; Obtaining a reversal key based on the unique identifier, and decrypting the transformed coded image based on the reversal key to obtain a coded image; decoding the coded image to obtain second encrypted data, symmetric key ciphertext, a public key, and summary information; decrypting the second encrypted data and the symmetric key ciphertext based on the public key to obtain first encrypted data and the symmetric key; Decrypting the first encrypted data based on the symmetric key to obtain decrypted data; performing a calculation on the decrypted data using a hash algorithm to obtain verification information; and in a case where the verification information is identical to the summary information, determining the decrypted data as message data; The second processor traverses all pixel points in the transformed coded image; determines the remainder of the sum of the horizontal coordinate and the vertical coordinate of the current pixel point and the total number of pixel points in the coded image as the transformed horizontal coordinate; Determine the remainder of the sum of the current pixel's horizontal coordinate and twice its vertical coordinate and the total number of pixels in the encoded image as the transformed vertical coordinate; Determine the transformed pixel point corresponding to the current pixel point based on the transformed horizontal coordinate and the transformed vertical coordinate; and obtain the encoded image after the transformed encoded image is traversed by the inverted key for times.