A JS file encryption method based on online interactive web dynamic defense
By combining LFSR and OHNN in the stream cipher generator to generate a high-security pseudo-random number sequence and exorbitant with plaintext, the problem of WEB service vulnerability in the prior art is solved, and the JS file encryption method based on online interactive WEB dynamic defense is realized, which improves encryption security and attack cost.
Patent Information
- Application Number
- CN202211010880.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-08-23
AI Technical Summary
The prior art is difficult to effectively defend against attacks caused by WEB services, and how to implement JS file encryption method based on online interactive WEB dynamic defense.
Through the stream cipher generator, OHNN consisting of multiple LFSRs and multiple neurons, n-order singular square matrix is selected as the basic connection weight matrix, randomly select the initial value of LFSR as the encryption key, and pass it to the receiver through a secret channel. The receiver calculates the new connection synaptic matrix, outputs the attractor, and forms the ciphertext through pseudo-random number and the plaintext bitwise XOR operation.
By leveraging the nonlinear chaotic characteristics of neural networks, high linear complexity and long-period pseudo-random number sequences are generated, the encryption security of JS files is improved, and the attack cost of attackers is increased, thereby effectively protecting WEB services.
Smart Images

Figure CN115473624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of WEB services, and in particular to a JS file encryption method based on online interactive WEB dynamic defense. Background Art
[0002] With the development of information technology, a large number of companies and institutions use Web technology to provide services to the outside world. According to Internet Live Stats, as of the beginning of 2021, the number of websites in the world has exceeded 1.8 billion. Due to the use of a large number of WEB services, many Web security issues have arisen, and hackers can easily use tools to attack WEB services.
[0003] How to avoid WEB services from being attacked? In view of this, a JS file encryption method based on online interactive WEB dynamic defense is needed. Summary of the invention
[0004] The embodiment of the present invention provides a JS file encryption method based on online interactive WEB dynamic defense, so as to at least solve the technical problem that the WEB server may be attacked in the related art.
[0005] According to one aspect of an embodiment of the present invention, a JS file encryption method based on online interactive WEB dynamic defense is provided, comprising:
[0006] Key selection: The stream cipher generator includes multiple LFSRs and OHNNs composed of multiple neurons; the communicating parties first select an n-order singular square matrix T 0 , n-order singular square matrix is used as the basic connection weight matrix. The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs, which are used together as the encryption key and transmitted to the receiver through a secret channel;
[0007] Attractor calculation: The receiver obtains the initial values of the matrix and all LFSRs and calculates the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used, and iterative operations are performed to calculate the attractor;
[0008] Generate pseudo-random numbers: group the attractors according to the rules, number them in the order of appearance, and then program and output pseudo-random numbers;
[0009] Encrypting plaintext: performing an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and outputting the result of the XOR operation as ciphertext.
[0010] Optionally, the number of the LFSRs and neurons is the same.
[0011] Optionally, the stream cipher generator includes an OHNN consisting of 16 LFSRs and 16 neurons, and the outputs of the 16 LFSRs serve as inputs of the OHNN.
[0012] Optionally, grouping the attractors according to the rules specifically includes: dividing the calculated attractors into two groups, one group of attractors has the same number of 0s and 1s, the other group of attractors has 2 more 1s than 0s, and the number of attractors in each group is the same, and the number of attractors in each group is the same as the number of LFSRs.
[0013] Optionally, the programming includes: setting odd numbers to "0" and setting even numbers to "1", so that the generated sequence of 0 and 1 is a pseudo-random sequence, that is, a pseudo-random number.
[0014] Optionally, the method further includes: while outputting the pseudo-random number, triggering the corresponding LFSR according to the attractor number to prepare for the next LFSR output, thereby changing the input of the OHNN.
[0015] Optionally, the JS file decryption method based on online interactive WEB dynamic defense is the inverse process of the JS file encryption method.
[0016] According to another aspect of an embodiment of the present invention, a JS file encryption system based on online interactive WEB dynamic defense is also provided, including:
[0017] The key selection module for the stream cipher generator includes multiple LFSRs and OHNNs composed of multiple neurons. The two communicating parties first select an n-order singular square matrix T 0 , n-order singular square matrix is used as the basic connection weight matrix. The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs, which are used together as the encryption key and transmitted to the receiver through a secret channel;
[0018] The attractor calculation module is used by the receiver to obtain the initial values of the matrix and all LFSRs and calculate the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used, and iterative operations are performed to calculate the attractor;
[0019] A pseudo-random number generating module is used to group the attractors according to a rule, number the attractors in the order of appearance, and then programmatically output pseudo-random numbers; and
[0020] The plaintext encryption module is used to perform an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and output the result of the XOR operation as ciphertext.
[0021] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned JS file encryption methods based on online interactive WEB dynamic defense.
[0022] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein when the program is running, any one of the above-mentioned JS file encryption methods based on online interactive WEB dynamic defense is executed.
[0023] Compared with the existing technology, the present invention has the following beneficial effects:
[0024] In the embodiment of the present invention, the key selection includes: the stream cipher generator includes a plurality of LFSRs and an OHNN composed of a plurality of neurons, and the communicating parties first select an n-order singular square matrix T 0 , n-order singular square matrix as the basic connection weight matrix, the sender arbitrarily selects an n-order matrix H, and randomly selects the initial values of all LFSRs, together as the encryption key, and transmits it to the receiver through a secret channel; the attractor calculation includes: the receiver obtains the matrix and the initial values of all LFSRs, and calculates the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state of the LFSR is used to perform iterative operations to calculate the attractor; generating pseudo-random numbers includes: grouping the attractors according to the rules, numbering them in the order of appearance of the attractors, and then programming and outputting pseudo-random numbers; encrypting plaintext includes: performing bit-by-bit XOR operations on the pseudo-random sequence and the plaintext, and outputting the result of the XOR operation as ciphertext. By utilizing the nonlinear chaotic characteristics of the oversaturated neural network, the sequence generated by the LFSR is randomly selected to generate a stream cipher, which is bit-by-bit XORed with the plaintext to form a ciphertext to complete the encryption. By adopting this nonlinear combination method, the chaotic characteristics of the discrete neural network can be combined with the good statistical characteristics of the sequence to obtain a pseudo-random number sequence with high linear complexity and long period. In addition, the front-end JS file is encrypted and decrypted by a stream cipher algorithm based on the chaotic attractor of the neural network, which increases the attack cost of the attacker, thereby achieving the effect of protecting the WEB service. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 It is a flow chart of a JS file encryption method based on online interactive WEB dynamic defense according to an embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of a stream cipher generator according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] In actual design, sequence ciphers usually consist of a driving part and a nonlinear combination part. Linear feedback shift register (LFSR) is the most commonly used method for implementing the driving part. The number and use of LFSRs have a great influence on the period and statistical characteristics of the generated sequence. After the output sequences of the driving part enter the nonlinear combination part, the various statistical indicators, linear complexity and randomness of the generated pseudo-random sequence are further changed and improved through nonlinear confusion and diffusion, generating a pseudo-random sequence that meets the corresponding test requirements.
[0032] The key expansion of linear feedback shift register sequence by nonlinear transformation using OHNN is a new idea for generating stream cipher. It mainly generates pseudo-random sequences through chaotic systems to cover up plaintext, and selects plaintext or key as control parameter or initial condition, and obtains ciphertext through multiple iterations. This idea combines chaotic system with traditional cryptography. The nonlinear, non-periodic and pseudo-random trajectory of the output is combined with LFSR to generate pseudo-random sequences to encrypt plaintext. Therefore, the method of the present invention utilizes the chaotic sequence trajectory of neural network, and the periodicity, random statistics and linear complexity of the sequence generated by the system are good, thereby improving the security of the algorithm.
[0033] Example 1
[0034] According to an embodiment of the present invention, an embodiment of a JS file encryption method based on online interactive WEB dynamic defense is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] like Figure 1 is a flow chart of a JS file encryption method based on online interactive WEB dynamic defense according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0036] Step S10, key selection: The stream cipher generator includes multiple LFSRs and OHNNs composed of multiple neurons; the communicating parties first select an n-order singular square matrix T 0 , the n-order singular square matrix is used as the basic connection weight matrix (i.e., the connection synaptic matrix). The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs, which are used together as the encryption key and transmitted to the receiver through a secret channel;
[0037] As an optional embodiment, the stream cipher based on linear feedback shift register (LFSR) has a simple design concept and is widely used in practice. This cryptographic system only needs a nonlinear component to perform nonlinear transformation on several LFSRs. If the design is appropriate, a key stream sequence can be generated, and various indicators of statistical characteristics are good and the linear complexity is high. The maximum period of an n-bit linear feedback shift register can only be 2 n -1, this maximum length sequence is called m-sequence. In this embodiment, the sequence generated by the LFSR is the m-sequence. The stream cipher design includes the same number of LFSRs and neurons.
[0038] Specifically, Figure 2 is a schematic diagram of a stream cipher generator according to an embodiment of the present invention. Figure 2 As shown in the figure, the stream cipher generator includes a Hopfield neural network composed of 16 LFSRs and 16 neurons of the OHNN. The output of the 16 LFSRs is used as the input of the OHNN. Due to the chaotic characteristics of the OHNN, it can traverse the input and randomly select the output. The m sequence generated by the 16 LFSRs is used as the input, which ensures a sufficiently large period and good nonlinearity.
[0039] Due to the chaotic characteristics of the Hopfield neural network with oversaturated storage, the transformation function of the neuron synaptic connection matrix is a one-way trapdoor function. Therefore, if the connection weight matrix of the neural network is changed, the chaotic attractor and its corresponding attraction domain will change accordingly. As long as H is changed, the attractor of the system will change greatly, and the output stream code will also change accordingly.
[0040] Step S20, attractor calculation: The receiver obtains the initial values of the matrix and all LFSRs, and calculates the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is taken and iterative operation is performed to calculate the attractor.
[0041] As an optional embodiment, the receiving party obtains the initial values of the matrix and 16 LFSRs and calculates As a new connection synaptic matrix, 16 LFSRs then start outputting according to the initial values and inputting OHNN in parallel as a connection synaptic matrix based on the connection synaptic matrix. The initial state is taken and iterative operation is performed to calculate the attractor.
[0042] Step S30, generating pseudo-random numbers: grouping the attractors according to the rules, numbering them in the order of appearance, and then programming to output pseudo-random numbers.
[0043] As an optional embodiment, grouping the attractors according to rules specifically includes: dividing the calculated attractors into two groups, one group of attractors has the same number of 0s and 1s, and the other group of attractors has 2 more 1s than 0s, and the number of attractors in each group is the same, and the number of attractors in each group is the same as the number of LFSRs, that is, both are 16.
[0044] As an optional embodiment, due to the ergodicity of the chaotic system, the probability of each attractor in each group appearing is the same, so half of the attractors in each group can be set to "0" and the other half to "1". Therefore, in programming, the odd-numbered ones are set to "0" and the even-numbered ones are set to "1", so that the sequence of 0 and 1 generated is a pseudo-random sequence, that is, a pseudo-random number. This design method does not store and judge specific attractors, saving a lot of computing and storage resources. While outputting pseudo-random numbers, the corresponding LFSRi (i=1, 2, -16) is triggered according to the attractor number to prepare for the next LFSR output, thereby changing the input of the OHNN.
[0045] In one of the embodiments, the attractor truth table of OHNN is shown in Table 1. From Table 1, it can be seen that the review random number is realized by the method of the above embodiment.
[0046] Table 1. Attractor truth table of OHNN
[0047] serial number Attractor Output serial number Attractor serial number 1 1010001011111000 0 1 1100001011111000 0 2 1101000001111100 1 2 1011000001111100 1 3 1000111111100000 0 3 1100111111100000 0 4 0000000011111111 1 4 1000000011111110 1 … …… 0 or 1 … …… 0 or 1 13 1110101110100000 0 13 1010101110100000 0 14 1111100111000000 1 14 1011100111000000 1 15 1111110110000100 0 15 1100110110000100 0 16 1011111100000100 1 16 1111111100000000 1
[0048] Step S40, encrypting the plaintext: performing an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and outputting the result of the XOR operation as the ciphertext.
[0049] As an optional embodiment, the JS file decryption method based on online interactive WEB dynamic defense is the reverse process of the JS file encryption method.
[0050] Specifically, after receiving the ciphertext, the receiver uses the same method as the encryptor to generate the same pseudo-random sequence, and XORs it with the ciphertext to obtain the plaintext.
[0051] The above embodiment, by utilizing the nonlinear chaotic characteristics of the oversaturated neural network, randomly selects the sequences generated by 16 LFSRs, thereby generating a stream cipher, performing bit-by-bit XOR with the plaintext to form a ciphertext, and completing encryption. By adopting this nonlinear combination method, the chaotic characteristics of the discrete neural network can be combined with the good statistical characteristics of the m sequence to obtain a pseudo-random number sequence with high linear complexity and long period. In addition, the front-end JS file is encrypted and decrypted by a stream cipher algorithm based on the chaotic attractor of the neural network, which increases the attack cost of the attacker, thereby achieving the effect of protecting the WEB service.
[0052] Example 2
[0053] According to another aspect of an embodiment of the present invention, a JS file encryption system based on online interactive WEB dynamic defense is also provided, including:
[0054] The key selection module for the stream cipher generator includes multiple LFSRs and OHNNs composed of multiple neurons. The two communicating parties first select an n-order singular square matrix T 0 , the n-order singular square matrix is used as the basic connection weight matrix (i.e., the connection synaptic matrix). The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs, which are used together as the encryption key and transmitted to the receiver through a secret channel;
[0055] The attractor calculation module is used by the receiver to obtain the initial values of the matrix and all LFSRs and calculate the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used, and iterative operations are performed to calculate the attractor;
[0056] A pseudo-random number generating module is used to group the attractors according to a rule, number the attractors in the order of appearance, and then programmatically output pseudo-random numbers; and
[0057] The plaintext encryption module is used to perform an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and output the result of the XOR operation as ciphertext.
[0058] The above-mentioned JS file encryption system based on online interactive WEB dynamic defense, the functional combination of the key selection module, the attractor calculation module, the pseudo-random number generation module and the encryption plaintext module, can realize the stream cipher algorithm based on the neural network chaotic attractor to encrypt and decrypt the front-end JS file, thereby increasing the attack cost of the attacker and achieving the effect of protecting the WEB service.
[0059] Embodiment 3, according to another aspect of the embodiment of the present invention, there is also provided a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned JS file encryption methods based on online interactive WEB dynamic defense.
[0060] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group, and the computer-readable storage medium includes a stored program.
[0061] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: key selection: the stream cipher generator includes a Hopfield neural network of OHNN composed of multiple LFSRs and multiple neurons; the communicating parties first select an n-order singular square matrix T 0, n-order singular square matrix as the basic connection weight matrix, the sender arbitrarily selects an n-order matrix H, and randomly selects the initial values of all LFSRs, together as the encryption key, and transmits it to the receiver through a secret channel. Attractor calculation: The receiver obtains the matrix and the initial values of all LFSRs, and calculates the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used to perform iterative operations to calculate the attractor. Generate pseudo-random numbers: group the attractors according to the rules, number them in the order of their appearance, and then program and output pseudo-random numbers. Encrypt plaintext: perform XOR operations on the pseudo-random sequence and the plaintext bit by bit, and output the result of the XOR operation as ciphertext.
[0062] Example 4
[0063] According to another aspect of an embodiment of the present invention, a processor is further provided, the processor being used to run a program, wherein when the program is running, any one of the above-mentioned JS file encryption methods based on online interactive WEB dynamic defense is executed.
[0064] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of a JS file encryption method based on online interactive WEB dynamic defense are implemented.
[0065] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0066] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0067] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of units or modules can be electrical or other forms.
[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0069] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0070] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be 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: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0071] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A JS file encryption method based on online interactive WEB dynamic defense, characterized in that: include: Key selection: The stream cipher generator includes multiple LFSRs and OHNNs composed of multiple neurons. The two communicating parties first select an n-order singular square matrix T0 as the basic connection weight matrix. The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs as the encryption key and transmits them to the receiver through a secret channel. Attractor calculation: The receiver obtains the initial values of the matrix and all LFSRs and calculates the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used, and iterative operations are performed to calculate the attractor; Generate pseudo-random numbers: group the attractors according to the rules, number them in the order of appearance, and then program and output pseudo-random numbers; The attractors are grouped according to the rule, specifically comprising: dividing the calculated attractors into two groups, wherein the number of 0s and 1s in one group of attractors is the same, and the number of 1s in the other group of attractors is 2 more than the number of 0s, and the number of attractors in each group is the same, and the number of attractors in each group is the same as the number of LFSRs; The programming includes: setting odd numbers to "0" and even numbers to "1", so that the generated sequence of 0 and 1 is a pseudo-random sequence, i.e., a pseudo-random number; Encrypting plaintext: performing an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and outputting the result of the XOR operation as ciphertext.
2. The JS file encryption method based on online interactive WEB dynamic defense according to claim 1 is characterized in that: The number of the LFSRs and neurons is the same.
3. The JS file encryption method based on online interactive WEB dynamic defense according to claim 1 is characterized in that: The stream cipher generator includes 16 LFSRs and an OHNN composed of 16 neurons, and the outputs of the 16 LFSRs serve as the inputs of the OHNN.
4. The JS file encryption method based on online interactive WEB dynamic defense according to claim 1 is characterized in that: Also includes: While outputting pseudo-random numbers, the corresponding LFSR is triggered according to the attractor number to prepare for the next LFSR output, thereby changing the input of the OHNN.
5. The JS file encryption method based on online interactive WEB dynamic defense according to claim 1 is characterized in that: The JS file decryption method based on online interactive WEB dynamic defense is the reverse process of the JS file encryption method.
6. A JS file encryption system based on online interactive WEB dynamic defense, characterized in that: include: The key selection module is used for the stream cipher generator, which includes multiple LFSRs and OHNN composed of multiple neurons. The two communicating parties first select an n-order singular square matrix T0 as the basic connection weight matrix. The sender arbitrarily selects an n-order matrix H and randomly selects the initial values of all LFSRs as the encryption key and transmits them to the receiver through a secret channel. The attractor calculation module is used by the receiver to obtain the initial values of the matrix and all LFSRs and calculate the new connection synaptic matrix Then all LFSRs start to output according to the initial value and input into OHNN in parallel. The result of OHNN output is used as the new connection synaptic matrix The initial state is used, and iterative operations are performed to calculate the attractor; A pseudo-random number generating module is used to group the attractors according to the rules, number the attractors in the order of appearance, and then programmatically output pseudo-random numbers; The attractors are grouped according to the rules, specifically comprising: dividing the calculated attractors into two groups, wherein the number of 0s and 1s in one group of attractors is the same, and the number of 1s in the other group of attractors is 2 more than the number of 0s, and the number of attractors in each group is the same, and the number of attractors in each group is the same as the number of LFSRs; the programming comprises: setting odd numbers to "0" and even numbers to "1", so that the generated sequence of 0s and 1s is a pseudo-random sequence, i.e., a pseudo-random number; and The plaintext encryption module is used to perform an XOR operation on the pseudo-random sequence and the plaintext bit by bit, and output the result of the XOR operation as ciphertext.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the JS file encryption method based on online interactive WEB dynamic defense as described in any one of claims 1 to 5.
8. A processor, characterized in that: The processor is used to run a program, wherein the program executes the JS file encryption method based on online interactive WEB dynamic defense as described in any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Public key cipher encrypting and decrypting method based on neural network chaotic attractor
CN101977112A
Satellite-borne Lidar hyperchaotic compressed sensing high-spatial-resolution imaging method
CN105182359A