You are on page 1of 13

CRYPTOGRAPHY

A
PAPER ON
CRYPTOGRAPHY
ByK.RAMYA SREE

J.SINDHU

2/4 Computer Science & Engg.

2/4 Computer Science & Engg

Avanthi College of Engg

Avanthi College of Engg

Ramyabubbly14@yahoo.com

CRYPTOGRAPHY

CRYPTOGRAPHY
ABSTRACT
The word Cryptography comes from a

provide the information regarding the

Greek word which means hidden or

various aspects of cryptography stating it as

secret. It is considered as a miraculous

a field of mathematics, computer science

boon that will solve all the computer

and electrical engineering. We also site some

security problems. It is also referred to as

examples of cipher generation like key-

science of secret writing. Authentication is

based cipher, pigpen cipher, etc. Next we

the first step in any cryptographic solution.

moved

Authentication allows the receiver of a

cryptography categorizing it into symmetric

digital message to be confident of both the

and asymmetric types using secret keys and

identity of the sender and the integrity of the

public keys respectively. We have also

message.

provided

Cryptography is the art of achieving security

functions and explained certain examples of

by encoding messages to make them non-

both symmetric and asymmetric keys like

readable for an external intruder thereby

DES, AES, RSA, etc. We have also given an

providing safer mode of communication.

idea about certain secure protocols and

In this paper, we present an introduction of

finally

cryptography and the need for using

applications of cryptography.

towards

the

use

information

presented

of

keys

regarding

some

benefits

in

hash

and

cryptography for secure communication. We

INTRODUCTION
1

CRYPTOGRAPHY

Cryptography is science of secret writing

3. Modify the content of the message in

information in such manner that no one can

such a way that Bob will think Alice

understand it except the intended viewer. It

sent the altered message.

provides privacy, repudiation, integrity, and

4. Impersonate Alice and communicate

authentication.

with

Bob

who

thinks

Network security is extremely essential.

communicating with Alice.

he

is

Two entities wish to work over a secure

Oscar is a passive observer who is trying to

network .but an intruder interrupts and

perform (1) and (2).

shares their secrets without their knowledge.

Mallory is more active and evil who is

Now cryptography has the ability to send

trying to perform (3) and (4).

information between entities in a way that

ENCRYPTION is the process of converting

prevents others from reading it.

plain text that is given as input into a secret


coded text called CIPHERTEXT (Algorithm
for performing encryption and decryption. It
is a series of well defined steps that can be
followed as a procedure). DECRYPTION is
the reverse of encryption. The figure shown
below gives a pictorial view of this concept.
In this
encrypted

methodology
into

cipher

original

data

(converted

is
in

unreadable form) through secret key. At


receiver-side this cipher is decrypted into
original data.

Eves Goals
1. Read the message
2. Figure out the key Alice is using and
read all the messages encrypted with
that key

HOW THIS IS DONE


EXPLAINED BELOW

IS

TRANSFORMATION
Transformation function is the function
which converts the message from one form
to another form.
Example: the function works as shown in
figure:
2

CRYPTOGRAPHY

Here intermediate text is generated.


Our

plaintext

is

WELCOME

TO

1
2
3
4
5
6
7
8

P
3
F
F
V
F
D
G
F
D

K
2
X
A
D
G
A
F
D
V

T
6
F
D
X
A
G
X
V
F

C
4
D
V
D
D
F
D
V
D

C
1
V
F
D
V
X
D
D
D

H
8
V
D
A
D
D
F
F
F

A
7
D
D
D
D
D
F
F
V

E
5
F
F
G
D
A
X
A
D

CRYPTOGRAPHY.

Our intermediate text: FX FD VV DF FA

Then intermediate plain text will be FX FD

DV FD DF VD XD DA DG FG AD VD DD

VV DF FA DV FD DG FA DF VD XD DA

DA GF XD DA GF XD DF is converted

DG FG AD VD DD DA GF XD.

into cipher by rotation (You can see the

Here for intermediate text generation, the

figure-Column wise arrangement as per

pair of row and column converts every

secret key) as VFDVXDDD XADGAFDV

character of plain (original) text.

FFVFDGFD DVDDFDVD FFGDAXAD

SECRET KEY

FDXAGXVF DDDDDFFV VDADDFFF.

For

encrypting

message

(original

DECRYPTION

information) the encryption key or can say

At receiver side decryption is done where

secret key is needed. Here, suppose secret

for decrypting the message secret key is

key has been chosen to CKPCETAH.

needed. At receiver side original message is

ENCRYPTION

fetched out.

As per secret key and there algorithm


specifications some of operation like or, Exor, rotation or shifting of column and rows is
done and whole message is encrypted.

WHY CRYPTOGRAPHY???

Data

hides the contents of messages.


Data integrity: The integrity check

confidentiality:

Encryption

The intermediate text is converted finally

functions

into

whether the document has changed.


Data origin authentication: To verify

the

cipher.

Example:

The

final

transformation after row arrangement is


shown.

provide

information

source and integrity of the messages.

CRYPTOGRAPHY

ASPECTS OF CRYPTOGRAPHY

Modern

cryptography

heavily

depends on mathematics and the


usage of digital systems.

It is an inter-disciplinary study of
the

following

three

fields:

Mathematics
ComputerScience
Electrical Engineering

Without

having

complete

understanding of crypto analysis (or


crypto analytic techniques) it is
impossible to design good (secure,
unbreakable) cryptographic systems.

It makes use of other disciplines


such

as

error-correcting

codes

compression.

EXAMPLES OF CRYPTOGRAM

KEYS THE SOLDIERS FOR


DATA
Cryptographic

algorithms

use

keys

to

protect data. The key used in cryptographic


transformation is the only item that needs
4

CRYPTOGRAPHY

absolute protection by KERKCHOFFS.

secret key and the sender should encrypt the

They are the sensitive data stored in a

message and the receiver should decrypt

computer system. To improve confidentiality

them using the shared secret. To store a data

and share secure information over insecure

that has to be preserved a key is to be

channel, keys are mandatory.

invented and the information is to be


encrypted using that key.

KERCKHKOFFSS PRINCIPLE
While assessing the strength, one should
always assume that the enemy knows the
cryptographic algorithm used.
The security of the system is based on:
* the quality (strength) of the algorithm not
obscurity

The Data Encryption Standard (DES) is a


cipher. It is based on a Symmetric-key

* the key space (or key length)

algorithm that uses a 56-bit key.

TYPES OF CRYPTOGRAPHIC
FUNCTIONS

Secret key functions- 1 key used


Public key functions- 2 keys used.
Hash functions- 0 keys used

It is divided into different areas of study


based on the methods devised to encipher
the

text

namely

symmetric

key

and

asymmetric key cryptography.


SECRET KEY CRYPTOGRAPHY
This type of cryptography uses a single key
to encrypt as well as decrypt. It is referred to
as

Conventional

cryptography

or

Symmetric cryptography. If there are two


entities who would like to share a message,
the thing needed is that they should share a
5

CRYPTOGRAPHY

3. Substitution - After mixing in the


subkey, the block is divided into
eight 6-bit pieces before processing
by the S-boxes, or substitution
boxes. Each of the 8 S-boxes
replaces its 6 input bits with four
output bits according to a non-linear
transformation.
The F- function, operates on half a block at a
time and consists of four stages:

4. Permutation - Finally, the 32 outputs


from the S-boxes are rearranged
according to a fixed permutation, the
P-box.
Triple DES is a block cipher formed
from the Data Encryption Standard
(DES) cipher by using it three times,
when it was found that a 56-bit key of
DES is not enough to guard against brute
force attacks. TDES can be operated

The Feistel function (F-function) of DES


1. Expansion - The 32-bit half-block is
expanded to 48 bits using the

with variations in two parameters:


number of keys used and order of
operations.

expansion permutation, denoted E in


the diagram, by duplicating some of
the bits.
2. Key mixing - The result is combined
with a subkey using an XOR
operation. Sixteen 48-bit subkeys
-One for each round are derived
from the main key using the key
schedule.
6

CRYPTOGRAPHY

AES is one of the most popular algorithms

DIGITAL SIGNATURES

used in symmetric key cryptography. It is

A digital signature or digital signature

available by choice in many different

scheme

encryption packages. Unlike DES (the

cryptography.

predecessor of AES), AES is a substitution-

equivalent

permutation network, not a Feistel network.

signatures

AES is fast in both software and hardware,

implemented digital signatures are more

is relatively easy to implement, and requires

difficult to forge than the handwritten type.

little memory. As a new encryption standard,

Digital signature schemes in the sense used

it is currently being deployed on a large

here are cryptographically based, and must

scale.

be implemented properly to be effective.

PUBLIC KEY CRYPTOGRAPHY

Some non-repudiation schemes offer a time

It is often referred to as asymmetric

stamp for the digital signature, so that even

cryptography. There are two types of keys

if the private key is exposed, the signature is

used here namely public key used for

valid

encryption

for

electronic mail, contracts, or a message sent

decryption which are designated as e and

via some other cryptographic protocol.

d respectively. The pictorial representation

Digital signatures provide two important

is given below.

functions. They prove who generated the

and

private

key

used

is

type
Digital

to
in

of

signatures

traditional
many

nonetheless.

asymmetric
are

handwritten

respects;

properly

Examples

include

information, and they prove that the


information has not been modified in
anyway by anyone since the message and
matching

signature

are

generated.

BENEFITS-DIGITAL SIGNATURE
AUTHENTICATION
It requires many computer processing cycles
to do Public key encryption and decryption,
so the efficiency is less. The major benefit is
that the public keys are not secret, so there is
no need to exchange them securely.

Although messages may often include


information about the entity sending a
message, that information may not be
accurate. Digital signatures can be used to
authenticate the source of messages.
7

CRYPTOGRAPHY

only be decrypted using the private key. The


INTEGRITY

keys for the RSA algorithm are generated

Encryption hides the contents of a message,

the following way:

yet it may be possible to change an


encrypted message without understanding it.
However, if a message is digitally signed,
any change in the message will invalidate

1. Choose two distinct large random


prime numbers p and q
2. Compute

the signature.

is used as the modulus

NON-REPUDIATION
In a cryptographic context, the word

3. Compute the totient:

repudiation refers to any act of disclaiming


responsibility for a message. A message's
recipient may insist the sender attach a

.
4. Choose an integer e such that
, and e and

signature in order to make later repudiation


more difficult.

share no factors other than 1


o

RSA ALGORITHM

e is released as the public key


exponent

The algorithm was publicly described in


1977 by Ron Rivest, Adi Shamir, and

5. Compute d to satisfy the congruence

Leonard Adleman; the letters RSA are the

relation

initials of their surnames, listed in the same

i.e.

order as on the paper. In cryptography, RSA

integer k.

for some

is an algorithm for public-key cryptography.


The RSA algorithm involves three steps, key
generation, encryption and decryption.
KEY GENERATION

d is kept as the private key


exponent.

ENCRYPTION

RSA involves a public key and a private key.

Sender transmits her public key

to

The public key can be known to everyone

receiver and keeps the private key secret.

and is used for encrypting messages.

Receiver then wishes to send message M.

Messages encrypted with the public key can

He first turns M into a number

< by
8

CRYPTOGRAPHY

using an agreed-upon reversible protocol


known as a padding scheme. He then

-Secret

key

encryption/decryption

computes the cipher text corresponding to:

algorithms are much faster than public key


algorithms.
Many times a combination is used:

DECRYPTION
Sender can recover

from by using her

private key exponent by the following


computation:

use public key cryptography to share

a secret key.
use the secret key to encrypt the bulk
of the communication.

HASH FUNCTIONS
Hash algorithms are known as message

Given

m, she can recover the original

digest or One-way transformations. A


cryptographic

hash

function

is

mathematical transformation that takes a

message M.

message of arbitrary length (transformed

COMPARISON
SYMMETRIC

BETWEEN
AND

PUBLIC

KEYS

into a string of bits) and computes from it a


fixed length (short) number. It is a way of
creating a small digital fingerprint from
many kinds of data. Lets assume hash

- The main advantage of public key over

function of a message m as h(m).

secret key is that, in the latter one if you lose

It has the following properties.

your private key, the data is irretrievably


lost.

to compute the hash.

-Here is a comparison between symmetric


key algorithms and public key algorithms
based on their key size.
Symmetric key bit
length
56 bits
64 bits
80 bits
112 bits
128 bits

It cant take a lot of processing time


Given h(m), there is no way to find
an m that hashes to h(m).
It is computationally infeasible to

Public key bit


length
384 bits
512 bits
768 bits
1792 bits
2304 bits

find two values that hash to the same thing.


PASSWORD HASHING
When a user types a password, the system
has to be able to determine whether the user
got it right. If the system stores the password
9

CRYPTOGRAPHY

unencrypted, then anyone with access to the

used

transactions.
HTTPS server usually runs on port

443.
Include notion of verification of

server via a certificate.


Central trusted source of certificates.

system storage or backup tapes can steal the


password in order to verify its correctness.
A Hash of a password is stored instead of
storing the password. When a password is
supplied it computes the passwords hash
and compares it with the stored value. If
they match the password is deemed correct.
Many systems hide the hashed password list

for

most

secure

web

BENEFITS AND APPLICATIONS

to ensure security.

Confidentiality

MESSAGE FINGERPRINT

Hiding the contents of the messages

With a hash function we can save storage:

exchanged in a transaction.

you simply save the message digest of the

Authentication

data on the tamper proof backing store.

Ensuring that the origin of a message is


correctly identified.

SECURE PROTOCOLS
Many application protocols include the use
of cryptography as part of the application
level protocol.
- The cryptographic scheme employed is
part of the protocol.
- If stronger cryptographic tools become
available we need to change the protocol.
- Secure Sockets Layer (SSL) is a different
approach - a new layer is added that
provides a secure channel over a TCP only
link.
- TLS is Transport Layer Security (IETF
standard based on SSL).
- HTTPS is HTTP running over SSL.

Integrity
Ensuring that only authorized parties are
able to modify computer system assets and
transmitted information.
Non-repudiation
Requires that neither of the authorized
parties

deny the

aspects

of a

valid

transaction.
Digital Signatures
Allows electronically sign (personalize) the
electronic

documents,

messages

and

transactions
Identification
Is capable of replacing password-based
identification methods with more powerful
(secure) techniques.
10

CRYPTOGRAPHY

Key Establishment
To

communicate

correspondent

whom

ways
a

key
you

that

cryptography

can

be

to

your

accomplished. To challenge these risks of

have

never

cryptography we adopt several techniques

physically met before.

by the use of secret and public keys

Secret Sharing

implemented using various cryptographic

Distribute the parts of a secret to a group of

algorithms.

people who can never exploit it individually.

Happy

E-commerce, mail, games

cryptography can be learned. But as much as

Carry out the secure transaction over an

you get into it, you will realize the vastness

insecure channel like Internet.

of the field. And you will end up perceiving

coding

and

have

no

fear

that it is impossible to completely "learn"


cryptography. That's because it is infinite.

CONCLUSION
The stupendous growth of the internet

Keep on coding and be safe!!!

opened up unlimited opportunities for


computing. However, at the same time, it
also brought about plethora of new issues
and concerns, chief among them being the
security of information being exchanged.
Information security has become a very
critical

aspect

of

modern

computing

systems. Cryptography is a vital part of


security scheme, as it is the mechanism for
ensuring that the information is transmitted

REFERENCES
1] www.rsasecurity.com
3] www.itsecurity.com
4] www.cryptographyworld.com
5] Introduction to network security and
computing by Perlman, Kauffmann.
6] Computer network security by
Raymonds

securely with no intruder having an access


to the information. There are a number of

11

CRYPTOGRAPHY

12

You might also like