[go: up one dir, main page]

CN105812146A - MD5-based two-way encryption data protection method - Google Patents

MD5-based two-way encryption data protection method Download PDF

Info

Publication number
CN105812146A
CN105812146A CN201610356831.1A CN201610356831A CN105812146A CN 105812146 A CN105812146 A CN 105812146A CN 201610356831 A CN201610356831 A CN 201610356831A CN 105812146 A CN105812146 A CN 105812146A
Authority
CN
China
Prior art keywords
character string
key
encryption
ascii
string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610356831.1A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201610356831.1A priority Critical patent/CN105812146A/en
Publication of CN105812146A publication Critical patent/CN105812146A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to an MD5-based two-way encryption data protection method, comprising: a key processing process, an encryption process and a decryption process, wherein the key processing process includes: subjecting a key to MD5 and BASE64 transcoding; intercepting the key; processing with a pseudorandom algorithm and converting a character string into a key box; the encryption process includes: converting a plaintext character string into ASCII code, circulating the ASCII code, and carrying out pseudorandom arrangement through an algorithm; adding ASCII code value of a check character string generated by intercepting in the key processing process; performing circulating bitwise XOR to convert the value into a character string; subjecting the generated character string to BASE64 transcoding to obtain a cyphertext character string; the decryption process includes: subjecting the cyphertext character string to BASE64 decoding, and carrying out ASCII coding; performing circulating bitwise XOR operation; matching a check portion with a check sequence, failing the check in case of inconformity; subjecting the cyphertext ASCII code string and the key box to circulating bitwise XOR operation to convert the obtained ASCII code string into a character string, and reversely executing as a random process to finally obtain a plaintext character string.

Description

A kind of two-way encryption data guard method based on MD5
Technical field
The present invention relates to field of data encryption, particularly relate to a kind of two-way encryption data guard method based on MD5.
Background technology
MD5 data individual event encryption technology: this technology full name is Message-DigestAlgorithm5 (md5-challenge), it can allow Large Copacity information be become the form of a kind of secrecy before signing private secret key with digital signature software by " compression ", technically, it is simply that the character string of random length is converted to the very large integer of 16 systems of fixed length.MD5 is One-Way Encryption, say, that after encryption produce character string impossible, in turn decrypted fall.
In real work, the effect of MD5 is mainly ciphering signature checking: such as user login validation, it is simply that the existing encrypted characters string stored with system according to the checking character string of login password md5 encryption mates, and is unanimously then verified;The relatively common example application of another one is the network transmission of file, a lot of software is had to have a filename identical when downloading, the file of file extent .MD5 by name, only has a line text in this document, and this style of writing is originally exactly the digital signature of file.A big text message is used as by whole file by MD5, by its irreversible character string mapping algorithm, creates this unique MD5 informative abstract.If propagating in the process of this file afterwards, no matter the content of file there occurs any type of change (including the error of transmission etc. that in artificial amendment or downloading process, circuit instability causes), as long as it finds that informative abstract differs when this file is recalculated MD5, it is possible to judge that this file is tampered.MD5 advantage: compare DES, AES encryption algorithm, md5 encryption algorithm has higher efficiency, and the safety of MD5 is higher simultaneously.But, MD5 is a kind of individual event encryption method, in practical application, data after encryption are decrypted by a lot of local needs, and this kind of situation, md5 encryption method can not meet requirement, now generally requires the encipher-decipher method based on RSA bigger by performance consumption.
Summary of the invention
For overcoming the deficiencies in the prior art, it is an object of the invention to provide the two-way encryption data guard method based on MD5 that a kind of safety is good.
For achieving the above object, the present invention is achieved through the following technical solutions:
A kind of two-way encryption data guard method based on MD5, including: key handling process, ciphering process, decrypting process, wherein,
Key handling process includes: key carries out md5 and base64 transcoding and processes, obtain encryption and decryption private key;Above-mentioned encryption and decryption private key is intercepted, generates the string of checking character of fixing figure place, for the verification operation in follow-up encryption process;Process above-mentioned encryption and decryption private key with pseudo-random algorithm, again upset its order, and this character string is converted to ASCII character, i.e. keylockers, treat follow-up encrypting and decrypting process uses;
Ciphering process includes: first plaintext character string transfers to ASCII character, circulation A SCII code, carries out pseudorandom arrangement by algorithm;In the pseudo-random sequence of above-mentioned plaintext ASCII character string afterbody, add the ASCII character value intercepting the string of checking character generated in key handling process;The pseudo-random sequence containing verification that previous step is generated, the keylockers circulation step-by-step XOR with obtaining in key generation process, obtain new ASCII character string, then transferred to character string;The character string generated in previous step is obtained ciphertext character string through base64 transcoding;
Decrypting process includes: first ciphertext character string carries out base64 decoding operation, and the character string obtained carries out ASCII character process again, obtains ciphertext ASCII character string;Ciphertext ASCII character string previous step generated is circulated step-by-step xor operation with described keylockers;Check part in previous step result is mated with the verification sequence generated in key handling process, if consistent, continue next step and process, inconsistent, by verification failure and return null value;When previous step coupling is consistent, above-mentioned ciphertext ASCII character string and described keylockers is circulated the ASCII character string that step-by-step xor operation obtains and transfers character string to and reverse execution is randomisation process, and finally give expressly character string..
Beneficial effects of the present invention: by original md5 encryption method, transform under the cooperation of other technologies, becomes a kind of encryption method that can support deciphering;Its safety is consistent with md5 encryption method, but can accomplish the md5 decrypting process that cannot realize;The method can realize it is critical only that of deciphering, in ciphering process, the md5 of encryption and decryption key adds the ASCII character of confidential information and the ASCII character XOR of encrypted character string, thus the feature of key md5 code is embedded in encrypted character string, and final acquisition encrypted characters string;The process used ensure that the safety of encryption and decryption key.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the two-way encryption data guard method based on MD5 described in one embodiment of the invention.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is described in further detail, to make those skilled in the art can implement according to this with reference to description word.
A kind of two-way encryption data guard method based on MD5, refers to accompanying drawing 1, including: key handling process, ciphering process, decrypting process, wherein,
Key handling process includes: key carries out md5 and base64 transcoding and processes, obtain encryption and decryption private key;Above-mentioned encryption and decryption private key is intercepted, generates the string of checking character of fixing figure place, for the verification operation in follow-up encryption process;Process above-mentioned encryption and decryption private key with pseudo-random algorithm, again upset its order, and this character string is converted to ASCII character, i.e. keylockers, treat follow-up encrypting and decrypting process uses;
Ciphering process includes: first plaintext character string transfers to ASCII character, circulation A SCII code, carries out pseudorandom arrangement by algorithm;In the pseudo-random sequence of above-mentioned plaintext ASCII character string afterbody, add the ASCII character value intercepting the string of checking character generated in key handling process;The pseudo-random sequence containing verification that previous step is generated, the keylockers circulation step-by-step XOR with obtaining in key generation process, obtain new ASCII character string, then transferred to character string;The character string generated in previous step is obtained ciphertext character string through base64 transcoding;
Decrypting process includes: first ciphertext character string carries out base64 decoding operation, and the character string obtained carries out ASCII character process again, obtains ciphertext ASCII character string;Ciphertext ASCII character string previous step generated is circulated step-by-step xor operation with described keylockers;Check part in previous step result is mated with the verification sequence generated in key handling process, if consistent, continue next step and process, inconsistent, by verification failure and return null value;When previous step coupling is consistent, above-mentioned ciphertext ASCII character string and described keylockers is circulated the ASCII character string that step-by-step xor operation obtains and transfers character string to and reverse execution is randomisation process, and finally give expressly character string.
Ultimate principle: character string to be encrypted and encryption and decryption key need each to carry out pseudorandom permutation, md5 encryption, base64 transcoding, ASCII character serializings etc. operate, both ASCII character XORs are become new sequence, now add confidential information and be included in ASCII sequence, this sequence is carried out the character string after anti-ASCII serializing operation can be encrypted.During deciphering, utilize ciphertext character string and encryption and decryption key, reverse execution ciphering process.The method can realize it is critical only that of deciphering, in ciphering process, the md5 of encryption and decryption key adds the ASCII character of confidential information and the ASCII character XOR of encrypted character string, thus the feature of key md5 code is embedded in encrypted character string, and final acquisition encrypted characters string.So the process used must assure that the safety of encryption and decryption key.
Although embodiment of the present invention are disclosed as above, but listed utilization that it is not restricted in description and embodiment, it can be applied to various applicable the field of the invention completely, for those skilled in the art, it is easily achieved other amendment, therefore, under the general concept limited without departing substantially from claim and equivalency range, the present invention is not limited to specific details and shown here as the legend with description.

Claims (1)

1. the two-way encryption data guard method based on MD5, it is characterised in that including: key handling process, ciphering process, decrypting process, wherein,
Key handling process includes: key carries out md5 and base64 transcoding and processes, obtain encryption and decryption private key;Above-mentioned encryption and decryption private key is intercepted, generates the string of checking character of fixing figure place, for the verification operation in follow-up encryption process;Process above-mentioned encryption and decryption private key with pseudo-random algorithm, again upset its order, and this character string is converted to ASCII character, i.e. keylockers, treat follow-up encrypting and decrypting process uses;
Ciphering process includes: first plaintext character string transfers to ASCII character, circulation A SCII code, carries out pseudorandom arrangement by algorithm;In the pseudo-random sequence of above-mentioned plaintext ASCII character string afterbody, add the ASCII character value intercepting the string of checking character generated in key handling process;The pseudo-random sequence containing verification that previous step is generated, the keylockers circulation step-by-step XOR with obtaining in key generation process, obtain new ASCII character string, then transferred to character string;The character string generated in previous step is obtained ciphertext character string through base64 transcoding;
Decrypting process includes: first ciphertext character string carries out base64 decoding operation, and the character string obtained carries out ASCII character process again, obtains ciphertext ASCII character string;Ciphertext ASCII character string previous step generated is circulated step-by-step xor operation with described keylockers;Check part in previous step result is mated with the verification sequence generated in key handling process, if consistent, continue next step and process, inconsistent, by verification failure and return null value;When previous step coupling is consistent, above-mentioned ciphertext ASCII character string and described keylockers is circulated the ASCII character string that step-by-step xor operation obtains and transfers character string to and reverse execution is randomisation process, and finally give expressly character string.
CN201610356831.1A 2016-05-26 2016-05-26 MD5-based two-way encryption data protection method Pending CN105812146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610356831.1A CN105812146A (en) 2016-05-26 2016-05-26 MD5-based two-way encryption data protection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610356831.1A CN105812146A (en) 2016-05-26 2016-05-26 MD5-based two-way encryption data protection method

Publications (1)

Publication Number Publication Date
CN105812146A true CN105812146A (en) 2016-07-27

Family

ID=56451947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610356831.1A Pending CN105812146A (en) 2016-05-26 2016-05-26 MD5-based two-way encryption data protection method

Country Status (1)

Country Link
CN (1) CN105812146A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131049A (en) * 2016-08-15 2016-11-16 福建中金在线信息科技有限公司 A kind of method of data transmission encryption and decryption
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
CN106789975A (en) * 2016-12-07 2017-05-31 广东京奥信息科技有限公司 A kind of method of the text encryption transmission with byte stream is preserved
CN108124480A (en) * 2016-12-27 2018-06-05 深圳配天智能技术研究院有限公司 A kind of software authorization method, system and equipment
CN110046524A (en) * 2019-04-16 2019-07-23 昆山丘钛微电子科技有限公司 A kind of processing method of data, device, electronic equipment and medium
CN111314053A (en) * 2018-12-12 2020-06-19 上海领甲数据科技有限公司 A Data Encryption and Decryption Method Based on Uniformly Distributed Symmetric Algorithm
CN112235098A (en) * 2020-09-17 2021-01-15 成都万江港利科技股份有限公司 A Simple and Fast Communication Encryption and Decryption Algorithm
CN114065304A (en) * 2021-12-02 2022-02-18 四三九九网络股份有限公司 JSON data encryption and decryption method
CN117315808A (en) * 2023-11-28 2023-12-29 成都博瑞科传科技有限公司 Water quality portable inspection instrument and collection method based on data integrity verification
CN118523910A (en) * 2024-07-16 2024-08-20 天津市天益达科技发展有限公司 Multimedia data stream transmission encryption method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005352A (en) * 2007-01-23 2007-07-25 华为技术有限公司 A method, system, server and terminal device for preventing online game cheating
CN102110278A (en) * 2009-12-25 2011-06-29 北京卡达克科技中心 Automotive vehicle certificate printing and data uploading authorization control method and system
CN103873250A (en) * 2012-12-18 2014-06-18 中国移动通信集团河南有限公司 Ciphertext generation method, ciphertext decryption method and encryption/ decryption device
WO2015081808A1 (en) * 2013-12-03 2015-06-11 Tencent Technology (Shenzhen) Company Limited Method and apparatus for data transmission
CN105281901A (en) * 2015-09-24 2016-01-27 浪潮集团有限公司 Encryption method for cloud tenant key information
CN105376261A (en) * 2015-12-21 2016-03-02 Tcl集团股份有限公司 Encryption method and system for instant communication message

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005352A (en) * 2007-01-23 2007-07-25 华为技术有限公司 A method, system, server and terminal device for preventing online game cheating
CN102110278A (en) * 2009-12-25 2011-06-29 北京卡达克科技中心 Automotive vehicle certificate printing and data uploading authorization control method and system
CN103873250A (en) * 2012-12-18 2014-06-18 中国移动通信集团河南有限公司 Ciphertext generation method, ciphertext decryption method and encryption/ decryption device
WO2015081808A1 (en) * 2013-12-03 2015-06-11 Tencent Technology (Shenzhen) Company Limited Method and apparatus for data transmission
CN105281901A (en) * 2015-09-24 2016-01-27 浪潮集团有限公司 Encryption method for cloud tenant key information
CN105376261A (en) * 2015-12-21 2016-03-02 Tcl集团股份有限公司 Encryption method and system for instant communication message

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131049A (en) * 2016-08-15 2016-11-16 福建中金在线信息科技有限公司 A kind of method of data transmission encryption and decryption
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
CN106603485B (en) * 2016-10-31 2020-03-03 美的智慧家居科技有限公司 Key agreement method and device
CN106789975A (en) * 2016-12-07 2017-05-31 广东京奥信息科技有限公司 A kind of method of the text encryption transmission with byte stream is preserved
CN108124480B (en) * 2016-12-27 2022-01-11 深圳配天智能技术研究院有限公司 Software authorization method, system and equipment
CN108124480A (en) * 2016-12-27 2018-06-05 深圳配天智能技术研究院有限公司 A kind of software authorization method, system and equipment
CN111314053A (en) * 2018-12-12 2020-06-19 上海领甲数据科技有限公司 A Data Encryption and Decryption Method Based on Uniformly Distributed Symmetric Algorithm
CN111314053B (en) * 2018-12-12 2023-02-10 上海领甲数据科技有限公司 Data encryption and decryption method
CN110046524A (en) * 2019-04-16 2019-07-23 昆山丘钛微电子科技有限公司 A kind of processing method of data, device, electronic equipment and medium
CN112235098A (en) * 2020-09-17 2021-01-15 成都万江港利科技股份有限公司 A Simple and Fast Communication Encryption and Decryption Algorithm
CN112235098B (en) * 2020-09-17 2023-02-10 成都万江港利科技股份有限公司 A Simple and Rapid Communication Encryption and Decryption Method
CN114065304A (en) * 2021-12-02 2022-02-18 四三九九网络股份有限公司 JSON data encryption and decryption method
CN114065304B (en) * 2021-12-02 2024-05-28 四三九九网络股份有限公司 JSON data encryption and decryption method
CN117315808A (en) * 2023-11-28 2023-12-29 成都博瑞科传科技有限公司 Water quality portable inspection instrument and collection method based on data integrity verification
CN117315808B (en) * 2023-11-28 2024-02-13 成都博瑞科传科技有限公司 Water quality portable inspection instrument and collection method based on data integrity verification
CN118523910A (en) * 2024-07-16 2024-08-20 天津市天益达科技发展有限公司 Multimedia data stream transmission encryption method and system

Similar Documents

Publication Publication Date Title
CN105812146A (en) MD5-based two-way encryption data protection method
US9537657B1 (en) Multipart authenticated encryption
JP4764639B2 (en) File encryption / decryption program, program storage medium
US11308241B2 (en) Security data generation based upon software unreadable registers
CN112202754B (en) Data encryption method and device, electronic equipment and storage medium
US10680816B2 (en) Method and system for improving the data security during a communication process
US20240160792A1 (en) Cryptographic method for verifying data
US20240250826A1 (en) Cryptographic method for verifying data
CN117155549A (en) Key distribution method, key distribution device, computer equipment and storage medium
CN116866029B (en) Random number encryption data transmission method, device, computer equipment and storage medium
CN110889696A (en) Storage method, device, equipment and medium for alliance block chain secret key based on SGX technology
KR102282788B1 (en) Blockchain system for supporting change of plain text data included in transaction
CN115883052A (en) Data encryption method, data decryption method, device and storage medium
CN106330435A (en) Key transformation method and device, and terminal
CN104866784A (en) BIOS encryption-based safety hard disk, and data encryption and decryption method
CN111066077A (en) Encryption device, encryption method, decryption device, and decryption method
CN111314050A (en) Encryption and decryption method and device
WO2020078804A1 (en) Puf based securing of device update
CN119906542A (en) A data encryption and decryption method, system, device and storage medium
CN111314051B (en) An encryption and decryption method and device
US20220417012A1 (en) Method for performing cryptographic operations in a processing device, corresponding processing device and computer program product
KR20170019679A (en) Efficient white-box based encryption-decryption method and tag generation and verification method
CN112291189A (en) Method, device, equipment and storage medium for sending and checking ciphertext
Singh et al. Proposed AES-based Obfuscation and Encryption Model for Cloud Data Security
CN111314079B (en) An encryption and decryption method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160727

WD01 Invention patent application deemed withdrawn after publication