Encryption method, device, computer equipment and computer readable storage medium

By generating highly complex random values ​​through dual hyperchaotic system modules, the problems of unstable quality of true random numbers and obvious periodicity of pseudorandom numbers are solved, and high-quality encryption effects are achieved.

CN115459899BActive Publication Date: 2025-10-10HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211080846.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2025-10-10
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

The quality of true random numbers generated in the existing technology is unstable, and the periodicity of pseudo-random numbers is obvious, resulting in the inability to guarantee the quality of encryption keys, affecting the encryption effect.

Method used

A double hyperchaotic system module is used to generate random values. The seed matrix is ​​parameter updated and disturbed by the first hyperchaotic system module and the second hyperchaotic system module to generate highly complex random values ​​for encryption of encrypted objects.

Benefits of technology

The field length and periodicity of the random value are increased, ensuring the quality of the key and improving the encryption effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115459899B_ABST
    Figure CN115459899B_ABST
Patent Text Reader

Abstract

The application discloses an encryption method and device, computer equipment and a computer readable storage medium, and relates to the field of information security, and the method comprises the following steps: when an encryption request is received, a first seed matrix corresponding to the encryption request is acquired; a first hyperchaotic system module and a second hyperchaotic system module are controlled to generate corresponding results according to parameters in the first seed matrix, and the first seed matrix is updated by using the generated results; a random number value is obtained by using parameters in the updated first seed matrix; and a to-be-encrypted object corresponding to the encryption request is encrypted by using the random number value. Based on the method, the field length of the random number value is improved in the way that the random number value is generated based on two hyperchaotic systems, and the periodicity based on the random number value is more concealed, so that the effect of the encryption method based on the random number value is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security, and in particular to an encryption method, device, computer equipment, and computer-readable storage medium. Background Art

[0002] In secure communications such as information encryption, electronic transactions, and network transmission, using random numbers to generate encryption keys for information / data is a common practice. Since random numbers can be categorized as true random numbers or pseudorandom numbers, encryption keys can be generated using either true random number generation or pseudorandom number generation.

[0003] True random numbers are often generated using methods based on physical devices or components, such as thermal noise amplification and low-frequency sampling with high-frequency conversion. However, due to the instability of the data generation source, namely the physical device, the quality of the generated true random numbers is difficult to guarantee, making the quality of keys generated based on true random numbers impossible to estimate.

[0004] Although pseudo-random numbers can be generated in a relatively simple and fast manner, the pseudo-random numbers generated by most pseudo-random number generators have obvious periodicity, which makes it difficult to apply pseudo-random numbers to encryption methods. Summary of the Invention

[0005] In view of this, the present invention provides an encryption method, apparatus, computer device and computer-readable storage medium for improving the current situation in the art where quality problems of true random numbers or pseudo-random numbers lead to poor encryption effects.

[0006] In a first aspect, an embodiment of the present invention provides an encryption method applied to a computer device, wherein the computer device includes a first hyperchaotic system module and a second hyperchaotic system module, and the method includes:

[0007] If an encryption request is received, obtaining a first seed matrix corresponding to the encryption request;

[0008] Controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and using the results to update the first seed matrix;

[0009] Obtaining random values ​​according to the parameters in the updated first seed matrix;

[0010] The object to be encrypted corresponding to the encryption request is encrypted using the random value.

[0011] Optionally, in an implementation provided by the embodiment of the present application, after the first seed matrix corresponding to the encryption request is obtained, the method further comprises:

[0012] According to a preset matrix perturbation rule, the parameters in the first seed matrix are perturbed;

[0013] The controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and updating the first seed matrix by using the results comprises:

[0014] Controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the perturbed first seed matrix and updating the perturbed first seed matrix by using the results.

[0015] Optionally, in an implementation provided by the embodiment of the present application, the first seed matrix comprises a first seed parameter, a first system parameter, a second seed parameter and a second system parameter;

[0016] The controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and updating the first seed matrix by using the results comprises:

[0017] The second system parameter and the second seed parameter are input into the second hyperchaotic system module to obtain a first result, and the second seed parameter in the first seed matrix is updated by using the first result and the first seed parameter;

[0018] The first system parameter and the first seed parameter are input into the first hyperchaotic system module to obtain a second result, and the first seed parameter in the first seed matrix is updated by using the second result and the updated second seed parameter.

[0019] Optionally, in an implementation provided by the embodiment of the present application, the first seed matrix comprises a first seed parameter, a first system parameter, a second seed parameter and a second system parameter;

[0020] After the controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and updating the first seed matrix by using the results, before the random number value is obtained according to the parameters in the updated first seed matrix, the method further comprises:

[0021] If the updated second seed parameter exceeds the corresponding preset value, performing a modulo process on each of the updated second seed parameters according to the preset value corresponding to each second seed parameter;

[0022] Obtaining a random value according to the parameters in the updated first seed matrix includes:

[0023] The random value is obtained by using the parameters in the first seed matrix after the modulo processing.

[0024] Optionally, in a feasible manner provided by an embodiment of the present invention, after controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and using the results to update the first seed matrix, and before obtaining random values ​​according to the parameters in the updated first seed matrix, the method further includes:

[0025] For the parameters in the updated first seed matrix, replacing the parameters with partial parameters of the parameters, wherein the partial parameters include fractional parameters;

[0026] Obtaining a random value according to the parameters in the updated first seed matrix includes:

[0027] The random value is obtained by using the parameters in the first seed matrix after the parameters are replaced.

[0028] Optionally, in a feasible manner provided by an embodiment of the present invention, obtaining a random value according to the parameters in the updated first seed matrix includes:

[0029] Based on a preset matrix scrambling rule, performing matrix scrambling processing on the updated first seed matrix to obtain a second seed matrix;

[0030] Get a random value based on the second seed matrix.

[0031] Optionally, in a feasible manner provided by an embodiment of the present invention, obtaining a random value according to the parameters in the updated first seed matrix includes:

[0032] Writing each parameter in the updated first seed matrix into a preset third seed matrix in sequence according to a preset order, wherein the dimension of the third seed matrix is ​​greater than the dimension of the first seed matrix;

[0033] Repeat the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and using the results to update the first seed matrix until a preset number of times are executed, and obtaining random values ​​using the parameters in the third seed matrix.

[0034] Optionally, in a feasible manner provided by an embodiment of the present invention, the step of repeatedly executing the step of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times is executed, and obtaining random values ​​using the parameters in the third seed matrix, includes:

[0035] Repeating the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times are performed, and performing a preset quantized sampling process on each parameter in the third seed matrix;

[0036] Convert each parameter in the third seed matrix after quantization sampling processing into a corresponding binary number;

[0037] The random values ​​are obtained using the parameters in the transformed third seed matrix.

[0038] Optionally, in a feasible manner provided by an embodiment of the present invention, obtaining a random value using parameters in the converted third seed matrix includes:

[0039] Writing each parameter in the converted third seed matrix into the preset fourth seed matrix and fifth seed matrix in sequence according to the preset order;

[0040] controlling each parameter in the fourth submatrix and each parameter in the fifth submatrix to be updated based on an XOR operation;

[0041] A random value is obtained by using each parameter in the fourth seed matrix after the exclusive OR operation is performed and each parameter in the fifth seed matrix after the exclusive OR operation is performed.

[0042] In a second aspect, an embodiment of the present invention provides an encryption device, applied to a computer device, wherein the computer device includes a first hyperchaotic system module and a second hyperchaotic system module, and the device includes:

[0043] an acquisition module, configured to, upon receiving an encryption request, acquire a first seed matrix corresponding to the encryption request;

[0044] an output module, configured to control the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and to update the first seed matrix using the results;

[0045] A random value acquisition module, configured to obtain a random value according to the parameters in the updated first seed matrix;

[0046] The encryption module is used to encrypt the object to be encrypted corresponding to the encryption request using the random value.

[0047] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes any encryption method disclosed in the first aspect.

[0048] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program runs on a processor, it executes any encryption method disclosed in the first aspect.

[0049] In the encryption method provided by an embodiment of the present invention, when a computer device receives an encryption request, it will obtain a first seed matrix corresponding to the encryption request, and input the parameters in the first seed matrix into the first hyperchaotic system module and the second hyperchaotic system module; then, the first hyperchaotic system module and the second hyperchaotic system module are controlled to generate corresponding results according to the parameters in the first seed matrix, and the generated results are used to update the first seed matrix; then, the parameters in the updated first seed matrix are used to obtain a random value; finally, the random value is used to encrypt the object to be encrypted corresponding to the encryption request.

[0050] Based on this, the embodiment of the present invention increases the field length of the random value according to the method of generating random values ​​by two hyperchaotic systems, thereby making the periodicity of the key generated based on the random value more concealed, thereby improving the quality of the key; and, the method of generating random values ​​based on software / algorithm proposed in the embodiment of the present invention ensures the quality of the generated random value uniformly, thereby improving the encryption effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0052] Figure 1 A schematic diagram of a process flow of a first encryption method provided by an embodiment of the present invention is shown;

[0053] Figure 2a 、 Figure 2b and Figure 2c The image before encryption, the image after encryption and the image after decryption provided by the embodiment of the present invention are respectively shown;

[0054] Figure 3 A schematic diagram of a second encryption method according to an embodiment of the present invention is shown;

[0055] Figure 4 A schematic structural diagram of an encryption device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0057] The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the figures is not intended to limit the scope of the claimed invention, but rather merely represents selected embodiments of the present invention. All other embodiments derived by those skilled in the art based on the embodiments of the present invention without inventive effort are intended to be within the scope of protection of the present invention.

[0058] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0059] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0060] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present invention pertain. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.

[0061] Example 1

[0062] Reference Figure 1, shows a flow chart of the first encryption method provided by an embodiment of the present invention. The encryption method provided by an embodiment of the present invention is applied to a computer device, and the computer device includes a first hyperchaotic system module and a second hyperchaotic system module.

[0063] It is understood that chaotic systems represent a deterministic but unpredictable complex dynamic state, and their long-term behavior is unpredictable and ergodic. Furthermore, because chaotic systems are highly sensitive to initial conditions, namely, input seed parameters, embodiments of the present invention utilize chaotic systems to generate repeatable, low-correlation, noise-like random values.

[0064] Furthermore, according to the applicant's tests, the statistical characteristics of random numerical values ​​generated by chaotic systems such as the Logistic chaotic system, the Lorenz chaotic system, the Chen chaotic system and the Rossler chaotic system are unreliable, and the data throughput of a single chaotic system is low. Therefore, the embodiment of the present invention adopts two hyperchaotic systems to realize the generation of random numerical values, thereby solving the problem that the data throughput of a single chaotic system is low and the statistical characteristics of the random numerical values ​​generated by a single chaotic system are unreliable.

[0065] It should be noted that compared with the traditional chaotic system with only one positive Lyapunov exponent, the hyperchaotic system has two positive Lyapunov exponents and therefore has richer chaotic dynamic characteristics.

[0066] It can also be understood that the specific hyperchaotic system to be adopted can be set according to actual conditions. For example, in a feasible method provided in an embodiment of the present invention, the first hyperchaotic system module and the second hyperchaotic system module are both four-dimensional hyperchaotic systems, wherein the first hyperchaotic system module is shown in the following formulas (1) to (4).

[0067]

[0068]

[0069]

[0070]

[0071] In formulas (1) to (4), a=10, b=8 / 3, c=28; when r belongs to the interval (-1.52, -0.06), there will be two Lyapunov exponents in the operation of the first hyperchaotic system module, which will produce hyperchaotic phenomena.

[0072] The second hyperchaotic system module is shown in the following formulas (5) to (6).

[0073]

[0074]

[0075]

[0076]

[0077] In formulas (5) to (6), a = 50, b = 24, c = 13, f = 8, g = 33, and h = 30. When b is in the interval [10, 28], there will be two positive Lyapunov exponents during the operation of the second hyperchaotic system module, thus generating hyperchaotic phenomena.

[0078] Based on this, the encryption method provided by the embodiment of the present invention includes:

[0079] S110: If an encryption request is received, obtain a first seed matrix corresponding to the encryption request.

[0080] That is, when a computer device receives an encryption request and needs to generate a key corresponding to the encryption request, it will obtain multiple parameters as seed parameters of the aforementioned first hyperchaotic system module and the second hyperchaotic system module. Then, after the first hyperchaotic system module and the second hyperchaotic system module generate corresponding random values ​​according to the seed parameters, the computer device uses the random values ​​to perform encryption operations on the encryption object.

[0081] It is understandable that the seed parameters can be stored in a matrix, set, array, class, etc., but in the embodiment of the present invention, because the matrix-based encoding method can clearly and directly specify the update / change method of different parameters, and the matrix-based change method is more efficient, a matrix, that is, a first seed matrix, will be used to complete the storage of the seed parameters.

[0082] In addition, it can also be understood that the method for obtaining the first seed matrix can be set according to actual conditions. For example, in one feasible method, the first seed matrix is ​​encapsulated in the encryption request. Therefore, after receiving the encryption request, the computer device can decapsulate the encryption request to obtain the first seed matrix.

[0083] In another feasible manner, the encryption request does not carry / encapsulate the first seed matrix, so after receiving the encryption request, the computer device will generate multiple parameters to form the first seed matrix according to a preset program / code / command.

[0084] It is not difficult to understand that the method for generating the first seed matrix can be set according to the actual situation. For example, in a feasible method provided in an embodiment of the present invention, the computer device first generates a zero matrix with a dimension of 2×8, and then generates 16 parameters. The 16 parameters are written into the zero matrix in sequence from left to right and from top to bottom, thereby completing the generation of the first seed matrix.

[0085] S120, controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and using the results to update the first seed matrix.

[0086] That is, after the computer device inputs the seed parameters in the first seed matrix into the first hyperchaotic system module and the second hyperchaotic system module, it will update / replace the parameters in the first seed matrix based on the outputs of the first hyperchaotic system module and the second hyperchaotic system module, so that each parameter in the first seed matrix is ​​a random value generated by the first hyperchaotic system module and the second hyperchaotic system module.

[0087] It can be understood that the first seed matrix in the embodiment of the present invention contains parameters for input into the first hyperchaotic system module and the second hyperchaotic system module respectively, that is, some parameters in the first seed matrix are used to input into the first hyperchaotic system module, and another part of the parameters are used to input into the second hyperchaotic system module.

[0088] Optionally, in a feasible manner provided by an embodiment of the present invention, both the first hyperchaotic system module and the second hyperchaotic system module will output corresponding results according to the RK4 (Runge-Kutta) algorithm.

[0089] Optionally, in a feasible method provided in an embodiment of the present invention, when the first hyperchaotic system module is implemented based on the aforementioned formulas (1) to (4), and the second hyperchaotic system module is implemented based on the aforementioned formulas (5) to (8), and the dimension of the first seed matrix is ​​2×8, the 8 parameters in the first row of the first seed matrix are used to input into the first hyperchaotic system module to define the state and output of the first hyperchaotic system module; and the 8 parameters in the second row are used to input into the second hyperchaotic system module to define the state and output of the second hyperchaotic system module.

[0090] More specifically, the first seed matrix is M[2, 8], wherein M[1, 1:4] is the first seed parameter corresponding to the first hyper-chaotic system module, i.e., x, y, z and w in the aforementioned formulas (1)-(4), M[1, 5:8] is the first system parameter corresponding to the first hyper-chaotic system module, i.e., a, b, c and r in the formulas (1)-(4); M[2, 1:4] is the second seed parameter corresponding to the second hyper-chaotic system module, representing x1-x4 in the formulas (5)-(8), and M[2, 5:8] is the second system parameter corresponding to the second hyper-chaotic system module, representing a, b, c and f in the formulas (5)-(8).

[0091] It should be understood that the second hyper-chaotic system module provided by the embodiment of the present application is more sensitive to the change of input parameters, i.e., if the input parameters of the second hyper-chaotic system module are more, the hyper-chaotic phenomenon of the second hyper-chaotic system module will be unstable, and the value entropy value will increase or decrease constantly.

[0092] Therefore, the input parameter M[2, 1:8] set for the second hyper-chaotic system module does not contain g and h in the aforementioned formulas (5)-(8), i.e., g is always 33 and h is always 30, and g and h do not change with the change of input parameters, so as to ensure the stable operation of the second hyper-chaotic system module.

[0093] S130, obtaining a random number value according to the parameters in the updated first seed matrix.

[0094] It can be understood that after the parameters in the first seed matrix are updated / replaced by the random number values output by the first hyper-chaotic system and the second hyper-chaotic system, the parameters in the updated first seed matrix are all random number values generated by the hyper-chaotic system. Further, when the parameters in the updated first seed matrix are all replaced / updated, the computer device generates a random number value for encryption by using each parameter in the first seed matrix, so as to encrypt the object to be encrypted by the random number value.

[0095] It can also be understood that when the parameters in the first seed matrix are all random number values, the way of obtaining the random number value required for encryption by using the parameters in the first seed matrix is content that can be set according to actual conditions. Exemplarily, in a feasible way, the computer device reads the parameters in the first seed matrix in the order from left to right and from top to bottom, and splices the read parameters in sequence, and then obtains the random number value required for encryption.

[0096] It's easy to understand that because the embodiments of the present invention utilize dual hyperchaotic systems to generate random values, compared to random values ​​generated by a single chaotic system, the fields of the random values ​​generated by the embodiments of the present invention are longer, resulting in a longer periodicity, and thus a more subtle periodicity. Furthermore, because the embodiments of the present invention derive the random values ​​required for encryption based on the output of the dual hyperchaotic systems, they avoid the limitations imposed by the limited digital precision of computer equipment on the length of the random value fields.

[0097] S140: Encrypt the object to be encrypted corresponding to the encryption request using the random value.

[0098] It can be understood that the object to be encrypted in the embodiment of the present invention may be an image, text, or any other object that can be expressed digitally.

[0099] For example, in a specific embodiment, the object to be encrypted is an image constructed by 256×256 grayscale values. Then, the encryption process of the object to be encrypted is: obtain the grayscale value matrix corresponding to the object to be encrypted, wherein the grayscale value matrix corresponds to the aforementioned 256×256 grayscale values; use the generated random value to encrypt each grayscale value in the grayscale value matrix, thereby completing the encryption of the object to be encrypted.

[0100] To better illustrate the beneficial effects of the encryption method provided by the embodiment of the present invention, please refer to Figure 2a 、 Figure 2b and Figure 2c , respectively showing the image before encryption, the image after encryption and the image after decryption provided by the embodiment of the present invention. It is not difficult to understand that, Figure 2b To adopt the encryption method of the embodiment of the present invention, after generating a random value, use the random value to Figure 2a The encrypted image is Figure 2c To use random value pairs Figure 2b The image obtained by decryption.

[0101] In the encryption method provided by an embodiment of the present invention, when a computer device receives an encryption request, it will obtain a first seed matrix corresponding to the encryption request, and input the parameters in the first seed matrix into the first hyperchaotic system module and the second hyperchaotic system module; then, the first hyperchaotic system module and the second hyperchaotic system module are controlled to generate corresponding results according to the parameters in the first seed matrix, and the generated results are used to update the first seed matrix; then, a random value is obtained according to the parameters in the updated first seed matrix; finally, the random value is used to encrypt the object to be encrypted corresponding to the encryption request.

[0102] Based on this, the embodiment of the present invention increases the field length of the random value according to the method of generating random values ​​by two hyperchaotic systems, making the periodicity of the random value more concealed; and the method of generating random values ​​based on software / algorithm proposed in the embodiment of the present invention ensures the quality of the generated random value, thereby achieving a uniform encryption effect.

[0103] Optionally, in a feasible manner provided by an embodiment of the present invention, after S110 and before S120, the method further includes:

[0104] Perturbing the parameters in the first seed matrix according to a preset matrix perturbation rule;

[0105] Furthermore, the S120 includes:

[0106] The first hyperchaotic system module and the second hyperchaotic system module are controlled to output corresponding results according to the parameters in the disturbed first seed matrix, and the disturbed first seed matrix is ​​updated using the results.

[0107] That is, before inputting the parameters in the first seed matrix into the first hyperchaotic system and the second hyperchaotic system, the embodiment of the present invention will also perturb the first seed matrix to make the input of the first hyperchaotic system and the second hyperchaotic system more complex, thereby increasing the complexity of generating random numerical values ​​and further improving the security of random numerical values.

[0108] It can be understood that, in this feasible manner, the parameters in the first seed matrix will be updated based on the output of the first hyperchaotic system module and the output of the second hyperchaotic system module after the matrix perturbation.

[0109] It can also be understood that the specific setting method of the matrix perturbation rule is content that can be adjusted according to actual conditions. For example, in a feasible method provided in an embodiment of the present invention, the first seed matrix is ​​the aforementioned M[2, 8] including the first seed parameter, the first system parameter, the second seed parameter and the second system parameter. Then, the process of performing matrix perturbation on M[2, 8] is shown in Formula (9) and Formula (10).

[0110] M[2,6]′=M[2,6]+M[1,2] / 20 (9)

[0111] M[1,8]′=-1+M[1,8] / 100 (10)

[0112] Wherein, M[2,6]' represents the result after the perturbation of M[2,6], and M[1,8]' represents the result after the perturbation of M[1,8].

[0113] That is, in this feasible approach, r and b in the second system parameters will be disturbed.

[0114] In addition, it can be understood that the first seed matrix can be input into the first hyperchaotic system module and the second hyperchaotic system module after multiple matrix perturbations to further improve the complexity and unpredictability of random value generation and improve the encryption effect.

[0115] It can also be understood that, in the embodiment of the present invention, if a parameter is enclosed in a single quotation mark superscript, i.e., “'”, it indicates that the parameter is the result after updating / perturbation / change. For example, in the aforementioned formula (10), M[2, 6]' indicates the result after M[2, 6] is disturbed.

[0116] It should be noted that when performing matrix perturbation, it is necessary to ensure that after the perturbed first seed matrix is ​​input into the first hyperchaotic system module and the second hyperchaotic system module, both the first hyperchaotic system module and the second hyperchaotic system module can maintain the hyperchaotic phenomenon, that is, there are two positive Lyapunov exponents in the first hyperchaotic system and the second hyperchaotic system.

[0117] Optionally, in a feasible method provided in an embodiment of the present invention, please refer to Figure 3 , shows a flow chart of a second encryption method provided by an embodiment of the present invention. In this feasible manner, the first seed matrix includes a first seed parameter, a first system parameter, a second seed parameter, and a second system parameter;

[0118] Furthermore, the S120 includes:

[0119] S121, inputting the second system parameter and the second seed parameter into the second hyperchaotic system module to obtain a first result, and updating the second seed parameter in the first seed matrix using the first result and the first seed parameter;

[0120] S122: Input the first system parameter and the first seed parameter into the first hyperchaotic system module to obtain a second result, and use the second result and the updated second seed parameter to update the first seed parameter in the first seed matrix.

[0121] It is not difficult to find that the parameters in the first seed matrix in this feasible approach are similar to those in the aforementioned M[2,8], both including the first seed parameter, the first system parameter, the second seed parameter, and the second system parameter. It should be noted that the specific functions and meanings of the first seed parameter, the first system parameter, the second seed parameter, and the second system parameter in this feasible approach are consistent with those described above and will not be further elaborated.

[0122] It is understandable that, depending on the difference between the first hyperchaotic system module and the second hyperchaotic system module, the dimension of the first seed matrix will change accordingly. For ease of explanation, the embodiment of the present invention will describe each seed matrix based on the first hyperchaotic system module corresponding to the aforementioned formulas (1) to (4) and the second hyperchaotic system module corresponding to the aforementioned formulas (5) to (8), that is, the aforementioned M[2, 8] will be used for corresponding description. However, it should be understood that the dimension and parameter settings of the first seed matrix need to be set according to actual conditions and are not limited to the setting method of M[2, 8].

[0123] Optionally, in a feasible manner, the second seed parameter M[2, 1:4] is updated as shown in formula (11).

[0124]

[0125] It is easy to understand that the M[2, i] on the right side of formula (11) represents the first result, that is, the random value output by the second hyperchaotic system module, and M[2, i]' represents the updated second system parameter.

[0126] Furthermore, after completing the update of the second system parameter M[2, 1:4], the computer device controls the first hyperchaotic system module to generate a corresponding second result, and uses the first result and the updated second seed parameter to update the first seed parameter M[1, 1:4].

[0127] Optionally, in a feasible manner, the first seed parameter M[1, 1:4] is updated as shown in formulas (12) to (15).

[0128]

[0129]

[0130]

[0131]

[0132] The mod in formula (14) represents modular division, that is, using 256 pairs of M[2, 2]*2 24 Perform a modulo operation.

[0133] It is not difficult to find that under this feasible method, the second hyperchaotic system module will disturb the first hyperchaotic system module. Therefore, the embodiment of the present invention realizes the disturbance between hyperchaotic systems, which can further improve the chaotic dynamic characteristics of the hyperchaotic system, thereby increasing the complexity of generating random numerical values.

[0134] Furthermore, in a feasible method provided by an embodiment of the present invention, the computer device will repeatedly execute S121 and S122 in a loop so that the second seed parameter and the first seed parameter are continuously updated with each other. In other words, the computer device will repeatedly execute formula (11) to formula (15).

[0135] Therefore, the embodiment of the present invention will realize the mutual perturbation of the two hyperchaotic systems, so that the output of any hyperchaotic system will serve as the input of the other hyperchaotic system, thereby further improving the chaotic dynamic characteristics of the two hyperchaotic systems and deepening the complexity of generating random values.

[0136] Optionally, in a feasible manner provided by an embodiment of the present invention, the first seed matrix includes a first seed parameter, a first system parameter, a second seed parameter and a second system parameter;

[0137] Furthermore, after S120 and before S130, the method further includes:

[0138] If the updated second seed parameter exceeds the corresponding preset value, performing a modulo process on each of the updated second seed parameters according to the preset value corresponding to each second seed parameter;

[0139] Furthermore, the S120 includes:

[0140] The random value is obtained by using the parameters in the first seed matrix after the modulo processing.

[0141] That is, after each second seed parameter is updated, the embodiment of the present invention determines whether each second system seed exceeds a corresponding preset value. If so, the second system parameter that exceeds the corresponding preset value is scaled.

[0142] It can be understood that the preset value corresponding to each second seed parameter can be set according to actual conditions. For example, in a feasible method provided in an embodiment of the present invention, the preset values ​​corresponding to each second seed parameter in M[2, 1:4] are 500, 500, 1500 and 2000 respectively.

[0143] Optionally, in a feasible manner provided by an embodiment of the present invention, after S120 and before S130, the method further includes:

[0144] For the parameters in the updated first seed matrix, the parameters are replaced by partial parameters of the parameters, wherein the partial parameters include fractional parameters.

[0145] Furthermore, the S120 includes:

[0146] The random value is obtained by using the parameters in the first seed matrix after the parameters are replaced.

[0147] That is, in this feasible manner, the embodiment of the present invention performs a second update on any one or more parameters in the first seed matrix, thereby further improving the complexity of the parameters in the first seed matrix.

[0148] It is understood that the partial parameters of the parameters in the embodiment of the present invention are contents that can be set according to actual conditions, and the aforementioned fractional parameters are only one of the feasible methods. In another feasible method provided by the embodiment of the present invention, the partial parameters of the parameters refer to the integer part parameters of the parameters.

[0149] Optionally, in order to further improve the difficulty of generating random numerical values, in a feasible manner, an embodiment of the present invention will execute the step of performing modulo processing on each updated second seed parameter according to the preset value corresponding to each second seed parameter if the updated second seed parameter exceeds the corresponding preset value, and then execute the step of parameter replacement, thereby improving the difficulty of generating random numerical values.

[0150] In addition, it is not difficult to understand that which parameters in the first seed matrix need to be updated twice can be set according to actual conditions. For example, in a feasible manner provided in an embodiment of the present invention, the first seed parameter and the second seed parameter are updated twice, that is, the first seed matrix includes the first seed parameter, the first system parameter, the second seed parameter, and the second system parameter;

[0151] Furthermore, replacing the parameters in the updated first seed matrix with part of the parameters includes:

[0152] For the first seed parameters and the second seed parameters in the updated first seed matrix, partial parameters of the first seed parameters and the second seed parameters are used to replace the corresponding first seed parameters or the second seed parameters.

[0153] It is not difficult to find that under this feasible method, the embodiment of the present invention performs a secondary update on the first seed parameter and the second system parameter, that is, partial parameters of the first seed parameter and the second seed parameter are used to replace the original first seed parameter / second seed parameter, thereby further improving the complexity of the random value.

[0154] Optionally, in a feasible manner provided in an embodiment of the present invention, the S130 includes:

[0155] Based on a preset matrix scrambling rule, matrix scrambling processing is performed on the updated first seed matrix to obtain a second seed matrix.

[0156] That is, the embodiment of the present invention performs row scrambling, column scrambling, or a cross-scrambling of row scrambling and column scrambling on the parameters of the updated first seed matrix, that is, the first seed matrix after the parameters are replaced, so as to make the parameters of the first seed matrix as random as possible, thereby generating a second seed matrix, thereby increasing the complexity of subsequent key generation.

[0157] To better illustrate the matrix scrambling method provided in the embodiment of the present invention, reference may be made to formulas (16) to (22). Formulas (16) to (22) are feasible matrix scrambling methods proposed in the embodiment of the present invention.

[0158] y[1,1]=M[2,1]+M[2,2]+M[1,1] (16)

[0159] y[1,2]=M[2,2]+M[2,4]+M[1,2] (17)

[0160] y[1,3]=M[2,3]+M[2,4]+M[1,3] (18)

[0161] y[1,4]=M[2,4]+M[2,1]+M[1,4] (19)

[0162] y[2,1]=M[2,1]+M[1,1]+M[1,2] (20)

[0163] y[2,2]=M[2,2]+M[1,2]+M[1,3] (21)

[0164] y[2,3]=M[2,3]+M[1,3]+M[1,4] (22)

[0165] y[2,4]=M[2,1]+M[2,3]+M[2,4] (22)

[0166] It should be understood that, in this feasible approach, the second seed matrix is ​​a matrix with a dimension of 2×4, including each y in formula (16) to formula (22).

[0167] It should also be understood that, to more conveniently and clearly illustrate the encryption method provided in the embodiment of the present invention, the subsequent description will be based on the second seed matrix y[2, 4] in this feasible approach. However, it should be made clear that the second seed matrix y[2, 4] is only one feasible approach, and the second seed matrix needs to be set according to actual conditions.

[0168] Optionally, in order to further improve the difficulty of generating random numerical values, in a feasible manner, an embodiment of the present invention will perform the step of performing modulo processing on each updated second seed parameter according to the preset value corresponding to each second seed parameter if the updated second seed parameter exceeds the corresponding preset value, and / or perform the step of replacing the parameters in the updated first seed matrix with part of the parameters of the parameters, and then perform the matrix scrambling processing in this feasible manner.

[0169] Optionally, in a feasible manner provided by an embodiment of the present invention, the S130 includes:

[0170] Writing each parameter in the updated first seed matrix into a preset third seed matrix in sequence according to a preset order, wherein the dimension of the third seed matrix is ​​greater than the dimension of the first seed matrix;

[0171] Repeat the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and using the results to update the first seed matrix until a preset number of times are executed, and obtaining random values ​​using the parameters in the third seed matrix.

[0172] It should be understood that, in this feasible manner, the embodiment of the present invention will cause the two hyperchaotic systems to perform multiple rounds of iterations, and obtain random values ​​according to the results of each iteration.

[0173] That is, after updating the parameters in the first seed matrix, the computer device under this feasible method will store the updated parameters in the first seed matrix into the third seed matrix to save the results of this iteration. At the same time, it will control the first hyperchaotic system module and the second hyperchaotic system module to perform a new round of iterative operations based on the parameters in the updated first seed matrix.

[0174] After completing a preset number of iterations and storing the results of each iteration in the third seed matrix, the computer device uses the parameters in the third seed matrix to obtain a random value, thereby completing the corresponding encryption.

[0175] It's easy to understand that, in this feasible approach, the first hyperchaotic system module and the second hyperchaotic system module store mutual interference. That is, after the computer device updates the first seed matrix using the output of the first hyperchaotic system module, the parameters in the updated first seed matrix are input into the second hyperchaotic system module. Thus, the output of the first hyperchaotic system module serves as the input of the second hyperchaotic system module; similarly, the output of the second hyperchaotic system module serves as the input of the first hyperchaotic system module. Based on this, this embodiment of the present invention achieves mutual perturbation between the two hyperchaotic systems.

[0176] In addition, it can be understood that when the computer device uses the corresponding results output by the first hyperchaotic system module and the second hyperchaotic system module to update the first seed matrix, the first result output by the first hyperchaotic system module will be used to update some parameters in the first seed matrix, and the second result output by the second hyperchaotic system module will be used to update other parameters in the first seed matrix.

[0177] Based on this, the embodiment of the present invention is based on the way that two hyperchaotic systems disturb each other, which can greatly increase the periodic interval between two identical random numbers generated by computer devices, that is, the periodicity of the random value is more concealed, and can effectively improve the security of the random value and the security of the key generated based on the random value.

[0178] It should also be understood that the embodiment of the present invention adopts a method of generating random numerical values ​​multiple times, that is, the parameters in the first seed matrix updated multiple times are stored in the third seed matrix, so that the output field of the dual hyperchaotic system is longer, thereby further improving the complexity of the output field.

[0179] In addition, it can be understood that the preset number of times and the dimension of the third seed matrix can be set according to actual conditions. The embodiment of the present invention only limits the dimension of the third seed matrix to be greater than the dimension of the first seed matrix to ensure that the third seed matrix can store random value fields with longer lengths.

[0180] Optionally, in a feasible manner provided by an embodiment of the present invention, when the first seed matrix is ​​the aforementioned M[2, 8], the preset number is 2, and the dimension of the third seed matrix is ​​[16, 2].

[0181] Optionally, to further improve the complexity of the random value, in a feasible manner, the embodiment of the present invention uses the second seed matrix to complete the generation of the third seed matrix.

[0182] That is, the embodiment of the present invention iteratively executes the following steps (1)-(3): (1) based on the output results of the first hyperchaotic system module and the second hyperchaotic system module, the first seed matrix is ​​updated; (2) the updated first seed matrix is ​​subjected to the aforementioned matrix scrambling processing to obtain the second seed matrix; (3) the parameters of the second seed matrix are written into the third seed matrix.

[0183] It is understandable that in this feasible approach, the aforementioned matrix scrambling process is added on the basis of the mutual disturbance of the two hyperchaotic systems, thereby completing the writing of the third seed matrix through the second seed matrix.

[0184] For example, the second seed matrix is ​​the aforementioned y[2, 4], the preset number is 4, and the dimension of the third seed matrix is ​​[16, 2].

[0185] Optionally, in a feasible manner provided by an embodiment of the present invention, the step of repeatedly executing the step of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times is executed, and obtaining random values ​​using the parameters in the third seed matrix, includes:

[0186] Repeating the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times are performed, and performing a preset quantized sampling process on each parameter in the third seed matrix;

[0187] Convert each parameter in the third seed matrix after quantization sampling into a corresponding binary number;

[0188] The random values ​​are obtained using the parameters in the transformed third seed matrix.

[0189] That is, under this feasible method, in order to improve the statistical performance of the random numerical values ​​output by the two hyperchaotic systems, the embodiment of the present invention will adopt a preset quantization sampling processing method and a binary number conversion method to process each parameter in the third seed matrix.

[0190] Optionally, in a feasible method provided in an embodiment of the present invention, the process of obtaining the converted third seed matrix is ​​as shown in formula (23) and formula (24).

[0191] z[l,n]′=mod(z[l,n]*2 24 ,256),l∈{1,2,…,15,16},n∈{1,2} (23)

[0192] z[l,n]″=Bin(z[l,n]′) (24)

[0193] It should be noted that z in formula (23) and formula (24) represents the third seed matrix with a dimension of [16, 2], Bin in formula (24) represents binarization, and z[l, n]' represents the binarization result of z[l, n]'.

[0194] According to formula (23) and formula (24), in this feasible way, the embodiment of the present invention controls each parameter z[l,n] in the third seed matrix by multiplying it by 2 24 After obtaining the corresponding multiplication value, the multiplication value corresponding to each parameter is controlled to perform a modulo operation with 256, thereby completing quantization sampling.

[0195] In addition, it should be noted that 2 of these feasible methods 24 and 256 are set according to actual conditions. In the embodiment of the present invention, quantized sampling can be completed by other values.

[0196] Optionally, in a feasible manner provided by an embodiment of the present invention, obtaining a random value using parameters in the converted third seed matrix includes:

[0197] Writing each parameter in the converted third seed matrix into the preset fourth seed matrix and fifth seed matrix in sequence according to the preset order;

[0198] controlling each parameter in the fourth submatrix and each parameter in the fifth submatrix to be updated based on an XOR operation;

[0199] A random value is obtained by using each parameter in the fourth seed matrix after the exclusive OR operation is performed and each parameter in the fifth seed matrix after the exclusive OR operation is performed.

[0200] It is understandable that in this feasible manner, the embodiment of the present invention splits the third seed matrix into two matrices, namely, the fourth seed matrix and the fifth seed matrix, so that the parameters in the fourth seed matrix and the fifth seed matrix are updated interactively.

[0201] It can also be understood that the manner of writing the parameters in the third seed matrix into the fourth and fifth seed matrices can be set according to actual conditions. For example, in a feasible manner provided in an embodiment of the present invention, the computer device will read the parameters in the third seed matrix in sequence from left to right and from top to bottom, and store the read parameters in sequence into the fourth seed matrix; when the fourth seed matrix is ​​full, the read parameters will be stored in sequence into the fifth seed matrix.

[0202] Furthermore, the execution method of the XOR operation in the embodiment of the present invention can also be set according to actual conditions. For example, in a feasible method provided in the embodiment of the present invention, the fourth seed matrix is ​​w1[8, 16], the fifth seed matrix is ​​w2[8, 16], and the process of performing the XOR operation on the parameters in the fourth and fifth seed matrices is:

[0203] The data of w1[1,:]=w1[6,:], w2[3,:] and w2[8,:] are XORed from left to right;

[0204] The data of w1[2,:]=w1[7,:], w2[4,:] and w2[5,:] are XORed from left to right;

[0205] The data of w1[3,:]=w1[8,:], w2[1,:] and w2[6,:] are XORed from left to right;

[0206] The data of w1[4,:]=w1[5,:], w2[2,:] and w2[7,:] are XORed from left to right;

[0207] The data of w1[5,:]=w1[4,:], w2[2,:] and w2[7,:] are XORed from left to right;

[0208] w1[6,:]=w1[1,1], w2[8,:] and w2[3,:] are XORed from left to right;

[0209] w1[7,:]=w1[2,:], w2[4,:] and w2[5,:] are XORed from left to right;

[0210] The data of w1[8,:]=w1[3,:], w2[1,:] and w2[6,:] are XORed from left to right;

[0211] w2[1,:]=w1[1,:], w1[5,:] and w2[5,:] are XORed from left to right;

[0212] w2[2,:]=w1[2,:], w1[6,:] and w2[6,:] are XORed from left to right;

[0213] w2[3,:]=w1[3,:], w1[7,:] and w2[7,:] are XORed from left to right;

[0214] w2[4,:]=w1[4,:], w1[8,:] and w2[8,:] are XORed from left to right;

[0215] w2[5,:]=w1[5,:], w1[6,:], w2[1,:] and w2[2,:] are XORed from left to right;

[0216] w2[6,:]=w1[1,:], w1[2,:], w1[3,:] and w1[4,:] are XORed from left to right;

[0217] w2[7,:]=w1[1,:], w1[4,:], w1[5,:] and w1[8,:] are XORed from left to right;

[0218] The data of w2[8,:]=w1[7,:], w1[8,:], w2[3,:] and w2[4,:] are XORed with each other from left to right.

[0219] For example, taking the first parameter of the first row in the fourth seed matrix, that is, w1[1, 1] in w1[1,:] in w1 as an example, the update of w1[1, 1] is shown in formula (25).

[0220]

[0221] Example 2

[0222] Corresponding to the encryption method provided in embodiment 1 of the present invention, embodiment 2 of the present invention further provides an encryption device, referring to Figure 4 , shows a schematic structural diagram of an encryption device 200 provided in an embodiment of the present invention. The encryption device 200 provided in an embodiment of the present invention is applied to a computer device, the computer device including a first hyperchaotic system module and a second hyperchaotic system module, and the device includes:

[0223] An acquisition module 210 is configured to acquire a first seed matrix corresponding to an encryption request upon receiving the encryption request;

[0224] An output module 220 is used to control the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and to update the first seed matrix using the results;

[0225] A random value acquisition module 230 is configured to obtain a random value according to the parameters in the updated first seed matrix;

[0226] The encryption module 240 is configured to encrypt the object to be encrypted corresponding to the encryption request using the random value.

[0227] Optionally, in a feasible manner provided by an embodiment of the present invention, the device further includes:

[0228] a perturbation module, configured to perturb the parameters in the first seed matrix according to a preset matrix perturbation rule;

[0229] The first hyperchaotic system module and the second hyperchaotic system module are controlled to output corresponding results according to the parameters in the disturbed first seed matrix, and the disturbed first seed matrix is ​​updated using the results.

[0230] Optionally, in a feasible manner provided by an embodiment of the present invention, the first seed matrix includes a first seed parameter, a first system parameter, a second seed parameter and a second system parameter;

[0231] The output module includes:

[0232] a first updating submodule, configured to input the second system parameter and the second seed parameter into the second hyperchaotic system module to obtain a first result, and update the second seed parameter in the first seed matrix using the first result and the first seed parameter;

[0233] The second updating submodule is used to input the first system parameter and the first seed parameter into the first hyperchaotic system module to obtain a second result, and use the second result and the updated second seed parameter to update the first seed parameter in the first seed matrix.

[0234] Optionally, in a feasible manner provided by an embodiment of the present invention, the device further includes:

[0235] a modulo module, configured to perform a modulo process on each of the updated second seed parameters according to the preset value corresponding to each second seed parameter if the updated second seed parameter exceeds the corresponding preset value;

[0236] The random value acquisition module is further configured to obtain a random value using the parameters in the first seed matrix after the modulo processing.

[0237] Optionally, in a feasible manner provided by an embodiment of the present invention, the generating module includes:

[0238] a replacement module, configured to replace the parameters in the updated first seed matrix with partial parameters of the parameters, wherein the partial parameters include fractional parameters;

[0239] The random value acquisition module is further configured to obtain a random value using parameters in the first seed matrix after the parameters are replaced.

[0240] Optionally, in a feasible manner provided by an embodiment of the present invention, the random value acquisition module includes:

[0241] a scrambling submodule, configured to perform matrix scrambling processing on the updated first seed matrix based on a preset matrix scrambling rule to obtain a second seed matrix;

[0242] The random value obtaining submodule is used to obtain a random value according to the second seed matrix.

[0243] Optionally, in a feasible manner provided by an embodiment of the present invention, the random value acquisition module includes:

[0244] a writing submodule, configured to write each parameter in the updated first seed matrix into a preset third seed matrix in sequence according to a preset order, wherein the dimension of the third seed matrix is ​​greater than the dimension of the first seed matrix;

[0245] A loop submodule is used to repeatedly execute the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and using the results to update the first seed matrix until a preset number of times are executed, and then obtaining random values ​​using the parameters in the third seed matrix.

[0246] Optionally, in a feasible manner provided by an embodiment of the present invention, the circulation submodule includes:

[0247] a quantization sampling unit, configured to repeatedly execute the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times are executed, and then performing a preset quantization sampling process on each parameter in the third seed matrix;

[0248] a conversion unit, configured to convert each parameter in the third seed matrix after the quantization sampling process into a corresponding binary number;

[0249] The random value obtaining unit is used to obtain a random value using the parameters in the converted third seed matrix.

[0250] Optionally, in a feasible manner provided by an embodiment of the present invention, the random value obtaining unit includes:

[0251] a parameter storage subunit, configured to write each parameter in the converted third seed matrix into a preset fourth seed matrix and a preset fifth seed matrix in sequence according to the preset order;

[0252] an XOR operation subunit, configured to control each parameter in the fourth submatrix and each parameter in the fifth submatrix to be updated based on an XOR operation;

[0253] The random value output subunit is used to obtain a random value by using each parameter in the fourth seed matrix after performing an exclusive OR operation and each parameter in the fifth seed matrix after performing an exclusive OR operation.

[0254] The encryption device 200 provided in the embodiment of the present application can implement each process of the encryption method corresponding to Example 1 and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0255] An embodiment of the present invention further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes the encryption method corresponding to embodiment 1.

[0256] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program runs on a processor, the encryption method corresponding to embodiment 1 is executed.

[0257] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0258] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0259] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0260] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. An encryption method, characterized in that: Applied to a computer device, the computer device comprising a first hyperchaotic system module and a second hyperchaotic system module, the method comprising: If an encryption request is received, obtaining a first seed matrix corresponding to the encryption request; Controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and using the results to update the first seed matrix, wherein the first seed matrix includes parameters for inputting into the first hyperchaotic system module and the second hyperchaotic system module respectively; After all parameters in the updated first seed matrix are updated, a random value is obtained according to the parameters in the updated first seed matrix; The object to be encrypted corresponding to the encryption request is encrypted using the random value.

2. The encryption method according to claim 1, wherein: If an encryption request is received, after obtaining a first seed matrix corresponding to the encryption request, controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to parameters in the first seed matrix, and before updating the first seed matrix using the results, the method further includes: Perturbing the parameters in the first seed matrix according to a preset matrix perturbation rule; The controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and using the results to update the first seed matrix includes: The first hyperchaotic system module and the second hyperchaotic system module are controlled to output corresponding results according to the parameters in the disturbed first seed matrix, and the disturbed first seed matrix is ​​updated using the results.

3. The encryption method according to claim 1, wherein: The first seed matrix includes a first seed parameter, a first system parameter, a second seed parameter and a second system parameter; The controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and using the results to update the first seed matrix includes: Inputting the second system parameter and the second seed parameter into the second hyperchaotic system module to obtain a first result, and updating the second seed parameter in the first seed matrix using the first result and the first seed parameter; The first system parameter and the first seed parameter are input into the first hyperchaotic system module to obtain a second result, and the first seed parameter in the first seed matrix is ​​updated using the second result and the updated second seed parameter.

4. The encryption method according to claim 1, wherein: The first seed matrix includes a first seed parameter, a first system parameter, a second seed parameter and a second system parameter; After controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and updating the first seed matrix using the results, and before obtaining random values ​​according to the parameters in the updated first seed matrix, the method further includes: If the updated second seed parameter exceeds the corresponding preset value, performing a modulo process on each of the updated second seed parameters according to the preset value corresponding to each second seed parameter; Obtaining a random value according to the parameters in the updated first seed matrix includes: The random value is obtained by using the parameters in the first seed matrix after the modulo processing.

5. The encryption method according to claim 1, wherein: After controlling the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix and updating the first seed matrix using the results, and before obtaining random values ​​according to the parameters in the updated first seed matrix, the method further includes: For the parameters in the updated first seed matrix, replacing the parameters with partial parameters of the parameters, wherein the partial parameters include fractional parameters; Obtaining a random value according to the parameters in the updated first seed matrix includes: The random value is obtained by using the parameters in the first seed matrix after the parameters are replaced.

6. The encryption method according to claim 1, wherein: Obtaining a random value according to the parameters in the updated first seed matrix includes: Based on a preset matrix scrambling rule, performing matrix scrambling processing on the updated first seed matrix to obtain a second seed matrix; Get a random value based on the second seed matrix.

7. The encryption method according to claim 1, wherein: Obtaining a random value according to the parameters in the updated first seed matrix includes: Writing each parameter in the updated first seed matrix into a preset third seed matrix in sequence according to a preset order, wherein the dimension of the third seed matrix is ​​greater than the dimension of the first seed matrix; Repeat the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and using the results to update the first seed matrix until a preset number of times are executed, and obtaining random values ​​using the parameters in the third seed matrix.

8. The encryption method according to claim 7, wherein: The step of repeatedly controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times is performed, and obtaining random values ​​using the parameters in the third seed matrix, includes: Repeating the steps of controlling the first hyperchaotic system module and the second hyperchaotic system module according to the parameters in the first seed matrix, outputting corresponding results, and updating the first seed matrix using the results, until a preset number of times are performed, and performing a preset quantized sampling process on each parameter in the third seed matrix; Convert each parameter in the third seed matrix after quantization sampling processing into a corresponding binary number; The random values ​​are obtained using the parameters in the transformed third seed matrix.

9. The encryption method according to claim 8, wherein: The method of obtaining a random value by using the parameters in the converted third seed matrix includes: Writing each parameter in the converted third seed matrix into the preset fourth seed matrix and fifth seed matrix in sequence according to the preset order; controlling each parameter in the fourth submatrix and each parameter in the fifth submatrix to be updated based on an XOR operation; A random value is obtained by using each parameter in the fourth seed matrix after the exclusive OR operation is performed and each parameter in the fifth seed matrix after the exclusive OR operation is performed.

10. An encryption device, characterized in that: Applied to a computer device, the computer device includes a first hyperchaotic system module and a second hyperchaotic system module, and the device includes: an acquisition module, configured to, upon receiving an encryption request, acquire a first seed matrix corresponding to the encryption request; an output module, configured to control the first hyperchaotic system module and the second hyperchaotic system module to output corresponding results according to the parameters in the first seed matrix, and to update the first seed matrix using the results, wherein the first seed matrix includes parameters for inputting the first hyperchaotic system module and the second hyperchaotic system module respectively; a random value acquisition module, configured to obtain a random value according to the parameters in the updated first seed matrix after all the parameters in the updated first seed matrix are updated; The encryption module is used to encrypt the object to be encrypted corresponding to the encryption request using the random value.

11. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the encryption method according to any one of claims 1 to 9 is executed.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed on a processor, executes the encryption method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for generating pseudo-random numbers on basis of cellular neural networks

    CN106201435A

  • Lorenz chaotic pseudo-random sequence generator based on m sequence

    CN107678729A