Encryption method and decryption method of RGB image

By simulating the protein folding process, RGB images are mapped to amino acid sequences and peptide chains are folded to generate a high-dimensional parameter space and digital signature. This solves the problem of efficiency and security imbalance in existing image encryption technologies and achieves high-security and reversible encryption.

CN121237194APending Publication Date: 2025-12-30KUNPENG PASSWORD EVALUATION TECHNOLOGY (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511480247.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing image encryption technologies are not suitable for the inherent characteristics of image data, resulting in an imbalance between efficiency and security. The encryption process lacks reasonable biological or physical model support, parameter settings rely on experience, and the complete reversibility of the encryption and decryption process is difficult to guarantee, affecting the reliability and maintainability of the system.

Method used

By simulating the protein folding process, the RGB image is decomposed into three channels, mapped to amino acid sequence chains, and peptide chain folding is performed using the simulated annealing algorithm. Sequence scrambling is then performed by combining amino acid hydrophobicity values ​​and polar coordinate angles to generate a high-dimensional, continuous parameter space, thereby increasing the key space. Finally, a folded digital signature is generated using the SHA-256 algorithm for integrity verification.

Benefits of technology

It achieves high-security image encryption, ensures data integrity, and has strong reversibility in the encryption and decryption process, solving the problems of low efficiency and insufficient security in existing technologies, and providing an encryption framework supported by a biophysical model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121237194A_ABST
    Figure CN121237194A_ABST
Patent Text Reader

Abstract

The invention provides an RGB image encryption method and decryption method, and the encryption method comprises the steps: decomposing an RGB image into three channels, mapping the pixel value of each channel into a predefined amino acid symbol, and generating three amino acid sequence chains corresponding to each channel; respectively carrying out peptide chain folding simulation and protein assembly optimization on each amino acid sequence chain; calculating the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain based on the spatial conformation coordinate, and reordering the amino acid sequence according to the angle value to realize sequence scrambling; combining and packaging the scrambled amino acid sequence and the metadata, and outputting final encrypted data; the decryption method is used for decrypting the image encrypted by the encryption method. According to the method, the folding path history and the scrambling mapping relation table are systematically recorded, and each operation of encryption can be strictly and reversely backtracked step by step in the decryption process, so that the original image can be ensured to be restored losslessly and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image encryption and decryption technology, and specifically relates to an encryption and decryption method for RGB images. Background Technology

[0002] With the widespread application of digital images in fields such as cloud computing, the Internet of Things, and medical imaging, their secure storage and transmission have become crucial.

[0003] Current image encryption technologies mainly include symmetric cryptography algorithms (such as AES and DES), chaotic system encryption, and DNA computation encryption. While symmetric cryptography algorithms offer high theoretical security, their design is primarily for text or binary data streams, failing to fully consider the high redundancy and strong pixel correlation inherent in image data. Directly applying them to image encryption leads to low computational efficiency, with encryption speed decreasing sharply as image resolution increases, making it unsuitable for applications with high real-time requirements. Chaotic system encryption utilizes the sensitivity and ergodicity of chaotic systems to initial conditions to scramble and diffuse pixels. However, under limited computer precision, digital chaotic systems are prone to periodic degradation, leading to key stream repetition and significantly reducing practical security, posing a risk of prediction or reconstruction. DNA computation encryption maps image pixels to DNA base sequences (A, T, C, G) and performs calculations using complementary base pairing rules. Its main drawback is that the symbol set contains only four states, effectively compressing pixel information to 2 bits, resulting in an exponentially smaller key space and insufficient robustness against brute-force attacks and statistical analysis.

[0004] In summary, existing image encryption technologies are not suitable for the inherent characteristics of image data, resulting in an imbalance between efficiency and security. The encryption process lacks a reasonable biological or physical model to support it, parameter settings rely on experience, and the complete reversibility of the encryption and decryption process is difficult to guarantee, affecting the reliability and maintainability of the system. Furthermore, there is a lack of efficient and loosely coupled mechanisms to verify whether the ciphertext has been tampered with after transmission. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes an encryption and decryption method for RGB images. By simulating the complex biophysical process of protein folding, an image encryption framework with a large key space, high security strength, built-in integrity verification, and biologically interpretable mechanism is constructed.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: An encryption method for RGB images includes the following steps: The RGB image is decomposed into three channels, and the pixel value of each channel is mapped to a predefined amino acid symbol to generate three amino acid sequence chains corresponding to each channel; Peptide chain folding simulation is performed on each amino acid sequence chain. The peptide chain folding simulation is based on the hydrophobicity value of the amino acid and uses simulated annealing algorithm for conformation optimization. With the goal of minimizing energy, the spatial conformation coordinates and folding path record of each peptide chain are output. Based on the spatial conformation coordinates, the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain is calculated, and the amino acid sequence is reordered according to the angle value to achieve sequence scrambling; The scrambled amino acid sequence is combined with metadata and encapsulated to output the final encrypted data; the metadata includes at least a folded digital signature for verifying data integrity and a scrambled mapping table for decryption.

[0007] Furthermore, the pixel value of each channel is mapped to a predefined amino acid symbol. Specifically, the pixel value of each channel is mapped to a preset number of amino acid symbols using a linear mapping algorithm.

[0008] Furthermore, the specific process of peptide chain folding simulation is as follows: Initialize the random initial conformation of the peptide chain in two-dimensional or three-dimensional space; Calculate the total energy of the current conformation based on the hydrophobicity value of the amino acid; Under the control of the simulated annealing algorithm, new conformations are generated by randomly perturbing the positions of amino acids, and the Metropolis criterion is used to determine whether to accept the new conformation. The process is iterated until the energy converges or the termination condition is met.

[0009] Furthermore, before calculating the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain based on the spatial conformation coordinates, the process also includes: The spatial conformations of the peptide chains in each channel are combined, and the interaction energies between channels are calculated. The combined structure is then optimized using a simulated annealing algorithm, and the optimized assembly structure coordinates are used as the basis for spatial scrambling encryption.

[0010] Furthermore, the method for generating a folded digital signature is as follows: after concatenating all the final amino acid spatial coordinate data, the data is input into the SHA-256 hash algorithm to generate a folded digital signature.

[0011] This invention also proposes a method for decrypting RGB images, used to decrypt images encrypted by an encryption method, comprising the following steps: The encrypted data is parsed to extract the scrambled amino acid sequence and metadata; the integrity of the data is verified using the folded digital signature in the metadata. After verification, the scrambled amino acid sequence is restored to the original amino acid sequence after folding and before scrambling, based on the scrambling mapping table in the metadata. Each amino acid symbol in the recovered amino acid sequence is reverse-mapped to its corresponding pixel value, and the pixel matrix of the three channels is recombined according to the original image size to output the decrypted RGB image.

[0012] Furthermore, metadata is stored in a file or data area separate from the encrypted image body, and data parsing is completed by reading this separate file or data area.

[0013] Furthermore, when verifying the integrity of the data using the folded digital signature in the metadata, if the folded digital signature verification fails, the decryption process is terminated and an error message is output.

[0014] Furthermore, the scrambling mapping table is used to record the original order index of amino acids before they are sorted by polar coordinate angles during the encryption process.

[0015] Furthermore, the execution of the decryption method relies on the folded path record and scrambling mapping table generated and stored in the metadata during the encryption method, in order to achieve complete reversibility of the encryption process. The effects described in the invention are merely those of the embodiments, and not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects: This invention proposes an encryption and decryption method for RGB images. This encryption method is no longer a simple number or string, but rather a high-dimensional, continuous parameter space composed of the initial peptide chain conformation, amino acid hydrophobicity model parameters, the initial temperature of the simulated annealing algorithm, and the cooling rate. This significantly increases the difficulty for attackers to exhaustively search or guess the key. Innovatively, the final stable protein spatial conformation coordinates are used as a "digital fingerprint," and a folded digital signature is generated using the SHA-256 algorithm. Any tampering with the encrypted data (including the ciphertext sequence or metadata) will cause the signature verification to fail during final decryption, thus enabling immediate and accurate detection of data integrity. The entire encryption process simulates peptide chain folding and protein assembly with clear biophysical significance. Each transformation step (such as hydrophobic interaction-driven folding and spatial coordinate sorting) has a reasonable scientific explanation, avoiding the problems of parameter empiricalization and difficulty in proving security boundaries in traditional chaotic encryption.

[0016] This invention systematically records the history of folding paths and scrambling mapping relationships. The decryption process can strictly and step-by-step reverse back each operation of encryption, thereby ensuring that the original image can be restored without loss and with precision, solving the problem of poor reversibility of some encryption methods. Attached Figure Description

[0017] Figure 1 This is a flowchart of an RGB image encryption method proposed in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the simulated peptide chain folding process in cells as proposed in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of protein assembly as proposed in Example 1 of the present invention; Figure 4 This is a flowchart of an RGB image decryption method proposed in Embodiment 2 of the present invention. Detailed Implementation

[0018] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure of the invention, components and arrangements of specific examples are described below. Furthermore, reference numerals and / or letters may be repeated in different examples. This repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. It should be noted that the components illustrated in the drawings are not necessarily drawn to scale. Descriptions of well-known components, processing techniques, and processes are omitted in this invention to avoid unnecessarily limiting the invention.

[0019] Example 1 Embodiment 1 of this invention proposes an RGB image encryption method to solve the technical problems existing in the prior art of RGB images. This application simulates the RGB image encryption process as a biological process of peptide chain folding, specifically including: The RGB image is decomposed into three channels, and the pixel value of each channel is mapped to a predefined amino acid symbol to generate three amino acid sequence chains corresponding to each channel; Peptide chain folding simulation is performed on each amino acid sequence chain. The peptide chain folding simulation is based on the hydrophobicity value of the amino acid and uses simulated annealing algorithm for conformation optimization. With the goal of minimizing energy, the spatial conformation coordinates and folding path record of each peptide chain are output. Based on the spatial conformation coordinates, the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain is calculated, and the amino acid sequence is reordered according to the angle value to achieve sequence scrambling; The scrambled amino acid sequence is combined with metadata and encapsulated to output the final encrypted data; the metadata includes at least a folded digital signature for verifying data integrity and a scrambled mapping table for decryption.

[0020] Figure 1 This is an encryption method for RGB images proposed in Embodiment 1 of the present invention.

[0021] In step S11, the RGB image is decomposed into three channels, and the pixel value of each channel is mapped to a predefined amino acid symbol to generate three amino acid sequence chains corresponding to each channel; The input RGB color image is decomposed into three independent channels: red (R), green (G), and blue (B). The pixel value (range 0-255) of each channel is converted into 20 standard amino acid symbols through a linear mapping algorithm, and three independent amino acid sequence chains corresponding to each channel are output. Specifically, these include: red amino acid sequence chain, green amino acid sequence chain, and blue amino acid sequence chain.

[0022] In this application, the linear mapping algorithm can employ equally spaced linear mapping, that is, the pixel value range of 0-255 is evenly divided into 20 continuous sub-intervals, each sub-interval uniquely corresponding to a standard amino acid symbol. For example, the pixel value range [0,12] is mapped to amino acid 'A', [13,25] is mapped to 'R', and so on.

[0023] Table 1 below shows an example table of converting RGB channel pixel values ​​into amino acid sequences.

[0024] Table 1: Examples of converting RGB channel pixel values ​​to amino acid sequences

[0025] The pixel-amino acid mapping step in this application is a lossy encoding process that converts image data from the pixel domain to the biological sequence domain.

[0026] In step S12, the folding of peptide chains within cells is simulated after obtaining the amino acid sequence chain; Figure 2 This is a schematic diagram of the simulated peptide chain folding process in cells as proposed in Embodiment 1 of the present invention; Initialize the random initial conformation of the peptide chain in two-dimensional or three-dimensional space; The total energy of the current conformation is calculated based on the hydrophobicity values ​​of amino acids; each amino acid is assigned a scientifically validated hydrophobicity value, with hydrophilic amino acids having negative values ​​and hydrophobic amino acids having positive values. Under the control of the simulated annealing algorithm, new conformations are generated by randomly perturbing the positions of amino acids, and the Metropolis criterion is used to determine whether to accept the new conformation. The process is iterated until the energy converges or the termination condition is met. Specifically, amino acids are randomly selected for positional movement, and the movement magnitude is positively correlated with the current temperature. The output includes the folding path history, the final spatial conformation coordinates, and the energy change trajectory.

[0027] Protein assembly optimization: The spatial conformation of the peptide chain in each channel is combined and the interaction energy between channels is calculated. The combined structure is then optimized as a whole using the simulated annealing algorithm. The coordinates of the optimized assembly structure are used as the basis for spatial scrambling encryption.

[0028] Figure 3 This is a schematic diagram of protein assembly as proposed in Example 1 of the present invention; specifically: Essential data are extracted from the folding results of the three channels (R, G, B), including the final spatial conformation coordinates, amino acid characteristic information (such as hydrophobicity value, charge, hydrogen bond donor, hydrogen bond acceptor, etc.), and folding path records.

[0029] The extracted data is normalized to ensure that the data from different channels are within the same scale range, so that subsequent assembly calculations can be performed accurately.

[0030] A feature vector is constructed for each amino acid, containing the following information: hydrophobicity value: indicating whether the amino acid is hydrophobic or hydrophilic; charge: indicating the charge state of the amino acid; hydrogen bond donor: indicating whether the amino acid can act as a hydrogen bond donor; hydrogen bond acceptor: indicating whether the amino acid can act as a hydrogen bond acceptor.

[0031] Performing rigid transformations (overall rotation + translation) preserves the internal folding conformation of a single chain, simulating the initial state of proteins in different positions and orientations within a living organism, and providing diverse starting conditions for subsequent assembly searches.

[0032] The assembly optimization is performed using the simulated annealing algorithm, and the specific steps are as follows: By calculating the interaction energies (including hydrophobic interaction energies, charge interaction energies, and hydrogen bond interaction energies) between different channel peptide chains in batches, and only calculating the interaction energies for amino acid pairs smaller than the cutoff radius r0 = 12 Å, the complexity is reduced and the total energy of the assembled system is calculated efficiently.

[0033] The interaction energy between hydrophobic amino acids is negative, indicating attractive force.

[0034] The interaction energy of like charges is positive (repulsion), and the interaction energy of unlike charges is negative (attraction).

[0035] The interaction energy between hydrogen-hydrogen bond donors and acceptors is negative, indicating attractiveness.

[0036] Total energy: is the sum of the three interaction energies mentioned above.

[0037] The system temperature is gradually reduced based on the set initial temperature and cooling rate. At each temperature, the peptide chain structure is randomly perturbed (e.g., rotated, translated) with a certain probability to simulate the dynamic changes during protein assembly.

[0038] The acceptance criterion of simulated annealing is used to determine whether to accept a new peptide chain structure. If the new structure has a lower energy, it is accepted directly; if the new structure has a higher energy, it is accepted with a certain probability to avoid local optima.

[0039] During assembly, the changes in system energy are continuously recorded. When the rate of energy change is below a set threshold for several consecutive steps, if ΔE / E < 1 × 10⁻ for 50 consecutive steps... 4 If the simulated annealing process meets the preset convergence condition (e.g., the rate of energy change ΔE / E is less than 1×10⁻⁻⁻⁶ within 50 consecutive steps), then convergence is determined, and the energy is considered to have converged, indicating that the assembly process has reached a stable state. 4 The computation terminates and the current configuration is adopted when the maximum number of iterations is reached. The reversibility of the system is guaranteed by recording the complete folding path, rather than by reaching the mathematical global energy minimum.

[0040] When the energy converges or the preset maximum number of iterations is reached, the assembly optimization calculation stops, and the final assembly result is output.

[0041] The protein assembly optimization step in this application aims to enhance the avalanche effect by deeply coupling the encryption process of the three channels through inter-channel interactions. The decryption system does not need to repeat this assembly process, as the required scrambling mapping table has already been generated and saved during the encryption stage based on the final conformation after assembly optimization.

[0042] In step S13, the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain is calculated based on the spatial conformation coordinates, and the amino acid sequence is reordered according to the angle value to achieve sequence scrambling and generate a scrambling mapping table.

[0043] Calculate the geometric center of the peptide chain, determine the polar coordinate angles of each amino acid, reorder the amino acid sequence in ascending order of angle values, concatenate all the three-dimensional coordinates of the amino acids as single-precision floating-point numbers and input them into SHA-256 (final conformation coordinates), and store the scrambled mapping table (for decryption).

[0044] In step S14, the scrambled amino acid sequence is combined with metadata and encapsulated to output the final encrypted data; the metadata includes at least a folded digital signature for verifying data integrity and a scrambled mapping table for decryption.

[0045] The encrypted image body includes: the scrambled amino acid sequence.

[0046] The metadata area includes: original image size, folding parameters for each channel (number of steps, temperature), final energy value, and fold digital signature.

[0047] The independent metadata file includes (in JSON format): complete fold path records, hydrophobic distribution data, and a scrambling mapping table.

[0048] Before generating the signature, this application standardizes the floating-point coordinates. Specifically, when generating the folded digital signature, the spatial coordinates of all amino acids are concatenated in a predetermined order (e.g., by the original sequence index). The X, Y, and Z components of each coordinate are converted into a fixed-precision string representation (e.g., retaining 6 decimal places) using a uniform delimiter. This string is then encoded into a byte stream and input into the SHA-256 algorithm.

[0049] The RGB image encryption method proposed in Embodiment 1 of this invention constructs an image encryption framework with a large key space, high security strength, built-in integrity verification, and biologically interpretable mechanism by simulating the complex biophysical process of protein folding.

[0050] Example 2 Embodiment 2 of the present invention also proposes a method for decrypting RGB images, used to decrypt images encrypted by the RGB image encryption method proposed in Embodiment 1. Figure 4 Here is a flowchart of an RGB image decryption method proposed in Embodiment 2 of the present invention: The encrypted data is parsed to extract the scrambled amino acid sequence and metadata; the integrity of the data is verified using the folded digital signature in the metadata. The integrity verification process includes: the system extracting the folded digital signature from the metadata; simultaneously reconstructing the spatial coordinates of the amino acids from the main data (this requires using folded path records or final conformational coordinate data); inputting the reconstructed coordinate data back into the SHA-256 algorithm to calculate a new signature; and comparing the calculated new signature with the original signature stored in the metadata. If the two signatures do not match, it indicates that the encrypted data has been tampered with during transmission or storage. The system immediately terminates the decryption process and returns an error message stating "Data integrity verification failed." If the signatures match perfectly, it proves that the data is complete and authentic, and the decryption process continues.

[0051] After verification, the scrambled amino acid sequence is restored to the original amino acid sequence after folding and before scrambling, based on the scrambling mapping table in the metadata. In this application, the scrambling mapping table is a one-time mapping record generated during the encryption process based on the unique spatial configuration produced in each folding simulation. The decryption system can directly perform the reverse permutation by reading this table, without needing to and being able to reproduce the folding process. To ensure consistency between encryption and decryption, the pseudo-random number generator seed used in the folding simulation should be stored as a core key parameter.

[0052] The scrambling mapping table is traversed. For each entry in the table: based on the "scrambling index" (new position), the corresponding amino acid is found in the encrypted amino acid sequence. Based on the "original sequence index" (old position), this amino acid is placed into the specified position in the restored sequence. After this process is completed, the amino acid sequence before scrambling and after folding is obtained.

[0053] Each amino acid symbol in the recovered amino acid sequence is reverse-mapped to its corresponding pixel value, and the pixel matrix of the three channels is recombined according to the original image size to output the decrypted RGB image.

[0054] Use the exact same mapping rules as during encryption (such as a linear mapping table), but perform the reverse operation. For example, when encountering the amino acid symbol A, reverse map it to the midpoint value of the pixel value range 0-12 (such as 6) or precisely restore it according to the rules agreed upon during encryption.

[0055] Since the amino acid sequences of the R, G, and B channels are processed independently during decryption, the system fills the pixel values ​​obtained from the reverse mapping into three independent matrices, which correspond to the R, G, and B channels of the original image, respectively. The three single-channel pixel matrices (R, G, B) obtained in the above steps are then merged according to the dimensions of the original image (obtained from the metadata) and recombined into a complete RGB color image matrix.

[0056] The final image matrix is ​​converted to a standard image file format (such as PNG or BMP), and the decrypted image is output. At this point, the output image should be completely identical to the original input image, achieving lossless decryption. Lossless decryption means that, given all the metadata (i.e., the key), the system can accurately perform the reverse mapping process from the encoded sequence to recover the pixel values ​​before encoding.

[0057] The RGB image decryption method proposed in Embodiment 2 of this invention can strictly and step-by-step reverse back each encryption operation, thereby ensuring that the original image can be restored without loss and accurately, solving the problem of poor reversibility of some encryption methods.

[0058] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that the elements inherent in a process, method, article, or apparatus that includes a list of elements are included. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Additionally, portions of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0059] While specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art can make other modifications or variations based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for encrypting RGB images, characterized in that, Includes the following steps: The RGB image is decomposed into three channels, and the pixel value of each channel is mapped to a predefined amino acid symbol to generate three amino acid sequence chains corresponding to each channel; Peptide chain folding simulation is performed on each amino acid sequence chain. The peptide chain folding simulation is based on the hydrophobicity value of the amino acid and uses simulated annealing algorithm for conformation optimization. With the goal of minimizing energy, the spatial conformation coordinates and folding path record of each peptide chain are output. Based on the spatial conformation coordinates, the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain is calculated, and the amino acid sequence is reordered according to the angle value to achieve sequence scrambling; The scrambled amino acid sequence is combined with metadata and encapsulated to output the final encrypted data; the metadata includes at least a folded digital signature for verifying data integrity and a scrambled mapping table for decryption.

2. The encryption method according to claim 1, characterized in that, The pixel value of each channel is mapped to a predefined amino acid symbol. Specifically, the pixel value of each channel is mapped to a preset number of amino acid symbols using a linear mapping algorithm.

3. The encryption method according to claim 1, characterized in that, The specific process of peptide chain folding simulation is as follows: Initialize the random initial conformation of the peptide chain in two-dimensional or three-dimensional space; Calculate the total energy of the current conformation based on the hydrophobicity value of the amino acid; Under the control of the simulated annealing algorithm, new conformations are generated by randomly perturbing the positions of amino acids, and the Metropolis criterion is used to determine whether to accept the new conformation. The process is iterated until the energy converges or the termination condition is met.

4. The encryption method according to claim 1, characterized in that, Before calculating the polar coordinate angle of each amino acid relative to the geometric center of the peptide chain based on the spatial conformation coordinates, the method further includes: combining the spatial conformations of the peptide chain of each channel, calculating the interaction energy between channels, and then using the simulated annealing algorithm to optimize the combined structure as a whole, using the optimized assembled structure coordinates as the basis for spatial scrambling encryption.

5. The encryption method according to claim 1, characterized in that, The method for generating a folded digital signature is as follows: after concatenating all the final amino acid spatial coordinate data, input it into the SHA-256 hash algorithm to generate a folded digital signature.

6. A method for decrypting RGB images, used to decrypt images encrypted by the encryption method according to any one of claims 1 to 5, characterized in that, Includes the following steps: The encrypted data is parsed to extract the scrambled amino acid sequence and metadata; the integrity of the data is verified using the folded digital signature in the metadata. After verification, the scrambled amino acid sequence is restored to the original amino acid sequence after folding and before scrambling, based on the scrambling mapping table in the metadata. Each amino acid symbol in the recovered amino acid sequence is reverse-mapped to its corresponding pixel value, and the pixel matrix of the three channels is recombined according to the original image size to output the decrypted RGB image.

7. The decryption method according to claim 6, characterized in that, Metadata is stored in a file or data area separate from the encrypted image body, and data parsing is completed by reading this separate file or data area.

8. The decryption method according to claim 6, characterized in that, When verifying the integrity of data using the folded digital signature in the metadata, if the folded digital signature verification fails, the decryption process is terminated and an error message is output.

9. The decryption method according to claim 6, characterized in that, The scrambling mapping table is used to record the original order index of amino acids before they are sorted by polar coordinate angles during the encryption process.

10. The decryption method according to claim 6, characterized in that, The execution of the decryption method relies on the folded path record and scrambling mapping table generated in the encryption method and stored in the metadata, which is used to achieve complete reversibility of the encryption process.