CN112165490A - Encryption method, decryption method, storage medium and terminal equipment - Google Patents

Encryption method, decryption method, storage medium and terminal equipment Download PDF

Info

Publication number
CN112165490A
CN112165490A CN202011046741.5A CN202011046741A CN112165490A CN 112165490 A CN112165490 A CN 112165490A CN 202011046741 A CN202011046741 A CN 202011046741A CN 112165490 A CN112165490 A CN 112165490A
Authority
CN
China
Prior art keywords
key
file
decrypted
encrypted
encryption
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.)
Granted
Application number
CN202011046741.5A
Other languages
Chinese (zh)
Other versions
CN112165490B (en
Inventor
谷国良
彭青齐
黄佳
瞿满波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainan Fenghuangmu Technology Co ltd
Original Assignee
Pengyuan Credit Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pengyuan Credit Service Co ltd filed Critical Pengyuan Credit Service Co ltd
Priority to CN202011046741.5A priority Critical patent/CN112165490B/en
Publication of CN112165490A publication Critical patent/CN112165490A/en
Application granted granted Critical
Publication of CN112165490B publication Critical patent/CN112165490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/045Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
    • 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

Landscapes

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

Abstract

The invention discloses an encryption method, a decryption method, a storage medium and a terminal device, comprising: when a file is encrypted, a random key required by symmetric algorithm encryption is randomly generated, the random key is used for symmetric algorithm encryption of the file, meanwhile, a public key of an asymmetric algorithm is used for encryption of the random key, the random key is attached to the encrypted file, after a decryptor obtains the encrypted file, the random key attached to the encrypted file is decrypted by a private key of the asymmetric algorithm, and then the file is decrypted by the symmetric algorithm by using the key.

Description

Encryption method, decryption method, storage medium and terminal equipment
Technical Field
The present invention relates to the field of data encryption technologies, and in particular, to an encryption method, a decryption method, a storage medium, and a terminal device.
Background
With the development of the internet, people often transmit files through network communication methods such as chat tools or e-mails, some of the files relate to sensitive information, and with the popularization of network security awareness, people also realize the importance of encryption processing on the sensitive information files.
Currently, there are two general types of software for encrypting files on the market:
first, a symmetric encryption algorithm is directly used to encrypt a file, and the same key is used for encryption and decryption, so that there is a risk point that the key can be intercepted in network transmission.
Secondly, a random key is generated, a symmetric encryption algorithm uses the random key to encrypt a file, a pair of asymmetric keys (the private key can be protected by a password) is additionally generated, the public key of the asymmetric encryption algorithm is used for encrypting the symmetric encrypted random key, the encrypted random key is placed in the encrypted file, a decryption party can use the password-protected private key to decrypt the random key in the encrypted file, and the encrypted file can be decrypted by using the random key. In such an encryption manner, generally, one public key corresponds to one private key, and there is a case that the private key is lost and cannot be decrypted.
The two kinds of encryption software have the problem that the decrypted key is unique, and the problem that the password cannot be decrypted after the private key is forgotten to protect the password or the private key is lost exists.
Thus, the prior art has yet to be improved and enhanced.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an encryption method, a decryption method, a storage medium and a terminal device, aiming at the defects of the prior art, so as to avoid the problem that a file (data) cannot be decrypted when a user forgets a password or loses a decryption private key.
The technical scheme adopted by the invention is as follows:
in a first aspect, an embodiment of the present invention provides an encryption method, where the encryption method includes:
acquiring a file to be encrypted;
generating a first random key;
generating a public key and a plurality of encrypted private keys corresponding to the public key;
and encrypting the file to be encrypted based on the first random secret key, the public key and the plurality of encryption private keys to generate an encrypted file.
As a further improved technical solution, the generating a public key and a plurality of encrypted private keys corresponding to the public key specifically includes:
generating a public key and a private key corresponding to the public key;
the method comprises the steps of receiving a plurality of input first passwords, and encrypting the private key by adopting each first password in the first passwords to generate a plurality of encrypted private keys.
As a further improved technical solution, the encrypting the file to be encrypted based on the first random key, the public key, and the plurality of encryption private keys to generate an encrypted file specifically includes:
encrypting the first random key according to the public key and an asymmetric encryption algorithm to generate an encryption key;
and encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file.
As a further improved technical solution, the encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file specifically includes:
encrypting the file to be encrypted according to the first random key and a symmetric encryption algorithm;
and adding the encryption key into the encrypted file to generate an encrypted file.
In a first aspect, an embodiment of the present invention provides a decryption method, where the decryption method includes:
acquiring a file to be decrypted;
obtaining a private key to be decrypted;
and decrypting the file to be decrypted according to the private key to be decrypted to generate a decrypted file.
As a further improved technical solution, the decrypting the file to be decrypted according to the private key to be decrypted to generate a decrypted file specifically includes:
obtaining a private key to be decrypted;
receiving an input second password;
decrypting the private key to be decrypted according to the second password, and obtaining a target private key when the second password is consistent with a preset password;
and decrypting the file to be decrypted according to the target private key to generate a decrypted file.
As a further improved technical solution, the decrypting the file to be decrypted according to the target private key to generate a decrypted file specifically includes:
extracting a decryption key from the file to be decrypted;
and decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file.
As a further improved technical solution, the decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file specifically includes:
decrypting the decryption key according to the target private key and an asymmetric encryption algorithm to obtain a second random key;
and decrypting the file to be decrypted according to the second random key and a symmetric encryption algorithm to generate a decrypted file.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the encryption method described in any one of the above items or to implement the steps in the decryption method described in any one of the above items.
In a fourth aspect, an embodiment of the present invention provides a terminal device, which includes: a processor and memory and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the encryption method as described in any one of the above, or implements the steps in the decryption method as described in any one of the above.
Has the advantages that: compared with the prior art, the invention discloses an encryption method, a decryption method, a storage medium and a terminal device, wherein the method comprises the following steps: acquiring a file to be encrypted; generating a first random key; generating a public key and an encrypted private key corresponding to the public key; and encrypting the file to be encrypted based on the first random secret key, the public key and the encryption private key. The invention randomly generates a random key required by symmetric algorithm encryption when encrypting a file, symmetrically encrypts the file by using the random key, encrypts the random key by using a public key of an asymmetric algorithm, attaches the random key to the encrypted file, decrypts the random key attached to the encrypted file by using a private key of the asymmetric algorithm after a decryptor obtains the encrypted file, and then decrypts the file by using the symmetric algorithm by using the key.
Drawings
Fig. 1 is a flowchart of an embodiment of an encryption method provided in the present invention.
Fig. 2 is a flowchart of an embodiment of a decryption method provided by the present invention.
Fig. 3 is a schematic diagram of a terminal device structure provided by the present invention.
Detailed Description
The present invention provides an encryption method, a decryption method, a storage medium and a terminal device, and in order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The invention will be further explained by the description of the embodiments with reference to the drawings.
The present embodiment provides an encryption method, as shown in fig. 1, the method includes:
and S100, acquiring a file to be encrypted.
In this embodiment, the file to be encrypted may be any type of file data, for example, the encrypted file may store private data of the user, and the private data is not limited to identity data, behavior data, medical data of the user, or other data that the user wants to protect.
S200, generating a first random key.
Specifically, the first random key is a random key required when a file to be encrypted is encrypted, the file is encrypted by a symmetric algorithm through the random key, meanwhile, the random key is encrypted by a public key of an asymmetric algorithm and is attached to the encrypted file, after a decryptor obtains the encrypted file, the random key attached to the encrypted file is decrypted by a private key of the asymmetric algorithm, and then the file is decrypted by the symmetric algorithm through the key.
S300, generating a public key and a plurality of encrypted private keys corresponding to the public key.
In this embodiment, the public key and the plurality of encrypted private keys corresponding to the public key are key pairs generated by using an asymmetric encryption algorithm, wherein the private keys in the key pairs are protected by passwords, so that when one public key and private key pair is generated, the private keys in the public key and private key pair are protected by passwords, it can be understood that the public key is used for encrypting the random key used in the asymmetric encryption, and the private key corresponding to the public key is used for decrypting the random key. Correspondingly, the generating a public key and an encrypted private key corresponding to the public key specifically include:
s301, generating a public key and a private key corresponding to the public key;
s302, receiving a plurality of input first passwords, and encrypting the private key by adopting each first password in the plurality of first passwords to generate a plurality of encrypted private keys.
Specifically, the input first password may be set on the encryption display interface by the encryption party, and in terms of file encryption, the public key and the private key appear in pairs, and as long as the private key corresponding to the public key is used for decrypting the file encrypted by the public key. In this embodiment, the public key may be paired with a plurality of private keys with different password protection, that is, the protection password of each private key may be different, for example, a protection password with which the owner of the private key is familiar may be set. Therefore, the embarrassment that the decrypted secret key is unique, and the secret key cannot be decrypted after the secret key protection password is forgotten or the secret key is lost can be solved. Furthermore, the first passwords can be generated in batch, namely, the corresponding first passwords can be generated for each team member at one time; certainly, the first passwords may also be generated in batches, for example, when a new member exists in a team, a new password may be created for the new member individually, and in practical applications, all members may modify the first passwords owned by the members, so that each member may remember the password more deeply, and not only is not easy to forget, but also brings convenience to use.
In practical application, if a team wants to encrypt and protect related files, and an asymmetric file encryption mode is used, the general method is that the team uses the same public key for encryption and the same private key for decryption, if the private key has a protection password, the password is known, if the strength of the known password is weak, the secrecy security degree is reduced, and if the password management is too complicated, the problem is caused. Therefore, in the embodiment, the team member can generate a plurality of private keys (encrypted private keys) with different protection passwords at one time through the invention when generating the asymmetric key, and can also generate a new private key with a new protection password by using an old private key. Therefore, when the member A in the team member forgets the key, the member B can input the corresponding password of the member B, so that the corresponding private key is obtained through decryption, and the problem that the file decryption cannot be normally carried out when the password is forgotten can be solved. In the embodiment, the team member can set the protection password of the private key as the password which can be easily remembered by the team member, thus solving the problem that the password is not remembered well,
for example, if the member B in the same team needs to decrypt the privacy file encrypted by the public key of the member a, the member B needs to obtain the private key associated with the public key of the member a and needs to know the protection password of the private key. If the member A does not want to directly give the private key of the protection password to the member B, the invention provides two solutions: firstly, when the asymmetric key is generated, the protection password for the private key can be set to be a plurality (respectively input by member A and member B), the protection passwords are set to be a plurality and are not spliced, the protection passwords are respectively set to be the private key, a plurality of private keys with different protection passwords can be generated, and the private keys can decrypt files encrypted by the public key (any member only needs to correctly input the protection password set when the private key for setting the protection password is used for decrypting the files).
In another embodiment of the present invention, the private key of the member a may be copied, at this time, the member a may input the protection password of the private key set by itself on the interface of the present invention, and upload the corresponding private key, and the present invention may generate another new encrypted private key according to the uploaded private key (the protection password of the new private key may be set by the member B, or after a is set, the private key is sent to B, and then B generates the private key with its familiar password protection), and the new private key may also decrypt the private file encrypted by the public key of the member a.
In practical application, the private key protection password can be set to be a plurality of, only when everyone in the team inputs the plurality of protection passwords simultaneously, and correct protection passwords are input in each team member, the file can be decrypted by the private key, and therefore the files which are particularly important are set as members which are gathered by the team to be decrypted together, and the safety of file data is further improved.
S400, encrypting the file to be encrypted based on the first random secret key, the public key and the plurality of encryption private keys to generate an encrypted file.
Specifically, the encrypting the file to be encrypted based on the first random key, the public key, and the plurality of encryption private keys to generate an encrypted file specifically includes:
s401, encrypting the first random key according to the public key and an asymmetric encryption algorithm to generate an encryption key;
s402, encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file.
Specifically, the file encryption can be technically asymmetric encryption, namely, the file is encrypted by using a public key of an asymmetric algorithm, and the file is decrypted by using a matched private key, wherein the private key is not easy to leak because the asymmetric algorithm uses the public key for encryption (the public key can be published) and uses the private key for decryption (the private key is privately stored by a decryptor); the file can also be encrypted by a symmetric algorithm, the symmetric algorithm needs a key for encrypting the file, the key also needs to be used during decryption, and both the encryption and decryption sides need to know the key, so that the possibility of key leakage exists in the encryption and decryption by using the symmetric algorithm.
Further, encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file specifically includes:
s4021, encrypting the file to be encrypted according to the first random key and a symmetric encryption algorithm;
s4022, adding the encryption key into the encrypted file to generate an encrypted file.
In the embodiment, the first random key is encrypted by using an asymmetric encryption algorithm, and the file to be encrypted is encrypted by using a symmetric encryption algorithm, so that the symmetric encryption algorithm and the asymmetric encryption algorithm are combined, that is, when the file to be encrypted is encrypted, a first random key required by the symmetric algorithm for encryption is randomly generated, the file is encrypted by using the symmetric algorithm through the key, meanwhile, the first random key is encrypted by using a public key of the asymmetric algorithm and then is attached to the encrypted file, so that after a decryptor obtains the encrypted file, the random key attached to the encrypted file is decrypted by using a private key of the asymmetric algorithm, and then the file is decrypted by using the symmetric algorithm through the key, thereby improving the security of the file. Optionally, adding the encryption key to the encrypted file to generate the encrypted file may be binary-arranging the encryption key in a middle header of the encrypted file.
Based on the above encryption method, this embodiment further provides a decryption method, as shown in fig. 2, where the decryption method is used to decrypt an encrypted file obtained by the encryption method according to the above embodiment, and the decryption method includes:
h100, acquiring a file to be decrypted;
h200, obtaining a private key to be decrypted;
and H300, decrypting the file to be decrypted according to the private key to be decrypted to generate a decrypted file.
Specifically, the decrypting the file to be decrypted according to the private key to be decrypted to generate a decrypted file specifically includes:
s301, obtaining a private key to be decrypted;
s302, receiving an input second password;
s303, decrypting the private key to be decrypted according to the second password, and obtaining a target private key when the second password is consistent with a preset password;
s304, decrypting the file to be decrypted according to the target private key to generate a decrypted file.
Specifically, the second password is the password input by the user needing to decrypt the private key, and the preset password is the first password input by the user in the encryption method.
Further, decrypting the file to be decrypted according to the target private key to generate a decrypted file specifically includes:
s3041, extracting a decryption key from the file to be decrypted;
s3042, decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file.
Illustratively, the team member B uses the invention to extract an encrypted random key (i.e., decryption key) from the middle header of the file to be decrypted, then uses the member B to decrypt the random key using the decrypted target private key, and then uses the decrypted random key to decrypt the entire encrypted file through a symmetric encryption algorithm.
In this embodiment, decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file specifically includes:
and decrypting the decryption key according to the target private key and the asymmetric encryption algorithm to obtain a second random key.
And decrypting the file to be decrypted according to the second random key and a symmetric encryption algorithm to generate a decrypted file.
In practical application, the invention also has a function of bulk encryption or decryption, that is, a user can select one folder or select a plurality of files on the interface of the invention, so that all the files below the folder or the selected plurality of files can be encrypted or decrypted. Of course, the user can also drag the file or the folder directly to the interface of the present invention to automatically fill the file path and the folder path which need to be filled by the user, thereby avoiding the operation of searching the file path which needs to be encrypted in the operating system by the user.
In summary, compared with the prior art, the embodiment of the invention has the following advantages:
the invention discloses an encryption method and a decryption method, wherein the method comprises the following steps: acquiring a file to be encrypted; generating a first random key; generating a public key and an encrypted private key corresponding to the public key; and encrypting the file to be encrypted based on the first random secret key, the public key and the encryption private key. The invention randomly generates a random key required by symmetric algorithm encryption when encrypting a file, symmetrically encrypts the file by using the random key, encrypts the random key by using a public key of an asymmetric algorithm, attaches the random key to the encrypted file, decrypts the random key attached to the encrypted file by using a private key of the asymmetric algorithm after a decryptor obtains the encrypted file, and then decrypts the file by using the symmetric algorithm by using the key.
Based on the encryption method and the decryption method, the present invention also provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the encryption method according to the above embodiment or to implement the steps in the decryption method according to the above embodiment.
Based on the above encryption method and decryption method, the present invention also provides a terminal device, as shown in fig. 3, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the storage medium and the instruction processors in the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An encryption method, characterized in that the encryption method comprises:
acquiring a file to be encrypted;
generating a first random key;
generating a public key and a plurality of encrypted private keys corresponding to the public key;
and encrypting the file to be encrypted based on the first random secret key, the public key and the plurality of encryption private keys to generate an encrypted file.
2. The encryption method according to claim 1, wherein the generating a public key and a plurality of encryption private keys corresponding to the public key specifically includes:
generating a public key and a private key corresponding to the public key;
the method comprises the steps of receiving a plurality of input first passwords, and encrypting the private key by adopting each first password in the first passwords to generate a plurality of encrypted private keys.
3. The encryption method according to claim 2, wherein the encrypting the file to be encrypted based on the first random key, the public key, and the plurality of encryption private keys to generate an encrypted file specifically comprises:
encrypting the first random key according to the public key and an asymmetric encryption algorithm to generate an encryption key;
and encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file.
4. The encryption method according to claim 3, wherein the encrypting the file to be encrypted according to the first random key and the encryption key to generate an encrypted file specifically comprises:
encrypting the file to be encrypted according to the first random key and a symmetric encryption algorithm;
and adding the encryption key into the encrypted file to generate an encrypted file.
5. A decryption method, characterized in that the decryption method comprises:
acquiring a file to be decrypted;
obtaining a private key to be decrypted;
and decrypting the file to be decrypted according to the private key to be decrypted to generate a decrypted file.
6. The decryption method according to claim 5, wherein the decrypting the file to be decrypted according to the private key to be decrypted to generate the decrypted file specifically comprises:
obtaining a private key to be decrypted;
receiving an input second password;
decrypting the private key to be decrypted according to the second password, and obtaining a target private key when the second password is consistent with a preset password;
and decrypting the file to be decrypted according to the target private key to generate a decrypted file.
7. The decryption method according to claim 6, wherein the decrypting the file to be decrypted according to the target private key to generate a decrypted file specifically comprises:
extracting a decryption key from the file to be decrypted;
and decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file.
8. The decryption method according to claim 7, wherein the decrypting the file to be decrypted based on the decryption key and the target private key to generate a decrypted file specifically comprises:
decrypting the decryption key according to the target private key and an asymmetric encryption algorithm to obtain a second random key;
and decrypting the file to be decrypted according to the second random key and a symmetric encryption algorithm to generate a decrypted file.
9. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps in the encryption method according to any one of claims 1 to 4 or to perform the steps in the decryption method according to any one of claims 5 to 8.
10. A terminal device, comprising: a processor and memory and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the encryption method of any one of claims 1 to 4 or implements the steps in the decryption method of any one of claims 5 to 8.
CN202011046741.5A 2020-09-29 2020-09-29 Encryption method, decryption method, storage medium and terminal equipment Active CN112165490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011046741.5A CN112165490B (en) 2020-09-29 2020-09-29 Encryption method, decryption method, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011046741.5A CN112165490B (en) 2020-09-29 2020-09-29 Encryption method, decryption method, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN112165490A true CN112165490A (en) 2021-01-01
CN112165490B CN112165490B (en) 2022-11-08

Family

ID=73862087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011046741.5A Active CN112165490B (en) 2020-09-29 2020-09-29 Encryption method, decryption method, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN112165490B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079155A (en) * 2021-03-29 2021-07-06 重庆富民银行股份有限公司 File encryption processing method based on mixed password
CN113918968A (en) * 2021-09-27 2022-01-11 山东浪潮通软信息科技有限公司 File encryption method and device
CN114172694A (en) * 2021-11-19 2022-03-11 卓望数码技术(深圳)有限公司 E-mail encryption and decryption method, system and storage medium
CN114499955A (en) * 2021-12-24 2022-05-13 长威信息科技发展股份有限公司 Dynamic decoding method and system
CN114710359A (en) * 2022-04-15 2022-07-05 辽宁工控科技有限公司 Industrial network dynamic key management method and industrial network encryption communication method
CN116992474A (en) * 2023-08-29 2023-11-03 密卡思(深圳)电讯有限公司 Firmware encryption method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005101742A (en) * 2003-09-22 2005-04-14 Mebius Corp Key management method, key preparation method, encryption processing method, decryption processing method, electronic signature method, access management method, and communication network system
CN107181589A (en) * 2017-04-11 2017-09-19 北京奇艺世纪科技有限公司 A kind of fort machine private key management method and device
CN110278078A (en) * 2019-06-17 2019-09-24 矩阵元技术(深圳)有限公司 A kind of data processing method, apparatus and system
CN111431713A (en) * 2020-03-27 2020-07-17 财付通支付科技有限公司 Private key storage method and device and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005101742A (en) * 2003-09-22 2005-04-14 Mebius Corp Key management method, key preparation method, encryption processing method, decryption processing method, electronic signature method, access management method, and communication network system
CN107181589A (en) * 2017-04-11 2017-09-19 北京奇艺世纪科技有限公司 A kind of fort machine private key management method and device
CN110278078A (en) * 2019-06-17 2019-09-24 矩阵元技术(深圳)有限公司 A kind of data processing method, apparatus and system
CN111431713A (en) * 2020-03-27 2020-07-17 财付通支付科技有限公司 Private key storage method and device and related equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079155A (en) * 2021-03-29 2021-07-06 重庆富民银行股份有限公司 File encryption processing method based on mixed password
CN113918968A (en) * 2021-09-27 2022-01-11 山东浪潮通软信息科技有限公司 File encryption method and device
CN114172694A (en) * 2021-11-19 2022-03-11 卓望数码技术(深圳)有限公司 E-mail encryption and decryption method, system and storage medium
CN114499955A (en) * 2021-12-24 2022-05-13 长威信息科技发展股份有限公司 Dynamic decoding method and system
CN114710359A (en) * 2022-04-15 2022-07-05 辽宁工控科技有限公司 Industrial network dynamic key management method and industrial network encryption communication method
CN114710359B (en) * 2022-04-15 2024-02-06 沈阳邦粹科技有限公司 Industrial network dynamic key management method and industrial network encryption communication method
CN116992474A (en) * 2023-08-29 2023-11-03 密卡思(深圳)电讯有限公司 Firmware encryption method and device
CN116992474B (en) * 2023-08-29 2024-08-13 密卡思(深圳)电讯有限公司 Firmware encryption method and device

Also Published As

Publication number Publication date
CN112165490B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
CN112165490B (en) Encryption method, decryption method, storage medium and terminal equipment
EP3155754B1 (en) Methods, systems and computer program product for providing encryption on a plurality of devices
US9602549B2 (en) Establishing trust between applications on a computer
US11233653B2 (en) Dongle for ciphering data
EP2973142B1 (en) Security services management for computer applications by modifying their object code
CN108712412B (en) Database encryption and decryption methods and devices, storage medium and terminal
JP7160605B2 (en) Method and system for secure data transfer
CN107453880B (en) Cloud data secure storage method and system
CN204360381U (en) mobile device
US20140108818A1 (en) Method of encrypting and decrypting session state information
CN104866784A (en) BIOS encryption-based safety hard disk, and data encryption and decryption method
US20180013551A1 (en) Apparatus for obfuscating and restoring program execution code and method thereof
CN104426849A (en) Method and system for realizing data security protection
CN112866216B (en) Method and system for encrypting file
CN112637140A (en) Password transmission method, terminal, server and readable storage medium
CN105187379B (en) Password based on multi-party mutual mistrust splits management method
KR101595056B1 (en) System and method for data sharing of intercloud enviroment
JP6885150B2 (en) File sharing system, file sharing device, file sharing method, and file sharing program
CN111542050A (en) TEE-based method for guaranteeing remote initialization safety of virtual SIM card
CN112052469A (en) Encryption method, decryption method, storage medium and terminal equipment
KR102343711B1 (en) Passive encryption system
CN114222260B (en) Peer-to-peer short message transmission method, system, equipment and computer storage medium
US20210143983A1 (en) Hybrid Content Protection Architecture
CN116614219A (en) Secure data burning method, secure module, customizing device, and storage medium
CN118153087A (en) Data desensitization and desensitization method, device, computer equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220609

Address after: 570100 Room 102, 1st floor, building B28, zone B, Hainan Ecological Software Park, high tech industry demonstration zone, Laocheng Town, Chengmai County, Haikou City, Hainan Province

Applicant after: Hainan fenghuangmu Technology Co.,Ltd.

Address before: 518040 4th floor, Sunshine Golf building, 7008 Shennan Avenue, Futian District, Shenzhen City, Guangdong Province

Applicant before: PENGYUAN CREDIT SERVICE CO.,LTD.

GR01 Patent grant
GR01 Patent grant