Image encryption method and device, image decryption method and device, equipment and medium

By combining quantum boson sampling and logical mapping to generate keys, the image is encrypted, which solves the problem of insufficient randomness of image encryption keys in the prior art, and significantly improves the security of the encryption system.

CN120050364APending Publication Date: 2025-05-27CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510188856.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing image encryption method based on logical mapping has problems with periodicity and predictability, resulting in reduced randomness of the key and facing potential security threats.

Method used

Quantum Bose sampling is used to generate the first key, and a second key is generated in combination with logical mapping, so as to encrypt the encrypted image. Specific steps include positional scrambling encryption, exclusive or encryption and block cyclic shift encryption to ensure the randomness of the key and the strength of the encryption.

Benefits of technology

By combining quantum boson sampling and logical mapping to generate keys, the randomness of keys is significantly improved, the security of the image encryption system is enhanced, and the leakage of sensitive information is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050364A_ABST
    Figure CN120050364A_ABST
Patent Text Reader

Abstract

According to the image encryption method and device, the decryption method and device, the equipment and the medium, the first secret key generated by quantum wave color sampling and the second secret key generated by logic mapping are combined for image encryption, the randomness of secret key generation can be ensured, an attacker is difficult to decode the secret keys, leakage of sensitive information is avoided, and the encryption efficiency is improved. And the security of the encryption system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular, to an image encryption method, a decryption method, a device, a device, and a medium. Background Art

[0002] In today's digital age, information security has become increasingly important. As a key information carrier, image encryption technology runs through all aspects of image processing. The accompanying logical mapping Logistic Map encryption image scheme is also continuously optimized to provide all-round and multi-level security protection for images.

[0003] As a typical example of chaotic mapping, the logical mapping is highly sensitive to initial conditions, and the generated sequence has pseudo-randomness. In image encryption applications, it can transform image information into seemingly irregular data, increasing the difficulty of interpreting the image information after being stolen, and can effectively resist common attack means in various application scenarios, ensuring the confidentiality of images.

[0004] However, although many current encryption methods based on logical mapping have significant advantages, there are still problems such as insufficient initial conditions and specific parameter settings, which may lead to periodicity and predictability problems, reducing the randomness of the generated key, and making the encryption system face potential security threats. Attackers may take advantage of this to break the key and obtain sensitive information. Summary of the Invention

[0005] This application proposes an image encryption method, a decryption method, a device, a device, and a medium, which can solve the problems of periodicity and predictable behavior in image encryption and decryption.

[0006] To achieve the above object, this application adopts the following technical solutions:

[0007] In a first aspect, an image encryption method is provided, and the encryption method includes:

[0008] Obtaining an image to be encrypted; and

[0009] Encrypting the image to be encrypted by using a first key generated by quantum boson sampling and a second key generated by a logical mapping logistic map,

[0010] wherein, the iteration formula of the logical mapping is X n+1 = μX n (1 - X n ), where X n is the pre-iteration value of the second key, X n+1 is the post-iteration value of the second key, n is the number of iterations, μ is the iteration parameter, and X 1 and μ are determined by the gray mean value of the image to be encrypted.

[0011] Based on the above technical solution, the first key generated by quantum boson sampling and the second key generated by logical mapping are combined for image encryption, which can ensure the randomness of the generated key, making it difficult for attackers to decipher the key, avoiding the leakage of sensitive information, and ensuring the security of the encryption system.

[0012] In a possible design manner of the first aspect, the grayscale mean M is:

[0013]

[0014] where N is the total number of pixels of the image to be encrypted, p i is the grayscale value of the i-th pixel of the image to be encrypted, X1 = M / 255, μ = 2 + M / 128.

[0015] In a possible design manner of the first aspect, when M < 200.96, let M = 200.96, and when M > 256, let M = 256, so that 3.57 ≤ μ ≤ 4, 0 < X1 < 1.

[0016] In a possible design manner of the first aspect, the first key includes a first sub-key and a second sub-key. Encrypting the image to be encrypted with the first key generated by quantum boson sampling specifically includes:

[0017] Using the first sub-key to perform position scrambling encryption and XOR encryption on the image to be encrypted; and

[0018] Using the second sub-key to perform block cyclic shift encryption on the data after XOR encryption.

[0019] In the second aspect, an image decryption method is provided, and the decryption method corresponds to the above encryption method.

[0020] In the third aspect, an image encryption device is provided, and the image encryption device includes:

[0021] A first acquisition unit for obtaining the image to be encrypted; and

[0022] An encryption unit for encrypting the image to be encrypted with the first key generated by quantum boson sampling and the second key generated by the logical mapping logisticmap,

[0023] where the iterative formula of the logical mapping is X n+1 = μX n (1 - X n ), where X n is the pre-iteration value of the second key, X n+1is the iterated value of the second key, n is the number of iterations, μ is the iteration parameter, and X 1 and μ are determined by the grayscale mean of the image to be encrypted.

[0024] Fourthly, an image decryption device is provided. The image decryption device includes:

[0025] a second acquisition unit configured to acquire data to be decrypted; and

[0026] a decryption unit configured to decrypt the data to be decrypted by using the decryption method corresponding to the encryption unit as described above.

[0027] Fifthly, an electronic device is provided. The electronic device includes: a processor and a memory coupled to the processor. The memory is configured to store a computer program. The processor is configured to execute the computer program stored in the memory so that the electronic device executes the encryption method according to any possible implementation manner in the first aspect, or executes the decryption method as described in the second aspect.

[0028] Sixthly, a computer-readable storage medium is provided, including a computer program or instruction. When the computer program or instruction runs on a computer, the computer is caused to execute the encryption method according to any possible implementation manner in the first aspect, or execute the decryption method as described in the second aspect. Description of the Drawings

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings in the following description are only some embodiments of the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0030] Figure 1 is a relationship diagram between the sequence generated by the logistic map provided in the embodiment of the present application and μ;

[0031] Figure 2 is a flowchart of an application of a key generation construction method based on chaotic quantum boson sampling and a logistic map encryption image scheme to the field of image transmission provided in the embodiment of the present application;

[0032] Figure 3 is a flowchart of a logistic map encryption image scheme provided in the embodiment of the present application;

[0033] Figure 4 is a flowchart of quantum boson sampling provided in the embodiment of the present application;

[0034] Figure 5 It is the probability distribution diagram of the output state of quantum boson sampling provided by an embodiment of the present application;

[0035] Figure 6 It is the flowchart of the key generation construction method based on chaotic quantum boson sampling and the logistic map encryption image scheme provided by an embodiment of the present application;

[0036] Figure 7 It is an example of applying the key generation construction method based on chaotic quantum boson sampling and the logistic map image encryption scheme to the field of image transmission provided by an embodiment of the present application. Detailed implementation manners

[0037] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the flowchart. Terms such as "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0040] Before introducing the embodiments of the present application, a brief description of the current technical research of the present application will be given first:

[0041] Comparison scheme 1: The paper "Chaotic Image Encryption Based on Boson Sampling" (authors: Shi Jinjing, etc.) published in Advanced Quantum Technologies in 2022 specifically mentions a chaotic image encryption (decryption) method and corresponding system based on boson sampling, mainly involving:

[0042] In the process of image encryption, first, based on boson sampling, a random sequence is generated. Then, the image to be encrypted is subjected to Arnold Transform and global position scrambling. Next, using the random sequence generated by boson sampling, subsequent block cyclic shift encryption and pixel XOR encryption are performed;

[0043] Correspondingly, during the image decryption process, block cyclic shift decryption and pixel exclusive-or decryption are first performed, and then, Arnold inverse transformation and global position regression are carried out.

[0044] Comparison Scheme 2: The Logistic Map uses the iterative formula X n+1 = μX n (1 - X n ) to generate the corresponding position scrambling key. Among them, X n is the pre-iteration value of the key, X n+1 is the post-iteration value of the key, n is the number of iterations, and μ is the iteration parameter. In the prior art, the value range of μ is 0 ≤ μ ≤ 4. As Figure 1 shown, on the one hand, when μ takes values in the range of 0 ≤ μ ≤ 3.57, the generated key does not have strong randomness. The value of X1 is fixed. When μ increases, Xn corresponds to multiple values (if it only corresponds to one value, it is fixed and has no randomness), which reflects randomness. However, this will lead to periodicity and predictability problems, reducing the randomness of the generated key and making the encryption system face potential security threats; when 3.57 ≤ μ ≤ 4, although the key has relatively strong randomness, under specific precision conditions, the number of value types is certain. For example, if the precision of both μ and X1 is two decimal places, there are 43 values for μ and 98 values for X 1 , and the total number of values is certain. Attackers can completely perform brute-force attacks through exhaustive methods and then decrypt the image.

[0045] Among them, the reasons for the periodicity problem are as follows:

[0046] First, the inherent nature of mathematical iteration: From the mathematical expression of the Logistic Map x n+1 = μx n (1 - x n ), it is a quadratic iterative function. When μ is in a specific interval, some fixed points or periodic points will be generated during the iterative process. For example, when μ is between 3 and approximately 3.45, periodic points with a period of 2 will appear, that is, the system will alternate between two values; when μ is between 3.45 and approximately 3.54, periodic points with a period of 4 will appear, and the system will cycle among four values.

[0047] Second, the existence of attractors: In the dynamic system, the concept of attractors exists. When μ is between 0 and 3.57, the system has stable attractors, and these attractors will attract the orbits of the system, causing the system to finally change periodically around the state of the attractor. For example, when μ is between 2 and 3, there is a stable fixed-point attractor, and the system will gradually converge to this fixed point; when μ is greater than 3, the attractor may be a periodic orbit, resulting in periodic oscillations of the system.

[0048] Simply put, when a sequence is not random, a pattern can surely be found to predict it, and this pattern is the period. If no pattern can be found, then the sequence is random.

[0049] To solve the above technical deficiencies, an embodiment of the present application, as Figures 1 to 7 shown, provides an image encryption and decryption method based on chaotic quantum boson sampling, mainly involving: a key generation construction method based on chaotic quantum boson sampling, a logistic map image encryption method, and a corresponding decryption method. Specifically:

[0050] The key generation construction method and the logistic map image encryption scheme based on chaotic quantum boson sampling provided by the present invention have the following encryption steps:

[0051] Step 1: Process the image to be transmitted, including grayscale conversion and image scaling, to facilitate image encryption.

[0052] Image grayscale conversion is the process of converting a color image into a grayscale image. A color image usually contains rich color information, and its data structure is relatively complex, which will increase the computational amount and processing difficulty during encryption. Through grayscale conversion, using a specific algorithm to calculate the color values of the red (R), green (G), and blue (B) channels of each pixel point in the color image according to a certain weight ratio, that is, Gray = 0.2989 * R + 0.5870 * G + 0.1140 * B, so as to convert each pixel point into a single grayscale value. Image scaling is to adjust the size of the image according to the actual encryption requirements. Through image scaling technology, methods such as nearest neighbor interpolation and bilinear interpolation can be used to adjust the size of the image to a suitable size while maintaining the basic characteristics of the image for easy transmission.

[0053] Step 2: Use quantum boson sampling to generate keys S1 and S2.

[0054] As Figure 3 shown, step 1 specifically includes:

[0055] The input state of M-mode N photons in quantum boson sampling is

[0056]

[0057] where j i represents the number of photons in the i-th mode, satisfying j 1 + j 2 + … + j M = N , is the photon annihilation operator of the i-th mode.

[0058] The evolution of the input state is based on the following formula

[0059]

[0060] where is the unitary matrix representing the linear optical network. The devices constituting the linear interferometer include a phase shifter (PS) and a beam splitter (BS), and U represents the transmission matrix in the linear optical network.

[0061] The unitary matrix form of the phase shifter is defined as

[0062] PS(θ) = e inθ (3)

[0063] where n represents the number of photons, i is the imaginary unit, and θ is the phase shift angle.

[0064] The unitary matrix form of the beam splitter is defined as

[0065]

[0066] where represents the phase angle, and φ represents the bias angle.

[0067] As Figure 4 shown, the output state of quantum boson sampling is

[0068]

[0069] where S is a constant of the unitary operator, n i is the number of photons output to the i-th mode, γ S represents the amplitude of S, which is calculated by the permanent of the product of the unitary matrix determined by the linear interferometer and the input-output state. Per(Us) represents the permanent of the matrix Us. The permanent of a matrix is a function similar to but different from the determinant, defined on a square matrix.

[0070]

[0071] The probability Ps of outputting a certain state is:[[]]

[0072]

[0073] We can use the distribution probability to generate a chaotic sequence, and then map this chaotic sequence to the desired keys S1 and S2.

[0074] Step 3: First, calculate the pixel mean of the transmitted image according to the formula

[0075] where N is the total number of image pixels, and p i is the gray value of the i-th pixel.

[0076] Then process M. If M < 200.96, let M = 200.96; if M > 256, let M = 256. Finally, calculate X1 = M / 255 and μ = 2 + M / 128. The obtained μ will be between 3.57 and 4, and 0 < X1 < 1, meeting the parameter requirements of the logistic map and ensuring that the subsequently generated key has good chaotic characteristics and security.

[0077] If 200.96 <= M <= 256, directly substitute the value of M into the formulas X1 = M / 255 and μ = 2 + M / 128 for calculation.

[0078] Such a design of the calculation formula is to limit the value of μ between 3.57 and 4. As can be seen from the following Figure 1 When μ is between 3.57 and 4, the generated sequence has strong randomness. Of course, other values can be used for M as long as the value of μ can be limited between 3.57 and 4.

[0079] Calculating μ through the image mean M can enhance the security of this encryption scheme. Without decrypting the image, the attacker cannot obtain the specific value of the image mean and thus cannot generate the correct key.

[0080] Step 4: Use μ, X1 and the formula X n+1 = μX n (1 - X n ) to continuously iterate and generate the key key. Arrange the key sequence in descending order, and then generate B to record the positions of each element before the arrangement. Due to the extreme sensitivity of the logistic map to the initial conditions, the generated key has security.

[0081] Arrange the key sequence in descending order. The sequence B is used to record the positions of each element in key before the arrangement. For example, if the key sequence is 51324, the descending order is 54321, and the B sequence is 15342.

[0082] Step 5: Expand the two-dimensional image into a one-dimensional array H, and use K i = H Bi for scrambling. B is used to record the positions of each element in key before the descending order arrangement, and K is the newly generated one-dimensional grayscale value array. This step can disrupt the original arrangement order of the image pixels, making it difficult for the image data to be recognized and interpreted without authorization.

[0083] Step 6: Arrange S1 in descending order, record the positions C of each element before the arrangement, and use I i = K CiPerform secondary scrambling. C is used to record the positions of the elements in S1 before sorting from large to small, and I is a newly generated one-dimensional grayscale value array. This further increases the degree of chaos of the image data and enhances the encryption strength.

[0084] Step 7: Use the generated key S 1 and perform XOR encryption. Through XOR operation, the image data is tightly combined with the key, making it impossible to restore the encrypted image data without the correct key. S 1 is the key generated by boson sampling, and F is a newly generated one-dimensional grayscale value array

[0085] Step 8: Restore F to a two-dimensional image G with dimensions M and N and divide it into four equal parts. The first M / 2 rows and the first N / 2 columns form G1, the first M / 2 rows and the last N / 2 columns form G2, the last M / 2 rows and the first N / 2 columns form G3, and the remaining part forms G4. Then use the formula to shift left by the corresponding number of times respectively.

[0086] G′ 1 = G 1 <<< left 1 , where left 1 = mod(S 2 , 8),

[0087] G′ 2 = G 2 <<< left 2 , where left 2 = mod(G′ 1 , 8),

[0088] G′ 3 = G 3 <<< left 3 , where left 3 = mod(G′ 2 , 8),

[0089] G′ 4 = G 4 <<< left 4 , where left 4 = mod(G′ 3 , 8).

[0090] Step 9: Recombine the four parts into a two-dimensional image in the original order, denoted as E, that is, the encryption is completed.

[0091] Step 10: Then transmit the ciphertext image E in a specific way.

[0092] Since the methods used for encryption are all reversible operations, decryption can be achieved by performing the inverse operations.

[0093] The decryption steps are as follows:

[0094] Step 1: After the recipient establishes a secure connection, the encrypted image E is first received.

[0095] Step 2: Divide E into four equal parts according to the same rules as before, and shift each part to the right by the corresponding number of times using the formula.

[0096] E′ 1 = E 1 >>> right 1 , where right 1 = mod(S 2 , 8),

[0097] E′ 2 = E 2 >>> right 2 , where right 2 = mod(E 1 , 8),

[0098] E′ 3 = E 3 >>> right 3 , where right 3 = mod(E 2 , 8),

[0099] E′ 4 = E 4 >>> right 4 , where right 4 = mod(E 3 , 8).

[0100] Step 3: Combine the four parts into a two-dimensional image and expand it into a one-dimensional array T, and perform XOR decryption using T is the one-dimensional grayscale value array obtained by combining the four parts into a two-dimensional image and then expanding it, and S 1 is the key generated by boson sampling.

[0101] Step 4: Perform decryption using , where C is used to record the positions of the elements in S1 before sorting from large to small, and Y is the newly generated one-dimensional grayscale value array.

[0102] Step 5: Perform secondary decryption using , where B is used to record the positions of the elements in key before sorting from large to small, and D is the newly generated one-dimensional grayscale value array.

[0103] Step 6: Restore the obtained one-dimensional image into a two-dimensional image, denoted as DE, which completes the decryption.

[0104] Step 7: Perform inverse grayscale conversion and image scaling on the decrypted image to restore the original image.

[0105] The embodiment of the present application also provides an image encryption device, which includes:

[0106] A first acquisition unit, configured to acquire an image to be encrypted; and

[0107] An encryption unit, configured to encrypt the image to be encrypted by using a first key generated by quantum boson sampling and a second key generated by using a logical mapping logisticmap,

[0108] wherein, the iteration formula of the logical mapping is X n+1 = μX n (1 - X n ), where X n is the pre-iteration value of the second key, X n+1 is the post-iteration value of the second key, n is the number of iterations, μ is the iteration parameter, and X 1 and μ are determined by the grayscale mean value of the image to be encrypted.

[0109] The embodiment of the present application also provides an image decryption device, which includes:

[0110] A second acquisition unit, configured to acquire data to be decrypted; and

[0111] A decryption unit, configured to decrypt the data to be decrypted by using the decryption method corresponding to the above encryption unit.

[0112] The embodiment of the present application also provides an electronic device, including: a processor, and a memory coupled to the processor, where the memory is configured to store a computer program; the processor is configured to execute the computer program stored in the memory, so that the electronic device executes the method described in any one of the above embodiments.

[0113] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device may include, but is not limited to, a processor and a memory.

[0114] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device, connecting various parts of the entire device through various interfaces and lines.

[0115] The memory can be used to store the computer program. The processor realizes various functions of the electronic device by running or executing the computer program stored in the memory and calling the data stored in the memory.

[0116] The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.

[0117] The embodiments of the present application also provide a storage medium. The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0118] The embodiments of the present application also provide a computer program product, including: a computer program or instruction, which, when running on a computer, causes the computer to execute the method of any of the above possible implementation manners.

[0119] The above are the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present application.

Claims

1. An image encryption method, characterized in that: The encryption method comprises: obtaining an image to be encrypted; and The image to be encrypted is encrypted using a first key generated by quantum Bose sampling and a second key generated by a logistic map. The iterative formula of the logical mapping is X n+1 =μX n (1-X n ), where X n is the value before iteration of the second key, X n+1 is the iterated value of the second key, n is the number of iterations, μ is the iteration parameter, and X1 and μ are determined by the grayscale mean of the image to be encrypted.

2. The encryption method according to claim 1, wherein: The grayscale mean M is: Where N is the total number of pixels of the image to be encrypted, p i is the grayscale value of the i-th pixel of the image to be encrypted, X1=M / 255, μ=2+M / 128.

3. The encryption method according to claim 2, characterized in that: When M<200.96, let M=200.96, and when M>256, let M=256, so that 3.57≤μ≤4, 0<X1<1.

4. The encryption method according to claim 1, wherein: The first key includes a first subkey and a second subkey, and the first key generated by quantum Bose sampling is used to encrypt the image to be encrypted, specifically including: Using the first subkey, performing position scrambling encryption and XOR encryption on the image to be encrypted; and The second subkey is used to perform block cyclic shift encryption on the XOR-encrypted data.

5. An image decryption method, characterized in that: The decryption method corresponds to the encryption method according to claims 1 to 4.

6. An image encryption device, characterized in that: The image encryption device comprises: A first acquisition unit, configured to obtain an image to be encrypted; and An encryption unit is used to encrypt the image to be encrypted using a first key generated by quantum Bose sampling and a second key generated by a logistic map, The iterative formula of the logical mapping is X n+1 =μX n (1-X n ), where X n is the value before iteration of the second key, X n+1 is the iterated value of the second key, n is the number of iterations, μ is the iteration parameter, and X1 and μ are determined by the grayscale mean of the image to be encrypted.

7. An image decryption device, characterized in that: The image decryption device comprises: A second acquisition unit, used to obtain data to be decrypted; and A decryption unit is used to decrypt the data to be decrypted using the decryption method corresponding to the encryption unit as claimed in claim 7.

8. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory coupled to the processor, The memory is used to store a computer program; and The processor is used to execute the computer program stored in the memory, so that the electronic device performs the encryption method as described in any one of claims 1 to 4, or performs the decryption method as described in claim 5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program or an instruction. When the computer program or the instruction is executed on a computer, the computer executes the encryption method according to any one of claims 1 to 4 or the decryption method according to claim 5.