Data encryption processing method, device, electronic device and storage medium

By converting the target data into parameter values ​​of the conic equation and generating coordinate values ​​using an asymmetric encryption algorithm for triple encryption, the problem of single key update method and inflexible key length in the prior art is solved, which significantly improves the data Security and controllability.

CN115174084BActive Publication Date: 2024-12-24CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210616462.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2024-12-24
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

In the prior art, the data encryption key update method is single, easy to be cracked, and the key length configuration is not flexible enough, which affects the security of data transmission.

Method used

Conic equations are used to convert the target data into equation parameter values, and coordinate values ​​are generated using an asymmetric encryption algorithm for triple encryption, and the parameters and coordinate counts are dynamically adjusted to improve the security of data encryption.

Benefits of technology

Through the multiple encryption process, the security of data is significantly improved, the risk of keys being cracked is avoided, and the controllability of data encryption is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174084B_ABST
    Figure CN115174084B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a data encryption method, device, electronic device and storage medium, the method comprising: obtaining target data to be encrypted; converting the target data into a plurality of equation parameter values, and substituting each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation; obtaining a key group and an asymmetric encryption algorithm for the target conic curve equation, and generating a plurality of first coordinate values ​​for the target conic curve equation based on the key group and the asymmetric encryption algorithm; substituting the first coordinate values ​​into the target conic curve equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypting each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of computer networks, the recording and transmission of information has become more and more convenient, and the value of information has become higher and higher. However, protecting the transmission of private information and ensuring that important information is not stolen has become a major problem. Among them, data security is the basis for the sustainable development of enterprises. Under normal circumstances, enterprises will use encryption algorithms to protect data, but the keys used for encryption are generally updated in a fixed, manual, or regular protocol change manner, which poses a risk of keys being easily cracked. In addition, in addition to the single key update method, during the transmission process of network data or the storage of data, the key length configuration is not flexible enough (too long will easily lead to performance degradation and affect the transmission bandwidth; too short will lead to poor encryption effect), and the security of data transmission cannot be effectively guaranteed. Summary of the invention

[0003] The embodiments of the present invention provide a data encryption processing method, device, electronic device and computer-readable storage medium to solve or partially solve the problem in the related art that the data update and configuration method is too single, resulting in poor data encryption security.

[0004] The embodiment of the present invention discloses a data encryption processing method, comprising:

[0005] Obtain target data to be encrypted;

[0006] Convert the target data into a plurality of equation parameter values, and substitute each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation;

[0007] Acquire a key group and an asymmetric encryption algorithm for the target conic section equation, and generate a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm;

[0008] Substitute the first coordinate values ​​into the target conic section equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data.

[0009] Optionally, the preset conic section equation includes an equation parameter α, an equation parameter e, an equation parameter p, an equation parameter g, and an equation parameter h, the target data includes a character string, and converting the target data into a plurality of equation parameter values ​​includes:

[0010] Get the character code corresponding to each character in the string;

[0011] Convert each character code into decimal to obtain the target value corresponding to the character string;

[0012] After adding the first value in the target value and the preset value, the average value of the sum is substituted into the equation parameter α to obtain the first equation parameter value corresponding to the target data;

[0013] After splitting the other values ​​in the target value except the first value into equal numbers, the split values ​​are substituted into the equation parameter e, the equation parameter p, the equation parameter g, and the equation parameter h in order. If there is a remainder in the target value during the equal number splitting process, the value corresponding to the remainder is assigned to the equation parameter h to obtain the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data.

[0014] Optionally, substituting each of the equation parameter values ​​into a preset conic section equation to obtain a target conic section equation includes:

[0015] Substitute the first equation parameter value, the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data into the preset conic section equation to obtain the target conic section equation corresponding to the character string.

[0016] Optionally, the acquiring a key group and an asymmetric encryption algorithm for the target conic section equation, and generating a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm, comprises:

[0017] Obtaining a key group, an asymmetric encryption algorithm, and an encryption complexity for the target conic section equation, wherein the key group includes a public key, and the encryption complexity is used to generate at least five x-axis coordinate values ​​of the target conic section equation;

[0018] The public key, the asymmetric encryption algorithm and the encryption complexity are used to perform operations to generate at least five x-axis coordinate values ​​for the target conic section equation.

[0019] Optionally, the step of substituting the first coordinate values ​​into the target conic section equation to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypting each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data includes:

[0020] Input each of the x-axis coordinate values ​​into the target conic curve equation to obtain the y-axis coordinate value corresponding to each of the x-axis coordinate values;

[0021] The value set consisting of each of the x-axis coordinate values ​​and each of the y-axis coordinate values ​​is encrypted to generate a ciphertext corresponding to the target data.

[0022] Optionally, the key group includes a private key, and the method further includes:

[0023] Obtaining an asymmetric decryption algorithm corresponding to the asymmetric encryption algorithm;

[0024] Decrypting the ciphertext using the asymmetric decryption algorithm and the private key to obtain each of the x-axis coordinate values ​​and each of the y-axis coordinate values;

[0025] Substituting the x-axis coordinate value and the corresponding y-axis coordinate value into the target conic curve equation to solve the equation and obtain the plurality of equation parameter values;

[0026] The target data are obtained by performing a reverse conversion on the plurality of equation parameter values.

[0027] Optionally, obtaining the target data to be encrypted includes:

[0028] In response to a data transmission instruction, first target data to be encrypted corresponding to the data transmission instruction is acquired, or, in response to a data storage instruction, second target data to be encrypted corresponding to the data storage instruction is acquired.

[0029] The embodiment of the present invention also discloses a data encryption processing device, including:

[0030] A target data acquisition module, used to acquire target data to be encrypted;

[0031] A curve equation generating module, used for converting the target data into a plurality of equation parameter values, and substituting each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation;

[0032] A coordinate value generation module, used to obtain a key group and an asymmetric encryption algorithm for the target conic section equation, and generate a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm;

[0033] The ciphertext generation module is used to substitute the first coordinate values ​​into the target conic section equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate ciphertext corresponding to the target data.

[0034] Optionally, the preset conic section equation includes an equation parameter α, an equation parameter e, an equation parameter p, an equation parameter g, and an equation parameter h, the target data includes a character string, and the curve equation generating module is specifically used for:

[0035] Get the character code corresponding to each character in the string;

[0036] Convert each character code into decimal to obtain the target value corresponding to the character string;

[0037] After adding the first value in the target value and the preset value, the average value of the sum is substituted into the equation parameter α to obtain the first equation parameter value corresponding to the target data;

[0038] After splitting the other values ​​in the target value except the first value into equal numbers, the split values ​​are substituted into the equation parameter e, the equation parameter p, the equation parameter g, and the equation parameter h in order. If there is a remainder in the target value during the equal number splitting process, the value corresponding to the remainder is assigned to the equation parameter h to obtain the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data.

[0039] Optionally, the curve equation generating module is further used for:

[0040] Substitute the first equation parameter value, the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data into the preset conic section equation to obtain the target conic section equation corresponding to the character string.

[0041] Optionally, the coordinate value generating module is specifically used for:

[0042] Obtaining a key group, an asymmetric encryption algorithm, and an encryption complexity for the target conic section equation, wherein the key group includes a public key, and the encryption complexity is used to generate at least five x-axis coordinate values ​​of the target conic section equation;

[0043] The public key, the asymmetric encryption algorithm and the encryption complexity are used to perform operations to generate at least five x-axis coordinate values ​​for the target conic section equation.

[0044] Optionally, the ciphertext generation module is specifically used to:

[0045] Input each of the x-axis coordinate values ​​into the target conic curve equation to obtain the y-axis coordinate value corresponding to each of the x-axis coordinate values;

[0046] The value set consisting of each of the x-axis coordinate values ​​and each of the y-axis coordinate values ​​is encrypted to generate a ciphertext corresponding to the target data.

[0047] Optionally, the key group includes a private key, and the device further includes:

[0048] A decryption algorithm acquisition module, used to acquire an asymmetric decryption algorithm corresponding to the asymmetric encryption algorithm;

[0049] A decryption module, used to decrypt the ciphertext using the asymmetric decryption algorithm and the private key to obtain each of the x-axis coordinate values ​​and each of the y-axis coordinate values;

[0050] A parameter value determination module, used for substituting the x-axis coordinate value and the corresponding y-axis coordinate value into the target conic curve equation to solve the equation and obtain the plurality of equation parameter values;

[0051] The data conversion module is used to reversely convert the several equation parameter values ​​to obtain the target data.

[0052] Optionally, the target data acquisition module is specifically used to:

[0053] In response to a data transmission instruction, first target data to be encrypted corresponding to the data transmission instruction is acquired, or, in response to a data storage instruction, second target data to be encrypted corresponding to the data storage instruction is acquired.

[0054] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0055] The memory is used to store computer programs;

[0056] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0057] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0058] The embodiments of the present invention include the following advantages:

[0059] In an embodiment of the present invention, by acquiring target data to be encrypted, then converting the target data into a number of equation parameter values, and substituting each equation parameter value into a preset conic curve equation to obtain a target conic curve equation, then acquiring a key group and an asymmetric encryption algorithm for the target conic curve equation, and generating a number of first coordinate values ​​for the target conic curve equation according to the key group and the asymmetric encryption algorithm, respectively substituting the first coordinate values ​​into the target conic curve equation to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypting each first coordinate value and each second coordinate value to generate a ciphertext corresponding to the target data, and by converting the target data to be encrypted into equation parameter values ​​of the conic curve equation, a first encryption is achieved, and then the coordinate values ​​of the conic curve equation are obtained based on the asymmetric encryption algorithm and the key group to achieve a second encryption, and then the corresponding coordinate values ​​are calculated according to the obtained coordinate values ​​and the conic curve equation, and all the obtained coordinate values ​​are encrypted to achieve a third encryption, so that the data encryption process becomes more irregular, and the security of the data is greatly improved. At the same time, based on the equation characteristics of the conic curve equation, the parameters and the number of coordinates obtained can be dynamically adjusted, and the controllability of data encryption is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a flowchart of a method for encrypting data provided in an embodiment of the present invention;

[0061] Figure 2 is a schematic diagram of a conic section provided in an embodiment of the present invention;

[0062] Figure 3 is a structural block diagram of a data encryption processing device provided in an embodiment of the present invention;

[0063] Figure 4 It is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] As an example, data security is the foundation for the sustainable development of an enterprise. Under normal circumstances, enterprises will use encryption algorithms to protect data, but the encryption keys are generally updated in a fixed, manual, or periodic protocol change manner, which poses a risk of keys being easily cracked. In addition, in addition to the single key update method, during the network data transmission process or data storage process, the key length configuration is not flexible enough (too long will easily lead to performance degradation and affect the transmission bandwidth; too short will lead to poor encryption effect), and the security of data transmission cannot be effectively guaranteed.

[0066] In this regard, one of the core invention points of the present invention is to use conic section equations as a part of encryption, and at the same time convert the target data to be encrypted into parameter values ​​of equation parameters of the conic section equation, and substitute them into the conic section equation to obtain the target conic section equation, and then use an asymmetric encryption algorithm, a key group and encryption complexity to generate the coordinate value of a certain coordinate axis of the equation, and then the obtained coordinate value can be substituted into the equation to obtain the coordinate value corresponding to another coordinate axis. In this process, the generated conic sections and generated data are different due to the different parameters of the equation and the encryption complexity input by the user, thereby ensuring the security of data encryption. Finally, the obtained coordinate values ​​corresponding to different coordinate axes can be further encrypted, and then through the triple data encryption method, the data encryption process becomes more irregular, thereby greatly improving the security of the data.

[0067] Specifically, refer to Figure 1 , shows a flowchart of a method for encrypting data provided in an embodiment of the present invention, which may specifically include the following steps:

[0068] Step 101, obtaining target data to be encrypted;

[0069] In an embodiment of the present invention, in response to a data transmission instruction, the first target data to be encrypted corresponding to the data transmission instruction may be obtained, or in response to a data storage instruction, the second target data to be encrypted corresponding to the data storage instruction may be obtained. Specifically, the target data may be data that needs to be encrypted during data transmission or data that needs to be encrypted during data storage, and its data type may be text, audio, video, picture, code, file, etc., which is not limited by the present invention.

[0070] Step 102, converting the target data into a plurality of equation parameter values, and substituting each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation;

[0071] In an embodiment of the present invention, based on data encryption of conic section equations, the target data may be first converted into a number of equation parameter values ​​satisfying floating-point type that conform to the conic section equation, and then each equation parameter value may be substituted into a preset conic section equation to obtain the target conic section equation.

[0072] For floating-point equation parameter values, they can be real numbers with more counting units. In this regard, compared with fixed-point numbers, floating-point numbers use exponents to allow the position of the decimal point to float up and down as needed, thereby flexibly expressing a larger range of real numbers. In the process of converting the target data into equation parameter values, the integrity of the data conversion can be effectively guaranteed, and it will not be limited by the size of the real number, thereby ensuring the integrity of the data conversion.

[0073] In a specific implementation, for the preset conic section equation, it can be:

[0074]

[0075] It can be seen that the preset conic section equation may include parameters such as equation parameter α, equation parameter e, equation parameter p, equation parameter g, equation parameter h, and include independent variable x and dependent variable y. The target data can be converted into values ​​corresponding to the equation parameters of the conic section equation, and the conic section equation can be constructed into a target conic section equation using the converted equation parameter values. Then, the corresponding independent variable coordinates can be randomly generated, and the dependent variable coordinates can be calculated. The coordinates are then encrypted to obtain ciphertext, so that the ciphertext can be transmitted or stored, etc., thereby making the encrypted data more random and improving data security.

[0076] Specifically, for the target data, which can be a string containing several characters, you can first obtain the character code corresponding to each character in the string, and convert each character code into decimal to obtain the target value corresponding to the string, then add the first value in the target value and the preset value, and substitute the average value of the sum into the equation parameter α to obtain the first equation parameter value corresponding to the target data, and split the other values ​​in the target value except the first value into equal quantities, and then substitute the split values ​​into the equation parameter e, equation parameter p, equation parameter g, and equation parameter h in order. If there is a remainder in the target value during the equal quantity splitting process, the value corresponding to the remainder is assigned to the equation parameter h to obtain the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data. After obtaining the equation parameter values ​​corresponding to each equation parameter in the conic section equation, the first equation parameter value, the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data can be substituted into the preset conic section equation to obtain the target conic section equation corresponding to the character string, thereby converting the data to be encrypted into equation parameter values ​​corresponding to each equation parameter in the conic section equation and substituting them into the conic section equation to obtain the corresponding target conic section equation, thereby realizing the first level of data encryption and facilitating further data encryption later.

[0077] Among them, for the conic section equation, it can be three types of curves intersecting the plane and the bicone, refer to Figure 2 , shows a schematic diagram of a conic section provided in an embodiment of the present invention, wherein:

[0078] When the parameter e=1: it represents a parabola with F(g, h) as the focus and p as the distance from the focus to the directrix.

[0079] When the parameter e < 1: it represents an ellipse with F(g, h) as one focus, p as the distance from the focus to the directrix, and e as the eccentricity.

[0080] When the parameter e > 1: it represents a hyperbola with F2(g, h) as one focus, p as the distance from the focus to the directrix, and e as the eccentricity.

[0081] When the parameter e = 0: it represents the point F(g, h).

[0082] In this regard, when converting the target data into the equation parameter values of the conic equation, e > 0, α ∈ [0, 2π), and p > 0 can be set to ensure that three types of conic curves can be obtained except for the point where e = 0. Specifically, when e = 0, its value can be set to 0.5, and the present invention does not limit this.

[0083] In one example, assume that the target data to be encrypted is text, such as "one". First, the encodings of the character sets corresponding to each character in the text can be obtained. The encodings include ASCII encoding, UTF-8 encoding, GBK encoding, etc. Then, according to the character set, the character encodings corresponding to each character can be obtained. Next, the encoding is converted into parameters according to the algorithm. Specifically, assume that the text content to be transmitted with the character set UTF-8 is "one". First, its corresponding UTF-8 character encodings D2BB4E00 E4 B8 80 (encoding of "one"), B8F6 4E2A E4 B8 AA (encoding of "a") can be obtained. Then, the 16 - bit encoded data corresponding to the characters can be converted into decimal. The converted result can be: 5931568880607040059315688806070400. Take the first digit "5" of the converted result in decimal, and then calculate (5 + 2.56) / 2 = 3.78. Use the calculated result 3.78 as the value of the equation parameter α, which can ensure that α is in [0, 2π). For the remaining 33 digits, divide by 4 to get 8 with a remainder of 1. Then, each group of 8 digits can be substituted into the equation parameters e, p, and g of the equation respectively, and for the equation parameter h, take the last 9 digits. It can be understood that in the case of no remainder, except for the first - digit value, the remaining corresponding values can be exactly distributed to the equation parameters e, p, g, and h respectively. Through the above data conversion, the conic equations corresponding to the target data "one" can be obtained as follows:

[0084]

[0085] By converting the target data into the equation parameter values of the conic equation and constructing the corresponding target conic equation, while achieving the first - level data encryption, further data encryption can be performed using the target conic equation.

[0086] It should be noted that in the embodiments of the present invention, the corresponding numerical values ​​are substituted into the conic section equation in the order of α, e, p, g, h, etc. It can be understood that the corresponding numerical values ​​can also be substituted into the conic section equation in other orders, and the present invention is not limited to this.

[0087] Step 103, obtaining a key group and an asymmetric encryption algorithm for the target conic section equation, and generating a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm;

[0088] The first coordinate value may be the x-axis coordinate value of the conic curve equation or the y-axis coordinate value. It should be noted that in the embodiment of the present invention, the first coordinate value is the x-axis coordinate value and the second coordinate value is the y-axis coordinate value for exemplary description.

[0089] In a specific implementation, a key group, an asymmetric encryption algorithm and an encryption complexity for a target conic curve equation can be obtained. The key group includes a private key and a corresponding public key. The encryption complexity is used to generate at least five x-axis coordinate values ​​of the target conic curve equation. Then, the public key, the asymmetric encryption algorithm and the encryption complexity are used to perform operations to generate at least five x-axis coordinate values ​​for the target conic curve equation. On the one hand, the corresponding x-axis coordinate values ​​are generated to perform operations on the conic curve equation. On the other hand, the x-axis coordinate values ​​are generated by the encryption algorithm to achieve a second encryption and improve the complexity of data encryption. At the same time, based on the generation method of encryption complexity, dynamic adjustment parameters can be achieved, and ciphertexts of different complexities can be dynamically generated according to specific business scenarios, security requirements, encryption granularity and other conditions. The complexity of encryption and the time and bandwidth transmission efficiency required for encryption can be effectively controlled to improve the applicability of data encryption. Among them, the asymmetric encryption algorithm can be an RSA algorithm, which is not limited by the present invention.

[0090] Among them, the encryption complexity can be a complexity parameter input by the user, through which a corresponding number of coordinate values ​​can be generated according to the asymmetric encryption algorithm and the public key. As the encryption complexity increases, the number of generated coordinate values ​​also increases, so that the user can dynamically adjust the number of generated coordinate values ​​according to the data encryption requirements. For example, the first-level encryption level is the lowest, and 5 coordinate values ​​corresponding to the coordinate axis can be generated, and the second-level encryption can generate 6, etc. It should be noted that for a conic curve, it requires at least 5 coordinate points to be determined. Therefore, at least 5 coordinate values ​​of the target coordinate axis are required to solve the target conic curve equation and obtain the coordinate value of another coordinate axis.

[0091] For example, use the date as the seed to get the x-axis value, and divide it by the number of x-axes to be generated. For example, the current timestamp is 1653618344515, and to generate 5 x-axes, divide the timestamp by 5 to get 330723668903, and then convert the obtained value into coordinates, including: using 330723668903*1, 330723668903*2...330723668903*5 as x coordinates, and then substituting them into the formula to get the corresponding y-axis coordinate value.

[0092] Step 104, respectively substitute the first coordinate values ​​into the target conic section equation to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data.

[0093] In a specific implementation, when the first coordinate value is an x-axis coordinate value, the several x-axis coordinate values ​​corresponding to the target data can be substituted into the target conic section equation to obtain the corresponding y-axis coordinate value; when the first coordinate value is a y-axis coordinate value, the several y-axis coordinate values ​​corresponding to the target data can be substituted into the target conic section equation to obtain the corresponding x-axis coordinate value, and then all the coordinate values ​​can be encrypted to obtain the ciphertext corresponding to the target data. Thus, through triple data encryption, the data encryption process becomes more irregular, which greatly improves the security of the data. At the same time, based on the characteristics of the conic section equation, the parameters and the number of coordinates obtained can be dynamically adjusted to ensure the controllability of data encryption.

[0094] In one example, assuming that the first coordinate value is the x-axis coordinate value, each x-axis coordinate value can be input into the target conic section equation respectively to obtain the y-axis coordinate value corresponding to each x-axis coordinate value, and then the value set consisting of each x-axis coordinate value and each y-axis coordinate value can be encrypted to generate the ciphertext corresponding to the target data. Thus, through triple data encryption, the data encryption process becomes more irregular, the risk of the encryption algorithm being cracked is reduced, and the data security is greatly improved. At the same time, based on the equation characteristics of the conic section equation, the parameters and the number of coordinates obtained can be dynamically adjusted to ensure the controllability of data encryption.

[0095] In addition, when it is necessary to decrypt the ciphertext to restore the target data, the asymmetric decryption algorithm corresponding to the asymmetric encryption algorithm can be obtained, and then the private key corresponding to the public key in the key group and the asymmetric decryption algorithm are used to decrypt the ciphertext to obtain each x-axis coordinate value and each y-axis coordinate value, and then the x-axis coordinate value and the corresponding y-axis coordinate value are substituted into the target conic section equation to solve the equation to obtain several equation parameter values, and the several equation parameter values ​​are reversely converted to obtain the target data, thereby effectively ensuring the security of the data through the above-mentioned multiple data encryption method.

[0096] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that those skilled in the art can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention is not limited to this.

[0097] In an embodiment of the present invention, by acquiring target data to be encrypted, then converting the target data into a number of equation parameter values, and substituting each equation parameter value into a preset conic curve equation to obtain a target conic curve equation, then acquiring a key group and an asymmetric encryption algorithm for the target conic curve equation, and generating a number of first coordinate values ​​for the target conic curve equation according to the key group and the asymmetric encryption algorithm, respectively substituting the first coordinate values ​​into the target conic curve equation to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypting each first coordinate value and each second coordinate value to generate a ciphertext corresponding to the target data, and by converting the target data to be encrypted into equation parameter values ​​of the conic curve equation, a first encryption is achieved, and then the coordinate values ​​of the conic curve equation are obtained based on the asymmetric encryption algorithm and the key group to achieve a second encryption, and then the corresponding coordinate values ​​are calculated according to the obtained coordinate values ​​and the conic curve equation, and all the obtained coordinate values ​​are encrypted to achieve a third encryption, so that the data encryption process becomes more irregular, and the security of the data is greatly improved. At the same time, based on the equation characteristics of the conic curve equation, the parameters and the number of coordinates obtained can be dynamically adjusted, and the controllability of data encryption is guaranteed.

[0098] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0099] Reference Figure 3 , shows a structural block diagram of a data encryption processing device provided in an embodiment of the present invention, which may specifically include the following modules:

[0100] The target data acquisition module 301 is used to acquire the target data to be encrypted;

[0101] The curve equation generating module 302 is used to convert the target data into a plurality of equation parameter values, and substitute each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation;

[0102] A coordinate value generating module 303 is used to obtain a key group and an asymmetric encryption algorithm for the target conic section equation, and generate a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm;

[0103] The ciphertext generation module 304 is used to substitute the first coordinate values ​​into the target conic section equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate ciphertext corresponding to the target data.

[0104] In an optional embodiment, the preset conic section equation includes an equation parameter α, an equation parameter e, an equation parameter p, an equation parameter g, and an equation parameter h, the target data includes a character string, and the curve equation generating module 302 is specifically used for:

[0105] Get the character code corresponding to each character in the string;

[0106] Convert each character code into decimal to obtain the target value corresponding to the character string;

[0107] After adding the first value in the target value and the preset value, the average value of the sum is substituted into the equation parameter α to obtain the first equation parameter value corresponding to the target data;

[0108] After splitting the other values ​​in the target value except the first value into equal numbers, the split values ​​are substituted into the equation parameter e, the equation parameter p, the equation parameter g, and the equation parameter h in order. If there is a remainder in the target value during the equal number splitting process, the value corresponding to the remainder is assigned to the equation parameter h to obtain the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data.

[0109] In an optional embodiment, the curve equation generating module 302 is further configured to:

[0110] Substitute the first equation parameter value, the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data into the preset conic section equation to obtain the target conic section equation corresponding to the character string.

[0111] In an optional embodiment, the coordinate value generating module 303 is specifically used for:

[0112] Obtaining a key group, an asymmetric encryption algorithm, and an encryption complexity for the target conic section equation, wherein the key group includes a public key, and the encryption complexity is used to generate at least five x-axis coordinate values ​​of the target conic section equation;

[0113] The public key, the asymmetric encryption algorithm and the encryption complexity are used to perform operations to generate at least five x-axis coordinate values ​​for the target conic section equation.

[0114] In an optional embodiment, the ciphertext generation module 304 is specifically used to:

[0115] Input each of the x-axis coordinate values ​​into the target conic curve equation to obtain the y-axis coordinate value corresponding to each of the x-axis coordinate values;

[0116] The value set consisting of each of the x-axis coordinate values ​​and each of the y-axis coordinate values ​​is encrypted to generate a ciphertext corresponding to the target data.

[0117] In an optional embodiment, the key group includes a private key, and the apparatus further includes:

[0118] A decryption algorithm acquisition module, used to acquire an asymmetric decryption algorithm corresponding to the asymmetric encryption algorithm;

[0119] A decryption module, used to decrypt the ciphertext using the asymmetric decryption algorithm and the private key to obtain each of the x-axis coordinate values ​​and each of the y-axis coordinate values;

[0120] A parameter value determination module, used for substituting the x-axis coordinate value and the corresponding y-axis coordinate value into the target conic curve equation to solve the equation and obtain the plurality of equation parameter values;

[0121] The data conversion module is used to reversely convert the several equation parameter values ​​to obtain the target data.

[0122] In an optional embodiment, the target data acquisition module 301 is specifically used for:

[0123] In response to a data transmission instruction, first target data to be encrypted corresponding to the data transmission instruction is acquired, or, in response to a data storage instruction, second target data to be encrypted corresponding to the data storage instruction is acquired.

[0124] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0125] In addition, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned data encryption processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0126] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data encryption processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0127] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0128] The electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and a power supply 411. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0129] It should be understood that in the embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 410 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 401 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.

[0130] The electronic device provides users with wireless broadband Internet access through the network module 402, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0131] The audio output unit 403 can convert the audio data received by the RF unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output it as sound. Moreover, the audio output unit 403 can also provide audio output related to a specific function performed by the electronic device 400 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, etc.

[0132] The input unit 404 is used to receive audio or video signals. The input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 406. The image frame processed by the graphics processor 4041 can be stored in the memory 409 (or other storage medium) or sent via the radio frequency unit 401 or the network module 402. The microphone 4042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 401 in the case of a telephone call mode.

[0133] The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 4061 and / or the backlight when the electronic device 400 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 405 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0134] The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0135] The user input unit 407 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 4071 or near the touch panel 4071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 4071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 410, receives the command sent by the processor 410 and executes it. In addition, the touch panel 4071 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 4071, the user input unit 407 may also include other input devices 4072. Specifically, other input devices 4072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0136] Furthermore, the touch panel 4071 may be overlaid on the display panel 4061. When the touch panel 4071 detects a touch operation on or near it, it is transmitted to the processor 410 to determine the type of the touch event. Then, the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Figure 4 In the figure, the touch panel 4071 and the display panel 4061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0137] The interface unit 408 is an interface for connecting an external device to the electronic device 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 400 or may be used to transmit data between the electronic device 400 and an external device.

[0138] The memory 409 can be used to store software programs and various data. The memory 409 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 409 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0139] The processor 410 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 409, and calling data stored in the memory 409, so as to monitor the electronic device as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.

[0140] The electronic device 400 may also include a power supply 411 (such as a battery) for supplying power to each component. Preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0141] In addition, the electronic device 400 includes some functional modules not shown, which will not be described in detail here.

[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0144] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0147] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0150] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0151] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data encryption processing method, characterized in that: include: Obtain target data to be encrypted; Convert the target data into a plurality of equation parameter values, and substitute each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation; Acquire a key group and an asymmetric encryption algorithm for the target conic section equation, and generate a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm; Substitute the first coordinate values ​​into the target conic curve equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data.

2. The method according to claim 1, characterized in that The preset conic section equation includes an equation parameter α, an equation parameter e, an equation parameter p, an equation parameter g, and an equation parameter h. The target data includes a character string. The converting the target data into a plurality of equation parameter values ​​includes: Get the character code corresponding to each character in the string; Convert each character code into decimal to obtain the target value corresponding to the character string; After adding the first value in the target value and the preset value, the average value of the sum is substituted into the equation parameter α to obtain the first equation parameter value corresponding to the target data; After splitting the other values ​​in the target value except the first value into equal numbers, the split values ​​are substituted into the equation parameter e, the equation parameter p, the equation parameter g, and the equation parameter h in order. If there is a remainder in the target value during the equal number splitting process, the value corresponding to the remainder is assigned to the equation parameter h to obtain the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data.

3. The method according to claim 2, characterized in that Substituting each of the equation parameter values ​​into a preset conic section equation to obtain a target conic section equation includes: Substitute the first equation parameter value, the second equation parameter value, the third equation parameter value, the fourth equation parameter value and the fifth equation parameter value corresponding to the target data into the preset conic section equation to obtain the target conic section equation corresponding to the character string.

4. The method according to claim 1, 2 or 3, characterized in that: The acquiring a key group and an asymmetric encryption algorithm for the target conic section equation, and generating a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm, comprises: Obtaining a key group, an asymmetric encryption algorithm, and an encryption complexity for the target conic section equation, wherein the key group includes a public key, and the encryption complexity is used to generate at least five x-axis coordinate values ​​of the target conic section equation; The public key, the asymmetric encryption algorithm and the encryption complexity are used to perform operations to generate at least five x-axis coordinate values ​​for the target conic section equation.

5. The method according to claim 4, characterized in that Substituting the first coordinate values ​​into the target conic curve equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypting each of the first coordinate values ​​and each of the second coordinate values ​​to generate a ciphertext corresponding to the target data, includes: Input each of the x-axis coordinate values ​​into the target conic curve equation to obtain the y-axis coordinate value corresponding to each of the x-axis coordinate values; The value set consisting of each of the x-axis coordinate values ​​and each of the y-axis coordinate values ​​is encrypted to generate a ciphertext corresponding to the target data.

6. The method according to claim 5, characterized in that The key group includes a private key, and the method further includes: Obtaining an asymmetric decryption algorithm corresponding to the asymmetric encryption algorithm; Decrypting the ciphertext using the asymmetric decryption algorithm and the private key to obtain each of the x-axis coordinate values ​​and each of the y-axis coordinate values; Substituting the x-axis coordinate value and the corresponding y-axis coordinate value into the target conic curve equation to solve the equation and obtain the plurality of equation parameter values; The target data are obtained by performing a reverse conversion on the plurality of equation parameter values.

7. The method according to claim 1, characterized in that The step of obtaining the target data to be encrypted includes: In response to a data transmission instruction, first target data to be encrypted corresponding to the data transmission instruction is acquired, or, in response to a data storage instruction, second target data to be encrypted corresponding to the data storage instruction is acquired.

8. A data encryption processing device, characterized in that: include: A target data acquisition module, used to acquire target data to be encrypted; A curve equation generating module, used for converting the target data into a plurality of equation parameter values, and substituting each of the equation parameter values ​​into a preset conic curve equation to obtain a target conic curve equation; A coordinate value generation module, used to obtain a key group and an asymmetric encryption algorithm for the target conic section equation, and generate a plurality of first coordinate values ​​for the target conic section equation according to the key group and the asymmetric encryption algorithm; The ciphertext generation module is used to substitute the first coordinate values ​​into the target conic section equation respectively to obtain second coordinate values ​​corresponding to the first coordinate values, and encrypt each of the first coordinate values ​​and each of the second coordinate values ​​to generate ciphertext corresponding to the target data.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.