Anda di halaman 1dari 19

THE APPLICATION

LAYER
(THE SECRET-KEY
ALGORITHMS)
CRYPTOGRAPHICS

• The messages to be encrypted; known as


the plaintext, are transformed by a
function that is parameterized by a key.
The output of the encryption process,
known as the ciphertext, is then
transmitted, often by messenger or radio.
We can decrypt the ciphertext into
plaintext by using the decryption key.
CRYPTOGRAPHICS
• If P is the plain text and we have an
encryption key K then we get the
ciphertext C by
C=EK(P)
to mean that the encryption of the
plaintext P using key K gives the
ciphertext C
• Similarly, P=DK(C) represents of decryption
of C to get the plaintext again.
DK(EK(P)) = P.
SECRET-KEY ALGORITHMS

• Modern cryptography uses the same basic


ideas as traditional cryptography
transposition and substitution, but its
emphasis is different.

• Transpositions and substitutions can be


implemented with simple circuits.
P-box S-
box
Product Cipher

S1 S5
S9

P1 S2 P2 S6 P3
S10 P4

S3 S7
S11
DATA ENCRYPTION
STANDARD
• In January 1977, the U.S government
adopted a product cipher developed by
IBM as its official standard for unclassified
information.

• This cipher, DES(DATA ENCRYPTION


STANDARD), was widely adopted by the
industry for use in security products
64 bit plaintext Li-1
Ri-1 Initial
transposition

Iteration 1

Iteration 2
Li-1 Exor f(Ri-1, ki)

Iteration 16

32 bit swap

Inverse
transposition

. 32 bits
32bits
. Li
• Plaintext is encrypted in blocks of 64 bits,
yielding 64 bits of ciphertext.
• The algorithm, which is parameterized by a
56-bit key, has 19 distinct stages.
• The first stage is a key independent
transposition on the 64-bit plaintext.
• The last stage is the exact reverse of this
transposititon.
• The stage prior to the last one exchanges the
leftmost 32-bits with the rightmost 32-bits.
• The remaining 16 stages are functionally
identical but are parameterized by different
functions of the key.
• For decryption the reverse process is
• The function consists of four steps, carried out
in sequence. First, a 48-bit number, E, is
constructed by expanding the 32-bit Ri-1
according to a fixed transposition and
duplication rule.

• Second, E and Ki are EXCLUSIVE Ored


together. This output is then partitioned into
eight groups of 6 bits each, each of which is
fed into a different S-box. Each of the 64
possible inputs to an S-box is mapped onto a
4-bit output. Finally, these 8*4 bits are passed
through a P-box.
DES CHAINING

• DES is basically a monoalphabetic


substitution cipher using a 64-bit
character. Whenever the same 64-bit
plaintext block goes in the front end, the
same 64-bit ciphertext block comes out in
the back end.

• To overcome this sought of problem DES


can be chained in various ways.

• One way of chaining is cipher block


P0 P1 P2 P3 C0 C1 C2
C3

# # # # E E E E

1V KEY
Decryption box

E E E E # # # #
Encryption
box
KEY …… 1V
………..
• We start by computing C0=E(P0 Xor 1V).

• Then we compute C1=E(P1 Xor 1V), and so on.

• Decryption works the other way, with P0=1V


XOR D(C0), and so on.

• Note that the encryption of block I is a


function of all the plaintext in blocks 0
through i-1, so the same plaintext generates
different ciphertext depending on where it
occurs.
• Cipher block chaining also has the advantage
that the same plaintext block will not result in
the same ciphertext block, making
cryptanalysis more difficult.

• Cipher block chaining also has the


disadvantage of requiring an entire 64-bit
block to arrive before decryption can begin.

• For byte-by-byte encryption, cipher feedback


mode can be used.
BREAKING DES
• Meet-in the-middle attack
Ci=EK2(EK1(Pi))

• If we now apply the decryption function,


DK2(Ci)=EK1(Pi)

• Because encrypting x and then decrypting


it with the same key gives back x
BREAKING DES
• The meet-in-the-middle attack uses this
equation to find the DES keys, K1 and K2,
as follows:

• Compute Ri = Ei(P1) for all 256 values of I,


where E is the DES encryption function.
Sort this table in ascending order of Ri.

• Compute Sj = Dj(C1) for all 256 values of j,


where D is the DES decryption function.
Sort this table in ascending order of Sj.
BREAKING DES
1. Scan the first table looking for an Ri that
matches some Sj in the second table.
When a match is found, we then have a
key pair (i,j) such that Dj(c1)=Ei(P1).
Potentially, i is K1 and j is K2.

3. Check to see if Ej(Ei(P2)) is equal to c2. if


it is, try all the other (plaintext,
ciphertext) pairs. If it is not continue
searching the two tables looking for
matches.
BREAKING DES

• All in all, double encryption using DES is


probably not much more secure than
single encryption.
• We also have triple encryption.
• Here we have two keys and three stages
are used.
• Two keys because 112 bits is sufficient for
the time being . Moreover 168 bits would
add the overhead of managing and
transporting another key.
Thank
you

Anda mungkin juga menyukai