CN106789053A - Random ciphertext generation method and system, decryption method and system - Google Patents

Random ciphertext generation method and system, decryption method and system Download PDF

Info

Publication number
CN106789053A
CN106789053A CN201611144279.6A CN201611144279A CN106789053A CN 106789053 A CN106789053 A CN 106789053A CN 201611144279 A CN201611144279 A CN 201611144279A CN 106789053 A CN106789053 A CN 106789053A
Authority
CN
China
Prior art keywords
plaintext
module
information
algorithm
filling
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
CN201611144279.6A
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201611144279.6A priority Critical patent/CN106789053A/en
Publication of CN106789053A publication Critical patent/CN106789053A/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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher

Landscapes

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

Abstract

The present invention relates to encryption and decryption technology, it discloses a kind of random ciphertext generation method and system, decryption method and system, the ciphertext in solution legacy packets AES to the encryption of same plaintext is unique, weakens the problem of ciphertext security.Random ciphertext generation system, including:AES selecting module, key selecting module, plaintext detection module, plaintext filling algorithm module and enciphering algorithm module;The AES selecting module is used to choose the type of block encryption algorithm;The key selecting module is used to choose the key length of the process that is encrypted;The plaintext detection module is used to judge input plaintext digit;The cleartext information that the plaintext filling algorithm module is used to be unsatisfactory for rule is filled according to special algorithm;The enciphering algorithm module is used to be encrypted the cleartext information after filling to operate and exporting cipher-text information.

Description

Random ciphertext generation method and system, decryption method and system
Technical field
The present invention relates to encryption and decryption technology, and in particular to a kind of random ciphertext generation method and system, decryption method and be System.
Background technology
With the development of information encryption, the intensity of AES is increasingly subject to everybody attention and concern, related Enhancing AES intensity method it is also more and more essential, plaintext by AES generation ciphertext after, to ciphertext Analysis and cracking also become the thing of the frequent concern of hackers, block encryption algorithm frequently commonly uses letter as a use Encryption for information method, is especially suitable for encrypting mass data;But to the ciphertext that same plaintext is encrypted it is only due to block encryption algorithm One, result in hacker can carry out inverse operation to known ciphertext, so as to draw corresponding plaintext, largely reducing the peace of ciphertext Quan Xing;Current legacy packets AES, does not solve the problems, such as this ciphertext uniqueness at all.
The content of the invention
The technical problems to be solved by the invention are:Propose a kind of random ciphertext generation method and system, decryption method and System, the ciphertext in solution legacy packets AES to the encryption of same plaintext is unique, weakens the problem of ciphertext security.
The technical solution adopted for the present invention to solve the technical problems is:
In a first aspect, the invention provides a kind of random ciphertext generation system, including:AES selecting module, key Selecting module, plaintext detection module, plaintext filling algorithm module and enciphering algorithm module;
The AES selecting module is used to choose the type of block encryption algorithm;
The key selecting module is used to choose the key length of the process that is encrypted;
The plaintext detection module is used to judge input plaintext digit;
The cleartext information that the plaintext filling algorithm module is used to be unsatisfactory for rule is filled according to special algorithm;
The enciphering algorithm module is used to be encrypted the cleartext information after filling to operate and exporting cipher-text information.
Used as further optimization, the digit that the plaintext filling algorithm module can be filled is one times or key selected by many times Length position.
Second aspect, the invention provides a kind of random ciphertext generation method, it is comprised the following steps:
A, enciphering algorithm module select used block encryption algorithm;
B, key selecting module determine key length according to selected block encryption algorithm;
C, plaintext detection module are judged the cleartext information being input into, and obtain the length information of its plaintext, and should Cleartext information calculates a summary info by digest algorithm, then gives plaintext filling algorithm mould by length of the plaintext information transmission Block, enciphering algorithm module is passed to by plaintext summary info;
D, plaintext filling algorithm module are filled according to the length information of be input into plaintext according to special algorithm;
The plaintext that E, enciphering algorithm module are exported using AES and symmetry algorithm key to plaintext filling algorithm module Plaintext summary info before information and filling is encrypted, and exports a cipher-text information.
Used as further optimization, in step D, if length of the plaintext deficiency key length, plaintext filling algorithm module is then given birth to Into random order information, and one times of key length will be filled into plain text using the information, one times of key length will then be generated again Random order information, behind the cleartext information before being filled into;If length of the plaintext is equal to key length, plaintext filling algorithm module One times of random order information of key length is then generated, is filled into behind cleartext information;If length of the plaintext is more than key length, bright Literary filling algorithm module is then first averagely cut cleartext information by key integral multiple, random order information is generated, to less than one The cleartext information of times key length is filled.
The third aspect, the embodiment of the present invention additionally provides a kind of decryption system, including:Decipherment algorithm module, reversely plaintext Filling module and plaintext correction verification module;
The decipherment algorithm module is used to be decrypted cipher-text information to operate and exporting the cleartext information with filler;
The reverse plaintext filling module is used to remove the filler information in cleartext information and export final plaintext Information;
The plaintext correction verification module is used to calculate and contrast the uniformity of the plaintext before input and the plaintext after decryption.
Fourth aspect, the embodiment of the present invention additionally provides a kind of decryption method, and it is comprised the following steps:
A, decipherment algorithm module are believed the ciphertext after cipher-text information is received using decipherment algorithm and symmetry algorithm key Breath is decrypted operation, obtains the cleartext information containing plaintext filler and plaintext summary info, and will contain plaintext filler Cleartext information pass to reverse plaintext filling algorithm module, plaintext summary info is passed into plaintext correction verification module;
B, reverse plaintext filling algorithm module carry out contrary operation to the cleartext information containing plaintext filler for obtaining, and obtain Go out one and remove the cleartext information of plaintext filler, and export and give plaintext correction verification module;
C, plaintext correction verification module calculate summary info to the cleartext information for receiving, and by the summary info and before from solution The plaintext summary info that close algoritic module is received is contrasted, and decryption oprerations success is judged if consistent, otherwise then decryption is lost Lose.
The beneficial effects of the invention are as follows:Random filler can be automatically added in plaintext, same plaintext is being added every time The algorithm of different ciphertexts can be generated after close, so that increase the strong degree of password, even if after realizing that hacker obtains ciphertext, it is also difficult reverse Release in plain text, so as to increased data transmission security.
Brief description of the drawings
Fig. 1 is the random ciphertext generation system block diagram in the embodiment of the present invention;
Fig. 2 is the decryption system block diagram in the embodiment of the present invention.
Specific embodiment
The present invention is directed to propose a kind of random ciphertext generation method and system, decryption method and system, solve legacy packets Ciphertext in AES to the encryption of same plaintext is unique, weakens the problem of ciphertext security.The present invention can be in plaintext Automatically random filler is added, same plaintext is generated the algorithm of different ciphertexts after encryption every time, so as to increase close The strong degree of code, even if after realizing that hacker obtains ciphertext, it is also difficult inversely to release in plain text.
As shown in figure 1, the random ciphertext generation system in the present embodiment, including:AES selecting module, key selection Module, plaintext detection module, plaintext filling algorithm module and enciphering algorithm module;
The AES selecting module is used to choose the type of block encryption algorithm;
The key selecting module is used to choose the key length of the process that is encrypted;
The plaintext detection module is used to judge input plaintext digit;
The cleartext information that the plaintext filling algorithm module is used to be unsatisfactory for rule is filled according to special algorithm;
The enciphering algorithm module is used to be encrypted the cleartext information after filling to operate and exporting cipher-text information.
The digit that the plaintext filling algorithm module can be filled is the length position of a times or key selected by many times.
Based on the random ciphertext generation method that the random ciphertext generation system is realized, including implemented below step:
A, procedure Selection which kind of block encryption algorithm (such as DES);
B, program pass through the AES (DES) for choosing, and choose the encryption key lengths (128bi t) for using.
C, plaintext detection module judged the input cleartext information for getting, and the length of its information is judged using algorithm Degree, then calls HASH algorithms (such as MD5 algorithms) that the cleartext information is calculated into a summary info, afterwards by length of the plaintext number According to passing to plaintext filling algorithm module, and plaintext summary info is passed into enciphering algorithm module.
D, plaintext filling algorithm module judge whether how the cleartext information is entered according to the length information of be input into plaintext Row padding, if length of the plaintext deficiency key length, plaintext filling algorithm module then generates random order information, and use should Plaintext is filled into one times of key length by information, one times of random order information of key length is then generated again, before being filled into Cleartext information behind;If length of the plaintext is equal to key length, plaintext filling algorithm module then generates one times of key length Random order information, is filled into behind cleartext information;If length of the plaintext is more than key length, plaintext filling algorithm module then first will Cleartext information is averagely cut by key integral multiple, random order information is generated, to the cleartext information less than one times of key length It is filled.
The plaintext that E, enciphering algorithm module are exported using AES and symmetry algorithm key to plaintext filling algorithm module Plaintext summary info before information and filling is encrypted, and exports a cipher-text information.
As shown in Fig. 2 the decryption system in the present embodiment, including:Decipherment algorithm module, reversely in plain text filling module and Plaintext correction verification module;
The decipherment algorithm module is used to be decrypted cipher-text information to operate and exporting the cleartext information with filler;
The reverse plaintext filling module is used to remove the filler information in cleartext information and export final plaintext Information;
The plaintext correction verification module is used to calculate and contrast the uniformity of the plaintext before input and the plaintext after decryption.
Based on the decryption method that above-mentioned decryption system is realized, including implemented below step:
A, decipherment algorithm module are believed the ciphertext after cipher-text information is received using decipherment algorithm and symmetry algorithm key Breath is decrypted operation, obtains the cleartext information containing plaintext filler and plaintext summary info, and will contain plaintext filler Cleartext information pass to reverse plaintext filling algorithm module, plaintext summary info is passed into plaintext correction verification module;
B, reverse plaintext filling algorithm module carry out contrary operation to the cleartext information containing plaintext filler for obtaining, and obtain Go out one and remove the cleartext information of plaintext filler, and export and give plaintext correction verification module;
C, plaintext correction verification module calculate summary info to the cleartext information for receiving, and by the summary info and before from solution The plaintext summary info that close algoritic module is received is contrasted, and decryption oprerations success is judged if consistent, otherwise then decryption is lost Lose.
Random filler is added to cleartext information using the present invention, after encryption every time, different ciphertext letters can be generated Breath, substantially increases the cost that hackers obtain sensitive data, increased the strong degree of ciphertext, improves the safety of related system Property.
Above-described embodiment is only the present invention preferably implementation method, it should be appreciated that those skilled in the art can be designed that A lot of other modifications and implementation method, all any modifications made within the spirit and principles in the present invention, equivalent and Improve etc., should be included within the scope of the present invention.

Claims (6)

1. random ciphertext generates system, it is characterised in that including:AES selecting module, in plain text key selecting module, detection Module, plaintext filling algorithm module and enciphering algorithm module;
The AES selecting module is used to choose the type of block encryption algorithm;
The key selecting module is used to choose the key length of the process that is encrypted;
The plaintext detection module is used to judge input plaintext digit;
The cleartext information that the plaintext filling algorithm module is used to be unsatisfactory for rule is filled according to special algorithm;
The enciphering algorithm module is used to be encrypted the cleartext information after filling to operate and exporting cipher-text information.
2. random ciphertext as claimed in claim 1 generates system, it is characterised in that the plaintext filling algorithm module can be filled Digit be one times or key selected by many times length position.
3. random ciphertext generation method, it is characterised in that comprise the following steps:
A, enciphering algorithm module select used block encryption algorithm;
B, key selecting module determine key length according to selected block encryption algorithm;
C, plaintext detection module are judged the cleartext information being input into, and obtain the length information of its plaintext, and by this in plain text Information calculates a summary info by digest algorithm, then gives plaintext filling algorithm module by length of the plaintext information transmission, Plaintext summary info is passed into enciphering algorithm module;
D, plaintext filling algorithm module are filled according to the length information of be input into plaintext according to special algorithm;
The cleartext information that E, enciphering algorithm module are exported using AES and symmetry algorithm key to plaintext filling algorithm module It is encrypted with the plaintext summary info before filling, exports a cipher-text information.
4. ciphertext generation method as claimed in claim 3 random, it is characterised in that in step D, if length of the plaintext deficiency is close Key length, plaintext filling algorithm module then generates random order information, and plaintext is filled into one times of key length using the information, Then one times of random order information of key length is generated again, behind the cleartext information before being filled into;If length of the plaintext etc. In key length, plaintext filling algorithm module then generates one times of random order information of key length, is filled into behind cleartext information; If length of the plaintext is more than key length, plaintext filling algorithm module is then first averagely cut cleartext information by key integral multiple Cut, generate random order information, the cleartext information less than one times of key length is filled.
5. decryption system, it is characterised in that including:Decipherment algorithm module, reversely plaintext filling module and plaintext correction verification module;
The decipherment algorithm module is used to be decrypted cipher-text information to operate and exporting the cleartext information with filler;
The reverse plaintext filling module is used to remove the filler information in cleartext information and export final cleartext information;
The plaintext correction verification module is used to calculate and contrast the uniformity of the plaintext before input and the plaintext after decryption.
6. decryption method, it is characterised in that comprise the following steps:
A, decipherment algorithm module are entered using decipherment algorithm and symmetry algorithm key after cipher-text information is received to the cipher-text information Row decryption oprerations, obtain the cleartext information containing plaintext filler and plaintext summary info, and will contain the bright of plaintext filler Literary information transmission gives reverse plaintext filling algorithm module, and plaintext summary info is passed into plaintext correction verification module;
B, reverse plaintext filling algorithm module carry out contrary operation to the cleartext information containing plaintext filler for obtaining, and draw one It is individual to remove the cleartext information of plaintext filler, and export and give plaintext correction verification module;
C, plaintext correction verification module calculate summary info to the cleartext information for receiving, and are calculated by the summary info and before from decryption The plaintext summary info that method module is received is contrasted, and decryption oprerations success is judged if consistent, otherwise then decryption fails.
CN201611144279.6A 2016-12-13 2016-12-13 Random ciphertext generation method and system, decryption method and system Pending CN106789053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611144279.6A CN106789053A (en) 2016-12-13 2016-12-13 Random ciphertext generation method and system, decryption method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611144279.6A CN106789053A (en) 2016-12-13 2016-12-13 Random ciphertext generation method and system, decryption method and system

Publications (1)

Publication Number Publication Date
CN106789053A true CN106789053A (en) 2017-05-31

Family

ID=58880505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611144279.6A Pending CN106789053A (en) 2016-12-13 2016-12-13 Random ciphertext generation method and system, decryption method and system

Country Status (1)

Country Link
CN (1) CN106789053A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134799A (en) * 2018-01-18 2018-06-08 国网湖南省电力有限公司 Novel encipher-decipher method and its device
US20210266175A1 (en) * 2018-06-18 2021-08-26 Koninklijke Philips N.V. Device for data encryption and integrity
CN113794550A (en) * 2021-08-09 2021-12-14 山东浪潮工业互联网产业股份有限公司 Link random encryption method and system
CN115001758A (en) * 2022-05-18 2022-09-02 矩阵时光数字科技有限公司 Short byte message security encryption method based on quantum encryption

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546156A (en) * 2012-02-01 2012-07-04 李智虎 Method, system and device for grouping encryption
CN103684794A (en) * 2013-12-25 2014-03-26 华南理工大学 Communication data encryption and decryption method based on DES (Data Encryption Standard), RSA and SHA-1 (Secure Hash Algorithm) encryption algorithms
CN104580129A (en) * 2013-10-29 2015-04-29 杭州迪普科技有限公司 SSL asynchronization agent method based on stream processing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546156A (en) * 2012-02-01 2012-07-04 李智虎 Method, system and device for grouping encryption
CN104580129A (en) * 2013-10-29 2015-04-29 杭州迪普科技有限公司 SSL asynchronization agent method based on stream processing
CN103684794A (en) * 2013-12-25 2014-03-26 华南理工大学 Communication data encryption and decryption method based on DES (Data Encryption Standard), RSA and SHA-1 (Secure Hash Algorithm) encryption algorithms

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134799A (en) * 2018-01-18 2018-06-08 国网湖南省电力有限公司 Novel encipher-decipher method and its device
US20210266175A1 (en) * 2018-06-18 2021-08-26 Koninklijke Philips N.V. Device for data encryption and integrity
CN113794550A (en) * 2021-08-09 2021-12-14 山东浪潮工业互联网产业股份有限公司 Link random encryption method and system
CN115001758A (en) * 2022-05-18 2022-09-02 矩阵时光数字科技有限公司 Short byte message security encryption method based on quantum encryption
CN115001758B (en) * 2022-05-18 2024-05-07 矩阵时光数字科技有限公司 Quantum encryption-based short byte message security encryption method

Similar Documents

Publication Publication Date Title
EP3552338B1 (en) Method of rsa signature or decryption protected using a homomorphic encryption
CN106385313A (en) Random cryptograph system based on grouping encryption algorithm and realization method thereof
US9608822B2 (en) Method for generating an HTML document that contains encrypted files and the code necessary for decrypting them when a valid passphrase is provided
JP2016515235A5 (en)
EP3476078B1 (en) Systems and methods for authenticating communications using a single message exchange and symmetric key
CN103595698B (en) Management method for digital rights
CN109104271B (en) Digital signature method, device and system
CN106789053A (en) Random ciphertext generation method and system, decryption method and system
CN109005027A (en) A kind of random data encryption and decryption method, apparatus and system
CN103905187A (en) Network communication encryption method based on contents
CN113014380B (en) File data password management method and device, computer equipment and storage medium
CN107306181A (en) Encryption, verification method and the device of right discriminating system and its authentication information
JP2022521525A (en) Cryptographic method for validating data
CN102255725A (en) Random hybrid key encryption/decryption method
CN106878322A (en) A kind of encryption and decryption method of the fixed length ciphertext based on attribute and key
CN111314050B (en) Encryption and decryption method and device
CN103942500B (en) Hash ciphertext re-encryption method based on noise and decryption method after re-encryption
CN104579680A (en) Method for safe distribution of seed
CN115883052A (en) Data encryption method, data decryption method, device and storage medium
CN107070874A (en) System, encryption method and the device of broadcast communication, decryption method and device
EP2960891B1 (en) Method for introducing dependence of white-box implementationon a set of strings
CN106453362A (en) Data transmission method and apparatus of vehicle-mounted device
CN112385175A (en) Device for data encryption and integrity
US8862893B2 (en) Techniques for performing symmetric cryptography
CN110149311B (en) Data processing method, device, server and readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531

RJ01 Rejection of invention patent application after publication