Sunteți pe pagina 1din 17

Under the Guidance of

Mr.Hiriyanna G.S. Lecturer CS & E


B.E, M.Tech

By, Manjunath K. 4JN03CS018

Contents
Introduction to Cryptography.
Theory of Shift Registers. Theory of Stream Ciphers.

Cipher Feedback System.


Conclusion. References.

Introduction
Cryptography is the greek word stands for Secret Writing Cryptography is the study of sending the message in

disguised form so that only intended recipient can remove the disguise and read the message.
Key is used for encrypting and decrypting the message.

CLASSIFICATION OF CRYPTOGRAPHY
All modern algorithms uses key to control encryption and decryption, a message can be decrypted only if the key matches the encryption key. There are two classes of key based encryption and decryption algorithms, 1. Symmetric (Secret key). 2. Asymmetric (Public key).
CRYPTOGRAPHY

SYMMETRIC ALGORITHMS

ASYMMETRIC ALGORITHMS

STREAM CIPHER
E x:Cipher Feedback System

BLOCK CIPHER

SHIFT REGISTER
Shift register is a binary storage element .

This storage elements are called as states.


The state of a shift register is a binary n-tuple, which is

regarded as a binary expression of an integers.


Sn-1 . S2 S1

S0

Output

Input

f(s0, s1, s2 .. sn-1 )

FEED BACK SHIFT REGISTERS


A feedback shift register consists of 'n' flip-flops and a feedback function that

expresses each new element a(t), where t >=n, of the sequence in terms of the previously generated elements a(t-n),a(t-n+1), . . . . , a(t-1).
For the state diagram of the shift register to consist of branch-less cycles

only, the feedback function must be nonsingular, which is of the form a(t) = f(a(t-1), a(t-2), . . . . a(t-n+1)) a(t-n)

a(t-1)

a(t-2)

a(t-n+1)

a(t-n)

f (a(t-1), . . . . , a(t-n+1)) a(t-n)

Linear Feedback Shift Register (LFSR)


The most useful devices in the generation of key sream is the Linear

Feedback Shift Register (LFSR).

The feedback function is simply the XOR of certain bits in the register; the list

of these bits is called tap sequence.

b4

b3

b2

b1

Output

Fig: A 4 bit Shift register

LFSR ( continued )
4-bit LFSR tapped at first and fourth bit. It is initialized with the value 1111, it produces following sequence of internal states before repeating.

b4 1 0 1 0 1 1 0 0 1 0 0 0 1 1

b3 1 1 0 1 0 1 1 0 0 1 0 0 0 1

b2 1 1 1 0 1 0 1 1 0 0 1 0 0 1

b1 1 1 1 1 0 1 0 1 1 0 0 1 0 0

The output sequence is the string of least significant bits 111101011001000

THEORY OF STREAM CIPHER


The stream ciphers are characterized by the property that the encipherment

of each bit of data is independent of the rest of the message. Here if an error occurs during the transmission of any single bit, the rest of the message will be unaffected. Here key stream is combined with the plaintext on a bit by bit basis. Stream ciphers convert plaintext to cipher text, one bit at a time. The simplest implementation of a stream cipher is shown in below Fig.
Key stream Generator Key stream Generator

plaintext Encryption

cipher text Decryption

plaintext

I V:
b4

1
b3

1
b2

1
b1

1
0 1 0 1 1

1
1 1 0 1

1
1 1 1 0

0 1 0 11110

11110

10101

*****
ENCRYPTING
DECRYPTING

10101

Cipher Feedback System ( CFS )


A cipher feedback system is one in which the cipher text is actually fed back

into the system and influences subsequent enciphering. The cipher generated in the previous step itself acts as a key for encrypting the plaintext in the next iteration.

Sn-1
Plaintext

S1 .....

S0

+
cn-1

c2

c1

c0

+
FIG: ENCIPHERER

CFS (continued)
Cipher text
..

cn-1

c2

c1

c0

+
Plaintext

FIG: DECIPHERER

System Design
A cipher feedback system is designed, to generate the key sequence which is used for both encryption and decryption.
Encryption Decryption

Key Sequence Generator

Key Sequence Generator

Cipher Feedback

Cipher image

Cipher Feedback

Image

Image

Image

Image

EXAMPLE
When the input image in Fig (a) is encrypted, the cipher appears to be as shown in

Fig(b). When this is observed, some residual information still exist. This is improved by introducing more randomness in the key sequence. If the same cipher is feed backed the residual information doesnt exist as shown in Fig (c).

fig (a) Input image

fig (b) First level

fig (c) Second level

CONCLUSION
Techniques for encryption, decryption and preventing attacks from intruders

provide the only protection of sensitive data.

The unpredictability in the key sequence can be increased by increasing the

stages of the feedback. Here key sequence is not specially designed , the cipher generated itself acts as a key sequence.

More randomness is achieved by once again passing the resulting cipher

image into cipher feed back system.

If we combine cipher with any other key sequence, still more randomness

can be achieved.

References
1. William Stallings. Cryptography and Network Security. PHE 2000. 2. B.Schneide ,Applied Cryptography. 2nd edition, Wiley 1996. 3. H.Beker and J. F. Piper, Cipher Systems: The Protection of Communications, London: Northwood Books, 1982.

THANK YOU

S-ar putea să vă placă și