CN114338009B - Data encryption method and device and nonvolatile storage medium - Google Patents

Data encryption method and device and nonvolatile storage medium Download PDF

Info

Publication number
CN114338009B
CN114338009B CN202111621003.3A CN202111621003A CN114338009B CN 114338009 B CN114338009 B CN 114338009B CN 202111621003 A CN202111621003 A CN 202111621003A CN 114338009 B CN114338009 B CN 114338009B
Authority
CN
China
Prior art keywords
target
celestial body
determining
data
coordinate
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.)
Active
Application number
CN202111621003.3A
Other languages
Chinese (zh)
Other versions
CN114338009A (en
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 CN202111621003.3A priority Critical patent/CN114338009B/en
Publication of CN114338009A publication Critical patent/CN114338009A/en
Application granted granted Critical
Publication of CN114338009B publication Critical patent/CN114338009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The application discloses a data encryption method, a data encryption device and a nonvolatile storage medium. Wherein the method comprises the following steps: determining an initial coordinate of a first target celestial body corresponding to target data in a preset coordinate system; determining the running time length of a running track corresponding to the first target celestial body from the initial coordinates; determining a target coordinate of the first target celestial body in a preset coordinate system according to the operation time of the first target celestial body and the initial coordinate of the first target celestial body; determining a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system, and determining a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key. The application solves the technical problems that the traditional encryption algorithm has low security and can not dynamically encrypt data.

Description

Data encryption method and device and nonvolatile storage medium
Technical Field
The present application relates to the field of network technology and security, and in particular, to a data encryption method, apparatus, and non-volatile storage medium.
Background
Along with the development of an information society, people continuously increase the importance knowledge of data security; in the traditional encryption algorithm, the management of the secret key in the symmetric encryption algorithm is difficult, and the security is not high. Before transmitting data, the data server and the client must have a predetermined key, then the server and the client must both store the key, and if one of the keys leaks, the data transmission will be unsafe. And the traditional encryption rule is single, the key security is not high, and the risk of cracking exists. Therefore, the encryption and decryption algorithm with high security can effectively prevent the problem of data leakage, and better maintain the security of user data.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a data encryption method, a data encryption device and a nonvolatile storage medium, which are used for at least solving the technical problems that the security of a traditional encryption algorithm is low and data cannot be dynamically encrypted.
According to an aspect of an embodiment of the present application, there is provided a data encryption method including: determining an initial coordinate of a first target celestial body corresponding to target data in a preset coordinate system; determining the running time length of the first target celestial body along the running track corresponding to the first target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; determining a target coordinate of the first target celestial body in a preset coordinate system according to the operation time of the first target celestial body and the initial coordinate of the first target celestial body; determining a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system, and determining a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
Optionally, determining the key corresponding to the target data according to the chebyshev distance includes: retrieving celestial body information of a first target celestial body from a database; splicing Chebyshev distance and celestial body information according to a preset splicing function to obtain a spliced text; and determining the key according to the spliced text.
Optionally, determining the key according to the spliced text includes: converting the spliced text into spliced binary data; generating a preset number of random binary data; and generating a key according to the spliced binary data and the preset number of random binary data.
Optionally, determining the running duration of the first target celestial body along the running track corresponding to the first target celestial body from the initial coordinates includes: determining a reference time point, wherein the reference time point is a time point for determining initial coordinates of the first target celestial body; and determining the time period length between the current time point and the reference time point, and taking the time period length as the running duration of the first target celestial body.
Optionally, before determining the initial coordinates of the first target celestial body corresponding to the target data in the preset coordinate system, the data encryption method further includes: displaying celestial body information of a plurality of celestial bodies to be selected to a target object; and responding to a first selection instruction of the target object, and determining a first target celestial body from the plurality of to-be-selected celestial bodies.
Optionally, determining a key corresponding to the target data according to the chebyshev distance, and encrypting the target data according to the key, wherein the data encryption method further comprises: responding to a second selection instruction of the target object, and determining a second target celestial body from the plurality of to-be-selected celestial bodies; determining an initial coordinate of a second target celestial body corresponding to the target data in a preset coordinate system; determining the running time length of the running track corresponding to the second target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; determining a target coordinate of the second target celestial body in a preset coordinate system according to the operation time of the second target celestial body and the initial coordinate of the second target celestial body; determining a reference object coordinate of a reference object corresponding to the second target celestial body in a preset coordinate system, and determining a chebyshev distance between the second target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
Optionally, the reference object is a star in the star system where the first target celestial body is located.
According to another aspect of the embodiment of the present application, there is also provided a data encryption apparatus, including: the first processing module is used for determining initial coordinates of a first target celestial body corresponding to the target data in a preset coordinate system; the second processing module is used for determining the running time length of the first target celestial body along the running track corresponding to the first target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; the first calculation module is used for determining the target coordinates of the first target celestial body in a preset coordinate system according to the operation time of the first target celestial body and the initial coordinates of the first target celestial body; the second calculation module is used for determining a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system and determining a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate; and the encryption module is used for determining a key corresponding to the target data according to the Chebyshev distance and encrypting the target data according to the key.
According to still another aspect of the embodiments of the present application, there is further provided a nonvolatile storage medium including a stored program, where the device in which the nonvolatile storage medium is controlled to execute the above-described data encryption method when the program runs.
According to still another aspect of the embodiment of the present application, there is further provided a processor for running a program, where the program executes the data encryption method described above.
In the embodiment of the application, the running track of the celestial body is utilized, the running track of the celestial body is simulated through a Cartesian coordinate system, the coordinates of all the running track points of the celestial body at different time points are calculated, the key is dynamically generated based on Chebyshev distance of a corresponding star reference object and celestial body information of own dimension as encryption parameters, different users dynamically select different parameters for encryption, the aim of improving the data encryption safety is achieved, the technical effect of dynamically encrypting data is achieved, and the technical problems that the safety of a traditional encryption algorithm is low and the data cannot be dynamically encrypted are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
Fig. 1 is a block diagram of a hardware structure of a computer terminal (or electronic device) for implementing a data encryption method according to the related art;
FIG. 2 is a flow chart of a data encryption method according to an embodiment of the application;
FIG. 3 is a flow chart of determining a key corresponding to target data according to Chebyshev distance according to an embodiment of the present application;
FIG. 4 is a flow chart for determining a key from spliced text according to an embodiment of the present application;
FIG. 5 is a flow chart of determining a length of time for operation of a first target celestial body according to an embodiment of the application;
FIG. 6 is a flow chart of determining a first target celestial object according to an embodiment of the application;
FIG. 7 is a flow chart of encrypting target data according to a second celestial body generated key according to an embodiment of the present application;
fig. 8 is a block diagram of a data encryption apparatus according to an embodiment of the present application;
FIG. 9 is a flow chart of conventional data encryption;
fig. 10 is a flowchart of an encryption method based on a celestial body movement track according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise 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 data encryption method provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or similar computing devices. Fig. 1 shows a block diagram of a hardware structure of a computer terminal (or electronic device) for implementing a data encryption method. As shown in fig. 1, the computer terminal 10 (or electronic device 10) may include one or more processors 102 (shown as 102a, 102b, … …,102 n) which may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like, a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuits described above may be referred to generally herein as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Furthermore, the data processing circuitry may be a single stand-alone processing module, or incorporated, in whole or in part, into any of the other elements in the computer terminal 10 (or electronic device). As referred to in embodiments of the application, the data processing circuit acts as a processor control (e.g., selection of the path of the variable resistor termination connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the data encryption method in the embodiment of the present application, and the processor 102 executes the software programs and modules stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the data encryption method described above. Memory 104 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 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via 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 module 106 is used to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or electronic device).
It should be noted here that, in some alternative embodiments, the computer device (or the electronic device) shown in fig. 1 described above may include hardware elements (including circuits), software elements (including computer code stored on a computer readable medium), or a combination of both hardware elements and software elements. It should be noted that fig. 1 is only one example of a specific example, and is intended to illustrate the types of components that may be present in the computer device (or electronic device) described above.
In the above-described operating environment, the embodiment of the present application provides a data encryption method as shown in fig. 2. It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
Fig. 2 is a flowchart of a data encryption method according to an embodiment of the present application, as shown in fig. 2, the method includes the steps of:
Step S202, determining initial coordinates of a first target celestial body corresponding to target data in a preset coordinate system;
Step S204, determining the running time length of the first target celestial body from the initial coordinates along the running track corresponding to the first target celestial body, wherein the running time length changes along with the change of the current time point;
step S206, determining a target coordinate of the first target celestial body in a preset coordinate system according to the operation time of the first target celestial body and the initial coordinate of the first target celestial body;
Step S208, determining a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system, and determining a Chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate;
step S210, determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
Before encrypting the target data, classifying all celestial bodies in the universe, such as various stars, planets, comet, meteor, artificial satellites and the like, wherein the stars can store information such as radius, calorific value and the like, the comet and the like can store information such as story-telling discovery time and the like, and the artificial satellites can store information such as birth time, country and the like; the celestial body information of different types is recorded in different dimensions and is stored in a database; the user selects the favorite celestial bodies by himself for encrypting user data, and the user can dynamically switch the favorite celestial bodies at any time.
In the steps S202 to S210, the preset coordinate system may be a cartesian coordinate system, and the running tracks of the specified celestial body at different times are simulated by the cartesian coordinate system, the specified celestial body is the first target celestial body selected by the user, the different celestial bodies select their corresponding coordinate systems of the star, the star reference object in the corresponding coordinate system is used as the origin of coordinates, the corresponding running tracks are dynamically allocated to each celestial body and its coordinate system, the target data is used as parameters, and the initial running coordinate position of the first target celestial body in its corresponding coordinate system is initialized; and obtaining the current time of the system, if the current time is 3 hours, the running time of the first target celestial body is 3 hours, calculating the Chebyshev distance between the coordinate position of the first target celestial body and the coordinate of the reference object corresponding to the first target celestial body after the running time is calculated by calculating the running coordinate position of the first target celestial body after the running time is 3 hours, namely calculating the Chebyshev distance between the coordinate position of the first target celestial body and the coordinate origin under the same coordinate system, and dynamically generating a verification signature, namely a key corresponding to target data by encrypting the target data by calling celestial body information corresponding to the first target celestial body stored in a database, splicing text values corresponding to a plurality of celestial body information into random text information by using a preset splicing function, converting the random text information into binary system, adding the Chebyshev distance and 16-bit random number to an encryption algorithm.
In step S210 of the data encryption method, a key corresponding to the target data is determined according to chebyshev distance, as shown in a flowchart in fig. 3, and specifically includes the following steps:
Step S302, retrieving celestial body information of a first target celestial body from a database;
step S304, splicing Chebyshev distance and celestial body information according to a preset splicing function to obtain a spliced text;
step S306, determining the key according to the spliced text.
In the steps S302 to S306, after the first target celestial body is determined, since the position information of the first target celestial body changes with the movement of time, the chebyshev distance of the first target celestial body is determined by calculation, the celestial body information of the first target celestial body is retrieved from the database, the celestial body information includes information such as description and attribute of the first target celestial body, the chebyshev distance and the celestial body information are spliced by a splicing function to obtain a spliced text, and the spliced text is converted into binary and is added with 16-bit random numbers to form a key. It should be noted that, the concatenation function may splice chebyshev distance and celestial body information, or splice all celestial body information corresponding to the first target celestial body, in the second case, it is necessary to convert the spliced text formed after splicing into binary, and then add the chebyshev distance, the binary and the 16-bit random number to the encryption algorithm according to a preset sequence to form the encryption key.
In the step S306, the key is determined according to the spliced text, as shown in the flowchart of fig. 4, which specifically includes the following steps:
Step S402, converting the spliced text into spliced binary data;
step S404, generating a preset number of random binary data;
Step S406, generating a secret key according to the spliced binary data and the preset number of random binary data.
In the steps S402 to S406, the number of binary data to be converted may be determined according to the size of the spliced text, and then the spliced text is converted into the binary data with the preset number, so as to generate the key.
In step S204 of the data encryption method, determining a running duration of the first target celestial body from the initial coordinates along the running track corresponding to the first target celestial body, as shown in a flowchart in fig. 5, specifically including the following steps:
step S502, determining a reference time point, wherein the reference time point is a time point for determining initial coordinates of a first target celestial body;
Step S504, determining the time period length between the current time point and the reference time point, and taking the time period length as the running time of the first target celestial body.
In the steps S502 to S504, when determining the operation duration of the first target celestial body, it is necessary to use, as a reference time point, a time point corresponding to the determined initial coordinate of the first target celestial body according to the initial coordinate of the first target celestial body in the preset coordinate system, and in an optional embodiment, by determining the current system time, calculating a difference between the current system time and the reference time, and taking a time period length obtained by calculating the difference as the operation duration of the first target celestial body; in another alternative embodiment, the obtained current system time may be directly used as the operation duration of the first target celestial body, without using the reference time point, if the current system time is 3, the operation duration of the first target celestial body is 3 hours.
It should be noted that, the user encrypts the data when storing the data, and then dynamically changes the encryption parameters according to different times, and only the authorized user can automatically decrypt the data into a plaintext when accessing the data; even if the user data file is obtained through an illegal way, the user data file is pure ciphertext, and the dynamic change cannot be decrypted.
In step S202 of the data encryption method, before determining the initial coordinates of the first target celestial body corresponding to the target data in the preset coordinate system according to the target data, as shown in the flowchart of fig. 6, the data encryption method further includes the following steps:
Step S602, showing celestial body information of a plurality of celestial bodies to be selected to a target object;
in step S604, a first target celestial body is determined from the plurality of candidate celestial bodies in response to the first selection instruction of the target object.
In the above steps S602 to S604, the celestial body information of the plurality of to-be-selected celestial bodies displayed to the target object is the names of celestial bodies, the plurality of to-be-selected celestial bodies are all celestial bodies stored in the database, and the target object determines one celestial body from the plurality of to-be-selected celestial bodies as the first target celestial body for calculating the encryption key according to the preference of the target object.
In step S210 of the data encryption method, after determining a key corresponding to the target data according to the chebyshev distance and encrypting the target data according to the key, as shown in the flowchart of fig. 7, the data encryption method further includes the following steps:
Step S702, responding to a second selection instruction of the target object, and determining a second target celestial body from a plurality of to-be-selected celestial bodies;
Step S704, determining initial coordinates of a second target celestial body corresponding to the target data in a preset coordinate system;
Step S706, determining the running time length of the second target celestial body along the running track corresponding to the second target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point;
Step S708, determining a target coordinate of the second target celestial body in a preset coordinate system according to the operation time of the second target celestial body and the initial coordinate of the second target celestial body;
step S710, determining a reference object coordinate of a reference object corresponding to the second target celestial body in a preset coordinate system, and determining a Chebyshev distance between the second target celestial body and the reference object according to the target coordinate and the reference object coordinate;
Step S712, determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
In the above steps S702 to S712, it is intended to illustrate that the user (i.e., the target object) may optionally select the target celestial body from the database according to his own preference, and determine the corresponding encryption key according to the celestial body information corresponding to the target celestial body and the chebyshev distance of the target celestial body, which is consistent with the explanation related to the data encryption method shown in fig. 2 to 6, and will not be repeated here.
In the data encryption method, the reference object is a fixed star in a star system where the first target celestial body is located.
Through the steps, the running track of the celestial body is utilized, the running track of the celestial body is simulated through a Cartesian coordinate system, the coordinates of all the running track points of the celestial body at different time points are calculated, the key is dynamically generated based on Chebyshev distance of a corresponding star reference object and celestial body information of the dimension of the celestial body, different users dynamically select different parameters to encrypt, the aim of improving data encryption safety is achieved, the technical effect of dynamically encrypting data is achieved, data leakage can be effectively prevented, the dynamic encrypting data is utilized, the randomness is strong, safety and reliability are achieved, and the technical problems that the traditional encrypting algorithm is low in safety and cannot dynamically encrypt the data are solved.
Fig. 8 is a block diagram of a data encryption apparatus according to an embodiment of the present application, as shown in fig. 8, including:
a first processing module 802, configured to determine an initial coordinate of a first target celestial body corresponding to the target data in a preset coordinate system;
A second processing module 804, configured to determine an operation duration of the first target celestial body along the operation track corresponding to the first target celestial body from the initial coordinate, where the operation duration changes along with a change of the current time point;
The first calculating module 806 is configured to determine, according to the operation duration of the first target celestial body and the initial coordinates of the first target celestial body, a target coordinate of the first target celestial body in a preset coordinate system;
A second calculation module 808, configured to determine a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system, and determine a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate;
The encryption module 810 is configured to determine a key corresponding to the target data according to the chebyshev distance, and encrypt the target data according to the key.
In the encryption module 810 in the data encryption device, a key corresponding to the target data is determined according to the chebyshev distance, which specifically includes the following steps: retrieving celestial body information of a first target celestial body from a database; splicing Chebyshev distance and celestial body information according to a preset splicing function to obtain a spliced text; and determining the key according to the spliced text.
In the above process, the key is determined according to the spliced text, and the method specifically comprises the following steps: converting the spliced text into spliced binary data; generating a preset number of random binary data; and generating a key according to the spliced binary data and the preset number of random binary data.
In the second processing module 804 in the data encryption device, determining the running duration of the first target celestial body from the initial coordinates along the running track corresponding to the first target celestial body specifically includes the following procedures: determining a reference time point, wherein the reference time point is a time point for determining initial coordinates of the first target celestial body; and determining the time period length between the current time point and the reference time point, and taking the time period length as the running duration of the first target celestial body.
In the first processing module 802 in the data encryption device, before determining the initial coordinates of the first target celestial body corresponding to the target data in the preset coordinate system, the module further includes the following procedures: displaying celestial body information of a plurality of celestial bodies to be selected to a target object; and responding to a first selection instruction of the target object, and determining a first target celestial body from the plurality of to-be-selected celestial bodies.
In the encryption module 810 in the data encryption apparatus, after determining a key corresponding to the target data according to the chebyshev distance and encrypting the target data according to the key, the module further includes the following procedures: responding to a second selection instruction of the target object, and determining a second target celestial body from the plurality of to-be-selected celestial bodies; determining an initial coordinate of a second target celestial body corresponding to the target data in a preset coordinate system; determining the running time length of the running track corresponding to the second target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; determining a target coordinate of the second target celestial body in a preset coordinate system according to the operation time of the second target celestial body and the initial coordinate of the second target celestial body; determining a reference object coordinate of a reference object corresponding to the second target celestial body in a preset coordinate system, and determining a chebyshev distance between the second target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
In the data encryption device, the reference object is a star in a star system where the first target celestial body is located.
It should be noted that the data encryption device shown in fig. 8 is used to perform the data encryption method shown in fig. 2 to 7, so the explanation of the data encryption method is also applicable to the data encryption device, and will not be repeated here.
The embodiment of the application also provides a nonvolatile storage medium, which comprises a stored program, wherein the device where the nonvolatile storage medium is controlled to execute the following data encryption method when the program runs: determining an initial coordinate of a first target celestial body corresponding to target data in a preset coordinate system; determining the running time length of the first target celestial body along the running track corresponding to the first target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; determining a target coordinate of the first target celestial body in a preset coordinate system according to the operation time of the first target celestial body and the initial coordinate of the first target celestial body; determining a reference object coordinate of a reference object corresponding to the first target celestial body in a preset coordinate system, and determining a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
In the above data encryption method, determining a key corresponding to the target data according to the chebyshev distance includes the following steps: retrieving celestial body information of a first target celestial body from a database; splicing Chebyshev distance and celestial body information according to a preset splicing function to obtain a spliced text; and determining the key according to the spliced text.
In the above data encryption method, determining the key according to the spliced text includes the following steps: converting the spliced text into spliced binary data; generating a preset number of random binary data; and generating a key according to the spliced binary data and the preset number of random binary data.
In the above data encryption method, determining the running duration of the first target celestial body from the initial coordinates along the running track corresponding to the first target celestial body includes the following steps: determining a reference time point, wherein the reference time point is a time point for determining initial coordinates of the first target celestial body; and determining the time period length between the current time point and the reference time point, and taking the time period length as the running duration of the first target celestial body.
In the above data encryption method, before determining the initial coordinates of the first target celestial body corresponding to the target data in the preset coordinate system, the data encryption method further includes the following steps: displaying celestial body information of a plurality of celestial bodies to be selected to a target object; and responding to a first selection instruction of the target object, and determining a first target celestial body from the plurality of to-be-selected celestial bodies.
In the above data encryption method, the data encryption method further includes: responding to a second selection instruction of the target object, and determining a second target celestial body from the plurality of to-be-selected celestial bodies; determining an initial coordinate of a second target celestial body corresponding to the target data in a preset coordinate system; determining the running time length of the running track corresponding to the second target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point; determining a target coordinate of the second target celestial body in a preset coordinate system according to the operation time of the second target celestial body and the initial coordinate of the second target celestial body; determining a reference object coordinate of a reference object corresponding to the second target celestial body in a preset coordinate system, and determining a chebyshev distance between the second target celestial body and the reference object according to the target coordinate and the reference object coordinate; and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
In the above data encryption method, the reference object is a star in a star system where the first target celestial body is located.
Fig. 9 is a flowchart of conventional data encryption, step S901 is plaintext data to be encrypted, key a in step S902 is obtained by an encryption algorithm, plaintext data is encrypted using key a to generate ciphertext in step S903, the encrypted data is transmitted, step S904 is to obtain plaintext data in step S907 by judging the encryption type used by key a, if the encryption type used by key a is symmetric encryption, decryption key a is also obtained by the decryption process of step S905, and if the encryption type used by key a is asymmetric encryption, decryption key B is obtained by the decryption process of step S906, and the encrypted data is decrypted by the obtained key regardless of whether the decryption key is key a or key B.
The traditional encryption rule is single, the key security is not high, the cracking risk exists, and in order to effectively prevent the problem of data leakage, the user data security is better maintained.
Fig. 10 is a flowchart of an encryption method based on celestial body running tracks according to an embodiment of the present application, as shown in fig. 10, step S1001 is to select a first target celestial body according to own preference, obtain target data to be encrypted through step S1002, simulate the running track of the first target celestial body through a cartesian coordinate system of step S1003, step S1004 is to determine initial coordinates of the first target celestial body in the cartesian coordinate system, since the reference object selected by each celestial body is different, coordinate systems corresponding to different celestial bodies are also different, initial coordinates are also different, a reference object corresponding to the first target celestial body is used as an initial coordinate of the first celestial body, in step S1005, calculate a coordinate position where the first target celestial body is located after running time, the coordinate position is a target coordinate, step S1006 determines a chebyshev distance between the target coordinate and the coordinate where the reference object corresponding to the first target celestial body is located, namely, calculate a coordinate system running time and then transfer the first target celestial body to the reference object corresponding to the first target celestial body, and the second coordinate system is set to the reference object corresponding to the first celestial body, and the step S1008 is used as a binary coordinate, the binary data is generated by using a dynamic key, and the encryption method is performed, step S is to obtain the encryption key information, and the encryption method is obtained by using the binary key.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A data encryption method, comprising:
Determining an initial coordinate of a first target celestial body corresponding to target data in a preset coordinate system;
Determining the running time length of the first target celestial body along the running track corresponding to the first target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point;
Determining a target coordinate of the first target celestial body in the preset coordinate system according to the operation time of the first target celestial body and the initial coordinate of the first target celestial body;
Determining a reference object coordinate of a reference object corresponding to the first target celestial body in the preset coordinate system, and determining a chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate;
and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
2. The data encryption method according to claim 1, wherein determining a key corresponding to the target data in accordance with the chebyshev distance includes:
retrieving celestial body information of the first target celestial body in a database;
Splicing the Chebyshev distance and the celestial body information according to a preset splicing function to obtain a spliced text;
And determining the secret key according to the spliced text.
3. The data encryption method of claim 2, wherein determining the key based on the spliced text comprises:
Converting the spliced text into spliced binary data;
Generating a preset number of random binary data;
and generating the secret key according to the spliced binary data and the preset number of random binary data.
4. The data encryption method according to claim 1, wherein determining the operation time length of the first target celestial body from the initial coordinates along the operation trajectory corresponding to the first target celestial body includes:
determining a reference time point, wherein the reference time point is a time point for determining initial coordinates of the first target celestial body;
And determining the length of a time period between the current time point and the reference time point, and taking the length of the time period as the running duration of the first target celestial body.
5. The data encryption method according to claim 1, wherein before determining the initial coordinates of the first target celestial body corresponding to the target data in the preset coordinate system, the data encryption method further comprises:
displaying celestial body information of a plurality of celestial bodies to be selected to a target object;
and responding to a first selection instruction of a target object, and determining the first target celestial body from the plurality of to-be-selected celestial bodies.
6. The data encryption method according to claim 5, wherein after determining a key corresponding to the target data according to the chebyshev distance and encrypting the target data according to the key, the data encryption method further comprises:
Responding to a second selection instruction of the target object, and determining a second target celestial body from the plurality of to-be-selected celestial bodies;
determining initial coordinates of a second target celestial body corresponding to the target data in the preset coordinate system;
determining the running time length of the second target celestial body along the running track corresponding to the second target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point;
Determining a target coordinate of the second target celestial body in the preset coordinate system according to the operation time of the second target celestial body and the initial coordinate of the second target celestial body;
Determining a reference object coordinate of a reference object corresponding to the second target celestial body in the preset coordinate system, and determining a chebyshev distance between the second target celestial body and the reference object according to the target coordinate and the reference object coordinate;
and determining a key corresponding to the target data according to the Chebyshev distance, and encrypting the target data according to the key.
7. The method of claim 1, wherein the reference is a star in a star system in which the first target celestial body is located.
8. A data encryption apparatus, comprising:
The first processing module is used for determining initial coordinates of a first target celestial body corresponding to the target data in a preset coordinate system;
The second processing module is used for determining the running time length of the running track corresponding to the first target celestial body from the initial coordinates, wherein the running time length changes along with the change of the current time point;
the first calculation module is used for determining target coordinates of the first target celestial body in the preset coordinate system according to the operation time of the first target celestial body and the initial coordinates of the first target celestial body;
the second calculation module is used for determining a reference object coordinate of a reference object corresponding to the first target celestial body in the preset coordinate system, and determining a Chebyshev distance between the first target celestial body and the reference object according to the target coordinate and the reference object coordinate;
And the encryption module is used for determining a key corresponding to the target data according to the Chebyshev distance and encrypting the target data according to the key.
9. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program, when run, controls a device in which the non-volatile storage medium is located to perform the data encryption method according to any one of claims 1 to 7.
10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized by: the processor, when executing the program, implements the data encryption method of any one of claims 1 to 7.
CN202111621003.3A 2021-12-27 2021-12-27 Data encryption method and device and nonvolatile storage medium Active CN114338009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111621003.3A CN114338009B (en) 2021-12-27 2021-12-27 Data encryption method and device and nonvolatile storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111621003.3A CN114338009B (en) 2021-12-27 2021-12-27 Data encryption method and device and nonvolatile storage medium

Publications (2)

Publication Number Publication Date
CN114338009A CN114338009A (en) 2022-04-12
CN114338009B true CN114338009B (en) 2024-05-14

Family

ID=81014574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111621003.3A Active CN114338009B (en) 2021-12-27 2021-12-27 Data encryption method and device and nonvolatile storage medium

Country Status (1)

Country Link
CN (1) CN114338009B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826763A (en) * 2022-05-16 2022-07-29 中国电信股份有限公司 Data encryption method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002268549A (en) * 2001-03-06 2002-09-20 Sharp Corp Method for controlling access to information, device for controlling access to information, network system for controlling access to information and program for controlling access to information
JP2004032376A (en) * 2002-06-26 2004-01-29 Sony Corp Information terminal equipment, information processor, and information transmission reception system
JP2014099774A (en) * 2012-11-14 2014-05-29 Mitsubishi Electric Corp Information processing device, radio communication device, and program
CN111431720A (en) * 2020-06-12 2020-07-17 网络通信与安全紫金山实验室 Secret key generation method based on grid statistic constellation locus diagram and communication equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002268549A (en) * 2001-03-06 2002-09-20 Sharp Corp Method for controlling access to information, device for controlling access to information, network system for controlling access to information and program for controlling access to information
JP2004032376A (en) * 2002-06-26 2004-01-29 Sony Corp Information terminal equipment, information processor, and information transmission reception system
JP2014099774A (en) * 2012-11-14 2014-05-29 Mitsubishi Electric Corp Information processing device, radio communication device, and program
CN111431720A (en) * 2020-06-12 2020-07-17 网络通信与安全紫金山实验室 Secret key generation method based on grid statistic constellation locus diagram and communication equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
低轨卫星网络中基于轨道分簇的密钥更新算法;张志强;张永健;王宇;卢昱;;电子与信息学报;20100315(第03期);全文 *

Also Published As

Publication number Publication date
CN114338009A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
EP3553995B1 (en) Terminal device for performing homomorphic encryption, server device for processing cipher text thereof, and methods therefor
US11239996B2 (en) Weighted partial matching under homomorphic encryption
US20190356666A1 (en) Generating Cryptographic Function Parameters From Compact Source Code
US11115393B2 (en) Message server, method for operating message server and computer-readable recording medium
US20200153804A1 (en) Cryptography using multi-factor key system and finite state machine
KR101982237B1 (en) Method and system for data sharing using attribute-based encryption in cloud computing
US10230697B2 (en) User terminals, and methods and computer-readable recording mediums storing computer programs for transmitting and receiving messages
EP3264671A1 (en) Key replacement direction control system, and key replacement direction control method
CN113691502A (en) Communication method, communication device, gateway server, client and storage medium
CN109299149A (en) Data query method calculates equipment and system
US9641328B1 (en) Generation of public-private key pairs
US20170063536A1 (en) Generating Cryptographic Function Parameters Based on an Observed Astronomical Event
US10079675B2 (en) Generating cryptographic function parameters from a puzzle
Tsai et al. A secure ECC-based electronic medical record system.
CN114338009B (en) Data encryption method and device and nonvolatile storage medium
CN113711247A (en) Data processing method, device and system of machine learning model
CN113691374B (en) Data encryption method and device, storage medium and electronic equipment
US11750367B2 (en) Simulation device and method for homomorphic cryptosystem
JPWO2018043466A1 (en) Data extraction system, data extraction method, registration device and program
CN114282239A (en) Data encryption method, device, storage medium and processor
KR102526114B1 (en) Apparatus and method for encryption and decryption
KR102629617B1 (en) Real-time iot data sharing system to support attribute-based access control and method of operation thereof
CN115378743B (en) Information encryption transmission method, device, equipment and medium
US20240127656A1 (en) Method for generating homomorphic encrypted message including vote analysis data and electronic apparatus therefor
US20240039696A1 (en) Apparatus and method for homomorphic encryption of text data

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
GR01 Patent grant
GR01 Patent grant