Decryption method, device, computer equipment and storage medium

By receiving the first password input and generating the second password based on the key and time, and performing decryption operations if consistent, the problem of low file security due to fixed encryption key is solved, dynamic encryption password is realized, and file security is improved.

CN112287369BActive Publication Date: 2025-06-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011206702.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-02
Publication Date
2025-06-10
Estimated Expiration
2040-11-02

AI Technical Summary

Technical Problem

In the prior art, a fixed encryption key is used to encrypt the file, resulting in low security of the file and easy to be decrypted by others.

Method used

By receiving the input first password, the password is determined by the key and the first time, the second time corresponding to the first password is determined, and a second password is generated based on the second time and the key. If the first password is consistent with the second password, the decryption operation is performed.

Benefits of technology

By using system time as a parameter for file encryption, the encrypted password changes dynamically, even if the password is leaked, it will not cause the risk of the file being decrypted by others, improving the security of the file.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112287369B_ABST
    Figure CN112287369B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention relates to a decryption method, device, computer device, and storage medium, including: receiving an input first password, where the first password is determined by a key and a first time; determining a second time corresponding to 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, perform a decryption operation. By using the system time as a parameter for file encryption, it is ensured that the password after file encryption is dynamically changed. Even if the password is accidentally leaked when entering the password, there is no risk of the file being decrypted by others, improving the security of the file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of security, and in particular, to a decryption method, apparatus, computer device, and storage medium. Background Art

[0002] To securely store computer files, a user sets an encryption key to encrypt the file and then stores the encrypted file in the computer. In addition, when opening the file, the user inputs a decryption key to decrypt the encrypted file and execute the file.

[0003] However, in existing file encryption methods, the encryption key and the decryption key are usually kept unchanged, that is, a fixed password is used for file decryption. There is a risk of leakage of the fixed password. Therefore, the method of encrypting files with a fixed encryption key is easily decrypted by others and has low security. Summary of the Invention

[0004] In view of this, to solve the technical problem of low file security caused by the above-mentioned form of encrypting files with a fixed encryption key, embodiments of the present invention provide a decryption method, apparatus, computer device, and storage medium.

[0005] In a first aspect, an embodiment of the present invention provides a decryption method, including:

[0006] Receiving a first password input, where the first password is determined by a key and a first time;

[0007] Determining a second time corresponding to when the first password is received;

[0008] Generating a second password based on the second time and the key;

[0009] If the first password is the same as the second password, performing a decryption operation.

[0010] In a possible implementation, the key includes: a preset string and a preset operation rule;

[0011] The first password being determined by a key and a first time includes:

[0012] Determining a first target string corresponding to the first time;

[0013] Determining the first password based on the preset operation rule, the first target string, and the preset string.

[0014] In a possible implementation, the generating a second password based on the second time and the key includes:

[0015] Determining a second target string corresponding to the second time;

[0016] Generate the second password based on the preset operation rule, the second target string, and the preset string.

[0017] In a possible implementation, the receiving the input first password includes:

[0018] When detecting an operation of the user to access the target file, display an input box, where a password input area and the first time are set on the input box, and the first time is the system time corresponding to when the input box is displayed;

[0019] Receive the input first password through the password input area.

[0020] In a possible implementation, the determining the second time corresponding to when the first password is received includes:

[0021] When detecting that the first password is received in the password input area, determine the system time corresponding to when the first password is received as the second time.

[0022] In a possible implementation, the method further includes:

[0023] The displayed 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 input of the first password.

[0024] In a possible implementation, the method further includes:

[0025] Receive the input key, where the key includes: a preset string and a preset operation rule;

[0026] Perform an encryption operation on the target file using a preset encryption rule and the key.

[0027] In a possible implementation, the performing an encryption operation on the target file using a preset encryption rule and the key includes:

[0028] Perform a dynamic encryption operation on the target file using the system time and the key, so that the second password corresponding to the target file after encryption is dynamically updated with the change of the system time.

[0029] In a possible implementation, the method further includes:

[0030] If the first password is inconsistent with the second password, re-display the input box to prompt re-entering the first password.

[0031] In a possible implementation, the preset operation rule includes at least one of the following: addition, subtraction, multiplication, or division;

[0032] The lengths of the preset string, the first target string, and the second target string are the same.

[0033] In a second aspect, an embodiment of the present invention provides a decryption device, including:

[0034] A receiving module, configured to receive an input first password, where the first password is determined by a key and a first time;

[0035] A determining module, configured to determine a second time corresponding to when the first password is received;

[0036] A generating module, configured to generate a second password based on the second time and the key;

[0037] A control module, configured to perform a decoding operation if the first password is consistent with the second password.

[0038] In a third aspect, an embodiment of the present invention provides a computer device, including: a processor and a memory, where the processor is configured to execute a decryption program stored in the memory to implement the decryption method according to any one of the above first aspects.

[0039] 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 can be executed by one or more processors to implement the decryption method according to any one of the above first aspects.

[0040] The decryption solution provided by the embodiment of the present invention receives an input first password, where the first password is determined by a key and a first time; determines a second time corresponding to when the first password is received; generates a second password based on the second time and the key; and if the first password is consistent with the second password, performs a decryption operation. By using the system time as a parameter for file encryption, it is ensured that the password after file encryption is dynamically changed. Even if the password is accidentally leaked when entering the password, there is no risk of the file being decrypted by others, thus enhancing the security of the file. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic flowchart of a decryption method provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic flowchart of an encryption method provided by an embodiment of the present invention;

[0043] Figure 3 It is a schematic diagram of an encryption interface related to an embodiment of the present invention;

[0044] Figure 4 Schematic flowchart of another decryption method provided by an embodiment of the present invention;

[0045] Figure 5 Schematic diagram of a decryption interface related to an embodiment of the present invention;

[0046] Figure 6 Schematic structural diagram of a decryption device provided by an embodiment of the present invention;

[0047] Figure 7 Schematic structural diagram of a computer device provided by an embodiment of the present invention. Detailed implementation manners

[0048] To make the objectives, 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 accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0049] For ease of understanding of the embodiments of the present invention, the following will further explain with specific embodiments with reference to the accompanying drawings. The embodiments do not constitute a limitation to the embodiments of the present invention.

[0050] Figure 1 Schematic flowchart of a decryption method provided by an embodiment of the present invention, as Figure 1 shown, the method specifically includes:

[0051] S11. Receive an input first password.

[0052] The decryption method provided by the embodiments of the present invention is applied to the encryption / decryption process of files. The files are pre-encrypted using a preset encryption rule so that the password corresponding to the encrypted file is dynamically updated with the system time.

[0053] Further, the first password corresponding to the encrypted file is determined by a key and a first time. The first time is the current system time corresponding to when the decryption operation is difficult to perform. The key is set by the encryptor when performing the encryption operation on the file. The key may include a string and an operation rule.

[0054] Specifically, the key and the first time are converted into strings of the same format, and the converted key and first time are subjected to one or more operations to obtain the first password.

[0055] For example, the secret key includes: the character 101010, the operation rule includes: addition, the first time can be 10:20 on the 20th, and the corresponding first password is: (|201020 + 101010| = 302030);

[0056] Another example, the secret key includes: the character 1010, the operation rule includes: addition, the first time can be 10:20 on the 20th, and the corresponding first password is: (|1020 + 1010| = 2030);

[0057] It should be noted that when the length of the character in the secret key is the same as the length of the first time, the operation between the secret key and the first time is directly performed. When the length of the character in the secret key is different from the length of the first time, the minimum length between the two is used as the calculation standard, and the determination of the character length is from right to left.

[0058] S12. Determine the second time corresponding to when the first password is received.

[0059] When it is detected that the first password is input, obtain the second time corresponding to when the first password is received, and the second time is the current system time corresponding to when the first password is received.

[0060] Furthermore, considering the change range of the time between the determination time of the first password and the determination time of the second password, minutes are used as the smallest calculation unit, that is, the first time and the second time are counted to the minute.

[0061] S13. Generate a second password based on the second time and the secret key.

[0062] Convert the second time and the secret key into strings of the same format, and perform one or more operations on the converted secret key and the second time to obtain the second password.

[0063] For example, the secret key includes: the character 101010, the operation rule includes: addition, the second time can be 10:20 on the 20th, and the corresponding second password is: (|201020 + 101010| = 302030)

[0064] S14. If the first password is the same as the second password, perform the decryption operation.

[0065] Compare the input first password with the calculated second password for consistency. If the first password is the same as the second password, it indicates that the first password input by the user is correct, then perform the decryption operation of the file, and set the access permission for this text this time to normal access.

[0066] The decryption method provided by the embodiments of the present invention receives the input first password, which is determined by a key and a first time; determines the second time corresponding to the reception of the first password; generates a second password based on the second time and the key; if the first password is consistent with the second password, then performs a decryption operation. By using the system time as a parameter for file encryption, it is ensured that the password after file encryption is dynamically changed. Even if the password is accidentally leaked when inputting the password, there is no risk of the file being decrypted by others, improving the security of the file.

[0067] Figure 2 It is a schematic flowchart of an encryption method provided by the embodiments of the present invention, as Figure 2 shown, and the method specifically includes:

[0068] S21. Receive the input key.

[0069] In the embodiments of the present invention, a target file is encrypted using a key and time. The key is set by the creating user or managing user of the target file, and the key may include a preset string and a preset operation rule.

[0070] Further, the preset string can be composed of characters of any length. The characters can be numbers composed of 0-9, and the length can be custom-set. The longer the length of the preset string, the higher the complexity of the key and the greater the difficulty of being deciphered. For example, the preset string can also be a 4-digit number composed of 0-9, a 6-digit number composed of 0-9, an 8-digit number composed of 0-9, and so on.

[0071] The preset operation rule includes at least one of the following: addition, subtraction, multiplication, or division. In this embodiment, for the length of the preset string, the specific value of the preset string, and the specific operation rule, they can be set according to actual needs, and this embodiment does not make specific limitations.

[0072] S22. Perform an encryption operation on the target file using a preset encryption rule and the key.

[0073] Specifically, a dynamic encryption operation is performed on the target file using the system time and the key, so that the second password corresponding to the target file after encryption is dynamically updated with the change of the system time.

[0074] In this embodiment, the purpose of performing dynamic encryption on the target file 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 will also change with the update of the system time. Furthermore, when decrypting by inputting the password, even if the password is leaked, it will not cause the target file to be deciphered.

[0075] Further, the target file can be stored in a computer device, and an application program package (Android application package, APK) for performing encryption operations is also set in the computer device, and the encryption operation of the target file is performed through the APK.

[0076] Referring to Figure 3 , a schematic diagram of an encryption interface according to an embodiment of the present invention is shown. The user jumps to the encryption interface by selecting an encryption option. The encryption interface includes: a preset string input area, a preset budget rule input area, an encryption button, and a cancel button (for canceling the current encryption operation). The preset string input area receives the input preset string, the preset budget rule input area receives the input preset budget rule, and the encryption button is clicked to call the APK to perform the encryption operation on the target file. The corresponding encryption password is: (|system time + preset operation rule + preset string|).

[0077] Figure 4 It is a schematic flowchart of another decryption method provided by an embodiment of the present invention. As Figure 4 shown, the method specifically includes:

[0078] S41. When it is detected that the user triggers an operation to access the target file, an input box is displayed.

[0079] In the embodiment of the present invention, the target file is encrypted in advance. For the specific encryption process, reference can be made to the relevant steps above Figure 2 . The access status of the encrypted target file is monitored. When it is detected that the user triggers an operation to access the target file, an input box is popped up and displayed.

[0080] The input box is used to prompt the visitor to enter the password of the target file. Among them, a password input area and the first time are set on the input box, and the first time is the system time corresponding to the display time of the input box.

[0081] In an alternative solution of the embodiment of the present invention, the 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 input of the first password.

[0082] Referring to Figure 5 , a schematic diagram of a decryption interface according to an embodiment of the present invention is shown. The user jumps to the decryption interface by selecting a decryption option. The decryption interface includes: system time, remaining time, password input area, decryption button, and cancel button (for canceling the current decryption operation).

[0083] In an alternative solution of the embodiment of the present invention, considering the variation range of the time between the determination time of the first password and the determination time of the second password, minutes are used as the smallest calculation unit, that is, the first time and the second time are counted in minutes.

[0084] Specifically, the visitor extracts the first time from the system time according to the smallest time unit "minute" (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 time difference between the first time and the next minute. When the remaining time is "00:00", the password of the target file is updated.

[0085] The visitor determines the first time according to the system time, and calculates the corresponding first password according to the obtained key. The key includes: a preset string and a preset operation rule, and determines the first target string corresponding to the first time; determines the first password based on the preset operation rule, the first target string and the preset string.

[0086] In an alternative solution of the embodiment of the present invention, the preset string, the first target string, and the second target string have the same length.

[0087] In another alternative solution of the embodiment of the present invention, if the lengths of the preset string, the first target string, and the second target string are not the same, the lengths of the first target string and the second target string are adjusted to be the same as the length of the true preset string.

[0088] For example, the preset string is 101010, the preset operation rule is: addition, the first time is 2020.10.10 - 14:20, and the corresponding first target string is: 202010101420; adjust the length of the first target string, and the adjusted first target string is: 101420, and the corresponding first password is: (|101420 + 101010| = 203430).

[0089] It should be noted that when the lengths of the first target string and the second string are greater than the preset string, determine the adjusted first target string and second string with the same length as the preset string from right to left; when the lengths of the first target string and the second string are less than the preset string, from right to left, the missing bits are filled with zeros.

[0090] S42. When it is detected that the first password is input in the password input area, determine the system time corresponding to the reception of the first password as the second time.

[0091] Detect whether the first password is input in the password input area of the decryption interface. When it is detected that the first password is received in the password input area, determine the system time corresponding to the reception of the first password as the second time, and the system time corresponding to the reception can be determined by the system time of the decryption interface.

[0092] For example, the second time is 2020.10.10 - 14:20.

[0093] S43. Determine the second target string corresponding to the second time.

[0094] S44. Generate the second password based on the preset operation rule, the second target string, and the preset string.

[0095] For example, the preset string is 101010, the preset operation rule is addition, the second time is 2020.10.10 - 14:20, and the corresponding second target string is 202010101420; adjust the length of the second target string, and the adjusted second target string is 101420, and the corresponding first password is: (|101420 + 101010| = 203430).

[0096] S45. If the first password is the same as the second password, perform the decryption operation.

[0097] S46. If the first password is not the same as the second password, redisplay the input box to prompt for re - input of the first password.

[0098] After obtaining the second password, compare the first password and the second password for consistency. If the first password is the same as the second password, call the APK to perform an encryption operation on the encrypted target file so that the visitor can obtain the permission to access the target file; if the first password is not the same as the second password (indicating that the first password input by the visitor is incorrect), redisplay the input box to prompt for re - input of the first password.

[0099] The decryption method provided by the embodiments of the present invention, by receiving the input first password, where the first password is determined by the key and the first time; determining the second time corresponding to the reception of the first password; generating the second password based on the second time and the key; if the first password is the same as the second password, perform the decryption operation. By using the system time as a parameter for file encryption, it ensures that the password after file encryption is dynamically changed. Even if the password is accidentally leaked when inputting the password, there is no risk of the file being decrypted by others, improving the security of the file.

[0100] Figure 6 It is a schematic structural diagram of a decryption device provided by the embodiments of the present invention, asFigure 6 As shown, the structure specifically includes:

[0101] A receiving module 601, configured to receive an input first password, where the first password is determined by a key and a first time;

[0102] A determining module 602, configured to determine a second time corresponding to when the first password is received;

[0103] A generating module 603, configured to generate a second password based on the second time and the key;

[0104] A control module 604, configured to perform a decoding operation if the first password is consistent with the second password.

[0105] The decryption device provided in this embodiment may be the decryption device as shown in Figure 6 and can execute all steps of the decryption method as shown in Figures 1-5 to achieve the technical effects of the decryption method shown in Figures 1-5 For specific details, please refer to Figures 1-5 the relevant description. For the sake of brief description, it will not be elaborated here.

[0106] Figure 7 is a schematic structural diagram of a computer device provided in an embodiment of the present invention. Figure 7 The computer device 700 shown includes: at least one processor 701, a memory 702, at least one network interface 704, and other user interfaces 703. Each component in the computer device 700 is coupled together through a bus system 705. It can be understood that the bus system 705 is used to implement connection communication between these components. In addition to including a data bus, the bus system 705 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 7 all kinds of buses are labeled as the bus system 705.

[0107] Among them, the user interface 703 may include a display, a keyboard, or a pointing device (such as a mouse, a trackball, a touchpad, or a touch screen, etc.).

[0108] It can be understood that the memory 702 in the embodiments of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synch link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The memory 702 described herein is intended to include but not be limited to these and any other suitable types of memory.

[0109] In some embodiments, the memory 702 stores the following elements, executable units or data structures, or subsets or supersets thereof: the operating system 7021 and the application program 7022.

[0110] Among them, the operating system 7021 includes various system programs, such as the framework layer, the core library layer, the driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 7022 includes various application programs, such as a media player and a browser, etc., for implementing various application services. The program for implementing the method of the embodiments of the present invention can be included in the application program 7022.

[0111] In the embodiments of the present invention, by calling the program or instruction stored in the memory 702, specifically, the program or instruction stored in the application program 7022, the processor 701 is used to execute the method steps provided in each method embodiment, for example, including:

[0112] Receive the first password as input, where the first password is determined by a key and a first time; determine the second time corresponding to when the first password is received; generate a second password based on the second time and the key; if the first password is consistent with the second password, perform a decryption operation.

[0113] In a possible implementation, the key includes: a preset string and a preset operation rule;

[0114] Determine the first target string corresponding to the first time; determine the first password based on the preset operation rule, the first target string, and the preset string.

[0115] In a possible implementation, determine the second target string corresponding to the second time; generate the second password based on the preset operation rule, the second target string, and the preset string.

[0116] In a possible implementation, when detecting an operation by the user to access the target file, display an input box, where a password input area and the first time are set on the input box, and the first time is the system time corresponding to when the input box is displayed; receive the first password as input through the password input area.

[0117] In a possible implementation, when detecting that the first password is received in the password input area, determine the system time corresponding to when the first password is received as the second time.

[0118] In a possible implementation, the displayed input box is further set with the third time corresponding to the second password, and the third time is the remaining time to remind of the input of the first password.

[0119] In a possible implementation, receive the key as input, where the key includes: a preset string and a preset operation rule; perform an encryption operation on the target file using a preset encryption rule and the key.

[0120] In a possible implementation, perform a dynamic encryption operation on the target file using the system time and the key, so that the second password corresponding to the encrypted target file is dynamically updated as the system time changes.

[0121] In a possible implementation, if the first password is not consistent with the second password, re-display the input box to prompt re-input of the first password.

[0122] In a possible implementation, the preset operation rule includes at least one of the following: addition, subtraction, multiplication, or division;

[0123] The lengths of the preset string, the first target string, and the second target string are the same.

[0124] The method disclosed in the embodiments of the present invention described above can be applied to or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by the integrated logic circuit in hardware or instructions in software form in the processor 701. The above-mentioned processor 701 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software unit may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and combines its hardware to complete the steps of the above method.

[0125] It can be understood that these embodiments described herein can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in 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, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or a combination thereof.

[0126] For software implementation, the techniques described herein can be implemented by units that execute the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented within the processor or external to the processor.

[0127] The computer device provided in this embodiment can be a computer device as shown in Figure 7 and can execute all steps of the decryption method as shown in Figures 1-2 , thereby achieving the technical effects of the decryption method shown in Figures 1-2 . For specific details, please refer to Figures 1-2 the relevant description. For the sake of brevity, it will not be elaborated here.

[0128] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. Among them, the storage medium can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state drive; the memory can also include a combination of the above types of memory.

[0129] When one or more programs in the storage medium can be executed by one or more processors to implement the decryption method executed on the decryption device side as described above.

[0130] The processor is used to execute the decryption program stored in the memory to implement the following steps of the decryption method executed on the decryption device side:

[0131] Receive the input first password, which is determined by the key and the first time; determine the second time corresponding to when the first password is received; generate a second password based on the second time and the key; if the first password is consistent with the second password, perform the decryption operation.

[0132] In a possible implementation manner, the key includes: a preset string and a preset operation rule;

[0133] Determine the first target string corresponding to the first time; determine the first password based on the preset operation rule, the first target string and the preset string.

[0134] In a possible implementation manner, determine the second target string corresponding to the second time; generate the second password based on the preset operation rule, the second target string and the preset string.

[0135] In a possible implementation, when an operation of accessing a target file triggered by a user is detected, an input box is displayed. A password input area and a first time are set on the input box, and the first time is the system time corresponding to when the input box is displayed; a first password entered is received through the password input area.

[0136] In a possible implementation, when it is detected that the first password entered is received through the password input area, the system time corresponding to the reception of the first password is determined as the second time.

[0137] In a possible implementation, a third time corresponding to the second password is further set on the displayed input box, and the third time is the remaining time for reminding the input of the first password.

[0138] In a possible implementation, a received key is received, and the key includes: a preset string and a preset operation rule; an encryption operation is performed on the target file by using a preset encryption rule and the key.

[0139] In a possible implementation, a 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 as the system time changes.

[0140] In a possible implementation, if the first password is inconsistent with the second password, the input box is redisplayed to prompt re - entry of the first password.

[0141] In a possible implementation, the preset operation rule includes at least one of the following: addition, subtraction, multiplication, or division;

[0142] The lengths of the preset string, the first target string, and the second target string are the same.

[0143] Those skilled in the art should further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0144] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented in hardware, software modules executed by a processor, or a combination of both. The software modules may be placed in a random access memory (RAM), internal 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.

[0145] The specific embodiments described above have further elaborated on the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A decryption method, characterized in that, it includes: receiving an input first password, which is determined by a key and a first time, the first time being the system time corresponding to when the input box is displayed, the input box being displayed when detecting an operation by the user to access a target file, the target file being encrypted by the key and the system time, and the second password corresponding to the target file being dynamically updated as the system time changes; the key includes: a preset string and a preset operation rule, and the key is set by the creating user or the managing user of the target file; the first password is determined by the key and the first time, including: determining a first target string corresponding to the first time; converting the key and the first time into strings of the same format; when the length of the string in the key is the same as the length of the first target string, performing an operation on the string corresponding to the key and the first target string; when the length of the characters in the key is different from the length of the first target string, using the minimum length between the two as the calculation standard, and determining the length of the string from right to left; determining the first password based on the preset operation rule, the first target string, and the preset string; determining a second time corresponding to when the first password is received, the time interval between the second time and the first time being less than the minimum time unit of the system time; generating a second password based on the second time and the key; the generating a second password based on the second time and the key includes: determining a second target string corresponding to the second time; converting the key and the second time into strings of the same format; when the length of the string in the key is the same as the length of the second target string, performing an operation on the string corresponding to the key and the second target string; when the length of the characters in the key is different from the length of the second target string, using the minimum length between the two as the calculation standard, and determining the length of the string from right to left; generating the second password based on the preset operation rule, the second target string, and the preset string; if the first password is the same as the second password, performing a decryption operation.

2. The method according to claim 1, characterized in that, the receiving the input first password includes: when detecting an operation by the user to access a target file, displaying an input box, on which a password input area and the first time are set, the first time being the system time corresponding to when the input box is displayed; receiving the input first password through the password input area.

3. The method according to claim 2, characterized in that, the determining the second time corresponding to when the first password is received includes: when detecting that the first password is received through the password input area, determining the system time corresponding to when the first password is received as the second time.

4. The method according to claim 2, characterized in that, the method further includes: 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 input of the first password.

5. The method according to claim 1, wherein, the method further comprises: receiving an input key, the key comprising: a preset string and a preset operation rule; performing an encryption operation on the target file by using a preset encryption rule and the key.

6. The method according to claim 5, wherein, the performing an encryption operation on the target file by using a preset encryption rule and the key comprises: performing a dynamic encryption operation on the target file by using the system time and the key, so that the second password corresponding to the target file after encryption is dynamically updated with the change of the system time.

7. The method according to any one of claims 1-6, wherein, the method further comprises: if the first password is inconsistent with the second password, redisplaying the input box to prompt for re-input of the first password.

8. The method according to claim 2 or 5, wherein, the preset operation rule at least includes one of the following: addition, subtraction, multiplication or division; the lengths of the preset string, the first target string and the second target string are the same.

9. A decryption device, wherein, it comprises: a receiving module, configured to receive an input first password, the first password being determined by a key and a first time, the key comprising: a preset string and a preset operation rule, the first time being the system time corresponding to when the input box is displayed, the input box being displayed when detecting an operation by the user to access the target file, the target file being encrypted by the key and the system time, and the second password corresponding to the target file being dynamically updated with the change of the system time; the key is set by the creating user or the managing user of the target file; a determining module, configured to determine a second time corresponding to when the first password is received, the time interval between the second time and the first time being less than the minimum time unit of the system time; determining a first target string corresponding to the first time; converting the key and the first time into strings of the same format; when the lengths of the strings in the key and the first target string are the same, performing an operation on the string corresponding to the key and the first target string; when the lengths of the characters in the key and the first target string are different, taking the minimum of the two lengths as the calculation standard, and determining the length of the string from right to left; determining the first password based on the preset operation rule, the first target string and the preset string; A generation module, configured to generate a second password based on the second time and the key; determine a second target string corresponding to the second time; convert the key and the second time into strings in the same format; when the lengths of the strings in the key are the same as the length of the second target string, perform an operation on the string corresponding to the key and the second target string; when the length of the characters in the key is different from the length of the second target string, use the minimum length between the two as the calculation standard, and the length of the string is determined from right to left; generate the second password based on the preset operation rule, the second target string, and the preset string; A control module, configured to perform a decoding operation if the first password is the same as the second password.

10. A computer device, characterized in that, it includes: a processor and a memory, where the processor is configured to execute a decryption program stored in the memory to implement the decryption method according to any one of claims 1 to 8.

11. A storage medium, characterized in that, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the decryption method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • File encryption processing method and device

    CN107483432A

  • Authentication code generation method, decryption method, mobile payment method and device

    CN109167666A