CN110336669B - Information encryption method and device and electronic equipment - Google Patents

Information encryption method and device and electronic equipment Download PDF

Info

Publication number
CN110336669B
CN110336669B CN201910588230.7A CN201910588230A CN110336669B CN 110336669 B CN110336669 B CN 110336669B CN 201910588230 A CN201910588230 A CN 201910588230A CN 110336669 B CN110336669 B CN 110336669B
Authority
CN
China
Prior art keywords
encryption function
curve
curve segment
encryption
initial
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
CN201910588230.7A
Other languages
Chinese (zh)
Other versions
CN110336669A (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.)
Beijing Rzxt Technology Development Co ltd
Original Assignee
Beijing Rzxt Technology Development Co 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 Beijing Rzxt Technology Development Co ltd filed Critical Beijing Rzxt Technology Development Co ltd
Priority to CN201910588230.7A priority Critical patent/CN110336669B/en
Publication of CN110336669A publication Critical patent/CN110336669A/en
Application granted granted Critical
Publication of CN110336669B publication Critical patent/CN110336669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved

Abstract

The application discloses an information encryption method and device and electronic equipment, which are used for solving the problems that an existing encryption mode is low in security level and easy to steal or reverse crack by others. The method comprises the following steps: generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment; receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation; determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function; and encrypting the information to be encrypted according to the encryption function set.

Description

Information encryption method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information encryption method and apparatus, and an electronic device.
Background
Anonymous traceability is a core advantage of blockchain technology. Under the environment of complete open source, the user can safely manage the own account, execute the intelligent contract trusted by the user, and can also re-encrypt the anonymous information, and simultaneously ensure that the encrypted information is still operable.
In a real application, the interaction between the blockchain and the user is a wallet, and particularly, in an operation interface of a mobile terminal, the user only has a limited number of possible methods for generating encryption parameters: 1) inputting by a keyboard; 2) gesture sliding; 3) inputting voice; 4) and (5) face recognition.
The user interface of the existing encryption product usually inputs a secret key by inputting a password, inputting a fingerprint or other contact modes, and this scenario is usually applicable to a scenario that does not require a user to customize an encryption function. However, in such a scenario, the risk of key leakage, such as snooping by others and screen recording, exists in the process of inputting the password by the user, and great potential safety hazard exists.
And if a user self-defines an encryption function, for example, an intelligent contract is encrypted in a isomorphic encryption mode, the system can only recommend the user default encryption function, which greatly increases the possibility that the encrypted information of the user is reversely cracked.
Therefore, how to improve the security level of the user encrypted information and avoid password leakage and reverse cracking becomes a technical problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides an information encryption method and device and electronic equipment, and aims to solve the problems that an existing encryption mode is low in security level and easily stolen by others or cracked reversely.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
in a first aspect, a method for encrypting information is provided, including:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
In a second aspect, an apparatus for encrypting information is provided, comprising:
a generating unit for generating an initial curve on a screen, the initial curve including at least one continuous curve segment;
the receiving unit is used for receiving the adjustment operation of a user on at least one curve segment and adjusting the corresponding curve segment according to the adjustment operation;
a determining unit, configured to determine an encryption function set according to the adjusted at least one curve segment, where the encryption function set includes at least one encryption function, and one curve segment corresponds to one encryption function;
and the encryption unit is used for encrypting the information to be encrypted according to the encryption function set.
In a third aspect, an electronic device is provided, which includes:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
In a fourth aspect, a computer-readable storage medium is presented, storing one or more programs, which when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
The embodiment of the application can at least achieve the following technical effects by adopting the technical scheme:
the method of the embodiment of the present specification can generate an initial curve on a screen, where the initial curve includes at least one continuous curve segment, and can receive an adjustment operation of a user on the curve segment, adjust the curve segment according to the adjustment operation, and then determine an encryption function set according to the adjusted curve segment, where the encryption function set includes at least one encryption function, and one curve segment corresponds to one encryption function, and finally encrypt information to be encrypted according to the encryption function set. Therefore, the encryption function is determined in the background through the shape of the curve segment, the encryption function is not displayed on a screen, and specific parameters cannot be recovered even if the encryption function is snooped or recorded, so that the encryption security level is improved, the encryption function is determined through the curve segment adjusted by a user, the randomness is high, and the difficulty of reverse cracking is further improved.
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 application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart illustrating an implementation of a method for encrypting information according to an embodiment of the present disclosure;
FIG. 2(a) is a schematic illustration of an initial curve provided by one embodiment of the present description;
FIG. 2(b) is a schematic diagram of a user adjusting a curve segment according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an information encryption apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
In order to solve the problem that an existing encryption mode is low in security level and is easily stolen by a password or cracked reversely, an execution main body of the method can be but not limited to a mobile phone, a tablet computer and the like, and can be configured to execute at least one of user terminals of the method provided by the embodiment of the specification. Alternatively, the execution subject of the method may also be a client.
For convenience of description, the following description will be made of an embodiment of the method taking as an example that an execution subject of the method is a terminal device capable of executing the method. It is understood that the main subject of the method is the terminal device, which is only an exemplary illustration, and should not be construed as a limitation of the method.
Specifically, the key generation method of the present invention includes: firstly, generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment; then, the adjustment operation of the user on the at least one curve segment can be received, and the corresponding curve segment is adjusted according to the adjustment operation; determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function; and finally, encrypting the information to be encrypted according to the encryption function set.
The method in the embodiment of the specification can determine the encryption function in the background through the shape of the curve segment, the encryption function is not displayed on the screen, and specific parameters cannot be recovered even if the encryption function is snooped or recorded on the screen, so that the encryption security level is improved, the encryption function is determined through the curve segment adjusted by a user, the randomness is high, and the difficulty of reverse cracking is further improved.
The following describes in detail an implementation process of the information encryption method, by taking an implementation flow diagram of the information encryption method shown in fig. 1 as an example, and the implementation process includes:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
optionally, in order to increase the complexity of information encryption and increase the security level of the encrypted information, the initial curve generated on the screen by one or more embodiments of the present specification may include one or more intermediate points, where the intermediate points enable a user to move the position of the initial curve through a preset operation to change the shape of the initial curve, so as to customize the set of encryption functions corresponding to the initial curve. Then, an initial curve is generated on the screen, including:
generating two end points on a screen and generating at least one intermediate point between the two end points;
and sequentially connecting two adjacent points on the screen according to a preset mode to obtain at least one continuous curve section, wherein the at least one continuous curve section forms an initial curve.
Fig. 2(a) is a schematic diagram of an initial curve generated on a screen in an embodiment of the present disclosure. In fig. 2(a), the initial curve includes two end points (i.e., point a and point B) and 3 intermediate points (i.e., point M1, point M2, and point M3).
It should be understood that in order to connect two adjacent points on the screen, i.e. to connect AM1, M1M2, M2M3 and M3B in sequence in fig. 2(a), to form curve segments AM1, M1M2, M2M3 and M3B, there is a corresponding initial function between the two adjacent points in the embodiment of the present specification, the initial function is taken from a preset function library, and the initial function determines the shape of the curve segment; alternatively, two adjacent points may be randomly connected. Then, connecting two adjacent points on the screen in sequence according to a preset mode includes:
determining initial functions respectively corresponding to two adjacent points on the screen, and sequentially connecting the two adjacent points on the screen based on the initial functions; or
Two adjacent points on the screen are randomly connected.
As shown in fig. 2(a), assuming that two adjacent points, point a to point M1, correspond to a cryptographic function E1(X), point a and point M1 may be connected based on the cryptographic function E1 (X); assuming that two adjacent points from the point M1 to the point M2 correspond to a cryptographic function E2(X), the point M1 to the point M2 may be connected based on the cryptographic function E2 (X); assuming that two adjacent points from the point M2 to the point M3 correspond to a cryptographic function E3(X), the point M2 and the point M3 may be connected based on the cryptographic function E3 (X); assuming that two adjacent points, i.e., the point M3 and the point B, correspond to a cryptographic function E4(X), the point M3 and the point B can be connected based on the cryptographic function E4 (X).
And step 120, receiving an adjustment operation of the user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation.
As shown in fig. 2(a), after the user sees the initial curve (the curve between the point a and the point B shown in fig. 2 (a)) shown on the screen and the middle points M1, M2, and M3 of the initial curve, the positions of the middle points M1, M2, and M3, such as the positions of the middle points M1, M2, and M3, may be moved upward, downward, leftward, or rightward. After receiving the user's position adjustment operations for the middle points M1, M2, and M3 of the curve, the curve segment between the point a and the point B may be adjusted according to the user's adjustment operations.
Assume that the curve generated after the user makes an adjustment is as shown in fig. 2 (b). The curve is composed of a curve segment between point a to point M1 ', a curve segment between point M1' to point M2 ', a curve segment between point M2' to point M3 ', and a curve segment between point M3' to point B.
Step 130, determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
it should be understood that, since the shape of the adjusted curve segment is changed, and the corresponding function between two adjacent points in the curve segment is also changed correspondingly, the set of cryptographic functions is determined according to at least one adjusted curve segment, including:
determining an encryption function corresponding to each adjusted curve segment according to coordinates of the initial point and the end point of each adjusted curve segment in a pre-established coordinate system and a corresponding initial function;
and obtaining an encryption function set based on the adjusted encryption function corresponding to each curve segment.
Optionally, to implement isomorphic encryption, in the embodiment of the present specification, all curve segments after adjustment are monotonically continuous, and curves composed of all curve segments after adjustment are also monotonically continuous.
Isomorphic encryption is a mathematical mapping method, assuming that the encryption function is denoted as E, the following conditions are satisfied:
E(A op B)=E(A)op E(B);
that is, after the result of the operation on the ciphertext is decrypted, as is the result of the operation on the plaintext:
E -1 (E(A op B))=A op B。
the op represents operation modes such as addition, subtraction, multiplication and division or character string splicing.
Here, since all the curve segments after adjustment are monotonously continuous and the curves composed of all the curve segments after adjustment are also monotonously continuous, the set of cryptographic functions determined from the curve segments after adjustment is also monotonously continuous. Any combination of numbers (X1, X2..) is input, ciphertext (E (X1), E (X2)) is calculated from the set of cryptographic functions, and the ciphertext may subsequently be output to an application. Since E is monotonic, the ciphertext is also persistent. Ciphertext continuation means that ciphertext keeps the same order as plaintext, and if X1< X2< X3 >, then E (X1) < E (X2) < E (X3) <.
And 140, encrypting the information to be encrypted according to the encryption function set.
Optionally, in order to avoid the problem that the set password is leaked due to the fact that the user is peeped or recorded on the screen by others in the password setting process, the information to be encrypted in the embodiment of the description may include the plaintext password to be encrypted;
according to the encryption function set, encrypting the information to be encrypted comprises the following steps:
and encrypting the plaintext password to be encrypted according to the encryption function set to generate a secret key.
At the moment, the encryption function set generated by the background cannot be snooped, so that even if a plaintext password is leaked, a secret key cannot be leaked, and the safety is improved.
Of course, the encryption application scenario of the embodiment of the present invention is not limited to encrypting a plaintext password, and may also be applied to any scenario that requires encryption, for example, encrypting confidential data using an encryption function set.
Optionally, the plaintext cipher to be encrypted includes a plurality of numbers or characters, and one encryption function corresponds to one value range respectively;
encrypting a plaintext password to be encrypted according to an encryption function set, comprising:
determining an encryption function corresponding to the value ranges of a plurality of numbers or characters in the plaintext password to be encrypted from the encryption function set based on the value range corresponding to each encryption function in the encryption function set;
and encrypting the plurality of numbers or characters in the plaintext password to be encrypted based on the encryption function corresponding to the value ranges of the plurality of numbers or characters in the plaintext password to be encrypted.
Alternatively, the plaintext cipher to be encrypted may be a plaintext cipher consisting of a plurality of digits, such as a six-digit plaintext cipher "312645" which may consist of digits 1, 2, 3, 4, 5, 6; a plaintext cipher which may also consist of a plurality of letters, such as a six-digit cipher "back", which may consist of letters a, b, c, d, e, f; a plaintext cipher, which may also consist of letters and numbers, such as a six-digit cipher "a 2c1b 3", which may consist of numbers 1, 2, 3 and letters a, b, c; a plaintext cipher may also consist of letters, numbers and underlines, such as a six-digit cipher "12 _ cba" which may consist of numbers 1, 2, letters a, b, c and underline _ for example.
It should be understood that, since the value ranges of the one or more encryption functions corresponding to the adjusted curve segments are often the value ranges of numbers, in order to facilitate a user to set a plaintext password containing letters or underlines, embodiments of the present specification may preset a mapping relationship table between letters and underlines and numbers, for example, an underline may be set to correspond to a number 10, a letter a corresponds to a number 11, a letter b corresponds to a number 12, and so on.
It should be understood that the above-listed components and numbers of digits of the plaintext password to be encrypted are merely exemplary illustrations, and in practical applications, the numbers and specific contents of letters, numbers and underlines included in the plaintext password to be encrypted may be specifically set according to the memory habits and the operation behaviors of the user, which is not specifically limited by one or more embodiments of the present specification.
Assuming that a plaintext cipher to be encrypted contains a plurality of numbers "312645", taking a curve segment shown in fig. 2(B) as an example, the curve segment includes four segments, where a value range of an encryption function corresponding to a curve segment between a point a and a point M1 'is [ x0, x 1' ], a value range of an encryption function corresponding to a curve segment between a point M1 'and a point M2' is [ x1 ', x 2' ], a value range of an encryption function corresponding to a curve segment between a point M2 'and a point M3' is [ x2 ', x 3' ], and a value range of an encryption function corresponding to a curve segment between a point M3 'and a point B is [ x 3', x4 ].
Then, for the plaintext cipher "312645" to be encrypted, it is first determined which range [ X0, X1 '], [ X1', X2 '], [ X2', X3 '] and [ X3', X4] the "3" belongs to, and assuming that "3" belongs to [ X1 ', X2' ], it may be determined that the encryption function corresponding to "3" is the encryption function E2 '(X) corresponding to the curve segment between the point M1' and the point M2 ', and the encryption processing on "3" based on the encryption function results in E2' (3);
then determining which range of [ X0, X1 '], [ X1', X2 '], [ X2', X3 '] and [ X3', X4] that "1" belongs to, assuming that "1" belongs to [ X0, X1 '], determining that the encryption function corresponding to "1" is the encryption function E1' (X) corresponding to the curve segment between the point a and the point M1 ', and performing encryption processing on "1" based on the encryption function to obtain E1' (1);
then, it is determined which range of [ X0, X1 '], [ X1', X2 '], [ X2', X3 '] and [ X3', X4] that "2" belongs to, and assuming that "2" belongs to [ X1 ', X2' ], it is determined that the encryption function corresponding to "2" is the encryption function E2 '(X) corresponding to the curve segment between the point M1' and the point M2 ', and the encryption processing is performed on "1" based on the encryption function, so that E2' (2) is obtained;
by analogy, the encryption functions corresponding to "6", "4" and "5" and the keys processed based on the corresponding encryption functions are determined in sequence, and are assumed to be E4 ' (6), E3 ' (4) and E3 ' (5); it can be determined that the plain text password "312645" is a combination of keys E2 '(3), E1' (1), E2 '(2), E4' (6), E3 '(4), and E3' (5) obtained through encryption processing of the corresponding encryption function.
Optionally, in an implementation, a component packaged by using the method provided in an embodiment of the present specification may serve as a plug-in for a target application, where the plug-in may be used for setting a login password, a payment password, and the like of the target application, and inputting the login password and the payment password, and then after encrypting information, the method further includes:
and performing at least one of a login operation, a payment operation, and a transfer operation based on the encrypted information.
Taking a setting scenario of a password such as a login password and a payment password of a target application as an example, assuming that a user registers an account of the target application after downloading the target application, at this time, the user is often required to manually set the password such as the login password and the payment password of the target application. In this case, in the setting interface of the password such as the login password or the payment password of the target application, a default shape of the curve provided by the system may be displayed for the user, as shown in fig. 2(a), the starting point of the encryption curve is point a, the end point of the encryption curve is point B, and a plurality of points exist between point a and point B, so that the user can slide up, down, left and right. The user can change the shape of the default curve by sliding the points A and B up and down and left and right, so as to realize the self-defined setting of the encryption function corresponding to the curve segment.
After the user adjusts the shape of the curve segment, a confirmation operation may be performed on the curve segment, for example, two buttons "confirm" and "cancel" may be included in the display interface of the curve segment. When the user is detected to click the 'confirm' button, the user is indicated to confirm the shape of the curve segment, and the setting of the shape of the curve segment is completed. At this time, the curve segment may be saved, so that the curve segment is called to perform an encryption operation on the plaintext password input by the user when the user performs a login or payment operation next time.
After the user sets the shape of the curve segment, the set plaintext password can be input in the password setting input box, and it should be understood that the plaintext password is not the actual login password or payment password of the target application, so even if the plaintext password is snooped or recorded by others, the user cannot log in the target application or pay through the target application based on the plaintext password.
The method provided by the embodiment of the specification can determine the encryption function in the background through the shape of the curve segment, the encryption function is not displayed on a screen, and specific parameters cannot be recovered even if the encryption function is snooped or recorded, so that the encryption security level is improved, the encryption function is determined through the curve segment adjusted by a user, the randomness is high, and the difficulty of reverse cracking is further improved.
Fig. 3 is a schematic structural diagram of an information encryption apparatus 300 provided in an embodiment of the present specification. Referring to fig. 3, in one embodiment, an apparatus 300 for encrypting information may include:
a generating unit 301, configured to generate an initial curve on a screen, where the initial curve includes at least one continuous curve segment;
a receiving unit 302, configured to receive an adjustment operation performed by a user on at least one curve segment, and adjust the curve segment according to the adjustment operation;
a determining unit 303, configured to determine an encryption function set according to the adjusted at least one curve segment, where the encryption function set includes at least one encryption function, and one curve segment corresponds to one encryption function;
and an encrypting unit 304, configured to encrypt the information to be encrypted according to the set of encryption functions.
The device in the embodiment of the description can determine the encryption function in the background through the shape of the curve segment, the encryption function is not displayed on the screen, and specific parameters cannot be recovered even if the encryption function is snooped or recorded on the screen, so that the encryption security level is improved, the encryption function is determined through the curve segment adjusted by a user, the randomness is high, and the difficulty of reverse cracking is further improved.
Optionally, in an embodiment, the generating unit 301 is configured to:
generating two end points on the screen and generating at least one intermediate point between the two end points;
and sequentially connecting two adjacent points on the screen according to a preset mode to obtain at least one continuous curve segment, wherein the at least one continuous curve segment forms the initial curve.
Optionally, in an embodiment, the generating unit 301 is configured to:
determining initial functions respectively corresponding to two adjacent points on the screen, and sequentially connecting the two adjacent points on the screen based on the initial functions; or alternatively
And randomly connecting two adjacent points on the screen.
Optionally, in an embodiment, the receiving unit 302 is configured to:
and receiving the movement operation of the user on the end point or the intermediate point, and adjusting the curve segment where the end point or the intermediate point is located according to the moved end point or the intermediate point.
Optionally, in an embodiment, the determining unit 303 is configured to:
determining an encryption function corresponding to each adjusted curve segment according to the coordinates of the initial point and the end point of each adjusted curve segment in a pre-established coordinate system and the corresponding initial function;
and obtaining the encryption function set based on the adjusted encryption function corresponding to each curve segment.
Optionally, in an embodiment, the information to be encrypted includes a plaintext password to be encrypted;
the encryption unit 304 is configured to:
and encrypting the plaintext password to be encrypted according to the encryption function set to generate a secret key.
Optionally, in an embodiment, the plaintext cipher to be encrypted includes a plurality of numbers or characters, and one encryption function corresponds to one value range respectively;
the encryption unit 304 is configured to:
determining an encryption function corresponding to the value ranges of a plurality of numbers or characters in the plaintext password to be encrypted from the encryption function set based on the value range corresponding to each encryption function in the encryption function set;
encrypting the plurality of numbers or words in the plaintext password to be encrypted based on an encryption function corresponding to the value ranges of the plurality of numbers or words in the plaintext password to be encrypted.
Optionally, in an embodiment, all the curve segments after adjustment are monotonically continuous, and the curve composed of all the curve segments after adjustment is also monotonically continuous.
The information encryption apparatus 300 can implement the method in the embodiments of fig. 1 to fig. 2, and specifically refer to the information encryption method in the embodiments of fig. 1 to fig. 2, which is not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. Referring to fig. 4, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the key generation device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
According to the method, the encryption function can be determined in the background through the shape of the curve segment, the encryption function is not displayed on a screen, and specific parameters cannot be recovered even if the encryption function is snooped or recorded, so that the encryption security level is improved, and the difficulty of reverse cracking is further improved.
The above encryption method for information disclosed in the embodiment of fig. 1 in this specification can be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in one or more embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with one or more embodiments of the present disclosure may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules within the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further perform the information encryption method of fig. 1, which is not described herein again.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to perform the method of the embodiment shown in fig. 1, and are specifically configured to:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present disclosure should be included in the scope of protection of one or more embodiments of the present disclosure.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information and/or information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. A method for encrypting information, comprising:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
2. The method of claim 1, wherein generating an initial curve on a screen comprises:
generating two end points on the screen and generating at least one intermediate point between the two end points;
and sequentially connecting two adjacent points on the screen according to a preset mode to obtain at least one continuous curve segment, wherein the at least one continuous curve segment forms the initial curve.
3. The method of claim 2, wherein connecting two adjacent points on the screen in sequence according to a preset manner comprises:
determining initial functions respectively corresponding to two adjacent points on the screen, and sequentially connecting the two adjacent points on the screen based on the initial functions; or
And randomly connecting two adjacent points on the screen.
4. The method of claim 2, wherein receiving a user adjustment of the curve segment and adjusting the curve segment in accordance with the adjustment comprises:
and receiving the movement operation of the user on the end point or the intermediate point, and adjusting the curve segment where the end point or the intermediate point is located according to the moved end point or the intermediate point.
5. The method of claim 3, wherein determining a set of cryptographic functions from the adjusted at least one of the curve segments comprises:
determining an encryption function corresponding to each adjusted curve segment according to the coordinates of the initial point and the end point of each adjusted curve segment in a pre-established coordinate system and the corresponding initial function;
and obtaining the encryption function set based on the adjusted encryption function corresponding to each curve segment.
6. The method of claim 1, wherein the information to be encrypted comprises a plaintext cipher to be encrypted;
according to the encryption function set, encrypting information to be encrypted comprises the following steps:
and encrypting the plaintext password to be encrypted according to the encryption function set to generate a secret key.
7. The method according to claim 6, wherein the plaintext cipher comprises a plurality of numbers or words, and each of the plurality of cipher functions corresponds to a range of values;
according to the encryption function set, encrypting the plaintext password to be encrypted, comprising:
determining encryption functions corresponding to value ranges of a plurality of numbers or characters in the plaintext password to be encrypted from the encryption function set based on the value range corresponding to each encryption function in the encryption function set;
encrypting the plurality of numbers or words in the plaintext password to be encrypted based on an encryption function corresponding to the value ranges of the plurality of numbers or words in the plaintext password to be encrypted.
8. The method of claim 1, wherein all of the curve segments after the adjustment are monotonically continuous, and wherein the curve formed by all of the curve segments after the adjustment is monotonically continuous.
9. An apparatus for encrypting information, comprising:
a generating unit for generating an initial curve on a screen, the initial curve including at least one continuous curve segment;
the receiving unit is used for receiving the adjustment operation of a user on at least one curve segment and adjusting the corresponding curve segment according to the adjustment operation;
a determining unit, configured to determine an encryption function set according to the adjusted at least one curve segment, where the encryption function set includes at least one encryption function, and one curve segment corresponds to one encryption function;
and the encryption unit is used for encrypting the information to be encrypted according to the encryption function set.
10. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
generating an initial curve on a screen, wherein the initial curve comprises at least one continuous curve segment;
receiving the adjustment operation of a user on at least one curve segment, and adjusting the corresponding curve segment according to the adjustment operation;
determining an encryption function set according to the adjusted at least one curve segment, wherein the encryption function set comprises at least one encryption function, and one curve segment corresponds to one encryption function;
and encrypting the information to be encrypted according to the encryption function set.
CN201910588230.7A 2019-07-02 2019-07-02 Information encryption method and device and electronic equipment Active CN110336669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910588230.7A CN110336669B (en) 2019-07-02 2019-07-02 Information encryption method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910588230.7A CN110336669B (en) 2019-07-02 2019-07-02 Information encryption method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110336669A CN110336669A (en) 2019-10-15
CN110336669B true CN110336669B (en) 2022-09-09

Family

ID=68144624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910588230.7A Active CN110336669B (en) 2019-07-02 2019-07-02 Information encryption method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110336669B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995749A (en) * 2019-12-17 2020-04-10 北京海益同展信息科技有限公司 Block chain encryption method and device, electronic equipment and storage medium
CN112069525A (en) * 2020-09-29 2020-12-11 深圳壹账通智能科技有限公司 Encryption method, device and equipment for generating key based on attribute of information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104471892A (en) * 2011-12-02 2015-03-25 巴克莱银行公开有限公司 User access control based on a graphical signature
CN107404383A (en) * 2017-09-12 2017-11-28 四川阵风科技有限公司 The generation method and device of digital signature
CN108259505A (en) * 2018-01-31 2018-07-06 大连大学 A kind of ECC lightweight encryption methods for terminal mini-plant

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7020776B2 (en) * 2000-06-22 2006-03-28 Microsoft Corporation Cryptosystem based on a Jacobian of a curve

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104471892A (en) * 2011-12-02 2015-03-25 巴克莱银行公开有限公司 User access control based on a graphical signature
CN107404383A (en) * 2017-09-12 2017-11-28 四川阵风科技有限公司 The generation method and device of digital signature
CN108259505A (en) * 2018-01-31 2018-07-06 大连大学 A kind of ECC lightweight encryption methods for terminal mini-plant

Also Published As

Publication number Publication date
CN110336669A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN110892672B (en) Key authentication assertion generation providing device anonymity
US9407632B2 (en) Transformation rules for one-time passwords
TWI728639B (en) Data processing method, device and electronic equipment
CN109934585B (en) Signature method, device and system based on secure multiparty calculation
CN107431924B (en) Device theft protection associating device identifiers with user identifiers
TWI729698B (en) Data processing method, device and electronic equipment
US10448247B2 (en) Method and apparatus for information verification
US20160127134A1 (en) User authentication system and method
CN112016120A (en) Event prediction method and device based on user privacy protection
CN110336669B (en) Information encryption method and device and electronic equipment
CN105703901A (en) Encrypted data input method and encrypted data input device
CN110445768A (en) A kind of login method, device and electronic equipment
CN105022965A (en) Data encryption method and apparatus
US11569979B2 (en) Cryptographic systems with variable layout cryptography
US9553723B2 (en) Multi-dimensional encryption
CN114896603A (en) Service processing method, device and equipment
US11032273B2 (en) Method for authenticating secret information which protects secret information
US10433173B2 (en) Touch movement activation for gaining access beyond a restricted access gateway
CN111314057A (en) Private key using method and device depending on user input
CN112035901B (en) Information input method, device, electronic equipment and medium
Xie et al. Security and efficiency enhancement of an anonymous three-party password-authenticated key agreement using extended chaotic maps
US9407441B1 (en) Adding entropy to key generation on a mobile device
CN108664804A (en) A kind of input method of information, device, terminal and storage medium
CN107103247A (en) One kind application encryption method and device
CN106803030A (en) A kind of encryption and decryption method and device, user equipment

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