CN106357389A - Realization method of DES (Data Encryption Standard) encryption algorithm - Google Patents

Realization method of DES (Data Encryption Standard) encryption algorithm Download PDF

Info

Publication number
CN106357389A
CN106357389A CN201610898024.2A CN201610898024A CN106357389A CN 106357389 A CN106357389 A CN 106357389A CN 201610898024 A CN201610898024 A CN 201610898024A CN 106357389 A CN106357389 A CN 106357389A
Authority
CN
China
Prior art keywords
output
permutation
key
64bit
des
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201610898024.2A
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.)
Beihai Yishengyuan Farmers LLC
Original Assignee
Beihai Yishengyuan Farmers LLC
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 Beihai Yishengyuan Farmers LLC filed Critical Beihai Yishengyuan Farmers LLC
Priority to CN201610898024.2A priority Critical patent/CN106357389A/en
Publication of CN106357389A publication Critical patent/CN106357389A/en
Withdrawn 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
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a realization method of a DES (Data Encryption Standard) encryption algorithm. The realization method comprises the following steps: firstly, enabling a 64bit plaintext to pass through an initial permutation IP (Internet Protocol) and then rearranging bits to generate permutated input; circulating the same function for 16 times; finally, outputting a final cycle (16th cycle), and exchanging a left part and a right part of the output to obtain pre-output; enabling the pre-output to pass through an inversed initial permutation IP-1 to generate a 64bit ciphertext; enabling a 56bit secret key to pass through a permutation function; and then, carrying out combination of circulating left movement operation and permutation operation on each of the 16 cycles to obtain a sub secret key Ki. By adopting the realization method, the DES encryption algorithm is realized by utilizing a multi-turn iteration calculation algorithm with large computation, and a high-strength encryption tool is provided for production and living practices; the problems of an existing algorithm that the length of the secret key is long and a propagation speed is influenced are solved; and the realization method has a very high practical application value and is applicable to encryption of a plurality of fields.

Description

A kind of implementation method of des AES
Technical field
The present invention relates to encryption technology field is and in particular to a kind of implementation method of des AES.
Background technology
With the development of computer network and internet, global IT application oneself become the main trend of human social development. At the communication society of today, the aspect such as the research and development of science and technology and business, none is not closely bound up with information, data Safe and secret problem also becomes increasingly conspicuous, and people can not be by the straightforward procedure with reducing extent of information sharing come solve problem, Wei Yike The scheme of row is actively to solve the problems, such as information sharing and network security.Due to computer network have connection form multiformity, The feature such as terminal nonunf ormity and network opening, causes network to be easily subject to hacker and Malware agaainst the law with other Attack, the safety problem of internet has had become as one piece of stumbling-block of information development.And, the development with information technology Increasingly it is widely applied, the operating of entire society more and more nearly depends on information technology, depend on various bases letter The normal operation of breath system, depends on and is stored in the correct maintenance of various important informations and normal use in information system.Information , it may be said that being stable safety, the rise and fall of enterprise being related to national society, the life of the public is happy for safety problem, this Problem will seem more and more important.In China, information security issue also becomes increasingly conspicuous in recent years, and information security and network security are asked Topic also becomes social problems, and not only government department, financial department are paid attention to, and enterprise and institution and individual all pay attention to day by days This major issue.So, the safety of network information and secrecy ensure again network transmission speed be the information age in the urgent need to, Existing rsa algorithm in encryption not only key length very long, so that it is propagated on many networks and also bring complexity, seriously Have impact on spread speed, and it is also at inferior position in the realization of software.
Content of the invention
The present invention is to provide a kind of implementation method of des AES for technical problem to be solved.
For realizing the purpose of the present invention, the technical solution adopted in the present invention is:
A kind of implementation method of des AES, is encrypted to the data of 64 using 56 keys, and to 64 digits Carry out 16 wheel codings according to block, during with every wheel coding, one 48 " often taking turns " key value is drawn by the integrity key of 56, its It is characterised by, specifically comprise the following steps that
(1) by the plaintext of 64bit after an initial permutation ip, bit rearrangement creates the input through displacement;
(2) by same function is carried out with 16 circulations, this function itself had not only included displacement but also had included replacement letter Number, the output of last circulation (the 16th) is made up of 64bit, and the left side of this output and two, the right part are through exchanging Just obtain pre-output afterwards;The left and right of the intermediate result of each 64bit two part is treated as at two independent 32bit numerical value Reason, is respectively labeled as l (left) and r (right), and the processing procedure that each circulates is summarized as following equation:
L [i]=r [i-1]
R [i]=l [i-1] f (r [i-1], k [i])
Used in this circulation, the length of key ki is 48bit, and the length of the r of input is 32bit;This input R is first extended to 48bit, extended operation by extend displacement table definition include one displacement and one comprise reuse r in 16 The extended operation composition of individual bit;
Obtained 48bit carries out XOR with ki again, and the 48bit result obtaining produces through permutation function s again The laggard line replacement of output of 32bit;
(3) above-mentioned pre-output passes through an inverse initial permutation ip-1Generate the ciphertext of 64bit;
(4) 56bit key is passed through a permutation function, each sequentially for 16 circulations, all pass through one and follow The combination of ring shift left operation and a replacement operator produces a sub-key ki;The permutation function of each circulation is identical , but due to key bit repeat shift, the sub-key of generation all differs;
The key code of AES:
des_enc(x64);
Exterual ip, inip, ext, pos, sbox1,,, sbox8;
global k48[1-16];
state64←ip(x64);
for i←1to 16;
Do make state64=sl32 | | sr32;
temp 48←ext(sl32);
| | t6 [2] | | t6 [3] | | t6 [4] | | t6 [5] | | t6 [6] | | t6 [7] | | the t6 [8] that makes temp48=t6 [1];
t4[1]←sbox[1](t6[1]);
t4[2]←sbox[2](t6[2]);
t4[3]←sbox[3](t6[3]);
t4[4]←sbox[4](t6[4]);
t4[5]←sbox[5](t6[5]);
t4[6]←sbox[6](t6[6]);
t4[7]←sbox[7](t6[7]);
t4[8]←sbox[8](t6[8]);
Temp32=t4 [1] | | t4 [2] | | t4 [3] | | t4 [4] | | t4 [5] | | t4 [6] | | t4 [7] | | t4 [8];
temp32←pos(temp32);
sr32←temp32⊕sl32;
}
Make state64=sl32 | | sl32;
state64←sr32||sl32;
state64←invip(state64);
return state64.
Initial permutation key code:
ip(x64)
constarray[1-64],{58,50,42,34,26,18,10,2,60,52,44,36,28,20,12,4,62, 54,46,38,30,22,14,6,64,56,48,40,32,24,16,8,57,49,41,33,25,17,9,1,59,51,43,35, 27,19,11,3,61,53,45,37,29,21,13,5,63,55,47,39,31,23,15,7};
| | the x1 [2] | | that makes x64=x1 [1],, | | x1 [64];
Y64=y1 [1] | | y1 [2] | |,, | | y1 [64];
for i←1to 64;
Do { y1 [i]=x1 [constarrayi]
}
return y64.
The key code of inverse initial permutation:
invip(m64);
constarray[1-64],{40,8,48,16,56,24,64,32,39,7,47,15,55,23,63,31,38,6, 46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,38,35,3,43,11, 51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25};
| | the m1 [2] | | that makes x64=m1 [1],, | | m1 [64];
Y64=n1 [1] | | n1 [2] | |,, | | n1 [64];
for g←1to 64;
Do { y1 [i]=x1 [constarrayi]
}
return y64.
Extension displacement Chief code:
ext(x32)
constarray[1-48],{32,1,2,3,4,5,4,5,6,7,8,9,8,9,10,11,12,13,12,13,14, 15,16,17,16,17,18,19,20,21,20,21,22,23,24,25,24,25,26,27,28,29,28,29,30,31, 32,1};
| | the x1 [2] | | that makes x32=x1 [1],, | | x1 [32];
Y64=y1 [1] | | y1 [2] | |,, | | y1 [48];
for j←1to 48;
Do { y1 [i]=x1 [constarrayi]
}
return y48.
The key code of permutation function:
pos(m32)
constarray[1-32],{16,7,20,2,21,29,12,28,17,1,15,23,26,5,18,31,10,2,8, 24,14,32,27,3,9,19,13,30,6,22,11,4,25};
| | the m1 [2] | | that makes m32=m1 [1],, | | m1 [32];
Y64=n1 [1] | | n1 [2] | |,, | | n1 [32];
for i←1to 32;
Do { y1 [i]=x1 [constarrayi]
}
return n32.
The present invention realizes des AES using the method for many wheel iterative calculation of a large amount of computings, for producing and living real Trample and a kind of Encryption Tool of high intensity is provided, solve that existing algorithm secret key length is long, the problem of impact spread speed, have very High application value realistic is it is adaptable to multiple fields encryption uses.
Brief description
Fig. 1 is that the algorithm of the present invention realizes structure chart.
Specific embodiment
The following enforcement to the present invention is further described, so that those skilled in the art can be better understood from simultaneously Implement.
Embodiment 1
A kind of implementation method of des AES, is encrypted to the data of 64 using 56 keys, and to 64 digits Carry out 16 wheel codings according to block, during with every wheel coding, one 48 " often taking turns " key value is drawn by the integrity key of 56, its It is characterised by, specifically comprise the following steps that
(1) as shown in table 1 below, by the plaintext of 64bit after an initial permutation ip, bit rearrangement creates through putting The input changed.
Table 1: initial permutation table (ip)
(2) by same function is carried out with 16 circulations, this function itself had not only included displacement but also had included replacement letter Number, the output of last circulation (the 16th) is made up of 64bit, and the left side of this output and two, the right part are through exchanging Just obtain pre-output afterwards;The left and right of the intermediate result of each 64bit two part is treated as at two independent 32bit numerical value Reason, is respectively labeled as l (left) and r (right), and the processing procedure that each circulates is summarized as following equation:
L [i]=r [i-1]
R [i]=l [i-1] f (r [i-1], k [i])
Used in this circulation, the length of key ki is 48bit, and the length of the r of input is 32bit.This input R is first extended to 48bit, and extended operation is by extending permutation table, as shown in table 2 below, and definition includes a displacement and comprises with one Reuse the extended operation composition of 16 bits in r.
Table 2: extension permutation table
32 1 2 3 4 4
4 5 6 7 8 9
8 9 10 11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
Obtained 48bit carries out XOR with ki again, and the 48bit result obtaining produces through permutation function s again Line replacement is entered according to table 3 lattice after the output of 32bit.
Table 3: permutation function table
(3) above-mentioned pre-output passes through an inverse initial permutation ip-1, as shown in table 4, generate the ciphertext of 64bit.
Table 4: inverse initial permutation table (ip-1)
40 8 48 16 56 24 64 32
39 7 47 15 55 23 63 31
38 6 46 14 54 22 62 30
37 5 45 13 53 21 61 29
36 4 44 12 52 20 60 28
35 3 43 11 51 19 59 27
34 2 42 10 50 18 58 26
33 1 41 9 49 17 57 25
(4) 56bit key is passed through a permutation function, each sequentially for 16 circulations, all pass through one and follow The combination of ring shift left operation and a replacement operator produces a sub-key ki.The permutation function of each circulation is identical , but due to key bit repeat shift, the sub-key of generation all differs.

Claims (5)

1. a kind of implementation method of des AES, is encrypted to the data of 64 using 56 keys, and to 64 data Block carries out 16 wheel codings, and during with every wheel coding, one 48 " often taking turns " key value is drawn by the integrity key of 56, and it is special Levy and be, specifically comprise the following steps that
(1) by the plaintext of 64bit after an initial permutation ip, bit rearrangement creates the input through displacement;
(2) by same function is carried out with 16 circulations, the output of last circulation (the 16th) is made up of 64bit, this The left side of output and two, the right part just obtain pre-output after exchanging;
(3) above-mentioned pre-output passes through an inverse initial permutation ip-1Generate the ciphertext of 64bit;
(4) 56bit key is passed through a permutation function, each sequentially for 16 circulations, all pass through a circulation left Move operation and the combination of a replacement operator produces a sub-key ki.
2. as claimed in claim 1 a kind of implementation method of des AES it is characterised in that same in described step (2) Function refers to function itself and had not only included displacement but also included alternative functions.
3. as claimed in claim 1 a kind of implementation method of des AES it is characterised in that the implementing of described step (2) Method is that left and right two part of the intermediate result of each 64bit is treated as two independent 32bit numerical value process, labelling respectively For l (left) and r (right), the processing procedure of each circulation is summarized as following equation:
L [i]=r [i-1]
R [i]=l [i-1] f (r [i-1], k [i])
Used in this circulation, the length of key ki is 48bit, and the length of the r of input is 32bit, and the r of this input is first It is extended to 48bit, obtained 48bit carries out XOR with ki again, and the 48bit result obtaining is again through permutation function s Produce the laggard line replacement of output of 32bit.
4. the implementation method of des AES as described in claim 1 is it is characterised in that each in described step (4) The permutation function of individual circulation is all identical, and the sub-key of generation all differs.
5. the implementation method of des AES as described in claim 3 is it is characterised in that described extended operation is by including One displacement and an extended operation composition comprising to reuse 16 bits in r.
CN201610898024.2A 2016-10-15 2016-10-15 Realization method of DES (Data Encryption Standard) encryption algorithm Withdrawn CN106357389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610898024.2A CN106357389A (en) 2016-10-15 2016-10-15 Realization method of DES (Data Encryption Standard) encryption algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610898024.2A CN106357389A (en) 2016-10-15 2016-10-15 Realization method of DES (Data Encryption Standard) encryption algorithm

Publications (1)

Publication Number Publication Date
CN106357389A true CN106357389A (en) 2017-01-25

Family

ID=57866565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610898024.2A Withdrawn CN106357389A (en) 2016-10-15 2016-10-15 Realization method of DES (Data Encryption Standard) encryption algorithm

Country Status (1)

Country Link
CN (1) CN106357389A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431405A (en) * 2008-11-17 2009-05-13 暨南大学 DES encrypted circuit and method thereof and its hardware circuit implementing method
CN104618094A (en) * 2015-01-28 2015-05-13 山东华翼微电子技术股份有限公司 Password mask method for enhancing attack resistance ability
WO2016045217A1 (en) * 2014-09-23 2016-03-31 深圳市汇顶科技股份有限公司 Encryption method and encryption device
CN105790930A (en) * 2016-04-29 2016-07-20 南京酷派软件技术有限公司 Information encryption method and information encryption device used for mobile terminal and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431405A (en) * 2008-11-17 2009-05-13 暨南大学 DES encrypted circuit and method thereof and its hardware circuit implementing method
WO2016045217A1 (en) * 2014-09-23 2016-03-31 深圳市汇顶科技股份有限公司 Encryption method and encryption device
CN104618094A (en) * 2015-01-28 2015-05-13 山东华翼微电子技术股份有限公司 Password mask method for enhancing attack resistance ability
CN105790930A (en) * 2016-04-29 2016-07-20 南京酷派软件技术有限公司 Information encryption method and information encryption device used for mobile terminal and mobile terminal

Similar Documents

Publication Publication Date Title
Bansod et al. Implementation of a new lightweight encryption design for embedded security
Attaullah et al. A novel algebraic technique for the construction of strong substitution box
CN107491317A (en) A kind of symmetrical encryption and decryption method and systems of AES for accelerating platform based on isomery
Attaullah et al. Cryptosystem techniques based on the improved Chebyshev map: an application in image encryption
CN108134664A (en) A kind of implementation method of data encryption
US20110261958A1 (en) Table splitting for cryptographic processes
KR101095386B1 (en) A Cryptosystem with a Discretized Chaotic Map
Kako et al. New symmetric key cipher capable of digraph to single letter conversion utilizing binary system
Kapoor et al. Analysis of symmetric and asymmetric key algorithms
Yang et al. Cryptanalysis of a chaos block cipher for wireless sensor network
Gupta et al. Ensuring data security in databases using format preserving encryption
Mousa et al. Query Processing Performance on Encrypted Databases by Using the REA Algorithm.
CN107317667B (en) Early warning method and early warning device for identity document loss
Fahrianto et al. Encrypted SMS application on Android with combination of caesar cipher and vigenere algorithm
CN106921486A (en) The method and apparatus of data encryption
CN102523085A (en) Data encryption method, data encrypting device and smart card
Cui et al. An image encryption algorithm based on dynamic dna coding and hyper-chaotic lorenz system
Deshmukh et al. Lightweight symmetric key encryption for text using XOR operation and permutation matrix
CN106357389A (en) Realization method of DES (Data Encryption Standard) encryption algorithm
Mohan et al. Revised aes and its modes of operation
Shanthini et al. Design of low power S-box in Architecture Level using GF
Zajac et al. Cryptographic properties of small bijective S-boxes with respect to modular addition
Pandey et al. Data security using various cryptography Techniques: A Recent Survey
Srikantaswamy et al. A Cipher Design using the Combined Effect of Arithmetic and Logic Operations with Substitutions and Transposition Techniques
Kumar et al. SCLCT: Secured cross language cipher technique

Legal Events

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

Application publication date: 20170125