CN109660328A - Symmetric block encryption method, apparatus, equipment and medium - Google Patents

Symmetric block encryption method, apparatus, equipment and medium Download PDF

Info

Publication number
CN109660328A
CN109660328A CN201811597742.1A CN201811597742A CN109660328A CN 109660328 A CN109660328 A CN 109660328A CN 201811597742 A CN201811597742 A CN 201811597742A CN 109660328 A CN109660328 A CN 109660328A
Authority
CN
China
Prior art keywords
original text
group
exclusive
encryption
length
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
CN201811597742.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.)
CHINA FINANCIAL CERTIFICATION AUTHORITY CENTER Co Ltd
Original Assignee
CHINA FINANCIAL CERTIFICATION AUTHORITY CENTER 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 CHINA FINANCIAL CERTIFICATION AUTHORITY CENTER Co Ltd filed Critical CHINA FINANCIAL CERTIFICATION AUTHORITY CENTER Co Ltd
Priority to CN201811597742.1A priority Critical patent/CN109660328A/en
Publication of CN109660328A publication Critical patent/CN109660328A/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/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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

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 provides a kind of symmetric block encryption method, apparatus, equipment and media.Wherein, this method comprises: using original text is obtained;According to the encryption block length of symmetric block encryption algorithm, the original text is grouped into N group original text;Obtain length random number identical with the encryption block length;By the random number respectively with every group of original text step-by-step exclusive or in the N group original text be N group exclusive or original text;After random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypt as the 1st group encryption ciphertext;After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt as i+1 group encryption ciphertext;Generate encrypted result.Through the invention, it solves the problems, such as to encrypt that risk of leakage caused by original text is big using Standard Symmetric Multivariate Tuber yield, reduces the risk that original text leaks during block encryption.

Description

Symmetric block encryption method, apparatus, equipment and medium
Technical field
The present invention relates to field of information security technology, in particular to a kind of symmetric block encryption method, apparatus, equipment And medium.
Background technique
Data encryption is the core technology of information security field, including symmetrical code key system and public key cryptography system.Symmetrically Code key system is broadly divided into: symmetric block encryption and symmetrical stream encryption system.
The basic step of Standard Symmetric Multivariate Tuber yield is: original text being split according to regular length, end deficiency is then It is filled, block original text and code key is subjected to special Encryption Algorithm processing after the completion of filling, get encrypted cipher text.Wherein CBC IV (initialization vector) is needed to participate in first time block encryption when mode (cipher block chaining mode), then by first time block encryption As a result block encryption is carried out as encryption original text with second of block encryption original text exclusive or, and so on, finally obtain encrypted result.
Standard Symmetric Multivariate block decipherment algorithm is that Encryption Algorithm is carried out inverse operation to obtain the splicing of block encryption result.
It finds in the course of the research, existing symmetric block encryption haves the shortcomings that following:
1, since Tuber yield must be encrypted as unit of fixed block, block encryption is to realize update Original text must first be decrypted to be spliced, in the process, if using Standard Symmetric Multivariate Tuber yield to updated original text It is encrypted, it will lead to occur the source language message in memory, increase the risk of original text leakage.
2, since Tuber yield lacks the checking procedure of decrypted result, if symmetric cryptography code key or ciphertext are contaminated, Symmetry blocks decipherment algorithm can be used and be normally carried out decryption operation, and be difficult to judge whether decrypted result is correct.
Summary of the invention
The present invention provides a kind of symmetric block encryption method, apparatus, equipment and media, at least to solve to make in the related technology The big problem of risk of leakage caused by original text is encrypted with Standard Symmetric Multivariate Tuber yield.
In a first aspect, the embodiment of the invention provides a kind of symmetric block encryption methods, comprising:
Obtain original text;
According to the encryption block length of symmetric block encryption algorithm, the original text is grouped into N group original text;
Obtain length random number identical with the encryption block length;
By the random number respectively with every group of original text step-by-step exclusive or in the N group original text be N group exclusive or original text;
After random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypt for the 1st group encryption it is close Text;After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt for i+1 group encryption it is close Text;Generate encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
Second aspect, the embodiment of the invention provides a kind of symmetric block encryption device, described device includes:
First obtains module, for obtaining original text;
The original text is grouped into N group original text for the encryption block length according to symmetric block encryption algorithm by grouping module;
Second obtains module, for obtaining length random number identical with the encryption block length;
Encrypting module, for the random number is different for N group with every group of original text step-by-step exclusive or in the N group original text respectively Or original text;After random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypt as the 1st group encryption ciphertext; After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt as i+1 group encryption ciphertext; Generate encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
The third aspect, the embodiment of the invention provides a kind of symmetric block encryption equipment, comprising: at least one processor, extremely The computer program instructions of a few memory and storage in the memory, when the computer program instructions are described Method described in first aspect is realized when processor executes.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence instruction, method described in first aspect is realized when the computer program instructions are executed by processor.
Symmetric block encryption method, apparatus, equipment and the medium provided through the embodiment of the present invention, using acquisition original text;It presses According to the encryption block length of symmetric block encryption algorithm, the original text is grouped into N group original text;Obtain length and the encryption block length Identical random number;By the random number respectively with every group of original text step-by-step exclusive or in the N group original text be N group exclusive or original text; After random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypt as the 1st group encryption ciphertext;By i-th group Encrypted cipher text exclusive or i+1 group exclusive or original text after random number described in exclusive or, re-encrypts again as i+1 group encryption ciphertext;It generates and adds Close result;Wherein, i=1,2,3 ... N-1, N are the mode of the number of packet of the multiple groups exclusive or original text, are solved using standard The big problem of risk of leakage caused by symmetric block encryption algorithm for encryption original text reduces the wind of original text leakage during block encryption Danger.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of symmetric block encryption method according to an embodiment of the present invention;
Fig. 2 is the structural block diagram of symmetric block encryption device according to an embodiment of the present invention;
Fig. 3 is the hardware structural diagram of symmetric cryptography equipment according to an embodiment of the present invention;
Fig. 4 is the flow chart of symmetric block encryption method according to the preferred embodiment of the invention.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention , technical solution and advantage be more clearly understood, with reference to the accompanying drawings and embodiments, the present invention is further retouched in detail It states.It should be understood that described herein, the specific embodiments are only for explaining the present invention, is not intended to limit the present invention.For ability For field technique personnel, the present invention can be implemented in the case where not needing some details in these details.It is right below The description of embodiment is used for the purpose of better understanding the present invention to provide by showing example of the invention.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including There is also other identical elements in the process, method, article or equipment of the element.
A kind of symmetric block encryption method is provided in the present embodiment, and Fig. 1 is that symmetry blocks according to an embodiment of the present invention add The flow chart of decryption method, as shown in Figure 1, the process includes the following steps:
Step S101 obtains original text;
The original text is grouped into N group original text according to the encryption block length of symmetric block encryption algorithm by step S102;
Step S103 obtains length random number identical with the encryption block length;
The random number is respectively that N group exclusive or is former with every group of original text step-by-step exclusive or in the N group original text by step S104 Text;
Step S105, after random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypting is the 1st Group encryption ciphertext;After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt as i+1 Group encryption ciphertext;Generate encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
Through the above steps, in step s105 carry out symmetric block encryption during, encrypted encryption original text be through The exclusive or original text obtained after original text and random number exclusive or is crossed, therefore is not in original text in memory in ciphering process, is reduced The risk of original text leakage.
In order to further decrease the original text risk of leakage during symmetric block encryption, above-mentioned steps S101~step S104 can To be executed in the equipment (such as security card) being protected.
Optionally, according to the encryption block length of symmetric block encryption algorithm, by the original text be grouped into multiple groups original text include: In the case that the length of last group of original text is less than the encryption block length in the multiple groups original text, in last group of original text End filling 1 or 0, with the insufficient length of polishing.
Since whether can not verify decrypted result correct for existing Standard Symmetric Multivariate Tuber yield, in order to solve above-mentioned ask Topic optionally in the present embodiment, is modified encryption original text: before obtaining original text, obtaining input data;This is defeated Entering data is the plaintext for needing to encrypt originally;Calculate the abstract of the input data;By the input data and the abstract group It is combined into the original text.By the above-mentioned means, abstract is embedded in original text, so as to can use abstract defeated to verify its for decrypted result Whether correct enter data.Above-mentioned abstract can be calculated using well known any summary info algorithm.
Optionally, by the input data and the abstract group be combined into the original text include: by input data length field, The input data, length of summarization field and the abstract group are combined into the original text;Wherein, the input data length field Length is the first preset length, and value is the length value of the input data;The length of the length of summarization field is second pre- If length, value is the length value of the abstract.In the above method, once input data length field, the input data, The built-up sequence and input data length field of length of summarization field and the abstract and the length of length of summarization field are Know information, then after decryption obtains decrypted result, so that it may according to known built-up sequence and field length, solve accordingly Input data and abstract are got in close result, and then whether correct to verify input data using making a summary.
Optionally, the length of the abstract is identical as the encryption block length, and in this case, abstract can be placed on one It is encrypted in a cryptographic block.At this point, the abstract can be spelled when the input data and the abstract group are combined into the original text It is connected to the head or tail portion of the input data, the original text is combined into group.By above-mentioned mode, obtained in decryption ciphertext After decrypted result, it can directly be made a summary from first decryption block or the last one decryption block, improve treatment effeciency.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
A kind of symmetric block encryption device is additionally provided in the present embodiment, and the device is for realizing above-described embodiment and preferably Embodiment, the descriptions that have already been made will not be repeated.As used below, term " module ", " unit " or " son list The combination of the software and/or hardware of predetermined function may be implemented in member " etc..Although device described in following embodiment preferably with Software is realized, but the realization of the combination of hardware or software and hardware is also that may and be contemplated.
Fig. 2 is the structural block diagram of symmetric block encryption device according to an embodiment of the present invention, as shown in Fig. 2, the device includes:
First obtains module 21, for obtaining original text;
It is former to be grouped into N group for the encryption block length according to symmetric block encryption algorithm by grouping module 22 for the original text Text;
Second obtains module 23, for obtaining length random number identical with the encryption block length;
Computing module 24, for by the random number respectively with every group of original text step-by-step exclusive or in the N group original text be N group Exclusive or original text;
Encrypting module 25, for re-encrypting after random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or For the 1st group encryption ciphertext;After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt for I+1 group encryption ciphertext;Generate encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
Optionally, described device further include:
Third obtains module, for obtaining input data;
Computing module, for calculating the abstract of the input data;
Composite module is coupled to third and obtains module and computing module, is used for the input data and the abstract group It is combined into the original text.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned module be located at it is more In a processor.
In addition, in conjunction with Fig. 1 describe the embodiment of the present invention symmetric block encryption method can by symmetric block encryption equipment Lai It realizes.Fig. 3 shows the hardware structural diagram of symmetric block encryption equipment provided in an embodiment of the present invention.
Symmetric block encryption equipment may include processor 31 and the memory 32 for being stored with computer program instructions.
Specifically, above-mentioned processor 31 may include central processing unit (CPU) or specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention One or more integrated circuits of example.
Memory 32 may include the mass storage for data or instruction.For example it rather than limits, memory 32 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or logical With the combination of universal serial bus (Universal Serial Bus, USB) driver or two or more the above.It is closing In the case where suitable, memory 32 may include the medium of removable or non-removable (or fixed).In a suitable case, memory 32 can be inside or outside data processing equipment.In a particular embodiment, memory 32 is non-volatile solid state memory.? In specific embodiment, memory 32 includes read-only memory (ROM).In a suitable case, which can be masked edit program ROM, programming ROM (PROM), erasable PROM (EPROM), electric erasable PROM (EEPROM), electrically-alterable ROM (EAROM) Or the combination of flash memory or two or more the above.
Processor 31 is by reading and executing the computer program instructions stored in memory 32, to realize above-described embodiment In any one symmetric block encryption method.
In one example, symmetric block encryption equipment may also include communication interface 33 and bus 30.Wherein, as shown in figure 3, Processor 31, memory 32, communication interface 33 connect by bus 30 and complete mutual communication.
Communication interface 33 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment Communication.
Bus 30 includes hardware, software or both, and the component of symmetric block encryption equipment is coupled to each other together.Citing comes It says rather than limits, bus may include accelerated graphics port (AGP) or other graphics bus, enhance Industry Standard Architecture (EISA) always Line, front side bus (FSB), super transmission (HT) interconnection, the interconnection of Industry Standard Architecture (ISA) bus, infinite bandwidth, low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association part (VLB) bus or other conjunctions The combination of suitable bus or two or more the above.In a suitable case, bus 30 may include one or more Bus.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention considers any suitable bus or interconnection.
The symmetric block encryption equipment can execute the symmetric block encryption side in the embodiment of the present invention based on the data got Method, to realize the symmetric block encryption method described in conjunction with Fig. 1.
In addition, in conjunction with the symmetric block encryption method in above-described embodiment, the embodiment of the present invention can provide a kind of computer can Storage medium is read to realize.Computer program instructions are stored on the computer readable storage medium;The computer program instructions Any one symmetric block encryption method in above-described embodiment is realized when being executed by processor.
In order to keep the description of the embodiment of the present invention clearer, it is described and illustrates below with reference to preferred embodiment.
This preferred embodiment provides a kind of symmetric block encryption method, in the preferred embodiment, for Tuber yield The problem of data update must decrypt original text, modification algorithm, which is realized, realizes that block encryption is updated in non-decrypting original text, this is excellent Selecting embodiment to also achieve can judge symmetrically to decrypt the result is that no correct technical effect.
This preferred embodiment is particularly suitable for needing the encryption scene of dynamic more new data, such as the character of code keyboard is defeated Encryption etc. during entering.
With reference to Fig. 4, the symmetric block encryption method of this preferred embodiment includes the following steps:
Step 1: eap-message digest operation being carried out to input original text, by data according to input original text length+input original text+abstract Length+abstract mode carries out splicing as encryption original text.
Step 2: generating random number identical with encryption block length;
Step 3: by random number and encryption original text position exclusive or, if original text length be greater than random number length, beyond part after It is continuous to carry out exclusive or with random number, and so on;
Step 4: the encryption original text after exclusive or being encrypted, when first group of data encryption, by " the original text exclusive or of former algorithm Initialization vector " is revised as " original text exclusive or initialization vector exclusive or random number ", when second group of data encryption.By former algorithm " first group of ciphertext exclusive or, second group of original text " is revised as " first group of ciphertext exclusive or, second group of original text exclusive or random number ";
Such as:
If: original text is the multiple groups P1, P2, P3... being grouped as according to scheduled encryption block length, random number S, initialization Vector is IV, and V is cryptographic block after exclusive or, and E is encrypted cipher text, and BOX is Encryption Algorithm, then
V=P^S
If using standard encryption algorithms:
E1=BOX (P1^IV);(i.e. the 1st group of data will obtained after plaintext data block P1 and initialization vector IV exclusive or Exclusive or original text) it is encrypted, obtain encrypted cipher text E1;
E2=BOX (E1^P2);I.e. by the data obtained after encrypted cipher text E1 and plaintext data block P2 exclusive or, (i.e. the 2nd group different Or original text) encrypted, obtain encrypted cipher text E2;
Subsequent ciphering process is identical as the encryption method of E2, until total data encryption finishes.
Using the Encryption Algorithm of this preferred embodiment:
E1=BOX (V1^IV^S);
E2=BOX (E1^V2^S);
Subsequent ciphering process is also identical as the encryption method of E2, until total data encryption finishes.
Due to P^S^S=P, then BOX (P1^IV)=BOX (P1^S^IV^S)=BOX (V1^IV^S).
It can be seen that not occurring original text (P1, P2, P3 ...) in ciphering process using the Encryption Algorithm of this preferred embodiment, but different Or original text is consistent with original text, the encrypted result (E1, E2, E3 ...) that two Encryption Algorithm obtain and standard encryption algorithms are kept Unanimously, it can be decrypted by standard decipherment algorithm.
Step 5: obtaining encrypted result;
Step 6: according to splicing Rule input original text and original text after encrypted result is decrypted using canonical algorithm Abstract carries out abstract operation to input original text and compares with abstract is decrypted, indicates successful decryption if consistent.
Using the mechanism for increasing random number variable and operation of making a summary in the algorithm above, can be realized in asymmetric encryption procedure In do not occur updating encryption data in the case where plaintext, guarantee decryption operation result it is correct.
Further, since therefore P^S^S=P during the block encryption of the embodiment of the present invention, can update random at any time Number S, to realize the promotion of safety.
For example, realizing that encryption data realizes update, process packet in the case where non-decrypting original text through the embodiment of the present invention Include following steps:
Step 1, random number S identical with IV length is generated, it is assumed that the length of S is 16 points to be denoted as s1, s2, s3 ..., s16;
Step 2, input a data p1 length is 1, by data p1 and s1 exclusive or, obtains r1.R1 is saved;
Step 3, input second data p2 length is 2, by data p2 and s2 exclusive or, obtains r2.Exclusive or original text becomes r1+ r2;
Step 4, if to update random number, new random number Sn is generated, Sn length is also 16 points, it is not denoted as sn1, Sn2 ..., sn16;
Step 5, r1, r2 are distinguished into exclusive or s1, s2 distinguishes exclusive or sn1, sn2 again, then realizes that updating random number S is Sn;
Step 6, continue to p3 ... encryption using new random number Sn.
When input data length is greater than 16, i.e., original text length is greater than block encryption length, then according to the rule of block confidentiality algorithm Then, then 16 (length of a cryptographic block) be will exceed but without departing from the data pn and s of 32 (length of two cryptographic blocks) parts (n%16) exclusive or is carried out;
R1 after the completion of total data input, r2 ..., rn ... are the original text after exclusive or.Then block encryption fortune is carried out again It calculates.In above-mentioned algorithm, do not occur original text in ciphering process.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of symmetric block encryption method characterized by comprising
Obtain original text;
According to the encryption block length of symmetric block encryption algorithm, the original text is grouped into N group original text;
Obtain length random number identical with the encryption block length;
By the random number respectively with every group of original text step-by-step exclusive or in the N group original text be N group exclusive or original text;
After random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypt as the 1st group encryption ciphertext;It will I-th group encryption ciphertext exclusive or i+1 group exclusive or original text after random number described in exclusive or, re-encrypts again as i+1 group encryption ciphertext;It is raw At encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
2. the method according to claim 1, wherein according to the encryption block length of symmetric block encryption algorithm, by institute It states original text and is grouped into multiple groups original text and include:
In the multiple groups original text length of last group of original text be less than the encryption block length in the case where, it is described last The end filling 1 or 0 of group original text, with the insufficient length of polishing.
3. the method according to claim 1, wherein before obtaining original text, the method also includes:
Obtain input data;
Calculate the abstract of the input data;
The input data and the abstract group are combined into the original text.
4. according to the method described in claim 3, it is characterized in that, the input data and the abstract group are combined into the original Text includes:
Input data length field, the input data, length of summarization field and the abstract group are combined into the original text;
Wherein, the length of the input data length field is the first preset length, and value is the length value of the input data; The length of the length of summarization field is the second preset length, and value is the length value of the abstract.
5. according to the method described in claim 3, it is characterized in that, the length of the abstract is identical as the encryption block length.
6. according to the method described in claim 5, it is characterized in that, the input data and the abstract group are combined into the original Text includes:
Described make a summary is spliced to the head or tail portion of the input data, the original text is combined into group.
7. a kind of symmetric block encryption device, which is characterized in that described device includes:
First obtains module, for obtaining original text;
The original text is grouped into N group original text for the encryption block length according to symmetric block encryption algorithm by grouping module;
Second obtains module, for obtaining length random number identical with the encryption block length;
Computing module, for being respectively that N group exclusive or is former with every group of original text step-by-step exclusive or in the N group original text by the random number Text;
Encrypting module, for by after random number described in the 1st group of exclusive or original text exclusive or initialization vector again exclusive or, re-encrypting to be the 1st Group encryption ciphertext;After random number described in the i-th group encryption ciphertext exclusive or i+1 group exclusive or original text again exclusive or, re-encrypt as i+1 Group encryption ciphertext;Generate encrypted result;
Wherein, i=1,2,3 ... N-1, N are the number of packet of the multiple groups exclusive or original text.
8. device according to claim 7, which is characterized in that described device further include:
Third obtains module, for obtaining input data;
Computing module, for calculating the abstract of the input data;
Composite module, for the input data and the abstract group to be combined into the original text.
9. a kind of symmetric block encryption equipment characterized by comprising at least one processor, at least one processor and deposit The computer program instructions of storage in the memory, are realized such as when the computer program instructions are executed by the processor Method of any of claims 1-6.
10. a kind of computer readable storage medium, is stored thereon with computer program instructions, which is characterized in that when the calculating Such as method of any of claims 1-6 is realized when machine program instruction is executed by processor.
CN201811597742.1A 2018-12-26 2018-12-26 Symmetric block encryption method, apparatus, equipment and medium Pending CN109660328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811597742.1A CN109660328A (en) 2018-12-26 2018-12-26 Symmetric block encryption method, apparatus, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811597742.1A CN109660328A (en) 2018-12-26 2018-12-26 Symmetric block encryption method, apparatus, equipment and medium

Publications (1)

Publication Number Publication Date
CN109660328A true CN109660328A (en) 2019-04-19

Family

ID=66115165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811597742.1A Pending CN109660328A (en) 2018-12-26 2018-12-26 Symmetric block encryption method, apparatus, equipment and medium

Country Status (1)

Country Link
CN (1) CN109660328A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125781A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 File signature method and device and file signature verification method and device
CN112149174A (en) * 2019-06-28 2020-12-29 北京百度网讯科技有限公司 Model training method, device, equipment and medium
CN112464258A (en) * 2020-11-02 2021-03-09 中国银联股份有限公司 Data encryption and decryption method, device, equipment and storage medium
CN117411727A (en) * 2023-12-14 2024-01-16 山东省大数据中心 Encryption method, device and storage medium for symmetric encryption of communication transmission

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337732A (en) * 2015-10-29 2016-02-17 国网智能电网研究院 Encryption method capable of processing large data packets
CN106385313A (en) * 2016-09-08 2017-02-08 四川长虹电器股份有限公司 Random cryptograph system based on grouping encryption algorithm and realization method thereof
CN106656473A (en) * 2016-12-29 2017-05-10 北京握奇智能科技有限公司 Safe MAC calculation method and system of DES algorithm
CN108063760A (en) * 2017-12-11 2018-05-22 苏州科达科技股份有限公司 Method and its system, the method for packet deciphering of a kind of block encryption
CN108566270A (en) * 2018-04-26 2018-09-21 成都盛拓源科技有限公司 Use the novel encryption method of double block ciphers
CN108599922A (en) * 2018-04-26 2018-09-28 成都盛拓源科技有限公司 The generation method of the novel code of integrated authentication containing key message

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337732A (en) * 2015-10-29 2016-02-17 国网智能电网研究院 Encryption method capable of processing large data packets
CN106385313A (en) * 2016-09-08 2017-02-08 四川长虹电器股份有限公司 Random cryptograph system based on grouping encryption algorithm and realization method thereof
CN106656473A (en) * 2016-12-29 2017-05-10 北京握奇智能科技有限公司 Safe MAC calculation method and system of DES algorithm
CN108063760A (en) * 2017-12-11 2018-05-22 苏州科达科技股份有限公司 Method and its system, the method for packet deciphering of a kind of block encryption
CN108566270A (en) * 2018-04-26 2018-09-21 成都盛拓源科技有限公司 Use the novel encryption method of double block ciphers
CN108599922A (en) * 2018-04-26 2018-09-28 成都盛拓源科技有限公司 The generation method of the novel code of integrated authentication containing key message

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149174A (en) * 2019-06-28 2020-12-29 北京百度网讯科技有限公司 Model training method, device, equipment and medium
CN112149174B (en) * 2019-06-28 2024-03-12 北京百度网讯科技有限公司 Model training method, device, equipment and medium
CN111125781A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 File signature method and device and file signature verification method and device
CN111125781B (en) * 2019-12-24 2020-12-01 腾讯科技(深圳)有限公司 File signature method and device and file signature verification method and device
CN112464258A (en) * 2020-11-02 2021-03-09 中国银联股份有限公司 Data encryption and decryption method, device, equipment and storage medium
CN112464258B (en) * 2020-11-02 2024-03-19 中国银联股份有限公司 Data encryption and decryption methods, devices, equipment and storage medium
CN117411727A (en) * 2023-12-14 2024-01-16 山东省大数据中心 Encryption method, device and storage medium for symmetric encryption of communication transmission
CN117411727B (en) * 2023-12-14 2024-02-20 山东省大数据中心 Encryption method, device and storage medium for symmetric encryption of communication transmission

Similar Documents

Publication Publication Date Title
CN109040090B (en) A kind of data ciphering method and device
CN109660328A (en) Symmetric block encryption method, apparatus, equipment and medium
CN109428710A (en) Data transmission method, device, storage medium and processor
CN113346997B (en) Method and device for communication of Internet of things equipment, Internet of things equipment and server
CN110224834A (en) Identity identifying method, decryption and ciphering terminal based on dynamic token
CN110704854B (en) Stream type encryption method aiming at text data reserved format
CN109005184A (en) File encrypting method and device, storage medium, terminal
CN109687966A (en) Encryption method and its system
CN109995712A (en) Data encryption/decryption method, device, equipment and medium
CN105897737B (en) A kind of method of secure data exchange
CN104038336A (en) Data encryption method based on 3DES
CN115964728A (en) File encryption method and device based on consensus algorithm
CN110011787A (en) A kind of data block fill method and device based on AES encryption algorithm
CN108234466A (en) Information encryption communication method, device, computing device and storage medium
CN108365952A (en) A kind of method of registration, system and intelligent key safety equipment
CN115765969B (en) Method, device and storage medium for solving interaction of hidden set based on homomorphic encryption
CN104636662A (en) Data processing method and terminal device
CN107527084A (en) Electronic card processing method and processing device
EP4084484B1 (en) Method and device for encryption of video stream, communication equipment, and storage medium
US9083489B2 (en) Block encryption method and apparatus
CN109255225A (en) Hard disc data security control apparatus based on dual-identity authentication
CN114611129A (en) Data privacy protection method and system
CN112242970B (en) Data segmentation encryption security reinforcing method and device
CN104871476A (en) Method and apparatus for a computable, large, variable and secure substitution box
CN113992393A (en) Method, apparatus, system, and medium for model update for longitudinal federated learning

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: 20190419

RJ01 Rejection of invention patent application after publication