CN112287369A - Decryption method, decryption device, computer equipment and storage medium - Google Patents

Decryption method, decryption device, computer equipment and storage medium Download PDF

Info

Publication number
CN112287369A
CN112287369A CN202011206702.7A CN202011206702A CN112287369A CN 112287369 A CN112287369 A CN 112287369A CN 202011206702 A CN202011206702 A CN 202011206702A CN 112287369 A CN112287369 A CN 112287369A
Authority
CN
China
Prior art keywords
password
time
character string
input
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011206702.7A
Other languages
Chinese (zh)
Inventor
刘廷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011206702.7A priority Critical patent/CN112287369A/en
Publication of CN112287369A publication Critical patent/CN112287369A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/0872Generation of secret information including derivation or calculation of cryptographic keys or passwords using geo-location information, e.g. location data, time, relative position or proximity to other entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention relates to a decryption method, a decryption device, computer equipment and a storage medium, wherein the decryption method comprises the following steps: receiving an input first password, the first password being determined by a key and a first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; if the first password is consistent with the second password, decryption operation is executed, the password after the file encryption is ensured to be dynamically changed by taking the system time as a parameter of the file encryption, even if the password is leaked carelessly when the password is input, the risk that the file is decrypted by other people is avoided, and the safety of the file is improved.

Description

Decryption method, decryption device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of security, in particular to a decryption method, a decryption device, computer equipment and a storage medium.
Background
In order to securely store a file of a computer, a user sets an encryption key to encrypt the file, and then stores the encrypted file in the computer. Further, when opening the file, the user inputs a decryption key to decrypt the encrypted file and execute the file.
However, in the existing file encryption method, the encryption key and the decryption key are usually kept unchanged, that is, a fixed password used for file decryption is a fixed password, and the fixed password has a risk of leakage, so that the file is encrypted by using the fixed encryption key, so that the file is easily decrypted by other people, and the security is not high.
Disclosure of Invention
In view of this, in order to solve the technical problem that the security of a file is not high due to the above-mentioned form of encrypting the file by using a fixed encryption key, embodiments of the present invention provide a decryption method, an apparatus, a computer device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a decryption method, including:
receiving an input first password, the first password being determined by a key and a first time;
determining a second time corresponding to the first password when the first password is received;
generating a second password based on the second time and the key;
and if the first password is consistent with the second password, executing decryption operation.
In one possible embodiment, the key comprises: presetting a character string and a preset operation rule;
the first password is determined by a key and a first time, and comprises:
determining a first target character string corresponding to the first time;
determining the first password based on the preset operation rule, the first target character string and the preset character string.
In one possible embodiment, the generating a second password based on the second time and the key includes:
determining a second target character string corresponding to the second time;
and generating the second password based on the preset operation rule, the second target character string and the preset character string.
In one possible embodiment, the receiving the input first password includes:
when an operation of accessing a target file triggered by a user is detected, displaying an input box, wherein a password input area and the first time are arranged on the input box, and the first time is corresponding system time when the input box is displayed;
and receiving the input first password through the password input area.
In a possible embodiment, the determining a second time corresponding to the reception of the first password includes:
when it is detected that the password input area receives an input first password, determining the system time corresponding to the reception of the first password as the second time.
In one possible embodiment, the method further comprises:
and the display input box is also provided with third time corresponding to the second password, and the third time is the remaining time for reminding the input of the first password.
In one possible embodiment, the method further comprises:
receiving an input key, the key comprising: presetting a character string and a preset operation rule;
and executing encryption operation on the target file by adopting a preset encryption rule and the secret key.
In a possible embodiment, the performing, by using the preset encryption rule and the key, an encryption operation on the target file includes:
and executing dynamic encryption operation on the target file by adopting system time and the key so as to dynamically update the second password corresponding to the encrypted target file along with the change of the system time.
In one possible embodiment, the method further comprises:
if the first password is inconsistent with the second password, the input box is displayed again to prompt the user to input the first password again.
In one possible embodiment, the preset operation rule includes at least one of the following: addition, subtraction, multiplication or division;
the preset character string, the first target character string and the second target character string are the same in length.
In a second aspect, an embodiment of the present invention provides a decryption apparatus, including:
the receiving module is used for receiving an input first password, and the first password is determined by a secret key and a first time;
the determining module is used for determining a second time corresponding to the first password when the first password is received;
a generating module to generate a second password based on the second time and the key;
and the control module is used for executing decoding operation if the first password is consistent with the second password.
In a third aspect, an embodiment of the present invention provides a computer device, including: a processor and a memory, the processor being configured to execute a decryption program stored in the memory to implement the decryption method of any one of the above first aspects.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the decryption method according to any one of the first aspects.
According to the decryption scheme provided by the embodiment of the invention, the input first password is received, and the first password is determined by the secret key and the first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; if the first password is consistent with the second password, decryption operation is executed, the password after the file encryption is ensured to be dynamically changed by taking the system time as a parameter of the file encryption, even if the password is leaked carelessly when the password is input, the risk that the file is decrypted by other people is avoided, and the safety of the file is improved.
Drawings
Fig. 1 is a schematic flowchart of a decryption method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an encryption method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an encryption interface according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another decryption method according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a decryption interface according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a decryption apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a decryption method according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
and S11, receiving the input first password.
The decryption method provided by the embodiment of the invention is applied to the encryption/decryption process of the file, and the preset encryption rule is adopted to encrypt the file in advance, so that the password corresponding to the encrypted file can be dynamically updated along with the system time.
Further, the first password corresponding to the encrypted file is determined by a key and a first time, the first time is a current system time corresponding to the execution of the difficult decryption operation, the key is set by an encryptor when the encryptor executes the encryption operation on the file, and the key may include a character string and an operation rule.
Specifically, the key and the first time are converted into a character string with the same format, and one or more kinds of operations are performed on the converted key and the first time to obtain a first password.
For example, the keys include: the character 101010, the operation rule includes: and adding, wherein the first time can be 20, 10, 20 points, and the corresponding first password is: (|201020+101010| ═ 302030);
as another example, the key includes: character 1010, the operation rule includes: and adding, wherein the first time can be 20, 10, 20 points, and the corresponding first password is: (|1020+1010| ═ 2030);
when the length of the character in the key is not consistent with the length of the first time, the minimum length between the character in the key and the first time is used as a calculation standard, and the character length is determined from the right to the left.
And S12, determining a second time corresponding to the first password when received.
When the first password is detected to be input, second time corresponding to the first password in receiving is obtained, and the second time is current system time corresponding to the first password in receiving.
Further, in consideration of the variation width of the time between the determination time of the first password and the determination time of the second password, the score is adopted as the minimum calculation unit, that is, the first time and the second time are counted to the score.
S13, generating a second password based on the second time and the key.
And converting the second time and the key into character strings with the same format, and performing one or more operations on the converted key and the second time to obtain a second password.
For example, the keys include: the character 101010, the operation rule includes: and adding, wherein the second time can be 20, 10, 20 minutes, and the corresponding second password is: (|201020+101010| ═ 302030)
And S14, if the first password is consistent with the second password, executing decryption operation.
And comparing the consistency of the input first password with the calculated second password, if the first password is consistent with the second facial mask, indicating that the first password input by the user is correct, executing the decryption operation of the file, and setting the current access authority of the text as normal access.
According to the decryption method provided by the embodiment of the invention, the input first password is received, and the first password is determined by the secret key and the first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; if the first password is consistent with the second password, decryption operation is executed, the password after the file encryption is ensured to be dynamically changed by taking the system time as a parameter of the file encryption, even if the password is leaked carelessly when the password is input, the risk that the file is decrypted by other people is avoided, and the safety of the file is improved.
Fig. 2 is a schematic flowchart of an encryption method according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
and S21, receiving the input key.
In the embodiment of the invention, the target file is encrypted by adopting a key and time, the key is set by a creation user or a management user of the target file, and the key can comprise a preset character string and a preset operation rule.
Further, the preset character string may be composed of characters of any length, the characters may be numbers composed of 0 to 9, the length may be set by a user, the longer the length of the preset character string is, the higher the complexity of the key is, the greater the difficulty of being deciphered is, for example, the preset character string may be replaced by numbers composed of 4 bits 0 to 9, 6 bits 0 to 9, 8 bits 0 to 9, and so on.
The preset operation rule at least comprises one of the following steps: in this embodiment, the length of the preset character string, the specific numerical value of the preset character string, and the specific operation rule may be set according to actual requirements, and this embodiment is not limited specifically.
And S22, executing encryption operation on the target file by adopting a preset encryption rule and the key.
Specifically, the dynamic encryption operation is performed on the target file by adopting the system time and the secret key, so that the second password corresponding to the encrypted target file is dynamically updated along with the change of the system time.
In this embodiment, the purpose of dynamically encrypting the target file by using the system time and the key is that the system time is updated in real time, so that the password corresponding to the encrypted target file also changes along with the update of the system time, and further, when the input password is decrypted, the target file cannot be decrypted even if the password is leaked.
Further, the target file may be stored in a computer device, and an Application Package (APK) for performing an encryption operation is further provided in the computer device, and the encryption operation of the target file is performed through the APK.
Referring to fig. 3, a schematic diagram of an encryption interface according to an embodiment of the present invention is shown, where a user jumps to the encryption interface by selecting an encryption option, where the encryption interface includes: the method comprises the following steps of presetting a character string input area, a budget rule input area, an encryption button and a cancel button (used for canceling the encryption operation), receiving an input preset character string through the preset character string input area, receiving an input preset budget rule through the preset budget rule input area, calling an APK (android package) to execute the encryption operation on a target file by clicking the encryption button, wherein the corresponding encryption password is as follows: (| system time + preset operation rule + preset string |).
Fig. 4 is a schematic flowchart of another decryption method according to an embodiment of the present invention, and as shown in fig. 4, the method specifically includes:
and S41, when the operation of accessing the target file triggered by the user is detected, displaying the input box.
In the embodiment of the present invention, an encryption operation is performed on a target file in advance, a specific encryption process may refer to the related steps in fig. 2, access status monitoring is performed on the encrypted target file, and when an operation of accessing the target file triggered by a user is detected, an input box is popped up and displayed.
The input box is used for prompting an accessor to input the password of the target file, wherein a password input area and the first time are arranged on the input box, and the first time is the corresponding system time when the input box is displayed.
In an alternative of the embodiment of the present invention, the display input box is further provided with a third time corresponding to the second password, and the third time is a remaining time for reminding the user of inputting the first password.
Referring to fig. 5, a schematic diagram of a decryption interface according to an embodiment of the present invention is shown, where a user jumps to the decryption interface by selecting a decryption option, where the decryption interface includes: system time, remaining time, password input area, decryption button and cancel button (for canceling this decryption operation).
In an alternative of the embodiment of the present invention, the score is taken as the smallest calculation unit in consideration of the variation width of the time between the time of determining the first password and the time of determining the second password, that is, the score is counted from the first time and the second time.
Specifically, the visitor extracts the first time from the system time according to the minimum time unit "point" (for example, the first time corresponding to the decryption interface is 2020.10.10-14:20), the unit of the remaining time is "second", and the maximum duration is "59S", that is, the remaining time is: the first time jumps to the time difference between the next minute, and when the remaining time is '00: 00', the password of the target file is updated.
The visitor determines a first time according to the system time, and calculates and obtains a corresponding first password according to the obtained secret key, wherein the secret key comprises: presetting a character string and a preset operation rule, and determining a first target character string corresponding to the first time; determining the first password based on the preset operation rule, the first target character string and the preset character string.
In an alternative of the embodiment of the present invention, the lengths of the preset character string, the first target character string, and the second target character string are the same.
In another alternative of the embodiment of the present invention, if the lengths of the preset character string and the first and second target character strings are different, the lengths of the first and second target character strings are adjusted to be the same as the lengths of the actual preset character strings.
For example, the preset character string is 101010, and the preset operation rule is: and adding, wherein the first time is 2020.10.10-14:20, and the corresponding first target character string is: 202010101420, respectively; adjusting the length of the first target character string, wherein the adjusted first target character string is as follows: 101420, the corresponding first password is: (|101420+101010| ═ 203430).
When the lengths of the first target character string and the second character string are greater than the preset character string, determining the adjusted first target character string and the adjusted second character string which have the same length as the preset character string from right to left; and when the lengths of the first target character string and the second character string are smaller than the preset character string, from right to left, the missing bits are filled with zero.
And S42, when the password input area is detected to receive the input first password, determining the system time corresponding to the first password as the second time.
And detecting whether a first password is input in a password input area in the decryption interface, and when the password input area is detected to receive the input first password, determining the system time corresponding to the reception of the first password as the second time, wherein the system time corresponding to the reception can be determined by the system time of the decryption interface.
For example, the second time is 2020.10.10-14: 20.
And S43, determining a second target character string corresponding to the second time.
S44, generating the second password based on the preset operation rule, the second target character string and the preset character string.
For example, the preset character string is 101010, and the preset operation rule is: and adding, wherein the second time is 2020.10.10-14:20, and the corresponding second target character string is: 202010101420, respectively; adjusting the length of the second target character string, wherein the adjusted second target character string is as follows: 101420, the corresponding first password is: (|101420+101010| ═ 203430).
And S45, if the first password is consistent with the second password, executing decryption operation.
And S46, if the first password is not consistent with the second password, redisplaying the input box to prompt the user to input the first password again.
After the second password is obtained, consistency comparison is carried out on the first password and the second password, if the first password is consistent with the second password, the APK is called to carry out encryption operation on the encrypted target file, so that an accessor can obtain the authority of the target file; if the first password is not consistent with the second password (the first password input by the surface visitor is wrong), the input box is displayed again to prompt the user to input the first password again.
According to the decryption method provided by the embodiment of the invention, the input first password is received, and the first password is determined by the secret key and the first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; if the first password is consistent with the second password, decryption operation is executed, the password after the file encryption is ensured to be dynamically changed by taking the system time as a parameter of the file encryption, even if the password is leaked carelessly when the password is input, the risk that the file is decrypted by other people is avoided, and the safety of the file is improved.
Fig. 6 is a schematic structural diagram of a decryption device according to an embodiment of the present invention, and as shown in fig. 6, the structure specifically includes:
a receiving module 601, configured to receive an input first password, where the first password is determined by a key and a first time;
a determining module 602, configured to determine a second time corresponding to the reception of the first password;
a generating module 603 configured to generate a second password based on the second time and the key;
the control module 604 is configured to execute a decoding operation if the first password is consistent with the second password.
The decryption apparatus provided in this embodiment may be the decryption apparatus shown in fig. 6, and may perform all the steps of the decryption method shown in fig. 1 to 5, so as to achieve the technical effects of the decryption method shown in fig. 1 to 5, which are described with reference to fig. 1 to 5 for brevity and will not be described herein again.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention, where the computer device 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in the computer device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In the embodiment of the present invention, the processor 701 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022, for example, and includes:
receiving an input first password, the first password being determined by a key and a first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; and if the first password is consistent with the second password, executing decryption operation.
In one possible embodiment, the key comprises: presetting a character string and a preset operation rule;
determining a first target character string corresponding to the first time; determining the first password based on the preset operation rule, the first target character string and the preset character string.
In one possible implementation, a second target character string corresponding to the second time is determined; and generating the second password based on the preset operation rule, the second target character string and the preset character string.
In a possible implementation manner, when an operation of accessing a target file triggered by a user is detected, an input box is displayed, a password input area and the first time are arranged on the input box, and the first time is corresponding system time when the input box is displayed; and receiving the input first password through the password input area.
In one possible embodiment, when it is detected that the password input area receives the input first password, the system time corresponding to the reception of the first password is determined as the second time.
In a possible implementation manner, the display input box is further provided with a third time corresponding to the second password, and the third time is the remaining time for reminding the user of inputting the first password.
In one possible embodiment, an input key is received, the key comprising: presetting a character string and a preset operation rule; and executing encryption operation on the target file by adopting a preset encryption rule and the secret key.
In a possible implementation manner, the dynamic encryption operation is performed on the target file by using the system time and the key, so that the second password corresponding to the encrypted target file is dynamically updated along with the change of the system time.
In one possible embodiment, if the first password is not consistent with the second password, the input box is displayed again to prompt the user to input the first password again.
In one possible embodiment, the preset operation rule includes at least one of the following: addition, subtraction, multiplication or division;
the preset character string, the first target character string and the second target character string are the same in length.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention 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 the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The computer device provided in this embodiment may be the computer device shown in fig. 7, and may perform all the steps of the decryption method shown in fig. 1-2, so as to achieve the technical effect of the decryption method shown in fig. 1-2, and for brevity, it is described with reference to fig. 1-2, and details are not repeated here.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors to implement the above-described decryption method performed on the decryption device side.
The processor is configured to execute the decryption program stored in the memory to implement the following steps of the decryption method executed on the side of the decryption device:
receiving an input first password, the first password being determined by a key and a first time; determining a second time corresponding to the first password when the first password is received; generating a second password based on the second time and the key; and if the first password is consistent with the second password, executing decryption operation.
In one possible embodiment, the key comprises: presetting a character string and a preset operation rule;
determining a first target character string corresponding to the first time; determining the first password based on the preset operation rule, the first target character string and the preset character string.
In one possible implementation, a second target character string corresponding to the second time is determined; and generating the second password based on the preset operation rule, the second target character string and the preset character string.
In a possible implementation manner, when an operation of accessing a target file triggered by a user is detected, an input box is displayed, a password input area and the first time are arranged on the input box, and the first time is corresponding system time when the input box is displayed; and receiving the input first password through the password input area.
In one possible embodiment, when it is detected that the password input area receives the input first password, the system time corresponding to the reception of the first password is determined as the second time.
In a possible implementation manner, the display input box is further provided with a third time corresponding to the second password, and the third time is the remaining time for reminding the user of inputting the first password.
In one possible embodiment, an input key is received, the key comprising: presetting a character string and a preset operation rule; and executing encryption operation on the target file by adopting a preset encryption rule and the secret key.
In a possible implementation manner, the dynamic encryption operation is performed on the target file by using the system time and the key, so that the second password corresponding to the encrypted target file is dynamically updated along with the change of the system time.
In one possible embodiment, if the first password is not consistent with the second password, the input box is displayed again to prompt the user to input the first password again.
In one possible embodiment, the preset operation rule includes at least one of the following: addition, subtraction, multiplication or division;
the preset character string, the first target character string and the second target character string are the same in length.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (13)

1. A decryption method, comprising:
receiving an input first password, the first password being determined by a key and a first time;
determining a second time corresponding to the first password when the first password is received;
generating a second password based on the second time and the key;
and if the first password is consistent with the second password, executing decryption operation.
2. The method of claim 1, wherein the key comprises: presetting a character string and a preset operation rule;
the first password is determined by a key and a first time, and comprises:
determining a first target character string corresponding to the first time;
determining the first password based on the preset operation rule, the first target character string and the preset character string.
3. The method of claim 2, wherein generating a second password based on the second time and the key comprises:
determining a second target character string corresponding to the second time;
and generating the second password based on the preset operation rule, the second target character string and the preset character string.
4. The method of claim 1, wherein receiving the input first password comprises:
when an operation of accessing a target file triggered by a user is detected, displaying an input box, wherein a password input area and the first time are arranged on the input box, and the first time is corresponding system time when the input box is displayed;
and receiving the input first password through the password input area.
5. The method of claim 4, wherein determining the second time corresponding to the receipt of the first password comprises:
when it is detected that the password input area receives an input first password, determining the system time corresponding to the reception of the first password as the second time.
6. The method of claim 4, further comprising:
and the display input box is also provided with third time corresponding to the second password, and the third time is the remaining time for reminding the input of the first password.
7. The method of claim 1, further comprising:
receiving an input key, the key comprising: presetting a character string and a preset operation rule;
and executing encryption operation on the target file by adopting a preset encryption rule and the secret key.
8. The method of claim 7, wherein performing an encryption operation on the target file using the preset encryption rule and the key comprises:
and executing dynamic encryption operation on the target file by adopting system time and the key so as to dynamically update the second password corresponding to the encrypted target file along with the change of the system time.
9. The method according to any one of claims 1-8, further comprising:
if the first password is inconsistent with the second password, the input box is displayed again to prompt the user to input the first password again.
10. The method according to claim 2 or 7, wherein the predetermined operation rule comprises at least one of the following: addition, subtraction, multiplication or division;
the preset character string, the first target character string and the second target character string are the same in length.
11. A decryption apparatus, comprising:
the receiving module is used for receiving an input first password, and the first password is determined by a secret key and a first time;
the determining module is used for determining a second time corresponding to the first password when the first password is received;
a generating module to generate a second password based on the second time and the key;
and the control module is used for executing decoding operation if the first password is consistent with the second password.
12. A computer device, comprising: a processor and a memory, the processor being configured to execute a decryption program stored in the memory to implement the decryption method of any one of claims 1 to 10.
13. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the decryption method of any one of claims 1 to 10.
CN202011206702.7A 2020-11-02 2020-11-02 Decryption method, decryption device, computer equipment and storage medium Pending CN112287369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011206702.7A CN112287369A (en) 2020-11-02 2020-11-02 Decryption method, decryption device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011206702.7A CN112287369A (en) 2020-11-02 2020-11-02 Decryption method, decryption device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112287369A true CN112287369A (en) 2021-01-29

Family

ID=74352907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011206702.7A Pending CN112287369A (en) 2020-11-02 2020-11-02 Decryption method, decryption device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112287369A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202631A (en) * 2007-12-21 2008-06-18 任少华 System and method for identification authentication based on cipher key and timestamp
CN106161008A (en) * 2016-06-14 2016-11-23 青岛海信移动通信技术股份有限公司 A kind of terminal encryption method, terminal encryption device and terminal
CN107483432A (en) * 2017-08-10 2017-12-15 广州杰之良软件有限公司 File encryption processing method and processing device
CN108462686A (en) * 2018-01-08 2018-08-28 平安科技(深圳)有限公司 Acquisition methods, device, terminal device and the storage medium of dynamic key
CN109167666A (en) * 2018-08-31 2019-01-08 深圳众赢维融科技有限公司 Identifying code generation, decryption, method of mobile payment and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202631A (en) * 2007-12-21 2008-06-18 任少华 System and method for identification authentication based on cipher key and timestamp
CN106161008A (en) * 2016-06-14 2016-11-23 青岛海信移动通信技术股份有限公司 A kind of terminal encryption method, terminal encryption device and terminal
CN107483432A (en) * 2017-08-10 2017-12-15 广州杰之良软件有限公司 File encryption processing method and processing device
CN108462686A (en) * 2018-01-08 2018-08-28 平安科技(深圳)有限公司 Acquisition methods, device, terminal device and the storage medium of dynamic key
CN109167666A (en) * 2018-08-31 2019-01-08 深圳众赢维融科技有限公司 Identifying code generation, decryption, method of mobile payment and device

Similar Documents

Publication Publication Date Title
US8175268B2 (en) Generating and securing archive keys
JP6516342B2 (en) Access data tampering prevention method and portable terminal
EP3644181A1 (en) Embedded program secure boot method, apparatus and device, and storage medium
EP1325401B1 (en) System for protecting static and dynamic data against unauthorised manipulation
US8045708B2 (en) Discrete key generation method and apparatus
CN109726571B (en) Electronic signature method and device for document, storage medium and electronic equipment
EP3886354A1 (en) Computation on encrypted data using somewhat fully homomorphic encryption without bootstrapping using trusted third party
JP5052287B2 (en) Robot unauthorized use prevention device and robot unauthorized use prevention method
CN109829329B (en) Method and device for decrypting electronic signature document, storage medium and electronic equipment
CA2778805C (en) Saving and retrieving data based on public key encryption
JP6554103B2 (en) How to protect secret data when used in cryptographic algorithms
US20130064365A1 (en) Data Destruction
US8494169B2 (en) Validating encrypted archive keys
CN115509587B (en) Firmware upgrading method and device, electronic equipment and computer readable storage medium
CN106127558B (en) Bill generation method and mobile terminal
CN112287369A (en) Decryption method, decryption device, computer equipment and storage medium
US20140129977A1 (en) Notification Hardening
CN116361849A (en) Backup data encryption and decryption method and device for encrypted database
KR20010054151A (en) Method for generating one-time password in a portable card
US20150310230A1 (en) Cryptographic processing apparatus, cryptographic processing system, and cryptographic processing method
KR102284877B1 (en) Efficient functional encryption for set intersection
CN110516468B (en) Method and device for encrypting memory snapshot of virtual machine
US11310218B2 (en) Password streaming
US10505714B2 (en) Floating point cohort based encryption
CN113343215A (en) Embedded software authorization and authentication method and electronic 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