CN116502250A - Encryption and decryption method and device for computer - Google Patents

Encryption and decryption method and device for computer Download PDF

Info

Publication number
CN116502250A
CN116502250A CN202310493108.8A CN202310493108A CN116502250A CN 116502250 A CN116502250 A CN 116502250A CN 202310493108 A CN202310493108 A CN 202310493108A CN 116502250 A CN116502250 A CN 116502250A
Authority
CN
China
Prior art keywords
encryption
computer
decryption
key
algorithm
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.)
Withdrawn
Application number
CN202310493108.8A
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.)
Guangdong Innovative Technical College
Original Assignee
Guangdong Innovative Technical College
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 Guangdong Innovative Technical College filed Critical Guangdong Innovative Technical College
Priority to CN202310493108.8A priority Critical patent/CN116502250A/en
Publication of CN116502250A publication Critical patent/CN116502250A/en
Withdrawn legal-status Critical Current

Links

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
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention discloses a method and a device for encrypting and decrypting a computer, which comprises a key generation module, a dynamic key management module, a computer encryption module, a computer data storage module, a computer data transmission module, a computer decryption module and a data verification module; during decryption, the ciphertext stored in the computer is read, the same key used during encryption is generated by using a key generation algorithm to decrypt, the decrypted data is decrypted by using a dynamic key generated by using a random number generator, the original data is finally obtained, and the security of the computer is greatly improved through double encryption and decryption.

Description

Encryption and decryption method and device for computer
Technical Field
The present invention relates to the field of computer devices, and more particularly, to a method and apparatus for encrypting and decrypting a computer.
Background
The encryption and decryption of the computer is a technology for protecting the data security in the computer, and is widely applied to the fields of data transmission, storage, processing and the like in the modern society.
The public key encryption algorithm is an algorithm that uses different keys for encryption and decryption; common public key encryption algorithms include RSA, ECC, etc.; in this algorithm, different keys used for encryption and decryption are called a public key and a private key, in the encryption process, data is encrypted by the public key and ciphertext is generated, in the decryption process, the ciphertext is decrypted by the private key and restored to original data.
Because of the wide application of computer encryption and decryption methods, an attacker can attack the encryption algorithm by using various means, thereby cracking the ciphertext and obtaining confidential data.
Therefore, in order to solve the above-mentioned technical problems, it is necessary to provide a method and a device for encrypting and decrypting a computer.
Disclosure of Invention
The invention aims to provide an encryption and decryption method and device for a computer, so as to solve the problems.
In order to achieve the above object, an embodiment of the present invention provides the following technical solution:
the encryption and decryption method and the device of the computer comprise an encryption and decryption method and an encryption and decryption device, wherein the encryption and decryption method comprises the following steps:
s1, during encryption, converting data to be encrypted into binary codes, and generating a secret key by using a secret key generation algorithm;
s2, encrypting the data by using an encryption algorithm, and encrypting the encrypted data by using the generated secret key to obtain a ciphertext;
s3, storing the ciphertext in a computer through a storage and transmission encryption and decryption technology;
s4, reading ciphertext stored in the computer during decryption, and generating a key identical to a key used during encryption by using a key generation algorithm;
s5, decrypting the ciphertext by using a decryption algorithm, and decrypting the decrypted data by using the generated secret key to obtain the original data.
As a further improvement of the present invention, the encryption algorithm in the step S2 is a dynamic key, and the dynamic key adopts an HOTP algorithm or a TOTP algorithm.
As a further improvement of the invention, the generation of the dynamic key in the HOTP algorithm is based on a time stamp and an HMAC algorithm, and the generation of the dynamic key in the HOTP algorithm is based on a time stamp and a hash function.
As a further improvement of the invention, the storage encryption and decryption technology in the step S3 comprises storage control and ciphertext storage, and the transmission encryption and decryption technology comprises line encryption and end-to-end encryption.
As a further improvement of the present invention, the encryption and decryption technology in step S3 further includes a key management and a confirmation encryption and decryption technology, where the key management includes generation, preservation and destruction of the key.
As a further improvement of the present invention, the encryption and decryption technology in step S3 further includes an integrity authentication technology and a digest technology, where the integrity authentication technology is used for verification on identity, information, key and password, and the integrity digest technology is used for unidirectional Hash encryption function processing.
As a further improvement of the invention, the HMAC algorithm is used to secure data transmissions in a computer network.
As a further improvement of the present invention, the encryption and decryption apparatus includes: the dynamic key generation module, the dynamic key management module, the computer encryption module, the computer data storage module, the computer data transmission module, the computer decryption module and the data verification module encrypt and decrypt the file under the action of the control program.
Compared with the prior art, the invention has the advantages that:
the scheme is characterized in that data to be encrypted are converted into binary codes, a key is generated by using a key generation algorithm, then the data are encrypted by using an encryption algorithm, the encrypted data are encrypted by using a dynamic key generated by using a random number generator, and finally ciphertext is obtained and stored in a computer, so that the effect of safety protection is achieved; during decryption, the ciphertext stored in the computer is read, the same key used during encryption is generated by using a key generation algorithm to decrypt, the decrypted data is decrypted by using a dynamic key generated by using a random number generator, the original data is finally obtained, and the security of the computer is greatly improved through double encryption and decryption.
Drawings
FIG. 1 is a flow chart of the encryption and decryption method of the present invention.
Detailed Description
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; it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments, and that all other embodiments obtained by persons of ordinary skill in the art without making creative efforts based on the embodiments in the present invention are within the protection scope of the present invention.
Example 1:
referring to fig. 1, an encryption and decryption method and device for a computer includes the following steps:
s1, during encryption, converting data to be encrypted into binary codes, and generating a secret key by using a secret key generation algorithm;
s2, encrypting the data by using an encryption algorithm, and encrypting the encrypted data by using a dynamic key generated by a random number generator to obtain a ciphertext;
s3, storing the ciphertext in a computer through a storage and transmission encryption and decryption technology;
s4, reading ciphertext stored in the computer during decryption, and generating a key identical to a key used during encryption by using a key generation algorithm;
s5, decrypting the ciphertext by using a decryption algorithm, and decrypting the decrypted data by using a dynamic key generated by a random number generator to obtain the original data.
The encryption algorithm in step S2 is a dynamic key, the dynamic key adopts an HOTP algorithm or a TOTP algorithm, the generation of the dynamic key is based on a time stamp and a key generation algorithm, and meanwhile, time synchronization is needed between a computer and an authentication server so as to ensure the correctness and the safety of the dynamic key.
The generation of the dynamic key in the HOTP algorithm is based on a time stamp and HMAC algorithm, and the generation of the dynamic key in the TOTP algorithm is based on a time stamp and a hash function, both of which require time synchronization between the computer and the authentication server.
The HMAC algorithm is used for protecting data transmission security in a computer network, and combines a secret key and a message through the HMAC algorithm to generate a hash value with a fixed length as a message authentication code so as to ensure the integrity and authenticity of the message.
The storage encryption and decryption technology in the step S3 comprises storage control and ciphertext storage, the transmission encryption and decryption technology comprises line encryption and end-to-end encryption, the storage safety of information data in a computer can be prevented through the storage encryption and decryption technology, the transmission encryption and decryption technology can ensure the safety of the information data transmission process, the data to be transmitted are subjected to encryption processing, and the two encryption methods effectively achieve the purpose of protecting the information data of the computer.
The encryption and decryption technology in the step S3 also comprises a key management and confirmation encryption and decryption technology, wherein the key management mainly comprises generation, storage and destruction of a key, can be used for ensuring the safety of information data, protects the safety and the integrity of the information data, and can effectively prevent the information data from being copied or copied; the key management and the encryption and decryption confirmation technology are utilized, so that the information publisher cannot repudiate the information sent by the information publisher, and the information receiver can accurately judge the authenticity of the information.
The encryption and decryption technology in step S3 also comprises an integrity authentication technology and a digest technology, wherein the integrity authentication technology is used for verifying identity, information, keys and passwords, one-to-one transmission and transmission of information data can be achieved through one-way Hash encryption function processing, when an information sender encrypts the digest, the encryption and decryption technology is used for determining and verifying the accuracy and the legality of the data through the private key process of the information sender, and whether the data information is changed or not can be known through comparison analysis and summarization of the original digest and the digest of the transmitted information, so that the integrity and the security of computer information data can be effectively ensured through the integrity authentication and digest technology.
The encryption and decryption device comprises: the dynamic key generation module, the dynamic key management module, the computer encryption module, the computer data storage module, the computer data transmission module, the computer decryption module and the data verification module encrypt and decrypt the file under the action of the control program.
The key generation algorithm employs a cryptographically secure pseudorandom number generator (CSPRNG): the CSPRNG is a random number generator based on a deterministic algorithm, but it uses an encryption algorithm or hash function to increase randomness when generating random numbers. Since the encryption algorithm or hash function has uncertainty, the random number generated by the CSPRNG is more secure than the PRNG.
The dynamic key generation is to generate a random cipher or key which can be used once by using a random number generator and a key generation algorithm, then send the cipher or key to legal users, after receiving the cipher or key, the users need to use the cipher or key for authentication or encryption within a certain time, and after expiration, the cipher or key is automatically disabled so as to ensure the security of data transmission
Compared with the prior art, the invention has the advantages that:
the scheme is characterized in that data to be encrypted are converted into binary codes, a key is generated by using a key generation algorithm, then the data are encrypted by using an encryption algorithm, the encrypted data are encrypted by using a dynamic key generated by using a random number generator, and finally ciphertext is obtained and stored in a computer, so that the effect of safety protection is achieved; during decryption, the ciphertext stored in the computer is read, the same key used during encryption is generated by using a key generation algorithm to decrypt, the decrypted data is decrypted by using a dynamic key generated by using a random number generator, the original data is finally obtained, and the security of the computer is greatly improved through double encryption and decryption.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment contains only one independent technical solution, and that such description is provided for clarity only, and that the technical solutions of the embodiments may be appropriately combined to form other embodiments that will be understood by those skilled in the art.

Claims (8)

1. The encrypting and decrypting method of the computer is characterized by comprising the following steps:
s1, during encryption, converting data to be encrypted into binary codes, and generating a secret key by using a secret key generation algorithm;
s2, encrypting the data by using an encryption algorithm, and encrypting the encrypted data by using the generated secret key to obtain a ciphertext;
s3, storing the ciphertext in a computer through a storage and transmission encryption and decryption technology;
s4, reading ciphertext stored in the computer during decryption, and generating a key identical to a key used during encryption by using a key generation algorithm;
s5, decrypting the ciphertext by using a decryption algorithm, and decrypting the decrypted data by using the generated secret key to obtain the original data.
2. The encryption and decryption method of a computer according to claim 1, wherein: the encryption algorithm in the step S2 is a dynamic key, and the dynamic key adopts an HOTP algorithm or a TOTP algorithm.
3. The encryption and decryption method of a computer according to claim 2, wherein: the generation of the dynamic key in the HOTP algorithm is based on a time stamp and an HMAC algorithm, and the generation of the dynamic key in the HOTP algorithm is based on a time stamp and a hash function.
4. The encryption and decryption method of a computer according to claim 1, wherein: the storage encryption and decryption technology in the step S3 comprises storage control and ciphertext storage, and the transmission encryption and decryption technology comprises line encryption and end-to-end encryption.
5. The encryption and decryption method of a computer according to claim 1, wherein: the encryption and decryption technology in the step S3 also comprises a key management and confirmation encryption and decryption technology, wherein the key management mainly comprises the generation, the preservation and the destruction of the key.
6. The encryption and decryption method of a computer according to claim 1, wherein: the integrity authentication technology is used for verifying the aspects of identity, information, secret key and password, and the integrity digest technology is used for unidirectional Hash encryption function processing.
7. A method for encrypting and decrypting a computer according to claim 3, wherein: the HMAC algorithm is used to secure data transmissions in a computer network.
8. An encrypting and decrypting device of a computer is characterized in that: the encryption and decryption device comprises: the system comprises a key generation module, a dynamic key management module, a computer encryption module, a computer data storage module, a computer data transmission module, a computer decryption module and a data verification module, wherein the files are encrypted and decrypted under the action of a control program.
CN202310493108.8A 2023-05-05 2023-05-05 Encryption and decryption method and device for computer Withdrawn CN116502250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310493108.8A CN116502250A (en) 2023-05-05 2023-05-05 Encryption and decryption method and device for computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310493108.8A CN116502250A (en) 2023-05-05 2023-05-05 Encryption and decryption method and device for computer

Publications (1)

Publication Number Publication Date
CN116502250A true CN116502250A (en) 2023-07-28

Family

ID=87324505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310493108.8A Withdrawn CN116502250A (en) 2023-05-05 2023-05-05 Encryption and decryption method and device for computer

Country Status (1)

Country Link
CN (1) CN116502250A (en)

Similar Documents

Publication Publication Date Title
US8401186B2 (en) Cloud storage data access method, apparatus and system based on OTP
CN110958219B (en) SM2 proxy re-encryption method and device for medical cloud shared data
CN102077213B (en) Techniques for ensuring authentication and integrity of communications
US8433066B2 (en) Method for generating an encryption/decryption key
US20060265595A1 (en) Cascading key encryption
US20030123667A1 (en) Method for encryption key generation
US8995653B2 (en) Generating a secret key from an asymmetric private key
CN101359991A (en) Public key cipher system private key escrowing system based on identification
CN112202754B (en) Data encryption method and device, electronic equipment and storage medium
CN111079178B (en) Method for desensitizing and backtracking trusted electronic medical record
CN112713995A (en) Dynamic communication key distribution method and device for terminal of Internet of things
CN110233729B (en) Encrypted solid-state disk key management method based on PUF
CN110855667B (en) Block chain encryption method, device and system
CN111488618B (en) Block chain-based one-time pad encryption method, device and storage medium
CN114036541A (en) Application method for compositely encrypting and storing user private content
CN114499857A (en) Method for realizing data correctness and consistency in big data quantum encryption and decryption
CN116502250A (en) Encryption and decryption method and device for computer
CN112954388A (en) Data file acquisition method and device, terminal equipment and storage medium
Bojanova et al. Cryptography classes in bugs framework (BF): Encryption bugs (ENC), verification bugs (VRF), and key management bugs (KMN)
CN111431721A (en) IBE-based Internet of things equipment encryption method in intelligent medical environment
WO2020008363A1 (en) Method for encoding, transmitting and/or storing and decoding digital information in an unbreakable manner
CN116866029B (en) Random number encryption data transmission method, device, computer equipment and storage medium
Zahabiun One Time Pad Encrypted Messaging System
CN116668147A (en) Data transmission method, electronic device and computer readable storage medium
CN117061087A (en) Quantum random number distribution method based on homomorphic encryption algorithm

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20230728