Anda di halaman 1dari 48

Department of Computer Science & Engineering

LAB MANUAL
For
CRYPTOGRAPY & NET!OR" SECUR#TY
$%CS&'(
B)Tec* &
r+
Year $
,t
Seme,ter
-u./ %'$(
Department of Computer Science & Engineering
"L Uni0er,it/
111)2.uni0er,it/)in
TABLE O3 CONTENTS
$)' #NTRODUCT#ON & DESCR#PT#ON (
%)' PROGRAM OUTCOMES 4
&)' COMEPETENC#ES 5
()' MAPP#NG COMPETENC#ES TO OUTCOMES 6
4)' MAPP#NG E7ALUAT#ON COMPONENTS TO COMPETENC#ES 8
5)' 3ORMAT O3 TE PRO-ECT REPORT $'
6)' STANDARD 3OR MA#NT#A#NG LAB BOO" $%
$)' #ntro+uction
The Project based LAB related to the course Cryptography & Network Security is primarily
intended to make the students eposed to Cryptographic techni!ues and algorithms used "or
encryption and decryption in parallel with how these techni!ues are implemented to achie#e
#arious security mechanisms like digital signature$ message digest and authentication protocols%
The project designed and the eperiments included are related to the course being taught% &eal
li"e applications are chosen that are related to the course being taught%
%)' Program outcome,
'#ery B% Tech program will be designed to achie#e certain outcomes that (ap on to the P')S
that are set "or all the B% Tech programs taken together% *ollowing are )utcomes that are set "or
the B% Tech program in CS' and some o" these outcomes are to be used through the LAB
component o" this course
Program
outcome
+,
Program outcome ,escription
-hether set to
achie#e through the
LAB Component o"
the Course
P). Apply knowledge o" mathematics$ science$ engineering
"undamentals and an engineering speciali/ation to the
conceptuali/ation o" engineering models
Selected$
P)0 +denti"y$ "ormulate$ research literature and sol#e complex
engineering problems reaching substantiated conclusions using "irst
principles o" mathematics and engineering sciences%
Selected$
P)1 ,esign solutions "or complex engineering problems and design
systems$ components or processes that meet speci"ied needs with
appropriate consideration "or public health and sa"ety$ cultural$
societal$ and en#ironmental considerations%
Selected
P)2 Conduct in#estigations o" complex problems including design o"
eperiments$ analysis and interpretation o" data$ and synthesis o"
in"ormation to pro#ide #alid conclusions%
Selected
P)3 Create$ select and apply appropriate techni!ues$ resources$ and
modern engineering tools$ including prediction and modeling$ to
complex engineering acti#ities$ with an understanding o" the
limitations%
Selected$
P)4 *unction e""ecti#ely as an indi#idual$ and as a member or leader in
di#erse teams and in multi5disciplinary settings%
Not Selected%
P)6 Communicate e""ecti#ely on complex engineering acti#ities with the
engineering community and with society at large$ such as being able
to comprehend and write e""ecti#e reports and design
documentation$ make e""ecti#e presentations$ and gi#e and recei#e
clear instructions%
Selected%
P78 ,emonstrate understanding o" the societal$ health$ sa"ety$ legal and
cultural issues and the conse!uent responsibilities rele#ant to
engineering practice%
Not Selected%
P79 :nderstand and commit to pro"essional ethics and responsibilities
and norms o" engineering practice%
Selected%
P.7 :nderstand the impact o" engineering solutions in a societal contet
and demonstrate knowledge o" and need "or sustainable
de#elopment
Selected%
P.. ,emonstrate a knowledge and understanding o" management and
business practices$ such as risk and change management$ and
understand their limitations%
Not Selected%
P.0 &ecogni/e the need "or$ and ha#e the ability to engage in
independent and li"e5long learning%
Not Selected%
&)' Competencie, to 9e ac*ie0e+ t*roug* Pro:ect 9a,e+ LAB
C.% :nderstand basic operations o" substitution and transposition techni!ues employed in all
cryptographic algorithms like ,'S and A'S
C0% :nderstand basic techni!ues and approaches ;mathematically< engaged with respect to the
abo#e operations in#ol#ed in each o" the cryptographic algorithms ,'S$ A'S and &SA
C1% :nderstand the se!uence o" operations in#ol#e in each o" the o" the symmetric and
asymmetric encryption algorithms
C2% Apply basic operations and techni!ues and their se!uence in each o" the encryption and
decryption mechanisms o" both symmetric & asymmetric crypto systems with simple data #alues
;85bit and .45 bit numbers<
C3% Analy/e cryptanalysis o" ,'S and A'S crypto systems in simple scenarios with multiple
#alues ;like A#alanche e""ect<
C4% :nderstand mechanisms in#ol#ed in message digest & hash algorithms like S=A53.0$ key
echange protocols like ,i""ie =ellman and 'CC systems with respect to encryption and
decryption algorithms
C6% :nderstand the mechanisms o" digital signatures and other security protocols with respect to
implementation issues o" encryption & decryption coupled with di""erent security applications
C8% :nderstand the basic principles o" security ser#ices in terms o" authentication$ integration$
pri#acy and non repudiation with respect to web applications
C9% Analy/e network tra""ic in terms o" attacks ;tra""ic analysis and "re!uency analysis< using
Cryptanalysis
()' Mapping Competencie, to outcome,
Program
outcome
Program outcome,
E;pecte+ Competencie,
<$= <%= <&= <(= <4= <5= <6= <>= <8=
U
n
d
e
r
s
t
a
n
d

b
a
s
i
c

o
p
e
r
a
t
i
o
n
s

o
f

s
u
b
s
t
i
t
u
t
i
o
n

a
n
d

t
r
a
n
s
p
o
s
i
t
i
o
n

t
e
c
h
n
i
q
u
e
s

e
m
p
l
o
y
e
d

i
n

a
l
l

c
r
y
p
t
o
g
r
a
p
h
i
c

a
l
g
o
r
i
t
h
m
s

l
i
k
e

D
E
S

a
n
d

A
E
S
U
n
d
e
r
s
t
a
n
d

b
a
s
i
c

t
e
c
h
n
i
q
u
e
s

a
n
d

a
p
p
r
o
a
c
h
e
s

(
m
a
t
h
e
m
a
t
i
c
a
l
l
y
)

e
n
g
a
g
e
d

w
i
t
h

r
e
s
p
e
c
t

t
o

t
h
e

a
b
o
v
e

o
p
e
r
a
t
i
o
n
s

i
n
v
o
l
v
e
d

i
n

e
a
c
h

o
f

t
h
y
p
t
o
g
r
a
p
h
i
c

a
l
g
o
r
i
t
h
m
s

D
E
S


A
E
S

a
n
d

!
S
A
U
n
d
e
r
s
t
a
n
d

t
h
e

s
e
q
u
e
n
c
e

o
f

o
p
e
r
a
t
i
o
n
s

i
n
v
o
l
v
e

i
n

e
a
c
h

o
f

t
h
e

o
f

t
h
e

s
y
m
m
e
t
r
i
c

a
n
d

a
s
y
m
m
e
t
r
i
c

e
n
c
r
y
p
t
i
o
n

a
l
g
o
r
i
t
h
m
s
A
p
p
l
y

b
a
s
i
c

o
p
e
r
a
t
i
o
n
s

a
n
d

t
e
c
h
n
i
q
u
e
s

a
n
d

t
h
e
i
r

s
e
q
u
e
n
c
e

i
n

e
a
c
h

o
f

t
h
e

e
n
c
r
y
p
t
i
o
n

a
n
d

d
e
c
r
y
p
t
i
o
n

m
e
c
h
a
n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
e
p
u
d
i
a
t
i
o
n

w
i
t
h

r
e
s
p
e
c
t

t
o

w
e
b

a
p
p
l
i
c
a
t
i
o
n
s
A
n
a
l
y
"
e

n
e
t
w
o
r
k

t
r
a
+
c

i
n

t
e
r
m
s

o
f

a
t
t
a
c
k
s

(
t
r
a
+
c

a
n
a
l
y
s
i
s

a
n
d

f
r
e
q
u
e
n
c
y

a
n
a
l
y
s
i
s
)

u
s
i
n
g
P). Apply knowledge o" mathematics$ science$ engineering
"undamentals and an engineering speciali/ation to the
conceptuali/ation o" engineering models
Su9,ta
ntia../
Su9,
tanti
a../
(od
erate
ly
Mo+
erate
./
P)0 +denti"y$ "ormulate$ research literature and sol#e complex
engineering problems reaching substantiated conclusions
using "irst principles o" mathematics and engineering
sciences%
Mo+
erat
e./
Mo+er
ate./
Mo+e
rate./
Mo
+er
ate.
/
P)1 ,esign solutions "or complex engineering problems and
design systems$ components or processes that meet speci"ied
needs with appropriate consideration "or public health and
sa"ety$ cultural$ societal$ and en#ironmental considerations%
(odera
tely
S.ig*
t./
P)2 Conduct in#estigations o" complex problems including design
o" eperiments$ analysis and interpretation o" data$ and
synthesis o" in"ormation to pro#ide #alid conclusions%
S.ig
*t./
Slightly
S.ig*
t./
P)3 Create$ select and apply appropriate techni!ues$ resources$
and modern engineering tools$ including prediction and
modeling$ to complex engineering acti#ities$ with an
understanding o" the limitations%
Su9,
tanti
a../
S.ig
*t./
Program
outcome
Co+e
Program outcome,
E;pecte+ Competencie,
<$= <%= <&= <(= <4= <5= <6= <>= <8=
U
n
d
e
r
s
t
a
n
d

b
a
s
i
c

o
p
e
r
a
t
i
o
n
s

o
f

s
u
b
s
t
i
t
u
t
i
o
n

a
n
d

t
r
a
n
s
p
o
s
i
t
i
o
n

t
e
c
h
n
i
q
u
e
s

e
m
p
l
o
y
e
d

i
n

a
l
l

c
r
y
p
t
o
g
r
a
p
h
i
c

a
l
g
o
r
i
t
h
m
s

l
i
k
e

D
E
S

a
n
d

A
E
S
U
n
d
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y

a
n
a
l
y
s
i
s
)

u
s
i
n
g

,
r
y
p
t
a
n
a
l
y
s
i
s
P)4 *unction e""ecti#ely as an indi#idual$ and as a member
P)6 Communicate e""ecti#ely on complex engineering acti#ities
with the engineering community
(ode
rately
P78 ,emonstrate understanding o" the societal$ health$ sa"ety$
legal and cultural issues and the conse!uent responsibilities
rele#ant to engineering practice%
P79 :nderstand and commit to pro"essional ethics and
responsibilities and norms o" engineering practice%
Slight
ly
Slight
ly
P.7 :nderstand the impact o" engineering solutions in a societal
contet and demonstrate knowledge o" and need "or
sustainable de#elopment
S.ig*t.
/
Slight
ly
P.. ,emonstrate a knowledge and understanding o" management
and business practices$ such as risk and change management$
and understand their limitations%
P.0 &ecogni/e the need "or$ and ha#e the ability to engage in
independent and li"e5long learning%
4)' Mapping of E0a.uation Component, to Competencie,
Seria.
num9er of
Competenc/
De,cription of t*e competenc/
E0a.uation
Component
>C.% Understand basic operations of substitution
and transposition techniques employed in all
cryptographic algorithms like DES and AES
+nternal Continuous
e#aluation
>C0% Understand basic techniques and approaches
(mathematically) engaged with respect to the
above operations involved in each of the
cryptographic algorithms DES AES and !SA
+nternal Continuous
e#aluation
>C1% Understand the sequence of operations
involve in each of the of the symmetric and
asymmetric encryption algorithms
+nternal Continuous
e#aluation
>C2% Apply basic operations and techniques and
their sequence in each of the encryption and
decryption mechanisms of both symmetric $
asymmetric crypto systems with simple data
values (-&bit and (.& bit numbers)
+nternal Continuous
e#aluation
>C3% Analy"e cryptanalysis of DES and AES crypto
systems in simple scenarios with multiple
values (like Avalanche e#ect)
+nternal Continuous
e#aluation
>C4% Understand mechanisms involved in message
digest $ hash algorithms like S%A&'() key
e*change protocols like Di+e %ellman and
E,, systems with respect to encryption and
decryption algorithms
+nternal Continuous
e#aluation
>C6% Understand the mechanisms of digital
signatures and other security protocols with
respect to implementation issues of
encryption $ decryption coupled with di#erent
security applications
+nternal and 'ternal
'nd semester
e#aluation
>C8% Understand the basic principles of security
services in terms of authentication
integration privacy and non repudiation with
respect to web applications
+nternal and 'ternal
'nd semester
e#aluation
>C9% Analy"e network tra+c in terms of attacks
(tra+c analysis and frequency analysis) using
,ryptanalysis
+nternal and 'ternal
'nd semester
e#aluation
5) 3ormat of Pro:ect report
$) Stan+ar+ for De0e.opment of Pro:ect 9a,e+ LAB report
$)' Tit.e of t*e pro:ect
The title must be title o" the de#elopment project and not o" term paper% The title must
re"lect the application and the implementation method
%)' Detai., of t*e p.atform to 9e u,e+ for t*e +e0e.opment of t*e pro:ect
0%. Client side plat"orm details
0%.%. =ardware details
0%.%0So"tware details
0%0 Ser#er side plat"orm detail
0%0%. =ardware details
0%0%0 So"tware details
0%1 Networking details
&)' Pro:ect De,cription,
1%. ,etailed description o" the project ;As much in detail as possible<
1%0 *unctional &e!uirements
1%1 (odule +denti"ication and description
1%2 *unctional (apping to the module
1%3 ,etailed ,escription o" each *unction ;'periment<
&)4)$ E;p?A <De,cription ,*a.. 9e pro0i+e+ for eac* of t*e e;periment ,eparate./=
>.% Title o" the eperiment
>0% Theoretical concepts connected with the 'periment
>1% +nput?output ,etails ;in Tabular mode or through Snapshots o" :+ i" any<
>2% Process description through @ackson charts ;*unctional +nteraction<
>3% ,ata ,escription ;'& (odel$ *iles to be used i" any<
>4% 'ceptions =andling re!uirements to be included into the eperiment
>6% +nter"ace description o" this "unction with other "unctions
>8% +nteraction details with Cooperating System
>9% &eport Layout i" the "unction generates a report
>.7% '#ent handling description i" any
()' Co+e ? Eac* Mo+u.e 1i,e@ 3unction 1i,e
4)' Detai., of Mo+u.e integration
5)' Te,ting t*e pro:ect
5)$ ,escription o" Test en#ironment
4%0 Test Cases
4%0 Test &esults
6)' Conc.u,ion, an+ o9,er0ation,
>) Reference,
6) Stan+ar+ for Maintaining t*e LAB 9oo2
$)' Temp.ate Detai., in t*e 3ir,t Page of t*e LAB Boo2
&egistration Number
Name o" the student
Name o" the course
Batch Code
(odule title
%)' La9 Setup Specification <#n Page % of t*e LAB Boo2=
0%. Client
0%.%. =ardware
0%.%0 So"tware
0%0 Ser#er
0%0%. =ardware
0%0%0 So"tware
0%1 Network ,etails
&)' Li,t of e;periment, <#n Page & of t*e LAB Boo2=
()' E;perimenta. Log <The "ollowing content to be written in the LAB book "or each o" the
eperiment<
>.% Title o" the eperiment
>0% Theoretical concepts connected with the 'periment
>1% +nput?output ,etails ;in Tabular mode or through Snapshots o" :+ i" any<
>2% Process description through @ackson charts ;*unctional +nteraction<
>3% ,ata ,escription ;'& (odel$ *iles to be used i" any<
>4% 'ceptions =andling re!uirements to be included into the eperiment
>6% +nter"ace description o" this "unction with other "unctions
>8% +nteraction details with Cooperating System
>9% &eport Layout i" the "unction generates a report
>.7% '#ent handling description i" any
>..% Code
>.0% Test cases and test results
8. !ist of "#periments & $ro%ects
>)$ Li,t of E;periment,
!ee2 $A E;periment B $A #mp.ementing +ifferent ,u9,titution tec*niCue, .i2e Cae,ar
Cip*er@ P.a/fair Cip*er an+ i.. Cip*er
!ee2 %A E;periment B %A #mp.ementing +ifferent ,u9,titution tec*niCue, .i2e
7igenere Cip*er an+ Gau,, Cip*er
!ee2 &A E;periment B &A #mp.ementing +ifferent tran,po,ition tec*niCue, .i2e Rai.
fence cip*er & Co.umnar Cip*er
!ee2 (A E;periment B (A #mp.ementing ,imp.ifie+ DES & RC( a.gorit*m,
!ee2 4A E;periment B 4A #mp.ementing ,imp.ifie+ AES encr/ption & +ecr/ption
a.gorit*m
!ee2 5A E;periment B 5A #mp.ementing ran+om num9er generation a.gorit*m, .i2e
Linear Congruentia. an+ B.um B.um S*u9 generator
!ee2 6A E;periment B 6A #mp.ementing RSA encr/ption & +ecr/ption a.gorit*m
>)% Li,t of Pro:ect,
$) De,ign & #mp.ement 3reCuenc/ Ana./Der <To Brea2 Cip*er Te;t=
%) De,ign & #mp.ement B.oc2 Cip*er DES <5(?Bit Cip*er=
&) De,ign & #mp.ement B.oc2 Cip*er AES <$%>? Bit Cip*er=
() De,ign & #mp.ement Stream Cip*er RC( <%45 B Bit Te;t=
4) De,ign & #mp.ement Digita. Signature u,ing Mo+ifie+ a,* Co+e & RSA
5) De,ign & #mp.ement Digita. Signature u,ing Mo+ifie+ MAC Co+e & RSA
6) De,ign & #mp.ement ne1 Me,,age Dige,t A.gorit*m Ett*F <t*e To/ Tetra Grap* a,*=
>) De,ign & #mp.ement a mo+ifie+ Digita. Signature A.gorit*m <DSA=
8) De,ign & #mp.ement a mo+ifie+ Diffie e..man "e/ E;c*ange A.gorit*m
$') De,ign & #mp.ement a Digita. Signature A.gorit*m 1it* mo+ifie+ Encr/ption Sc*eme
$$) De,ign & #mp.ement a mo+ifie+ DES Cip*er
$%) De,ign & #mp.ement a mo+ifie+ DES Cip*er 1it* A0a.anc*e Effect
$&) De,ign & #mp.ement a B.oc2 Cip*er in CBC mo+e of operation an+ Trip.e DES <&?
DES=
$() De,ign & #mp.ement a B.oc2 Cip*er in CTS mo+e of Operation <Cip*er Te;t Stea.ing
Mo+e= 1it* pa++ing faci.it/
$4) De,ign & #mp.ement mo+ifie+ "e/ E;c*ange A.gorit*m
$5) De,ign & #mp.ement a 0ariant Pu9.ic "e/ Cr/pto ,/,tem of RSA
$6) De,ign & #mp.ement a mo+ifie+ RSA Cip*er
$>) De,ign & #mp.ement a mo+ifie+ Digita. Signature A.gorit*m u,ing 7ariant E..iptic
Cur0e Cr/pto ,/,tem
$8) De,ign & #mp.ement "e/ +i,tri9ution Protoco.
%') De,ign & #mp.ement a ,imp.e !e9 app.ication for E?Commerce
1. $latform for &mplementation of the $ro%ect
Computing Location !GS! !GS! e.ement !GS! e.ement ,pecification
C.ient =- Processor ,ual Core
(emory 0AB
,isk Storage 177AB
S- )S -+N,)-S BP
)&ACL' +,' )&ACL' ,BC
,ATA STAA' 4%7
D+S+) 6%7
PL5SEL 0%7
Ser0er =- Processor B')N
(emory 0AB
,isk Storage 177AB
S- )S -+,)-S 0778
,B(S )&ACL' 9i
$% ,esign & implement a project which accomplishes Analysis o" 'nglish Alphabets ;Called
*re!uency Analysis< that occur in encryption o" plain tet letters to cipher tet letters epressed
in 'nglish language only% As per data in 'nglish language "re!uency analysis the letter FtG
occupies with .8H "ollowed by FsG and so on% This project aims to implement di""erent classical
substitution and transposition techni!ues and then apply "re!uency analysis to break the cipher
tet produced by any con#entional encryption techni!ues similar to Caesar$ =ill$ Play"air and
more% The mini project includes the eperiments with concepts o" Substitution$ Transposition
techni!ues and *re!uency Analysis o" 'nglish alphabets as containing some o" the "ollowing
a% Caesar Cipher
b% (ono Alphabetic Cipher
c% =ill Cipher
d% Play Cipher
e% Poly Alphabetic Cipher I Digenere Cipher
"% Poly alphabetic Cipher I Aauss Cipher
g% &ail "ence Techni!ue
h% Columnar Cipher
i% Dernam Cipher
j )ne time Pad
k% *re!uency Analysis o" Single letter
l% *re!uency Analysis o" Two letters ;,iagrams<
m% *re!uency Analysis o" Three letters ;Trigrams<
(odule .J Substitution Techni!ues
Task .J +mplementing Caesar Cipher
Task 0J +mplementing Dariation o" Caesar Cipher ;A""ine Cipher<
Task 1J +mplementing =ill Cipher
Task 2J +mplementing Play "air Cipher
Task 3J +mplementing (ono alphabetic Cipher
Task 4J +mplementing Dariation o" (ono alphabetic Cipher
Task 6J +mplementing Product Cipher
(odule 0J Transposition Techni!ues
Task .J +mplementing general Transposition techni!ue
Task 0J +mplementing &ail "ence techni!ue
Task 1J +mplementing column cipher
Task 2J +mplementing Dernam Cipher
Task 3J +mplementing Poly alphabetic Cipher
Task 4J +mplementing Aauss Cipher
Task 6J +mplementing one time Pad
(odule 1J *re!uency analysis o" Substitution Techni!ues
Task .J +denti"y the occurrence o" "re!uency o" single letter alphabets on
Substitution Techni!ues ;Caesar & (ono alphabetic<
Task 0J +denti"y the occurrence o" "re!uency o" two letter alphabets on
Substitution Techni!ues ;=ill Cipher & Play "air cipher<
Task 1J )bser#e multiple letter alphabets on Substitution Techni!ues ;Poly
Alphabetic<
Task 2J Prepare the data base o" occurrence o" alphabets
Task 3J +mplement a simple "re!uency analy/er to break the cipher tet
Task 4J +mplement a *re!uency analy/er to break the cipher tet on any
Substitution techni!ue
(odule 2J *re!uency analysis o" Transposition Techni!ues
Task .J +denti"y the occurrence o" "re!uency o" single letter alphabets on
Transposition Techni!ues ;Aeneral & &ail "ence<
Task 0J +denti"y the occurrence o" "re!uency o" single$ two letter alphabets on
Transposition Techni!ues ;columnar$ )ne time Pad<
Task 1J )bser#e multiple letter alphabets on Transposition Techni!ues ;Poly
Alphabetic<
Task 2J Prepare the data base o" occurrence o" alphabets
Task 3J +mplement a simple "re!uency analy/er to break the cipher tet
Task 4J +mplement a *re!uency analy/er to break the cipher tet on any
Transposition techni!ue

%% Create a ,'S Cipher ;425bit< on 425bit plain tet which con#erts to e!ui#alent Cipher tet
based on the "ollowing "unctions de"ined "or key generation and encryption & decryption
algorithms

(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or ,'S
Task .J ,e"ining +nitial Permutation and +n#erse +P "unctions
Task 0J ,e"ining 'pansion & Permutation "unction
Task 1J ,e"ining S5Bo *unction
Task 2J ,e"ining PC5. and PC50
Task 3J ,e"ining Shi"t Cey "unction
Task 4J ,e"ining +nitial Cey & Plain tet input o" 425 bits
Task 6J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J Aenerate an input se!uence 425bit input number "or key generation
Task 0J +mplementing Permuted Choice I . "unction on 425bit number
Task 1J +mplementing Shi"t operation on the output "rom PC5. "unction
Task 2J +mplementing Permuted Choice I 0 "unction
Task 3J Aenerate the keys re!uire "or encryption "unction
Task 4J Aenerate the keys re!uire "or decryption "unction
(odule 1J 'ncryption Phase
Task .J Aenerate an input se!uence 425bit input number "or encryption
Task 0J +mplementing +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom encryption phase
(odule 2J ,ecryption Phase
Task .J Aenerate an input se!uence 425bit input number "or decryption
Task 0J +mplementing +P
5.
+n#erse +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom ,ecryption phase
&% Create A'S Cipher ;.085bit< o" .08 bit plain tet con#erted to .08 bit Cipher tet de"ined with
the "ollowing "unctions
A++ Roun+ "e/J A simple B)& operation between input State array and Cey matri de"ined
with si/e o" .4K.4 matrices
3OR!ARD AND #N7ERSE TRANS3ORMAT#ONS The for1ar+ ,*ift ro1
tran,formation$ called Shi"t &ows is as "ollows% The "irst row o" State is not altered% *or the
second row$ a .5byte circular le"t shi"t is per"ormed% *or the third row$ a 05byte circular le"t shi"t
is per"ormed% *or the "ourth row$ a 15byte circular le"t shi"t is per"ormed% The "ollowing is an
eample o" Shi"t &ows/ The "ollowing is an eample of the function
Mi; Co.umn Tran,formationJ This "unction per"orms multiplication o" state matri with a
constant matri o" same si/e which is shown as below
AES "e/ E;pan,ionJ
Dalue o" &CLjM in hea decimal is de"ined as "ollows
(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or A'S
Task .J ,e"ining Substitution Bo "unction ;S5Bo<
Task 0J ,e"ining Constant (atri "unction re!uired "or (i Column "unction
Task 1J ,e"ining +n#erse S5Bo "unction
Task 2J ,e"ining &ound Constant ;&C< "unction
Task 3J ,e"ining (ultiplicati#e +n#erse Cey "unction
Task 4J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J +nitiali/ing .08 bit key to generate "our words o" initial key to 10 bits o"
w7$ w.$ w0$ w2 ;(atri 2K2 o" each 8 bits<
Task 0J +mplement the "unction FgG to generate 22 words o" remaining
Task 1J +mplementing Circular le"t shi"t "unction
Task 2J +mplement S5Bo "unction
Task 3J +mplement round constant "unction
Task 4J Aenerate the keys re!uire "or 'ncryption?decryption modules
(odule 1J 'ncryption Phase
Task .J Aenerate an input se!uence .085bit plain tet "or encryption
Task 0J +mplementing +nitial Add &ound Cey "unction on .08 bit number
Task 1J +mplementing Substitute Bytes "unction on .08 bit number
Task 2J +mplementing (i Column "unction on .08 bit number
Task 3J +mplementing Add &ound key "unction on .08 bit number
Task 4J Aenerate the output "rom encryption phase
(odule 2J ,ecryption Phase
Task .J Aenerate an input se!uence .085bit cipher tet "or decryption
Task 0J +mplementing +nitial Add &ound Cey "unction on .08 bit number
Task 1J +mplementing Substitute Bytes "unction on .08 bit number
Task 2J +mplementing (i Column "unction on .08 bit number
Task 3J +mplementing Add &ound key "unction on .08 bit number
Task 4J Aenerate the output "rom decryption phase
(% ,esign and implement &C2 Cipher with a #ariable length key o" si/e . to 034 bytes ;8 to 0728
bits< which is used "or initiali/ation% *or encryption and decryption a byte FkG is generated "rom
initial State by selecting one o" the 033 entries in a systematic "ashion% As each #alue o" FkG is
generated the entries in originalFsG are permuted again to select the net key "or the immediate
encryption "unction%
Mo+u.e,J
(odule .J (ain (odule
Task .J +nitiali/e the 034 byte array matri as input "or key generation
Task 0J +nitiali/e the input plain tet o" each 8 I bit number to encrypt
Task 1J Parsing the initial arguments re!uired to call key generation & encryption
Task 2J Aenerating & +nitiali/ing +nitial Seed #alue "or P&NA
Task 3J +mplementing main module to integrate with other modules
(odule 0J Cey stream generation "unction
Task .J +nitiali/e the 034 byte array matri as input "or key generation
Task 0J +mplement +dentity Permutation "unction on input key
Task 1J +mplementing Permutation "unction to make it permutation array
Task 2J +mplementing Pseudo &andom Number generator algorithm
Task 3J +mplementing Byte generation o" 85bit number as output
(odule 1J &C2 'ncryption "unction
Task .J +nitiali/e input plain tet in multiples o" 85 bits each "or 'ncryption
Task 0J +mplement &andom number generation "unction to call random key
Task 1J +mplementing B)& "unction
Task 2J +mplementing and generate the se!uence o" B)& product
Task 3J Aenerate the "inal output "or the gi#en input
(odule 2J &C2 ,ecryption "unction
Task .J +nitiali/e input cipher tet in multiples o" 85 bits each "or decryption
Task 0J +mplement &andom number generation "unction to call random key
Task 1J +mplementing B)& "unction
Task 2J +mplementing and generate the se!uence o" B)& product
Task 3J Aenerate the "inal output "or the gi#en cipher tet input
4% Create and implement digital signature protocol using user de"ined N=ash codeO #ia &SA
Cipher ;Algorithm<% ,igital signature is the mechanism used to pro#ide both authentication and
con"identiality o" the message% +t works in "ollowing manner% =ere the =ash "unction is used to
generate =ash Code o" the message which pro#ides the authentication and the produced =ash
code is encrypted using the public key o" the recei#er to pro#ide con"identiality$ and at the
destination the recei#ed =ash code is decrypted and compared with the =ash code generated
"rom the recei#ed message%
+n this project the user implements user de"ined simple =ash "unction to generate the hash code
o" the message as "ollows% The simple =ash "unctions is used to generate FmG byte =ash code
then di#ide the message in to sub groups each containing FmG byte and then B)& all the sub part
to generate "inal =ash code%
*or 'ample a message with si/e F(G is di#ided in to FnG sub parts ;(.$ (0$ (1 P (
n
< each
containing a an e!ual si/e o" FmG bits ; . byte$ 0 bytes and so on<
So initially =i Q (iR "or iQ7R
=iQ (i ;S<K =i5.R "or iQ. to n where K is B)& operation%
:ses the hash code generated in the abo#e mentioned phase$ & then implement the digital
signature protocol producing both Signing and Deri"ying "unctions using &SA Algorithm shown
in the "ollowing diagram%
Mo+u.e,J
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
Task 4J +nitiali/e other miscellaneous global and local constant #alues
(odule 0J Aenerating Public Cey Pri#ate Pairs
Task .J &andomly generate initial p$ ! #alues using P&NA
Task 0J Deri"y whether they are prime or not ;large prime numbers<
Task 1J Deri"y the conditions re!uired to satis"y &SA inputs
Task 2J Aenerate the set o" possible #alues to implement &SA
Task 3J *orm the pair o" public and pri#ate key pairs
(odule 1J &SA Algorithm
Task .J Set & Deri"y initial p$ ! #alues using P&NA taken "rom (odule 0
Task 0J +mplement (odular Arithmetic "unction to deri#e FeG andFdG #alues
Task 1J Deri"y the pair o" #alues generated in task 0 as &SA inputs
Task 2J Aenerate set o" possible public and pri#ate key #alues to implement &SA
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
(odule 2J ,igital Signature using =ash Algorithm
Task .J Deri"y initial Pair o" Public pri#ate key taken "rom (odule 1
Task 0J Aenerate hash code "or gi#en input using gi#en algorithm
Task 1J Aenerate message and digital signature using =ash "rom task 0
Task 2J +mplement communicate protocol to recipient module
Task 3J Deri"y & Compare the ,igital Signature at the recipient side
5% Create and implement ,igital Signature Protocol using user de"ined (AC code #ia &SA
Cipher or 'lliptic Cur#e Crypto system% The (AC code is produced using CBC ;Cipher block
chaining< mode o" operation o" ,'S Cipher with initiali/ation #ector o" Tero with each data
block o" e!ual si/e ;Plain tet si/e o" 8$ .4$ P < ,.$ ,0$ ,1 P ,n ;i" necessary the "inal block
is padded with F7G bits<% The ,AC ;,ata Authentication Code< is produced as "ollows
). Q 'k ;,.<
)0Q 'k ;,0 ;S< ,.<
)1Q 'k ;,1 ;S< ,0<
PPPPP%
)nQ 'k ;,n ;S< ,n5.<
-here S is B)& operation
The produced (AC code ;*inal )n #alue< is used to generate the digital signature and the
corresponding Signing and Deri"ying "unctions are shown in the "ollowing diagram to implement
,igital Signature Protocol%
(odules
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA or 'lliptic Cur#e algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
Task .J &andomly generate initial p$ ! #alues using P&NA
Task 0J Deri"y whether they are prime or not ;large prime numbers<
Task 1J Deri"y the conditions re!uired to satis"y &SA or 'lliptic Crypt inputs
Task 2J Aenerate the set o" possible #alues to implement &SA or 'lliptic
Task 3J *orm the pair o" public and pri#ate key pairs
(odule 1J &SA or 'lliptic Cur#e Cryptography Algorithm
Task .J Set & Deri"y initial p$ ! #alues using P&NA taken "rom (odule 0
Task 0J +mplement (odular Arithmetic "unction to deri#e FeG andFdG #alues
Task 1J Deri"y the pair o" #alues generated in task 0 as &SA inputs
Task 2J Aenerate set o" possible public and pri#ate key #alues to implement &SA
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
+" 'lliptic Cur#e Cryptography
Task .J Set & Deri"y initial Alobal #alues using P&NA taken "rom (odule 0
Task 0J +mplement module to do Arithmetic operations on Tp or 0n
Task 1J Deri"y the pair o" #alues generated in task 0 as inputs "or 'CC
Task 2J Aenerate set o" possible public and pri#ate key #alues to implement 'CC
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
(odule 2J ,igital Signature using =ash Algorithm
Task .J Deri"y initial Pair o" Public pri#ate key taken "rom (odule 1
Task 0J Aenerate (AC code "or gi#en input using gi#en algorithm
Task 1J Aenerate message and digital signature using (AC "rom task 0
Task 2J +mplement communicate protocol to recipient module
Task 3J Deri"y & Compare the ,igital Signature at the recipient side
6% Create and implement a new (essage ,igest algorithm called Ett*F which produces a #ariant
(essage digest output using the "ollowing mechanism% This problem introduces a hash "unction
similar in spirit to S=A53.0 that operates on letters instead o" binary data% #t i, ca..e+ t*e toy
tetra graph hash <tt*=% Ai#en a message consisting o" a se!uence o" letters$ tth produces a hash
#alue consisting o" "our letters% *irst$ tth di#ides the message into blocks o" .4 letters$ ignoring
spaces$ punctuation$ and capitali/ation% +" the message length is not di#isible by .4$ it is padded
out with nulls% A "our5number running total is maintained that starts out with the #alue ;7$ 7$ 7$
7<R this is input to the compression "unction "or processing the "irst block% The compression
"unction consists o" two rounds%
Roun+ $A Aet the net block o" tet and arrange it as a row5wise 2K2 block o" tet and con#ert it
to numbers% ;A Q 7$ B Q . etc%<% *or eample "or the block A0,DE12%3456789: we have
Then$ add each column mod 04 and add the result to the running total$ mod 04% +n this eample$
the running total is ;02$ 0$ 4$ .7<%
Roun+ %A :sing the matri "rom round .$ rotate the "irst row le"t by .$ second row le"t by 0$
third row le"t by 1$ and re#erse the order o" the "ourth row% +n our eampleJ
Now$ add each column mod 04 and add the result to the running total% The new running total is
;3$ 6$ 9$ ..<%This running total is now the input into the "irst round o" the compression "unction
"or the net block o" tet% A"ter the "inal block is processed$ con#ert the "inal running total to
letters% *or eample$ i" the message is ABC,'*A=+@CL(N)P$ then the hash is *=@L%
(odulesJ
(odule .J ,raw the diagram comparable to original S=A53.0 algorithm to depict the o#erall tth
logic and the compression "unction logic
(odule 0J Calculate the hash "unction "or the 285letter message N+ lea#e twenty million dollars to
my "riendly cousin Bill%O
(odule 1J To demonstrate the weakness o" tth$ "ind a 285letter block that produces the same hash
as that just deri#ed% Hint: :se lots o" AGs%
(odule 2J ,esign & +mplement (ain (odule "or FtthG
>% ,esign and implement ,igital Signature Algorithm using the "ollowing mechanism which is
use"ul to test "or Primality% Check how this algorithm works with simple eample% Aenerate a
,SS protocol based on the mechanism to test "or Primality where e#er a prime number is
re!uired% All the reaming parameters are same as the )riginal ,SS algorithm
The ,SS signing and #eri"ying "unctions are shown in the "ollowing diagram
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
Task 4J +nitiali/e other miscellaneous global and local constant #alues
(odule 0J Aenerating Public Cey Pri#ate Paris
Task .J &andomly generate initial p$ ! and r #alues using P&NA
Task 0J +mplement Primality testing algorithm gi#en ;large prime numbers<
Task 1J Deri"y the conditions re!uired to satis"y ,SS inputs
Task 2J Aenerate the set o" possible #alues to implement ,SS
Task 3J *orm the pair o" public and pri#ate key pairs
(odule 1J ,SS Algorithm
Task .J Set & Deri"y initial p$ !$ r #alues using P&NA taken "rom (odule 0
Task 0J +mplement (odular Arithmetic "unction to deri#e ".$ "0 #alues
Task 1J Deri"y the pair o" #alues generated in task 0 as ,SS inputs
Task 2J Aenerate set o" possible public and pri#ate key #alues to implement ,SS
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
(odule 2J ,igital Signature using normal ,SS Algorithm
Task .J Deri"y initial Pair o" Public pri#ate key taken "rom (odule 1
Task 0J Aenerate hash code "or gi#en input using gi#en algorithm
Task 1J Aenerate message and digital signature using =ash "rom task 0
Task 2J +mplement communicate protocol to recipient module
Task 3J Deri"y & Compare the ,igital Signature at the recipient side
8% ,esign and implement a #ariation o" ,i""ie =ellman Cey 'change algorithm which can be
used as a ,igital Signature algorithm shown as below
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or modi"ied ,i""ie =ellman algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
Task 4J +nitiali/e other miscellaneous global and local constant #alues
(odule 0J Aenerating Public Cey Pri#ate Paris
Task .J &andomly generate initial ! and alpha #alues using P&NA
Task 0J +mplement Primality testing algorithm gi#en ;large prime numbers<
Task 1J Deri"y the conditions re!uired to satis"y Cey 'change inputs
Task 2J Aenerate the set o" possible #alues to implement ,SS
Task 3J *orm the pair o" public and pri#ate key pairs
(odule 1J ,igital Signature Algorithm
Task .J Set & Deri"y initial p$ !$ r #alues using P&NA taken "rom (odule 0
Task 0J +mplement (odular Arithmetic "unction to deri#e ".$ "0 #alues
Task 1J Deri"y the pair o" #alues generated in task 0 as ,SS inputs
Task 2J Aenerate set o" possible public and pri#ate key #alues to implement ,SS
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
(odule 2J ,igital Signature using normal proposed ,igital Signature Algorithm
Task .J Deri"y initial Pair o" Public pri#ate key taken "rom (odule 1
Task 0J Aenerate hash code "or gi#en input using gi#en algorithm
Task 1J Aenerate message and digital signature using =ash "rom task 0
Task 2J +mplement communicate protocol to recipient module
Task 3J Deri"y & Compare the ,igital Signature at the recipient side
$'% ,esign and +mplement a ,igital Signature algorithm with the "ollowing modi"ication% The
early proposal "or a digital signature scheme using symmetric encryption is based on the
"ollowing% To sign an n5bit message$ the sender randomly generates in ad#ance 0n 345bit
cryptographic keysJ
k.$ C.$ k0$ C0$% % $ kn$ Cn
which are kept pri#ate% The sender prepares in ad#ance two sets o" corresponding non5secret 425
bit #alidation parameters$ which are made publicJ
u.$ :.$ u0$ :0 P$ un$ :n and #.$ D.$ #0$ D0 P$ #n$ Dn
-here
#i Q ';ki$ ui<$ Di Q ';ki$ :i<
The message ( is signed as "ollows% *or the ith bit o" the message$ either ki or Ci is attached to
the message$ depending on whether the message bit is 7 or .% *or eample$ i" the "irst three bits
o" the message are 7..$ then the "irst three keys o" the signature are k.$ C0$ C1
a) =ow does the recei#er #alidate the messageU
9) +s the techni!ue secureU
c) =ow many times can the same set o" secret keys be sa"ely used "or di""erent messagesU
+) ,esign so"tware to implement the mentioned Algorithm
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
Task 4J +nitiali/e other miscellaneous global and local constant #alues
(odule 0J Aenerating Public Cey Pri#ate Paris
Task .J &andomly generate 345 bit Ceys using P&NA
Task 0J +mplement Se!uence o" multiples o" 345 bit patterns
Task 1J Deri"y the conditions re!uired to satis"y as inputs
Task 2J Aenerate the set o" possible #alues to implement ,igital Signature scheme
Task 3J *orm the pair o" public and pri#ate key pairs
(odule 1J ,SS Algorithm
Task .J Set & Deri"y initial pair o" keys taken "rom (odule 0
Task 0J +mplement 'ncrypt "unction to generate cipher tet
Task 1J Deri"y the pairs #i and Di
Task 2J Aenerate set o" possible public and pri#ate key #alues to call ,S
Task 3J Aenerate and produce a sample plain tet$ cipher tet pairs
(odule 2J ,igital Signature using normal ,SS Algorithm
Task .J Deri"y initial Pair o" Public pri#ate key taken "rom (odule 1
Task 0J Aenerate hash code "or gi#en input using gi#en algorithm
Task 1J Aenerate message and digital signature using =ash "rom task 0
Task 2J +mplement communicate protocol to recipient module
Task 3J Deri"y & Compare the ,igital Signature at the recipient side
$$% Create and implement a modi"ied ,'S cipher using the "ollowing "unction instead o" the
original switch "unction% Suppose the ,'S F*G "unction maps e#ery 105bit input &$ regardless o"
the #alue o" the input C$ to
a) 105bit string o" ones
9) bitwise complement o" &
:se the "ollowing properties o" the B)& operationJ
;AK B<KC Q AK;BKC<
AKA Q 7
AK7 Q A
AK . Q bit wise complement o" A
-here K is B)& operation$ A$ B and C are n5bit string o" bits
7 is an n5bit string o" 7 bits
. is an n5bit string o" . bits
+denti"y the "unction in the ,'S encryption and also per"orm decryption%
(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or ,'S
Task .J ,e"ining +nitial Permutation and +n#erse +P "unctions
Task 0J ,e"ining 'pansion & Permutation "unction
Task 1J ,e"ining S5Bo *unction
Task 2J ,e"ining PC5. and PC50
Task 3J ,e"ining Shi"t Cey "unction
Task 4J ,e"ining +nitial Cey & Plain tet input o" 425 bits
Task 6J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J Aenerate an input se!uence 425bit input number "or key generation
Task 0J +mplementing Permuted Choice I . "unction on 425bit number
Task 1J +mplementing Shi"t operation on the output "rom PC5. "unction
Task 2J +mplementing Permuted Choice I 0 "unction
Task 3J Aenerate the keys re!uire "or encryption "unction
Task 4J Aenerate the keys re!uire "or decryption "unction
(odule 1J 'ncryption Phase ;implement the proposed algorithm using same steps<
Task .J Aenerate an input se!uence 425bit input number "or encryption
Task 0J +mplementing +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom encryption phase
(odule 2J ,ecryption Phase ;implement the proposed algorithm using same steps<
Task .J Aenerate an input se!uence 425bit input number "or decryption
Task 0J +mplementing +P
5.
+n#erse +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom ,ecryption phase
$%% ,esign and implement (odi"ied ,'S cipher as mentioned below and obser#e the A#alanche
e""ect% The number o" rounds allowed "rom one to "i#e only% )bser#e the A#alanche e""ect by c
hanging the bits o" the plain tet% That is )nce the "irst round is completed$ change . bit o" the
plain tet and obser#e the change in cipher tet bits% Continue the analysis by changing hal" o"
the bits in the plain tet%
(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or ,'S
Task .J ,e"ining +nitial Permutation and +n#erse +P "unctions
Task 0J ,e"ining 'pansion & Permutation "unction
Task 1J ,e"ining S5Bo *unction
Task 2J ,e"ining PC5. and PC50
Task 3J ,e"ining Shi"t Cey "unction
Task 4J ,e"ining +nitial Cey & Plain tet input o" 425 bits
Task 6J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J Aenerate an input se!uence 425bit input number "or key generation
Task 0J +mplementing Permuted Choice I . "unction on 425bit number
Task 1J +mplementing Shi"t operation on the output "rom PC5. "unction
Task 2J +mplementing Permuted Choice I 0 "unction
Task 3J Aenerate the keys re!uire "or encryption "unction
Task 4J Aenerate the keys re!uire "or decryption "unction
(odule 1J 'ncryption Phase
Task .J Aenerate an input se!uence 425bit input number "or encryption
Task 0J +mplementing +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output bit e""ect with #arying .$ 0$ and 1 bits in the input
(odule 2J ,ecryption Phase
Task .J Aenerate an input se!uence 425bit input number "or decryption
Task 0J +mplementing +P
5.
+n#erse +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom ,ecryption phase
$&% ,esign and implement a Block Cipher in CBC ;Cipher Block chaining< mode o" operation
with 15,'S mechanism "rom the "ollowing two #ariants shown as below
%
(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or ,'S
Task .J ,e"ining +nitial Permutation and +n#erse +P "unctions
Task 0J ,e"ining 'pansion & Permutation "unction
Task 1J ,e"ining S5Bo *unction
Task 2J ,e"ining PC5. and PC50
Task 3J ,e"ining Shi"t Cey "unction
Task 4J ,e"ining +nitial Cey & Plain tet input o" 425 bits
Task 6J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J Aenerate an input se!uence 425bit input number "or key generation
Task 0J +mplementing Permuted Choice I . "unction on 425bit number
Task 1J +mplementing Shi"t operation on the output "rom PC5. "unction
Task 2J +mplementing Permuted Choice I 0 "unction
Task 3J Aenerate the keys re!uire "or encryption "unction
Task 4J Aenerate the keys re!uire "or decryption "unction
(odule 1J 'ncryption Phase ;+mplement proposed ',' Phase<
Task .J Aenerate an input se!uence 425bit input number "or encryption
Task 0J +mplementing +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom encryption phase
(odule 2J ,ecryption Phase ;implement proposed ',' Phase<
Task .J Aenerate an input se!uence 425bit input number "or decryption
Task 0J +mplementing +P
5.
+n#erse +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom ,ecryption phase
$(% ,esign and implement a Block Cipher ;,'S or A'S< in CTS ;Cipher tet Stealing< mode o"
operation with a concept called padding where one might store the encrypted data in the same
memory bu""er that originally contained the plain tet and so the cipher tet must be the same
length as the original plain tet% :se the "ollowing algorithm "or the padding shown below
implement Block cipher and also implement a #ariant o" CTS mode immediate to the "irst
diagram%
(odulesJ
(odule .J ,e"ining & +nitiali/ation o" all re!uired "unctions re!uired "or ,'S
Task .J ,e"ining +nitial Permutation and +n#erse +P "unctions
Task 0J ,e"ining 'pansion & Permutation "unction
Task 1J ,e"ining S5Bo *unction
Task 2J ,e"ining PC5. and PC50
Task 3J ,e"ining Shi"t Cey "unction
Task 4J ,e"ining +nitial Cey & Plain tet input o" 425 bits
Task 6J ,e"ining the other constant "unctions re!uire "or ,'S implementation
(odule 0J Cey Aeneration Phase
Task .J Aenerate an input se!uence 425bit input number "or key generation
Task 0J +mplementing Permuted Choice I . "unction on 425bit number
Task 1J +mplementing Shi"t operation on the output "rom PC5. "unction
Task 2J +mplementing Permuted Choice I 0 "unction
Task 3J Aenerate the keys re!uire "or encryption "unction
Task 4J Aenerate the keys re!uire "or decryption "unction
(odule 1J 'ncryption Phase ;:se the proposed Cipher Block Chaining (ode<
Task .J Aenerate an input se!uence 425bit input number "or encryption
Task 0J +mplementing +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom encryption phase
(odule 2J ,ecryption Phase ;:se the proposed Cipher Block Chaining (ode<
Task .J Aenerate an input se!uence 425bit input number "or decryption
Task 0J +mplementing +P
5.
+n#erse +nitial Permutation "unction on 425bit number
Task 1J +mplementing 'pansion "unction on 10 bit number to get 285bit number
Task 2J +mplementing B)& on 28 bit with &ound . key
Task 3J +mplementing S5 Bo "unction on 28 bit number to get 10 I bit number
Task 4J +mplementing Permutation "unction on 105 bit
Task 6J Aenerate the output "rom ,ecryption phase
$4% ,esign and implement Cey 'change algorithm using the "ollowing mechanism%
(odulesJ
(odule .J &andom Number Aeneration to generate 87 bit5 #alue
(odule 0J +mplement 'ncryption algorithm using &C2 algorithm
(odule 1J +mplement Communication Phase
(odule 2J Analysis o" Cey generation scheme
$5% ,esign and implement a public key crypto system using the "ollowing mechanism mentioned
below
To summari/e$
$) (. takes an input k and produces an output x%
%) (0 takes inputs x and p gi#ing output z%
&) (1 takes inputs z and k and produces p%
The three tables$ once constructed$ are made public%
Mo+u.e,J
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
(odule 1J &SA Algorithm using proposed scheme
(odule 2J Analysis o" &SA and (odi"ied &SA algorithm
$6% ,esign and implement modi"ied &SA cipher using the "ollowing algorithm% +" possible create
a digital Signature protocol using the modi"ied algorithm
$) A chooses two large primes P and Q that are also relati#ely prime to ;P 5 .< and ;Q 5 .<%
%) A publishes N Q PQ as its public key%
&) A calculates PG and Q such that PP = . ;mod Q 5 .< and QQ = . ;mod P 5 .< ;Congruent
modulo operations
() B encrypts message M as C Q M
N
mod N%
4) A "inds M by sol#ing M = C
P
;mod Q< and M = C
EG
;mod P<%
Compare the algorithm with &SA and "ind where it di""ers with &SA%
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
(odule 1J &SA Algorithm using proposed scheme
(odule 2J ,igital Signature Aeneration Phase & Analysis
$>% ,esign and implement ,igital Signature scheme using modi"ied 'lliptic Cur#e
Cryptosystem mentioned as below%
-e ha#e a global elliptic cur#e$ prime p$ and NgeneratorO A% Alice picks a pri#ate signing key B
A
and "orms the public #eri"ying key V
A
Q B
A
A% To sign a messageJ
W Alice picks a #alue k%
W Alice sends Bob ($ k and the signature S Q ( I k B
A
A
W Bob #eri"ies that ( Q S S kV
A
Pro#e that this modi"ied scheme works in the same "ashion as original 'lliptic Cur#e
Cryptosystem and also compare the #alues with the modi"ied one and show that #eri"ication
process produces e!uality i" the signature is #alid% Show that the scheme is unacceptable by
describing a simple techni!ue "or "orging a userGs signature on an arbitrary message%
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
(odule 1J 'lliptic Cur#e Algorithm
(odule 2J Analysis o" 'lliptic and (odi"ied 'lliptic Cur#e algorithm
$8% ,esign and implement a key distribution protocol as mentioned below
Consider the "ollowing protocol$ designed to let A and B decide on a "resh$ shared session key
CG
AB%
-e assume that they already share a long5term key C
AB
%
.% A BJ A$ N
A
0% B AJ ' ;C
AB
$ LN
A
$ CG
AB
M<
1% A BJ ' ;CG
AB
$ N
A
<
Try to understand the protocol designerGs reasoningJ X-hy would A and B belie#e a"ter the
protocol ran that they share CG
AB
with the other partyU X-hy would they belie#e that this
shared key is "reshU +n both cases$ you should eplain both the reasons o" both A and B% Propose
a modi"ication to this scheme and implement new protocol% :se any o" the Block cipher ,'S$
A'S or &C2 to complete the protocol implementation where e#er encryption and decryption is
re!uired%
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
(odule 1J Protocol implementation using ,'S$ A'S or &C2
(odule 2J Analysis o" the proposed and eisting scheme
%'% ,esign and create an e5commerce application containing the "ollowing modules
(odulesJ
(odule .J Customer as a client ;-eb site< to complete the online ordering o" items
(odule 0J (erchant to deli#er the items to the customer
(odule 1J Bank to pro#ide online transaction "acility to the customer and (erchant
(odule 2J Card processing "or debit card or credit card transactions
(odule .J +nitiali/ation PhaseJ
Task .J +nitiali/e input plain tet$ Seed Dalue
Task 0J +nitiali/e global #alues re!uired "or &SA algorithm
Task 1J +nitiali/e local parameters re!uired "or ,igital signature
Task 2J +nitiali/e other miscellaneous constant #alues re!uired "or Algorithm
Task 3J ,eclare appropriate Alobal and local parameters "or "unction calls
(odule 0J Aenerating Public Cey Pri#ate Paris
(odule 1J &SA Algorithm using proposed scheme
(odule 2J Analysis o" &SA and (odi"ied &SA algorithm
'ourse 'oordinator
((. )a%a *e+har,