CN114268436A - Method and device for generating dynamic key, storage medium and electronic device - Google Patents

Method and device for generating dynamic key, storage medium and electronic device Download PDF

Info

Publication number
CN114268436A
CN114268436A CN202111633661.4A CN202111633661A CN114268436A CN 114268436 A CN114268436 A CN 114268436A CN 202111633661 A CN202111633661 A CN 202111633661A CN 114268436 A CN114268436 A CN 114268436A
Authority
CN
China
Prior art keywords
scattered light
encrypted
data
frequency
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111633661.4A
Other languages
Chinese (zh)
Inventor
孙科
王乾
蒋艳军
赵轶新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111633661.4A priority Critical patent/CN114268436A/en
Publication of CN114268436A publication Critical patent/CN114268436A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating, Analyzing Materials By Fluorescence Or Luminescence (AREA)

Abstract

The invention discloses a method and a device for generating a dynamic key, a storage medium and an electronic device, wherein the method comprises the following steps: converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light; controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the frequency light beam; and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light. By adopting the technical scheme, the problem that in the prior art, the public key and the private key pair form of the data encryption algorithm is single, the rule of key generation is fixed, and further the key has a cracking risk is solved.

Description

Method and device for generating dynamic key, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for generating a dynamic key, a storage medium, and an electronic apparatus.
Background
With the development of the information-oriented society, in the information field, the importance of maintaining data security, especially the security of transmitting data, is increasing. In order to ensure the safety of data transmission, a high-safety data encryption algorithm must be designed, and through the data encryption algorithm, the problem of data leakage can be effectively prevented, and the data safety is better maintained.
In a traditional data encryption algorithm, before data is transmitted, a data server and a client must determine keys in advance, and then both the server and the client must store the keys, so that if the keys of one party are leaked, the transmitted data information is unsafe. In the existing data encryption algorithm, as shown in fig. 1, fig. 1 is a flowchart of the existing encryption algorithm according to the embodiment of the present invention, a form of a public key and a private key pair is single, and a rule of key generation is fixed, and the key is generated either after symmetric encryption or after asymmetric encryption, which causes a risk of cracking the key.
The method aims at solving the problems that in the prior art, the form of a public key and a private key pair of a data encryption algorithm is single, the rule of key generation is fixed, and further the key has a cracking risk.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating a dynamic key, a storage medium and an electronic device, which are used for at least solving the problems that in the prior art, the form of a public key and a private key pair of a data encryption algorithm is single, the rule of key generation is fixed, and further the key is at risk of cracking.
According to an embodiment of the present invention, a method for generating a dynamic key is provided, including: converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light; controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam; and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
In an exemplary embodiment, generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the amount of the scattered light includes: determining the frequency of the scattered light according to the simple harmonic vibration of atoms of the target inhomogeneous substance after the light beam irradiates the target inhomogeneous substance, and determining the total number of preset spectral lines in the scattered light according to the type of the scattered light and the number of the scattered light; and generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light.
In an exemplary embodiment, generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light includes: acquiring an atom simple harmonic vibration coordinate corresponding to the simple harmonic vibration of the atom of the target inhomogeneous substance; and taking the atomic simple harmonic vibration coordinate, the frequency of the scattered light and the total number of the preset spectral lines as parameters of an encryption algorithm, and generating a dynamic key of the data to be encrypted through the encryption algorithm.
In one exemplary embodiment, determining the frequency of the scattered light from simple harmonic vibrations of atoms of the target inhomogeneous species after the beam of light impinges on the target inhomogeneous species comprises: controlling the light beam to irradiate the target inhomogeneous substance, wherein atoms of the target inhomogeneous substance do simple harmonic vibration after irradiation; determining the frequency of the scattered light by the simple coordinates and the simple harmonic vibration of the atoms of the target inhomogeneous species.
In one exemplary embodiment, obtaining atomic simple harmonic vibration coordinates corresponding to simple harmonic vibrations of atoms of the target inhomogeneous species includes: and describing the simple harmonic vibration of the atoms of the target inhomogeneous substance through a coordinate system to obtain the simple harmonic vibration coordinates of the atoms, and taking the frequency parameters as the coordinate parameters of the simple harmonic vibration of the atoms.
In one exemplary embodiment, converting data to be encrypted into frequency parameters of a light beam includes: after the data to be encrypted is converted into a numerical value, controlling the numerical value in a frequency range of visible light in a preset mode to obtain a target numerical value; and taking the target value as a frequency parameter of the light beam.
In an exemplary embodiment, after generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the amount of the scattered light, the method further includes: encrypting the data to be encrypted according to the dynamic key to obtain encrypted data to be encrypted; and sending the encrypted data to be encrypted to a receiver of the data to be encrypted so as to instruct the receiver to decrypt the encrypted data to be encrypted according to the dynamic secret key received in advance.
According to another embodiment of the present invention, there is also provided a dynamic key generation apparatus, including: the conversion module is used for converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light; the control module is used for controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam; and the generating module is used for generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above method for generating a dynamic key when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for generating a dynamic key through the computer program.
In the embodiment of the application, the data to be encrypted is converted into the frequency parameters of the light beam, wherein the frequency parameters are positioned in the frequency range of visible light; controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam; and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light. By adopting the technical scheme, the problem that the key has a cracking risk due to the fact that the form of a public key and a private key pair of a data encryption algorithm is single and the rule of key generation is fixed in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a prior art encryption algorithm of an embodiment of the present invention;
fig. 2 is a block diagram of a hardware structure of a computer terminal of a method for generating a dynamic key according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of dynamic key generation according to an embodiment of the invention;
FIG. 4 is a schematic illustration of the principle of Raman effect according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a method of generating a dynamic key according to an embodiment of the invention;
fig. 6 is a block diagram of a dynamic key generation apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a computer terminal or a similar operation device. Taking a computer terminal as an example, fig. 2 is a block diagram of a hardware structure of a computer terminal of a method for generating a dynamic key according to an embodiment of the present invention, and as shown in fig. 2, the computer terminal may include one or more processors 202 (only one is shown in fig. 2) (the processor 202 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 204 for storing data, and in an exemplary embodiment, the computer terminal may further include a transmission device 206 for a communication function and an input/output device 208. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration, and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 2, or have a different configuration with equivalent functionality to that shown in FIG. 2 or more functionality than that shown in FIG. 2.
The memory 204 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the dynamic key generation method in the embodiment of the present invention, and the processor 202 executes various functional applications and data processing by running the computer programs stored in the memory 204, so as to implement the method described above. Memory 204 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include memory located remotely from the processor 202, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 206 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 206 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 206 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for generating a dynamic key is provided, which is applied to the above-mentioned computer terminal, and fig. 3 is a flowchart of the method for generating a dynamic key according to the embodiment of the present invention, where the flowchart includes the following steps:
step S302, converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light;
it should be noted that the data to be encrypted, i.e. the plaintext data, is any data that is not encrypted.
It should be noted that the light beam is a visible light beam, and the frequency parameter of the light beam is determined according to the data to be encrypted.
It should be noted that the visible light refers to the portion of the electromagnetic spectrum that can be perceived by human eyes, and the frequency range of the visible light is 4.2 ^ 20^24 to 7.8 ^ 20^24 Hz.
Step S304, controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam;
the inhomogeneous substance is a substance having inhomogeneous optical properties, that is, the optical properties of the substance are not necessarily the same in all directions.
It should be noted that the inhomogeneous substances may be heterogeneous substances, and may also be heterogeneous substances of the same type, which is not limited in this application.
To aid in understanding the present solution, the raman effect is described below: one of the more specific effects of the scattering phenomenon of light is the raman effect, which is the change in frequency of light after scattering, which is the result of the superposition of vibrational energy and photon energy of molecules when incident photons collide with the molecules. As shown in fig. 4, fig. 4 is a schematic diagram illustrating the principle of raman effect according to an embodiment of the present invention, when a light beam is irradiated onto the surface of a heterogeneous substance at a fixed frequency U, energy transfer occurs when constituent molecules or atoms in the substance collide with incident photons, and since the molecules are composed of atoms, the vibrational states of the atoms are changed to different degrees, and then the light beam with various frequencies is scattered. The scattered light may have the same frequency as the incident light, e.g., a Rayleigh line with a frequency of U, or may have a different frequency, e.g., a Scotto line with a frequency of U + Δ U. The frequency of the scattered light changes depending on the characteristics of the inhomogeneous material, and since the mode of vibration of different kinds of radicals is unique, the light is scattered after passing through the inhomogeneous material, and scattered light having a difference from the incident light frequency can be generated.
The light beam generates scattered light by raman effect after passing through the target heterogeneous substance, and the type of the scattered light generated and the amount of the scattered light can be obtained.
Step S306, generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
It should be noted that the dynamic key is a two-factor authentication system using a time synchronization technique. The traditional static password is replaced by the one-time password generated by two variables of time, events and keys.
Through the steps, data to be encrypted are converted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light; controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the frequency light beam; and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light. By adopting the technical scheme, the problem that in the prior art, the public key and the private key pair form of the data encryption algorithm is single, the rule of key generation is fixed, and further the key has a cracking risk is solved.
Optionally, in this embodiment, in step S304, controlling the light beam to irradiate the target inhomogeneous substance, and obtaining the type of the scattered light and the quantity of the scattered light corresponding to the light beam includes: controlling the light beam to irradiate the target inhomogeneous substance, wherein the target inhomogeneous substance comprises different kinds of inhomogeneous substances; obtaining the type and the quantity of scattered light generated after the light beam irradiates each heterogeneous substance in the heterogeneous substances.
When the beam irradiates different inhomogeneous substances, the atomic vibrational states of the inhomogeneous substances change, and the atomic vibrational states of the inhomogeneous substances are different from substance to substance.
In an exemplary embodiment, the frequency of the scattered light is determined according to the simple harmonic vibration of the atoms of the target inhomogeneous substance after the light beam irradiates the target inhomogeneous substance, and the total number of preset spectral lines in the scattered light is determined according to the type of the scattered light and the number of the scattered light; and generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light.
It should be noted that the simple harmonic vibration is simple harmonic motion, that is, the object reciprocates in a sinusoidal manner near its equilibrium position under the action of restoring force proportional to the displacement.
It should be noted that the light beam generates a plurality of scattered lights after passing through the heterogeneous material, and the scattered lights have spectral lines with different frequencies.
Optionally, in this embodiment, the preset spectral line may include, but is not limited to: rayleigh, raman, stokes and anti-stokes lines in the scattered light.
In one exemplary embodiment, atomic simple harmonic vibration coordinates corresponding to simple harmonic vibrations of the target inhomogeneous species are obtained; and taking the atomic simple harmonic vibration coordinate, the frequency of the scattered light and the total number of the preset spectral lines as parameters of an encryption algorithm, and generating a dynamic key of the data to be encrypted through the encryption algorithm.
It should be noted that the atomic simple harmonic vibration coordinates include, but are not limited to: the amplitude of the atomic simple harmonic vibration, the period of the atomic simple harmonic vibration, the angular frequency of the atomic simple harmonic vibration, and the like.
It should be noted that the encryption algorithm is an algorithm for generating a dynamic key of data to be encrypted, and the algorithm may be a dynamic key generation algorithm based on event counting, or may be a dynamic key generation algorithm based on time counting, which is not limited in this application.
In this embodiment, even if the encryption algorithm is cracked, the data is still the data encrypted by the raman effect, and the security of the data can be effectively ensured.
Optionally, in this embodiment, generating the dynamic key of the data to be encrypted through the encryption algorithm includes: and generating a dynamic key of the data to be encrypted by adopting An HTOP (An hMAC-based one-time Password algorithm, a one-time Password generation algorithm based on event counting).
Optionally, in this embodiment, after obtaining the atomic simple harmonic vibration coordinates corresponding to the simple harmonic vibration of the target inhomogeneous substance, the method further includes: and taking the atomic simple harmonic vibration coordinate, the frequency of the scattered light, the total number of the preset spectral lines and a random number with a preset digit as parameters of an encryption algorithm, and generating a dynamic key of the data to be encrypted through the encryption algorithm.
It should be noted that, the random number with the preset number of bits may be understood that the number of bits of the random number is preset, for example, the number of bits of the preset random number is 16 bits, the atomic simple harmonic vibration coordinates, the frequency of the scattered light, the total number of the preset spectral lines, and the 16-bit random number are used as parameters of an encryption algorithm, and a dynamic key of data to be encrypted is generated through the encryption algorithm.
In one exemplary embodiment, the light beam is controlled to irradiate the target inhomogeneous substance, wherein atoms of the target inhomogeneous substance vibrate in simple harmonic mode after irradiation; determining the frequency of the scattered light by the simple coordinates and the simple harmonic vibration of the target inhomogeneous material.
It should be noted that the above-mentioned simple coordinates are a coordinate system for describing and calculating the internal motion of molecules or atoms, each simple coordinate represents a set of combinations of the internal motion of molecules or atoms, the energy of the internal motion of molecules or atoms can be known by examining the simple coordinates of molecules or atoms, and further the characteristic absorption peak of molecules or atoms in the raman effect can be predicted, and the simple coordinates are introduced to analyze the frequency of the scattered light according to the atomic simple harmonic vibration of the inhomogeneous material.
In one exemplary embodiment, the simple harmonic vibration of the atom of the target inhomogeneous substance is described by a coordinate system to obtain the atom simple harmonic vibration coordinate, and the frequency parameter is taken as the coordinate parameter of the atom simple harmonic vibration.
It should be noted that, when a plurality of heterogeneous substances are included in the target heterogeneous substance, the simple harmonic vibration of the atom of each substance is described by the coordinate system.
Optionally, in this embodiment, describing simple harmonic vibration of the atom of the target inhomogeneous substance by using a coordinate system to obtain a simple harmonic vibration coordinate of the atom, and taking the frequency parameter as a coordinate parameter of the simple harmonic vibration of the atom, includes: and describing the simple harmonic vibration of the atom of the target inhomogeneous substance through Cartesian coordinates to obtain the simple harmonic vibration coordinates of the atom, and taking the frequency parameters as the amplitude, the period and the angular frequency of the simple harmonic vibration of the atom of the target substance.
In an exemplary embodiment, after the data to be encrypted is converted into a numerical value, the numerical value is controlled in a frequency range of visible light in a preset manner to obtain a target numerical value; and taking the target value as a frequency parameter of the light beam.
Optionally, in this embodiment, the method for converting data to be encrypted into a numerical value includes, but is not limited to: and converting Chinese and English in the encrypted data into decimal.
Optionally, in this embodiment, the controlling the value in the frequency range of the visible light in a preset manner to obtain the target value includes: judging whether a numerical value obtained by converting data to be encrypted is in a visible frequency range of light, if so, taking a target numerical value as a frequency parameter of the light beam, if so, calculating a difference value between the numerical value and the maximum value, subtracting the difference value from the numerical value, and then subtracting a random number to obtain a numerical value as a frequency parameter, wherein the random number is smaller than the average value of the visible range; if the difference value is smaller than the minimum value of the visible frequency, the difference value between the minimum value and the numerical value is calculated, the numerical value obtained by adding the difference value to the numerical value and adding a random number is used as the frequency parameter, wherein the random number is smaller than the average value of the visible range.
In an exemplary embodiment, after a dynamic key for encrypting the data to be encrypted is generated according to the type of the scattered light and the quantity of the scattered light, the data to be encrypted is encrypted according to the dynamic key to obtain encrypted data to be encrypted; and sending the encrypted data to be encrypted to a receiver of the data to be encrypted so as to instruct the receiver to decrypt the encrypted data to be encrypted according to the dynamic secret key received in advance.
The dynamic key generation method in the scheme is applied to an anti-harassment platform of a certain company at present, and the encryption method is reliable, efficient and high in safety through practical inspection.
In order to better understand the process of the above dynamic key generation method, the following describes a flow of the above dynamic key generation implementation method with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
In this embodiment, a method for generating a dynamic key is provided, and fig. 5 is a schematic diagram of a method for generating a dynamic key according to an embodiment of the present invention, as shown in fig. 5, the following steps are specifically provided:
step S502: converting data to be encrypted into decimal values;
step S504: judging whether the value is in a visible light frequency range; if the frequency is within the visible light frequency range, continuing to execute the step S508; if not, executing step S506;
step S506: controlling the value in a visible light frequency range in a preset mode;
step S508: this value is taken as a frequency parameter of the light beam and different inhomogeneous substances (corresponding to the target inhomogeneous substance) are irradiated by the light beam;
step S510: describing simple harmonic vibration of atoms of the inhomogeneous substance through Cartesian coordinates, and taking a frequency parameter as a coordinate parameter of the simple harmonic vibration of the atoms;
step S512: analyzing the frequency of the scattered light according to the simple harmonic vibration of the scattered light through a simple normal coordinate;
step S514: analyzing and recording the number of Rayleigh lines, Raman lines, Stokes lines and anti-Stokes lines (equivalent to preset spectral lines) in the scattered light;
step S516: using the atomic simple harmonic vibration coordinates, the frequency of scattered light, the total number of preset spectral lines (namely Rayleigh lines, Raman lines, Stokes lines and anti-Stokes lines) and a 16-bit random number (equivalent to the preset random number) as parameters of an encryption algorithm;
step S518: and generating a dynamic key of the data to be encrypted through the encryption algorithm.
Through the steps, the problem that in the prior art, the public key and the private key pair of the data encryption algorithm are single in form, the rule of key generation is fixed, and therefore the key is at risk of cracking is solved. According to the scheme, through a simulated Raman effect experiment, the key is dynamically generated by taking the simple harmonic vibration of atoms, the frequency of scattered light, Rayleigh lines and the number of Raman lines of different substances irradiated by each frequency beam in the Raman effect as encryption parameters, the encryption parameters are unpredictable, the randomness is strong, the method is safe and reliable, the generated key is high in safety, and the problem of the safety of the key in the traditional encryption algorithm can be solved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a dynamic key generation device is further provided, and the dynamic key generation device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated after the description is given. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a dynamic key generation apparatus according to an embodiment of the present invention; as shown in fig. 6, includes:
the conversion module 62 is configured to convert data to be encrypted into frequency parameters of a light beam, where the frequency parameters are within a frequency range of visible light;
it should be noted that the data to be encrypted, i.e. the plaintext data, is any data that is not encrypted.
It should be noted that the light beam is a visible light beam, and the frequency parameter of the light beam is determined according to the data to be encrypted.
It should be noted that the visible light refers to the portion of the electromagnetic spectrum that can be perceived by human eyes, and the frequency range of the visible light is 4.2 ^ 20^24 to 7.8 ^ 20^24 Hz.
The control module 64 is used for controlling the light beams to irradiate the target inhomogeneous substance to obtain the type and the quantity of the scattered light corresponding to the frequency light beams;
the inhomogeneous substance is a substance having inhomogeneous optical properties, that is, the optical properties of the substance are not necessarily the same in all directions.
It should be noted that the inhomogeneous substances may be heterogeneous substances, and may also be heterogeneous substances of the same type, which is not limited in this application.
To aid in understanding the present solution, the raman effect is described below: one of the more specific effects of the scattering phenomenon of light is the raman effect, which is the change in frequency of light after scattering, which is the result of the superposition of vibrational energy and photon energy of molecules when incident photons collide with the molecules. As shown in fig. 4, fig. 4 is a schematic diagram illustrating the principle of raman effect according to an embodiment of the present invention, when a light beam is irradiated onto the surface of a heterogeneous substance at a fixed frequency U, energy transfer occurs when constituent molecules or atoms in the substance collide with incident photons, and since the molecules are composed of atoms, the vibrational states of the atoms are changed to different degrees, and then the light beam with various frequencies is scattered. The frequency of the scattered light may be the same as the frequency of the incident light, such as rayleigh line with a frequency U, or may be different, such as scott line, and the frequency of the scattered light with a frequency U + au varies depending on the characteristics of the inhomogeneous material.
The light beam generates scattered light by raman effect after passing through the target heterogeneous substance, and the type of the scattered light generated and the amount of the scattered light can be obtained.
A generating module 66, configured to generate a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the amount of the scattered light.
It should be noted that the dynamic key is a two-factor authentication system using a time synchronization technique. The traditional static password is replaced by the one-time password generated by two variables of time, events and keys.
By the device, data to be encrypted is converted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light; controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the frequency light beam; and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light. By adopting the device, the problems that in the prior art, the form of a public key and a private key pair of a data encryption algorithm is single, the rule of key generation is fixed, and further the key has a cracking risk are solved.
Optionally, in this embodiment, the control module 64 is further configured to control the light beam to irradiate the target inhomogeneous substance, where the target inhomogeneous substance includes different kinds of inhomogeneous substances; obtaining the type and the quantity of scattered light generated after the light beam irradiates each heterogeneous substance in the heterogeneous substances.
When the beam irradiates different inhomogeneous substances, the atomic vibrational states of the inhomogeneous substances change, and the atomic vibrational states of the inhomogeneous substances are different from substance to substance.
In an exemplary embodiment, the generating module 66 is further configured to determine a frequency of the scattered light according to a harmonic vibration of atoms of the target inhomogeneous substance after the light beam irradiates the target inhomogeneous substance, and determine a total number of preset spectral lines in the scattered light according to a type of the scattered light and a number of the scattered light; and generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light.
It should be noted that the simple harmonic vibration is simple harmonic motion, that is, the object reciprocates in a sinusoidal manner near its equilibrium position under the action of restoring force proportional to the displacement.
It should be noted that the light beam generates a plurality of scattered lights after passing through the heterogeneous material, and the scattered lights have spectral lines with different frequencies.
Optionally, in this embodiment, the generating module 66 is further configured to, where the preset spectral line may include but is not limited to: rayleigh, raman, stokes and anti-stokes lines in the scattered light.
In an exemplary embodiment, the generating module 66 is further configured to obtain atomic simple harmonic vibration coordinates corresponding to the simple harmonic vibration of the target inhomogeneous material; and taking the atomic simple harmonic vibration coordinate, the frequency of the scattered light and the total number of the preset spectral lines as parameters of an encryption algorithm, and generating a dynamic key of the data to be encrypted through the encryption algorithm.
It should be noted that the atomic simple harmonic vibration coordinates include, but are not limited to: the amplitude of the atomic simple harmonic vibration, the period of the atomic simple harmonic vibration, the angular frequency of the atomic simple harmonic vibration, and the like.
It should be noted that the encryption algorithm is an algorithm for generating a dynamic key of data to be encrypted, and the algorithm may be a dynamic key generation algorithm based on event counting, or may be a dynamic key generation algorithm based on time counting, which is not limited in this application.
In this embodiment, even if the encryption algorithm is cracked, the data is still the data encrypted by the raman effect, and the security of the data can be effectively ensured.
Optionally, in this embodiment, the generating module 66 is further configured to generate a dynamic key of the data to be encrypted through the encryption algorithm, where the dynamic key includes: and generating a dynamic key of the data to be encrypted by adopting An HTOP (An hMAC-based one-time Password algorithm, a one-time Password generation algorithm based on event counting).
Optionally, in this embodiment, the generating module 66 is further configured to, after obtaining an atom simple harmonic vibration coordinate corresponding to the simple harmonic vibration of the target inhomogeneous substance, use the atom simple harmonic vibration coordinate, the frequency of the scattered light, the total number of the preset spectral lines, and a random number with a preset number as parameters of an encryption algorithm, and generate the dynamic key of the data to be encrypted through the encryption algorithm.
It should be noted that, the random number with the preset number of bits may be understood that the number of bits of the random number is preset, for example, the number of bits of the preset random number is 16 bits, the atomic simple harmonic vibration coordinates, the frequency of the scattered light, the total number of the preset spectral lines, and the 16-bit random number are used as parameters of an encryption algorithm, and a dynamic key of data to be encrypted is generated through the encryption algorithm.
In an exemplary embodiment, the control module 64 is further configured to control the light beam to irradiate the target inhomogeneous material, wherein atoms of the target inhomogeneous material vibrate in simple harmonic mode after being irradiated; determining the frequency of the scattered light by the simple coordinates and the simple harmonic vibration of the target inhomogeneous material.
It should be noted that the above-mentioned simple coordinates are a coordinate system for describing and calculating the internal motion of molecules or atoms, each simple coordinate represents a set of combinations of the internal motion of molecules or atoms, the energy of the internal motion of molecules or atoms can be known by examining the simple coordinates of molecules or atoms, and further the characteristic absorption peak of molecules or atoms in the raman effect can be predicted, and the simple coordinates are introduced to analyze the frequency of the scattered light according to the atomic simple harmonic vibration of the inhomogeneous material.
In an exemplary embodiment, the control module 64 is further configured to describe the simple harmonic vibration of the atom of the target inhomogeneous material by a coordinate system to obtain a coordinate of the simple harmonic vibration of the atom, and to use the frequency parameter as a coordinate parameter of the simple harmonic vibration of the atom.
It should be noted that, when a plurality of heterogeneous substances are included in the target heterogeneous substance, the simple harmonic vibration of the atom of each substance is described by the coordinate system.
Optionally, in this embodiment, the control module 64 is further configured to describe, by a coordinate system, simple harmonic vibration of an atom of the target inhomogeneous substance to obtain a coordinate of the simple harmonic vibration of the atom, and use the frequency parameter as a coordinate parameter of the simple harmonic vibration of the atom, where the method includes: and describing the simple harmonic vibration of the atom of the target inhomogeneous substance through Cartesian coordinates to obtain the simple harmonic vibration coordinates of the atom, and taking the frequency parameters as the amplitude, the period and the angular frequency of the simple harmonic vibration of the atom of the target substance.
In an exemplary embodiment, the conversion module 62 is further configured to, after converting the data to be encrypted into a numerical value, control the numerical value in a frequency range of visible light in a preset manner to obtain a target numerical value; and taking the target value as a frequency parameter of the light beam.
Optionally, in this embodiment, the conversion module 62 is further configured to convert the data to be encrypted into a numerical value by: and converting Chinese and English in the encrypted data into decimal.
Optionally, in this embodiment, the apparatus further includes: the judgment module is used for judging whether a numerical value obtained by converting the data to be encrypted is in a visible frequency range of light, if the numerical value is in the visible frequency range, a target numerical value is used as a frequency parameter of the light beam, if the numerical value is larger than the maximum value of the visible frequency, the difference value between the numerical value and the maximum value is calculated, the difference value is subtracted from the numerical value, and then the numerical value obtained by subtracting a random number is used as the frequency parameter, wherein the random number is smaller than the average value of the visible range; if the difference value is smaller than the minimum value of the visible frequency, the difference value between the minimum value and the numerical value is calculated, the numerical value obtained by adding the difference value to the numerical value and adding a random number is used as the frequency parameter, wherein the random number is smaller than the average value of the visible range.
In an exemplary embodiment, the generating module 66 is further configured to, after generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light, encrypt the data to be encrypted according to the dynamic key to obtain encrypted data to be encrypted; and sending the encrypted data to be encrypted to a receiver of the data to be encrypted so as to instruct the receiver to decrypt the encrypted data to be encrypted according to the dynamic secret key received in advance.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, converting the data to be encrypted into frequency parameters of the light beams, wherein the frequency parameters are located in the frequency range of visible light;
s2, controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of the scattered light corresponding to the frequency light beam;
and S3, generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, converting the data to be encrypted into frequency parameters of the light beams, wherein the frequency parameters are located in the frequency range of visible light;
s2, controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of the scattered light corresponding to the frequency light beam;
and S3, generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for generating a dynamic key, comprising:
converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light;
controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam;
and generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
2. The method for generating a dynamic key according to claim 1, wherein generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the amount of the scattered light comprises:
determining the frequency of the scattered light according to the simple harmonic vibration of atoms of the target inhomogeneous substance after the light beam irradiates the target inhomogeneous substance, and determining the total number of preset spectral lines in the scattered light according to the type of the scattered light and the number of the scattered light;
and generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light.
3. The method for generating a dynamic key according to claim 2, wherein generating a dynamic key for encrypting the data to be encrypted according to the frequency of the scattered light and the total number of preset spectral lines in the scattered light comprises:
acquiring an atom simple harmonic vibration coordinate corresponding to the simple harmonic vibration of the atom of the target inhomogeneous substance;
and taking the atomic simple harmonic vibration coordinate, the frequency of the scattered light and the total number of the preset spectral lines as parameters of an encryption algorithm, and generating a dynamic key of the data to be encrypted through the encryption algorithm.
4. The method for generating a dynamic key according to claim 2, wherein determining the frequency of the scattered light from the simple harmonic vibration of the atoms of the target inhomogeneous substance after the beam of light is irradiated on the target inhomogeneous substance comprises:
controlling the light beam to irradiate the target inhomogeneous substance, wherein atoms of the target inhomogeneous substance do simple harmonic vibration after irradiation;
determining the frequency of the scattered light by the simple coordinates and the simple harmonic vibration of the atoms of the target inhomogeneous species.
5. The method for generating a dynamic key according to claim 3, wherein obtaining atomic simple harmonic vibration coordinates corresponding to the simple harmonic vibration of the atom of the target inhomogeneous material comprises:
and describing the simple harmonic vibration of the atoms of the target inhomogeneous substance through a coordinate system to obtain the simple harmonic vibration coordinates of the atoms, and taking the frequency parameters as the coordinate parameters of the simple harmonic vibration of the atoms.
6. The method for generating a dynamic key according to claim 1, wherein converting the data to be encrypted into the frequency parameter of the light beam comprises:
after the data to be encrypted is converted into a numerical value, controlling the numerical value in a frequency range of visible light in a preset mode to obtain a target numerical value;
and taking the target value as a frequency parameter of the light beam.
7. The method for generating a dynamic key according to claim 1, wherein after generating the dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the amount of the scattered light, the method further comprises:
encrypting the data to be encrypted according to the dynamic key to obtain encrypted data to be encrypted;
and sending the encrypted data to be encrypted to a receiver of the data to be encrypted so as to instruct the receiver to decrypt the encrypted data to be encrypted according to the dynamic secret key received in advance.
8. An apparatus for generating a dynamic key, comprising:
the conversion module is used for converting data to be encrypted into frequency parameters of light beams, wherein the frequency parameters are located in the frequency range of visible light;
the control module is used for controlling the light beam to irradiate the target inhomogeneous substance to obtain the type and the quantity of scattered light corresponding to the light beam;
and the generating module is used for generating a dynamic key for encrypting the data to be encrypted according to the type of the scattered light and the quantity of the scattered light.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202111633661.4A 2021-12-28 2021-12-28 Method and device for generating dynamic key, storage medium and electronic device Pending CN114268436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111633661.4A CN114268436A (en) 2021-12-28 2021-12-28 Method and device for generating dynamic key, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111633661.4A CN114268436A (en) 2021-12-28 2021-12-28 Method and device for generating dynamic key, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114268436A true CN114268436A (en) 2022-04-01

Family

ID=80831220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111633661.4A Pending CN114268436A (en) 2021-12-28 2021-12-28 Method and device for generating dynamic key, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114268436A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170045095A (en) * 2015-10-16 2017-04-26 한국전자통신연구원 Method and apparatus for encrypted communication using scatterer
WO2019037411A1 (en) * 2017-08-22 2019-02-28 深圳光启智能光子技术有限公司 Data transmission method, device, storage medium, and processor
US20190109719A1 (en) * 2016-05-31 2019-04-11 Schott Ag Optical key protected authentication and encryption
CN113484281A (en) * 2021-05-28 2021-10-08 太原理工大学 Optical encryption device and method based on unique light scattering characteristics of biological tissues

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170045095A (en) * 2015-10-16 2017-04-26 한국전자통신연구원 Method and apparatus for encrypted communication using scatterer
US20190109719A1 (en) * 2016-05-31 2019-04-11 Schott Ag Optical key protected authentication and encryption
WO2019037411A1 (en) * 2017-08-22 2019-02-28 深圳光启智能光子技术有限公司 Data transmission method, device, storage medium, and processor
CN113484281A (en) * 2021-05-28 2021-10-08 太原理工大学 Optical encryption device and method based on unique light scattering characteristics of biological tissues

Similar Documents

Publication Publication Date Title
CN107465689B (en) Key management system and method of virtual trusted platform module in cloud environment
US20220109695A1 (en) Method and apparatus for decryption of encrypted ssl data from packet traces
CN112019541B (en) Data transmission method and device, computer equipment and storage medium
CN109194625B (en) Client application protection method and device based on cloud server and storage medium
CN108476138A (en) Monitor the communication in computer network
Kumar et al. An efficient and secure data storage in cloud computing using modified RSA public key cryptosystem
EP3738288B1 (en) Method for encrypting data streams with negotiable and adaptable encryption levels
CN116547941A (en) Secure re-encryption of homomorphic encrypted data
CN105099676A (en) User login method, user terminal and server
CN109362074A (en) The method of h5 and server-side safety communication in a kind of mixed mode APP
CN104883255A (en) Password resetting method and device
CN110636067A (en) Data encryption method, data decryption method and device
GB2504457A (en) Message authentication via distributed secret keys
CN106161363B (en) SSL connection establishment method and system
McLaren et al. Deriving ChaCha20 key streams from targeted memory analysis
Hayati et al. A novel secure root key updating scheme for LoRaWANs based on CTR_AES DRBG 128
CN111246407A (en) Data encryption and decryption method and device for short message transmission
CN108769038B (en) Data processing method and device based on block chain
CN106452754B (en) Multi-user online dynamic encryption method and device
CN108965278A (en) Transaction request processing method and processing device
Fahl et al. Trustsplit: usable confidentiality for social network messaging
CN114268436A (en) Method and device for generating dynamic key, storage medium and electronic device
CN106878985A (en) A kind of unified jump method of terminal page, device and terminal
Jung et al. Securing RTP Packets Using Per‐Packet Key Exchange for Real‐Time Multimedia
CN109981667A (en) A kind of user data transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination