Cryptography Tutorials - Tutorial Addendum - Blank - DES Algorithm
| |
(Continued from antecedent part...)
Permuted Best 2 - PC2:
14 17 11 24 1 5
3 28 15 6 21 10
23 19 12 4 26 8
16 7 27 20 13 2
41 52 31 37 47 55
30 40 51 45 33 48
44 49 39 56 34 53
46 42 50 36 29 32
Left accouterment (number of $.25 to rotate) - r1, r2, ..., r16:
r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16
1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1
DES Decryption Algorithm
The decryption algorithm of a block blank should be identical to encryption algorithm
step by move in about-face order. But for DES cipher, the encryption algorithm is so well
designed, that the decryption algorithm is identical to the encryption algorithm
step by move in the aforementioned order, alone with the subkeys activated in the about-face order.
DES decryption algorithm:
Input:
CC: 64 $.25 of blank text
k16, k15, ..., k1: 16 annular keys
IP: Antecedent permutation
FP: Final permutation
f(): Annular function
Output:
TT: 64 $.25 of bright text
Algorithm:
CC = IP(CC), applying antecedent permutation
(LL0, RR0) = CC , adding CC into two 32-bit parts
(LL1, RR1) = (RR0, LL0 ^ f(RR0, k16))
(LL2, RR2) = (RR1, LL1 ^ f(RR1, k15))
......
TT = (RR16, LL16), swapping the two parts
TT = FP(TT ), applying final permutation
Here is how to accept the decryption algorithm:
Let:
T: 64 $.25 of bright text
C: 64 $.25 of blank argument encrypted from T
CC: 64 $.25 of blank text
TT: 64 $.25 of bright argument decrypted from CC
If:
CC = C
Then:
TT = T
Prove:
CC = IP(CC) First move of decryption
= IP(C) Acceptance of CC = C
= IP(FP(C )) Endure move of encryption
= C IP is the changed about-face of FP
(LL0, RR0) = CC Initializing move in decryption
= C CC = C
= (R16, L16) Swapping move in encryption
(LL1, RR1) = (RR0, LL0 ^ f(RR0, k16))
First annular of decryption
= (L16, R16 ^ f(L16, k16))
Antecedent result
= (R15, (L15 ^ f(R15,k16)) ^ f(R15, k16))
(L16, R16) = (R15, L15 ^ f(R15, k16))
= (R15, L15) ^ about-face itself
......
(LL16, RR16) = (R0, L0)
TT = (RR16, LL16) Swapping in decryption
= (L0, R0) Antecedent result
= T Initializing move in encryption
TT = FP(TT ) Endure move in decryption
= FP(T ) Antecedent result
= FP(IP(T)) First move in encryption
= T FP is the changed about-face of IP
Conclusions:
- DES is a 64-bit block cipher.
- 16 annular keys are acquired from a individual 64-bit key.
- Decryption algorithm is identical to the encryption algorithm except
for the adjustment of the annular keys.
Now we understand how DES encryption algorithm works, let s try to apparatus it in Java.
See the next two chapters.
|
algorithm, decryption, encryption, cipher, permutation, round, previous, result, swapping, identical, reverse, clear, , decryption algorithm, encryption algorithm, r15 l15, r15 k16, round keys, cipher text, previous result, rr16 ll16 swapping, tutorial notes cipher, tutorials tutorial notes, cryptography tutorials tutorial, |
Also see ...
This affiliate describes some basal concepts of cryptography:What is cryptography?Functions.Encryptions.p
i(Continued from antecedent part...)/iEncryptionEncryption Function A bijection that uses a key, encryption key,to compute the image. br
This affiliate describes:A simple Java accomplishing of the DES blank algorithm.CipherDES.java A Simple Java Accomplishing of DES
i(Continued from antecedent part...)/i clandestine changeless byte doXORBytes(byte a, byte b) { byte out = new byte; for (int i=0; i<a.length; i++) { out = (byte) (a ^ b); } ack
i(Continued from antecedent part...)/i clandestine changeless byte selectBits(byte in, int pos, int len) { int numOfBytes = (len 1)/8 + 1; byte out = new byte; for (int i=0; i<len; i++) {
This affiliate describes:A Java program to allegorize the DES key agenda Algorithm.A Java program to allegorize the DES blank algorithm.
i(Continued from antecedent part...)/i clandestine changeless abandoned printBytes(byte data, Cord name) { System.out.println(""); System.out.println(name+":"); for (int i=0; i<data.length; i+
i(Continued from antecedent part...)/iDESCipherTest.java DES Blank Algorithm IllustrationAs an analogy to the DES blank algorithm declared in theprevious chapter, I
i(Continued from antecedent part...)/i clandestine changeless byte substitution6x4(byte in) { in = splitBytes(in,6); // Agreeable byte into 6 bit blocks// printBytes(in,"R: Afterwards splitting");p
i(Continued from antecedent part...)/iIn this program, the ascribe bright argument block and the subkeys are harder coded with the ethics acclimated by J. Orlin Grabbe in "The DES Algorithm Illustrated". T