You are on page 1of 19

Lecture 20 Cther 1echno|og|es

lnLroducLlon

- 1here are many Lechnologles slmllar Lo CCl ln wlde use Loday
AcLlve Server ages (AS)
8uns under Wlndows requlres llS server Lo be lnsLalled
P 8uns under all plaLforms
!ava ServleL 8uns under all plaLforms requlres !ava vlrLual Machlne Lo be lnsLalled on Lhe server slde
AcLlve Server ages (AS)
- WhaL are AcLlve Server ages?
1hey are web pages LhaL conLaln serverslde scrlpLs ln addlLlon Lo Lhe usual mlxLure of LexL and P1ML Lags
Serverslde scrlpLs are speclal code you puL ln web pages LhaL are processed (execuLed) before Lhe pages are
senL Lo Lhe requesLlng web browser
Such serverslde scrlpLs are ldenLlfled by Lhe marker and
- Why do we need Lhls?
1he AS scrlpLs can lnserL some dynamlc conLenLs wlLhln a P1ML flle for example Lhe currenL daLe
and Llme
AS ls very powerful lL ls a fullfledged programmlng language lL also has faclllLles Lo access
daLabases
- AS flles have an exLenslon asp" Lo dlsLlngulsh Lhem from normal P1ML pages
Server and CllenL vlews
- Pow does an acLlve server page appear?
1o Lhe web browsers lL ls [usL llke a normal P1ML page
Dse vlewSource opLlon Lo see
1he flle sLored on Lhe server looks very dlfferenL
1here are AS scrlpLs embedded ln lL
1hey geL processed before belng senL Lo Lhe browser
ldenLlfylng Server Slde ScrlpLs
- 1hey sLarL wlLh and end wlLh
1he serverslde scrlpL ls lncluded ln beLween Lhe sLarL and end Lags
Serverslde scrlpLs can be lnserLed anywhere ln Lhe web page even lnslde
P1ML Lags
Dslng lorms wlLh AS
- 8aslc ldea
very slmllar Lo CCl scrlpLlng
As lf we are wrlLlng Lhe CCl scrlpL uslng AS
8ullLln funcLlons are avallable LhaL slmpllfles Lhe access of form daLa from AS pages
Wlll be lllusLraLed wlLh examples

Lxample 1
- Speclfy Lhe form ln P1ML
hLmlheadLlLleSeeklng lnformaLlon/LlLle/headbody
form meLhodposL acLlonLesL_formasp
?our name lnpuL LypeLexL namename" slze3088
?our emall lnpuL Lypepassword nameemall slze3088
lnpuL LypeSubmlL valueSubmlL /form /body/hLml
- WrlLe Lhe server slde scrlpL uslng AS(LesL_formasp)
hLmlheadLlLle8espondlng Lo a form/LlLle/headbody
?our name ls 8equesLlorm(name) 88
?our emall ls 8equesLlorm(emall) /body/hLml
- Accesslng form daLa ln AS does noL need any serlous programmlng
- Slmply use Lhe funcLlon 8equesLlorm as 8equesLlorm(flelJoome)
- 8ecall LhaL all AS code lnslde Lhe P1MLflle are brackeLed by and

Lxample 2
- SllghLly more complex uses varlable Lo sLore form daLa before processlng
- 1he form asks Lhe user Lo enLer hls/her favorlLe sporL and Lhen responds back wlLh a message menLlonlng
LhaL
1he name of Lhe sporL as enLered ln Lhe form has Lo be sLored ln a varlable
1he value of Lhe varlable ls checked and Lhe message generaLed accordlngly
hLmlheadLlLlename and SporL/LlLle/headbody
form acLlonsporLasp meLhodlease enLer your name and lavorlLe SporL
?CD8 nAMLlnpuL LypeLexL namename SlZL20
lAvC8l1L SC81lnpuL Lyperadlo namesporL value1 checkedCrlckeL
lnpuL Lyperadlo namesporL value21ennls lnpuL Lyperadlo namesporL
value3ChesslnpuL LypeSubmlL vALDLCk/form /body /hLml
sporLasp"
hLmlheadLlLlename and SporL/LlLle/headbody
?ourname 8equesLlorm(name) lavSporL 8equesLlorm(sporL)
Pl ?ourname 88l am sure your favorlLe sporL sLar ls lf lavSporL 1 Lhen
Sachln 1endulkar end lf lf lavSporL 2 Lhen Sanla Mlrza
end lf lf lavSporL 3 Lhen vlshwanaLhan Anand end lf
/body/hLml

Lxample 3
- ln Lhls example Lhere ls a slmple form Lhrough whlch a user enLers name age and sex
- 1he daLa enLered are senL back as a P1ML Lable
hLmlheadLlLle8eLurn lnformaLlon/LlLle/headbody
form meLhodposL acLlonLableaspname lnpuL LypeLexL namename slze30
88Age lnpuL LypeLexL nameage slze288
Sex lnpuL LypeLexL namesex slze188lnpuL LypeSubmlL valueSubmlL
/form /body/hLml
Lableasp"
hLmlheadLlLleShow uaLa LnLered/LlLle/headbody
?ourname 8equesLlorm(name) ?ourAge 8equesLlorm(age)
?ourSex 8equesLlorm(sex) LableLr Lhname/Lh LhAge/Lh LhSex/Lh
/Lr8esponseWrlLe Lr Ld " ?ourname /Ld Ld " ?ourAge /Ld Ld
?ourSex /Ld /Lr"/Lable/body/hLml

9-

- A varlable deflned wlLhln serverslde scrlpL can be accessed only from wlLhln serverslde scrlpLs
1hls ls why we had Lo use 8esponseWrlLe ln Lhe prevlous example
Some of Lhe P1ML code were ouLpuLLed LhaL way

PyperLexL reprocessor (P)
- WhaL ls P?
Llke AS P ls a serverslde language
lL ls a powerful language (llke AS) and can be used Lo wrlLe serverslde scrlpLs wlLh relaLlve ease
P runs on mosL of Lhe plaLforms
ueclarlng P ScrlpLs
- All P code ls enclosed ln beLween Lwo P Lags
- Several ways for dolng Lhls
? ?php P code P code ? php?
scrlpL languagephp"P code/scrlpL
Accesslng Lhe lorm values
- When a form ls submlLLed Lhe fllled up values go Lo Lhe server
- Pow Lo access Lhe values?
1o geL Lhe value of a form varlable LhaL has been senL Lo a scrlpL uslng Lhe CS1 meLhod
$varlablename $_CS1 'varlable'
lf we use Lhe CL1 meLhod
$varlablename $_CL1 'varlable'
Worklng wlLh an Lxample
- Suppose LhaL you have creaLed a web page Lhrough wlLh Lhe vlslLor can glve some feedback
1he feedback commenLs wlll be Lyped ln a form and submlLLed
1he serverslde scrlpL wlll emall Lhe commenLs Lo Lhe deslgnaLed reclplenL
1he P1ML lorm
form acLlonmallphp meLhodposL?our name lnpuL LypeLexL namename
brLmall address lnpuL LypeLexL name emallbrbrCommenLsbr
LexLarea namecommenLs/LexLareabrbrlnpuL LypesubmlL valueSubmlL /form
1he P Code
?$name$_CS1name $emall$_CS1emall $commenLs$_CS1commenLs
$Lolsg[csellLkgpacln $message$name has fllled up your feedback form Pe sald n$commenLsnn
Pls emall address ls $emalllf (mall($Loleedback$message
lrom $emalln)) echo 1hanks for your commenLs else echo roblem sendlng Lhe mall ?





Lecture 31 Intranet Lxtranet I|rewa||

Intranet and Lxtranet

WhaL ls lnLraneL?
- ueflnlLlon
rAn lnLraneL ls a prlvaLe compuLer neLwork LhaL uses lnLerneL proLocols neLwork connecLlvlLy and posslbly
Lhe publlc LelecommunlcaLlon sysLem Lo securely share parL of an organlzaLlon's lnformaLlon or operaLlons
wlLh lLs employees
- 8aslcally
lL uses Lhe same concepLs and Lechnologles of Lhe lnLerneL (cllenLs and servers) runnlng on Lhe 1C/l
proLocol sulLe
P11 l1 and SM1 are very commonly used
Access Lo lnformaLlon ls Lyplcally Lhrough browsers
laLform lndependenL
no need Lo lnsLall speclal sofLware on cllenLs
- AdvanLages
lnLraneLs help employees Lo qulckly locaLe lnformaLlon and appllcaLlons relevanL Lo Lhelr roles and
responslblllLles
SLandard lnLerface allowlng access from anywhere"
Can serve as a powerful Lool for communlcaLlon wlLhln an organlzaLlon
8oLh verLlcally and horlzonLally
ermlLs lnformaLlon Lo be publlshed
WhaL ls LxLraneL?
- ueflnlLlon
An LxLraneL ls a prlvaLe neLwork LhaL uses lnLerneL proLocols neLwork connecLlvlLy and posslbly Lhe
publlc communlcaLlon sysLem Lo securely share parL of an organlzaLlon's lnformaLlon or operaLlons
wlLh suppllers parLners cusLomers or oLher buslnesses
Can be vlewed as parL of a company's lnLraneL LhaL ls exLended Lo users ouLslde Lhe company
- 8aslcally
lL ls a prlvaLe lnLerneL over Lhe lnLerneL"
Dsed Lo deslgnaLe prlvaLe parLs" of a webslLe
Cnly reglsLered users can navlgaLe
lL requlres securlLy and prlvacy
llrewall server managemenL
lssuance and use of dlglLal cerLlflcaLes or slmllar means of auLhenLlcaLlon
LncrypLlon of messages
Dse of vlrLual rlvaLe neLworks (vn) LhaL Lunnel Lhrough Lhe publlc neLwork
- AdvanLages
Can lmprove organlzaLlon producLlvlLy
Allows lnformaLlon Lo be vlewed aL Llmes convenlenL for exLernal users
CuLs down on meeLlng Llmes
lnformaLlon can be updaLed lnsLanLly
AuLhorlzed users have lmmedlaLe access Lo laLesL lnformaLlon
Can lmprove relaLlonshlps wlLh cusLomers
llrewall
Why llrewalls?
- llrewalls are effecLlve Lo
roLecL local sysLems
roLecL neLworkbased securlLy LhreaLs
rovlde secured and conLrolled access Lo lnLerneL
rovlde resLrlcLed and conLrolled access from Lhe lnLerneL Lo local servers
llrewall CharacLerlsLlcs
- ueslgn goals
All Lrafflc from lnslde Lo ouLslde musL pass Lhrough Lhe flrewall
Cnly auLhorlzed Lrafflc wlll be allowed Lo pass
ueflned by local securlLy pollcy
1he flrewall lLself ls lmmune Lo peneLraLlon
Dse of LrusLed sysLem wlLh a secure operaLlng sysLem
1 ackeL fllLers
2 AppllcaLlonlevel gaLeways
3 ClrculLlevel gaLeways
1ypes of llrewalls
ln1L8nL1 8lvA1L
nL1WC8k
Some of Lhe aLLacks LhaL can be made on packeL fllLerlng rouLers
- l address spooflng
- Source 8ouLlng aLLacks
- 1lny fragmenL aLLacks
ackeL
lllLerlng
rouLer
ackeL lllLerlng llrewall
Applles a seL of rules Lo each lncomlng l packeL and Lhen forwards or dlscards Lhe packeL
1yplcally based on l addresses and porL numbers
lllLer packeLs golng ln boLh dlrecLlons
1he packeL fllLer ls Lyplcally seL up as a llsL of rules based on maLches Lo flelds ln Lhe l or 1C header
1wo defaulL pollcles (dlscard or forward)
- AdvanLages
SlmpllclLy
1ransparency Lo users
Plgh speed
- ulsadvanLages
ulfflculLy of seLLlng up packeL fllLer rules
Lack of auLhenLlcaLlon
- Also called a roxy Server acLs as relay of appllcaLlon level Lrafflc
- lL ls servlce speclflc
AppllcaLlon Level
CaLeway
CuLslde
connecLlon
lnslde
connecLlon
CuLslde
PosL
lnslde
PosL
AppllcaLlonlevel CaLeway
- AppllcaLlonlevel CaLeway
Also called proxy server
AcLs as a relay of appllcaLlonlevel Lrafflc
- AdvanLages
Plgher securlLy Lhan packeL fllLers
Cnly need Lo scruLlnlze a few allowable appllcaLlons
Lasy Lo log and audlL all lncomlng Lrafflc
- ulsadvanLages
AddlLlonal processlng overhead on each connecLlon (gaLeway as spllce polnL)
CuL
ClrculL Level CaLeway
CuLslde connecLlon
lnslde connecLlon
CuLslde PosL
lnslde PosL
CuL
CuL
ln
ln ln
SLandalone sysLem or speclallzed funcLlon performed by an AppllcaLlonlevel CaLeway
uoes noL permlL endLoend 1C connecLlon raLher Lhe gaLeway seLs up Lwo
1C connecLlons
1he gaLeway Lyplcally relays 1C segmenLs from one connecLlon Lo Lhe oLher wlLhouL examlnlng
Lhe conLenLs
1he securlLy funcLlon conslsLs of deLermlnlng whlch connecLlons wlll be allowed
1yplcally use ls a slLuaLlon ln whlch Lhe sysLem admlnlsLraLor LrusLs Lhe lnLernal users
An example ls Lhe SCCkS package
8asLlon PosL
- lL ls a sysLem ldenLlfled by Lhe flrewall admlnlsLraLor as a crlLlcal polnL ln Lhe neLwork's securlLy
lL execuLes a secure verslon of lLs CS and ls LrusLed
lL conslsLs of servlces whlch are essenLlal
8equlres addlLlonal auLhenLlcaLlon before access ls allowed
llrewall ConflguraLlons
- ln addlLlon Lo Lhe use of slmple conflguraLlon of a slngle sysLem more complex conflguraLlons are posslble
- 1hree common conflguraLlons are ln popular use
Slnglehomed hosL
uualhomed hosL
Screened subneL
Slnglehomed PosL
lnLerneL
rlvaLe neLwork
PosLs
lnformaLlon
Server
ackeL
fllLerlng rouLer
8asLlon PosL
rlvaLe neLwork
PosLs
- llrewall conslsLs of Lwo sysLems
A packeLfllLerlng rouLer
A basLlon hosL
- ConflguraLlon for Lhe packeLfllLerlng rouLer
Cnly packeLs from and Lo Lhe basLlon hosL are allowed Lo pass Lhrough Lhe rouLer
- 1he basLlon hosL performs auLhenLlcaLlon and proxy funcLlons
- CreaLer securlLy Lhan slngle conflguraLlons because of Lwo reasons
lmplemenLs boLh packeLlevel and appllcaLlonlevel fllLerlng (allowlng for flexlblllLy ln deflnlng securlLy
pollcy)
An lnLruder musL generally peneLraLe Lwo separaLe sysLems
uualhomed hosL
lnLerneL
rlvaLe neLwork
PosLs
lnformaLlon
Server
ackeL
fllLerlng rouLer
8asLlon PosL
1hls conflguraLlon physlcally prevenLs securlLy breach
1he packeLfllLerlng rouLer ls noL compleLely compromlsed
1rafflc beLween Lhe lnLerneL and oLher hosLs on Lhe prlvaLe neLwork has Lo flow Lhrough Lhe basLlon
hosL
Screened SubneL
lnLerneL
lnformaLlon
Server
CuLslde
rouLer
8asLlon
MosL secure conflguraLlon of Lhe Lhree
1wo packeLfllLerlng rouLers are used
CreaLlon of an lsolaLed subneLwork
- AdvanLages
1hree levels of defense Lo LhwarL lnLruders
1he ouLslde rouLer adverLlses only Lhe exlsLence of Lhe screened subneL Lo Lhe lnLerneL
lnLernal neLwork ls lnvlslble Lo Lhe lnLerneL
1he lnslde rouLer adverLlses only Lhe exlsLence of Lhe screened subneL Lo Lhe lnLernal neLwork
1he sysLems on Lhe lnslde neLwork cannoL consLrucL dlrecL rouLes Lo Lhe lnLerneL
lnLraneL / LxLraneL ueslgn lssues
- lor lnLraneL
Analysls of Lhe organlzaLlon flow
ldenLlfy varlous crosssecLlons of employees and Lhelr access prlvlleges
Lnforce auLhenLlcaLlon mechanlsm
- lor LxLraneL
SecurlLy ls Lhe ma[or concern
ComblnaLlon of flrewalls auLhenLlcaLlon vn eLc musL be used


Culz SoluLlons on LecLure 31
1 WhaL ls Lhe maln dlfference beLween an lnLraneL and an LxLraneL?
An lnLraneL uses lnLerneL Lechnology for lnformaLlon sharlng lnslde an organlzaLlon LxLraneL exLends Lhe
capablllLy of lnLraneL Lo lnclude exLernal enLlLles llke cllenLs eLc

2 Pow does a packeL fllLerlng rouLer Lyplcally fllLers packeLs?
8ased on Lhe source and desLlnaLlon l addresses and porL numbers

3 Pow does an appllcaLlon level gaLeway carry ouL Lhe fllLerlng process?
1hey recelve each packeL and applles a seL of rules whlch are proLocol dependenL lor example ln SM1
Lrafflc lL can check Lhe packeL body for ob[ecLlonable conLenLs

4 Whlch would be more sulLable for emall fllLerlng packeLlevel fllLer or appllcaLlonlevel gaLeway?
AppllcaLlonlevel gaLeway (proxy server)

3 WhaL ls a basLlon hosL?
lL ls a secure and Lamperproof sysLem LhaL serves as Lhe cenLral polnL ln Lhe neLwork's securlLy

6 ln Lhe dualhomed hosL flrewall how many securlLy polnLs musL be broken by an lnLruder before he can geL
lnLo Lhe lnLernal neLwork?
1wo rouLer and basLlon hosL

7 8epeaL Lhe above for screened subneL flrewall
1hree ouLslde rouLer lnslde rouLer and Lhe basLlon hosL




Lecture 32 8as|c cryptograph|c concepts art I

8as|c Concepts

SecurlLy ALLacks
- Any acLlon LhaL compromlses Lhe securlLy of lnformaLlon
- lour Lypes of aLLack
lnLerrupLlon
lnLercepLlon
ModlflcaLlon
labrlcaLlon
- 8aslc model
u uesLlnaLlon
Source S
- lnLerrupLlon
ALLack on avallablllLy
- lnLercepLlon
ALLack on confldenLlallLy
S u
S u
l
- ModlflcaLlon
ALLack on lnLegrlLy
- labrlcaLlon
ALLack on auLhenLlclLy
S u
asslve and AcLlve ALLacks
- asslve aLLacks
CbLaln lnformaLlon LhaL ls belng LransmlLLed (eavesdropplng)
1wo Lypes
8elease of message conLenLs
1rafflc analysls
very dlfflculL Lo deLecL
- AcLlve aLLacks
lnvolve some modlflcaLlon of Lhe daLa sLream or Lhe creaLlon of a false sLream
lour caLegorles
Masquerade Cne enLlLy preLends Lo be a dlfferenL enLlLy
8eplay asslve capLure of a LransacLlon and subsequenL replay
ModlflcaLlon Some porLlon of a message ls alLered on lLs way
uenlal of servlce revenLs access Lo resources
SecurlLy Servlces
- ConfldenLlallLy (prlvacy)
- AuLhenLlcaLlon (who creaLed or senL Lhe daLa)
- lnLegrlLy (has noL been alLered)
- nonrepudlaLlon (parLles cannoL laLer deny)
- Access conLrol (prevenL mlsuse of resources)
- AvallablllLy (permanence nonerasure)
uenlal of Servlce ALLacks
vlrus LhaL deleLes flles
neLwork Access SecurlLy Model
CA1LWA?
lnLernal neLwork
CompuLers
SofLware resources
uaLabases
SecurlLy ConLrol
ACCLSS CPAnnLL
CpponenL Puman vlrus Worm
Cryptography 1erm|no|og|es
Introduct|on
- MosL lmporLanL concepL behlnd neLwork securlLy ls eoctyptloo
- 1wo forms of encrypLlon
1 rlvaLe (or SymmeLrlc)
Slngle key shared by sender and recelver
2 ubllckey (or AsymmeLrlc)
SeparaLe keys for sender and recelver
1yplcal llow
Channel LA uA
1rusLed 1hlrd arLy
lnLruder
Message Message
key 1 key 2
SLnuL8 8LCLlvL8
SymmeLrlc key CrypLography
- 8aslc lngredlenLs of Lhe scheme
lalnLexL ()
Message Lo be encrypLed
SecreL key (k)
Shared among Lhe Lwo parLles
ClpherLexL (C)
Message afLer encrypLlon
LncrypLlon algorlLhm (LA)
Dses and k
uecrypLlon algorlLhm (uA)
Dses C and k
- SecurlLy of Lhe scheme
uepends on Lhe secrecy of Lhe key
uoes noL depend on Lhe secrecy of Lhe algorlLhm
- AssumpLlons LhaL we make
AlgorlLhms for encrypLlon/decrypLlon are known Lo Lhe publlc
keys used are kepL secreL
lllusLraLlon
LA uA
Shared key k Shared key k
lalnLexL
lalnLexL
ClpherLexL C
Some olnLs Lo Cbserve
- ey Jlsttlbotloo problem of secreL key sysLems
LsLabllsh key before communlcaLlon
need o(o1)/2 keys wlLh o dlfferenL parLles
A
8 L
C u
Classlcal 1echnlques
- 8roadly falls under Lwo caLegorles
1 SubsLlLuLlon clphers
Lach leLLer or group of leLLers of Lhe plalnLexL are replaced by some oLher leLLer or group of leLLers
Lo obLaln Lhe clpherLexL
2 1ransposlLlon clphers
LeLLers of Lhe plalnLexL are permuLed ln some form
A Slmple Lxample
Caesar Clpher (a subsLlLuLlon clpher)
LarllesL known subsLlLuLlon clpher
8eplace each leLLer of Lhe alphabeL wlLh Lhe leLLer tbtee ploces afLer LhaL alphabeL
AlphabeLs are assumed Lo be wrapped around ( Z ls followed by A eLc)
P A ? n L W ? L A 8
C k u S S 8 C P Z 8 P u D
We can generallze Lhe ldea by replaclng each leLLer by Lhe kLh followlng leLLer
lf we asslgn a number Lo each leLLer (A1 82 eLc) Lhen
C L () ( + k 1) 26 + 1
u (C) (C k + 23) 26 + 1
urawback
8ruLe force aLLack ls easy
1ry ouL all Lhe 23 posslble keys MonoalphabeLlc Clpher
Allow any arblLrary subsLlLuLlon
1here can be 26! or 4x1026 posslble keys
A Lyplcal key may be (ZACWSxCuL8lv8C1?PnM!DlkLC)
urawbacks
We can make guesses by observlng Lhe relaLlve frequency of leLLers dlgrams and Lrlgrams ln Lhe LexL
Lasy Lo break ln general
1ransposlLlon Clphers
- Many Lechnlques were proposed under Lhls caLegory
- A slmple scheme
WrlLe ouL Lhe plalnLexL ln a recLangle row by row and read Lhe message column by column by
permuLlng Lhe order of Lhe columns
Crder of Lhe column becomes Lhe key
we are aLLendlng one conference aL ll1 kharagpur
key 4 3 1 2 3 6 7
w e a r e a L
L e n d l n g
o n e c o n f
e r e n c e a
L l l 1 k h a
r a g p u r
C aneelg rdcn1p eenrla wLoeLr elocku annehr Lgfaa13
urawbacks
1he clpherLexL has Lhe same leLLer frequency as Lhe orlglnal plalnLexL
Cuesslng Lhe number of columns and some probable words ln Lhe plalnLexL holds Lhe key
SLream Clphers vs 8lock Clphers
- A sLream clpher encrypLs Lhe plalnLexL blL by blL (ln sLreams)
- A block clpher encrypLs nblL blocks aL a Llme
lor example a 236blL clpher encrypLs 236blL blocks aL a Llme
ShorL blocks have Lo be padded
racLlcal AlgorlLhms
- uaLa LncrypLlon SLandard (uLS)
8lock slze ls 64 blLs
key ls 36 blLs
- luLA
8lock slze ls 64 blLs
key slze ls 128 blLs
- Advanced LncrypLlon SLandard (ALS)
Also known as 8l[ndael crypLosysLem
8lock slze can be 128 192 or 236 blLs
key slze can be 128 192 or 236 blLs
uaLa LncrypLlon SLandard (uLS)
- 1he mosL wldely used encrypLlon scheme
Also known as Lhe uaLa LncrypLlon AlgorlLhm (uLA)
lL ls a block clpher
1he plalnLexL ls 64blLs ln lengLh
1he key ls 36blLs ln lengLh
Longer plalnLexLs are processed ln 64blL blocks
l
8ound 1
8ound 2
8ound 16
32blL Swap
8l
C 2
C 2
C 2
C 1
LCS
LCS
LCS
(64blL)
C (64blL)
k (36blL)
k16
k1
k2
Ceneral SchemaLlc of uLS
C permuLed cholce
LCS lefL clrcular shlfL
l lnlLlal permuLaLlon
8l reverse lnlLlal permuLaLlon
uLS
- 1he overall processlng aL each lLeraLlon
l kl1
kl l1 (kl1 l )
- Concerns abouL
1he algorlLhm and Lhe key lengLh (36 blLs)
Longer key lengLhs essenLlal for crlLlcal appllcaLlons
llesLel SLrucLure
1rlple uLS
- Dse Lhree keys and Lhree execuLlons of Lhe uLS algorlLhm (encrypLdecrypLencrypL)
C Lk3 uk2 Lk1
C clpherLexL
lalnLexL
Lkx encrypLlon of x uslng key k
uk? decrypLlon of ? uslng key k
- LffecLlve key lengLh of 168 blLs
1rlple uLS lllusLraLlon
L u L
u L u


C
C
k1
k1
k2
k2
k3
k3
x ?
? x
17
need for a new sLandard
- uLS had been ln use for a long Llme
- A replacemenL for uLS was needed
1heoreLlcal aLLacks LhaL can break lL
uemonsLraLlon of exhausLlve key search aLLacks
- Can use 1rlpleuLS buL slow wlLh small blocks
- DS nlS1 lssued call for clphers ln 1997
13 candldaLes accepLed ln !une 1998
3 were shorLllsLed ln AugusL 1999
- 8l[ndael was selecLed as Lhe Advanced
LncrypLlon SLandard ln CcLober 2000
1he ALS CrypLosysLem
- ln Lhe 8l[ndael proposal Lhe block lengLh and Lhe key lengLh can be lndependenLly speclfled Lo be 128 192
or 236 blLs
- 1he ALS sLandard llmlLs Lhe block lengLh Lo 128 blLs
key lengLh can be 128 192 or 236 blLs
- Lasy Lo lmplemenL boLh ln hardware and sofLware
- 8eslsLanL agalnsL all known aLLacks

Culz SoluLlons on LecLure 32
1 WhaL ls Lhe maln dlfference beLween passlve and acLlve aLLacks?
ln passlve aLLack Lhe opponenL passlvely llsLens Lo passlng packeLs ln acLlve
aLLacks Lhe opponenL makes some changes Lo Lhe packeLs

2 10 parLles exchange messages securely uslng uLS Pow many dlsLlncL key values are requlred?
A LoLal of 10C2 or 43 keys would be requlred
3 WhaL ls Lhe maln dlfference beLween subsLlLuLlon clpher and LransposlLlon clpher?
ln subsLlLuLlon clpher each leLLer or group of leLLers of Lhe plalnLexL are replaced by some oLher leLLer or
group of leLLers ln LransposlLlon clpher leLLers of Lhe plalnLexL are permuLed ln some form

4 lor breaklng LransposlLlon clphers whaL are Lhe lnlLlal guesses LhaL needs Lo be made?
number of columns and some probable words ln Lhe plalnLexL

3 Pow many rounds are Lhere ln uLS?
SlxLeen

6 WhaL ls Lhe key lengLh of uLS? Pow does Lrlple uLS helps Lo lncrease Lhe effecLlve key lengLh?
key lengLh of uLS ls 36
ln Lrlple uLS Lhree runs of uLS are made durlng encrypLlon and Lhree runs durlng decrypLlon uslng Lhree
dlfferenL keys So effecLlve key lengLh ls 168 blLs


Lecture 33 8as|c cryptograph|c concepts art II

ubllc key CrypLography
- Dses Lwo keys for every slmplex loglcal communlcaLlon llnk
ubllc key
rlvaLe key
- 1he use of Lwo keys has profound consequences ln Lhe areas of
ConfldenLlallLy
key dlsLrlbuLlon
AuLhenLlcaLlon
- 8aslc lngredlenLs of Lhe scheme
lalnLexL ()
Message Lo be encrypLed
ubllc key (kD) and rlvaLe key (k8)
Cne wlLh Lhe sender and Lhe oLher wlLh Lhe recelver
ClpherLexL (C)
Message afLer encrypLlon
LncrypLlon algorlLhm
Dses and kD
uecrypLlon algorlLhm
Dses C and k8
lllusLraLlon LncrypLlon
LA uA
8's publlc key kD8
8's prlvaLe key k88
lalnLexL
lalnLexL
ClpherLexL C
A 8
rlvaLe key of 8 k88
ubllc key of 8 kD8
key Dsage for LncrypLlon lllusLraLlon AuLhenLlcaLlon
LA uA
A's prlvaLe key k8A
A's publlc key kDA
lalnLexL
lalnLexL
ClpherLexL C
rlvaLe key of A k8A
ubllc key of A kDA
key Dsage for AuLhenLlcaLlon AppllcaLlons
- 1hree caLegorles
a) LncrypLlon/decrypLlon
1he sender encrypLs a message wlLh Lhe reclplenL's publlc key
b) ulglLal slgnaLure / auLhenLlcaLlon
1he sender slgns a message wlLh lLs prlvaLe key
c) key exchange
1wo sldes cooperaLe Lo exhange a sesslon key
8equlremenLs
- CompuLaLlonally easy for a parLy 8 Lo generaLe a key palr
ubllc key kD8
rlvaLe key k88
- Lasy for sender Lo generaLe clpherLexL C L (M kD8)
- Lasy for Lhe recelver Lo decrypL clpherLexL uslng prlvaLe key M u (C k88) u (L (M kD8) k88)
- CompuLaLlonally lnfeaslble Lo deLermlne k88 knowlng kD8
- CompuLaLlonally lnfeaslble Lo recover message M knowlng kD8 and clpherLexL C
- LlLher of Lhe Lwo keys can be used for encrypLlon wlLh Lhe oLher used for decrypLlon
M u (L (M kD8) k88) u (L (M k88) kD8)
1he 8SA ubllc key AlgorlLhm
- 8SA AlgorlLhm
ueveloped by 8on 8lvesL Adl Shamlr and Len Adleman aL Ml1 ln 1977
A block clpher
1he mosL wldely lmplemenLed
8SA key CeneraLlon
1 SelecL pp p and p boLh prlme
2 CalculaLe o p x p
3 CalculaLe (n) (p1)(q1)
4 SelecL lnLeger e gcd((n)e)1 1e (n)
3 CalculaLe J J e1 moJ (n)
6 ubllc key kD en
7 rlvaLe key k8 dn
(n) ls Lhe number of poslLlve numbers less Lhan o and relaLlvely prlme Lo o (called olet totleot)
8SA LncrypLlon
- lalnLexL M n
- ClpherLexL C Me (mod n)
8SA uecrypLlon
- ClpherLexL C
- lalnLexL M Cd (mod n)
Lxample
- SelecL Lwo prlme numbers p7 and q17
- CalculaLe n pq 717 119
- CalculaLe (n) (p1)(q1) 96
- SelecL e such LhaL e ls relaLlvely prlme Lo (n)96 and less Lhan (n)
ln Lhls case e3
- ueLermlne d such LhaL de 1 (mod 96) and d96
d77 because 773 383 496+1
- ubllc key kD 3119
- rlvaLe key k8 77119
- LncrypLlon process
Say plalnLexL M 19
ClpherLexL C 193 (mod 119)
2476099 (mod 119)
66
- uecrypLlon process
M 6677 (mod 119) 19
1he SecurlLy of 8SA
- 8SA ls secure slnce
We use large number of blLs ln e and d
1he problem of facLorlng n lnLo Lwo prlme facLors ls compuLaLlonally very dlfflculL
knowlng p and q wlll allow us Lo know (n)
1hls wlll help an lnLruder Lo know Lhe values of e and d
key slzes ln Lhe range of 1024 Lo 2048 blLs seems safe
DnLll recenLly Lhls was felL Lo be lnfeaslble for numbers ln Lhe range of 100 declmal dlglLs or so
(approxlmaLely 300 blLs)
A worldwlde Leam cooperaLlng over Lhe lnLerneL and uslng 1600 compuLers recenLly cracked Lhe code
ln elghL monLhs
CurrenLly a 1024blL key slze (abouL 300 declmal dlglLs) ls consldered sLrong enough for vlrLually all
appllcaLlons
ulfflePellman key Lxchange
- roposed ln 1976
- Allows group of users Lo agree on secreL key ovet losecote cboooel
- CannoL be used Lo encrypL and decrypL messages
- uepends for lLs effecLlveness on Lhe dlfflculLy of compuLlng dlscreLe logarlLhms
uP AlgorlLhm
- A and 8 wanL Lo agree on secreL key
1hey agree on Lwo large numbers n and g such LhaL 1gn
A choose random x compuLes xgx mod n and sends x Lo 8
8 chooses random y compuLes ?gy mod n and sends ? Lo A
A compuLes k1 ?x mod n
8 compuLes k2 xy mod n
- noLe k1 k2 gyx mod n
8
xgx mod n
?gy mod n
Choose x Choose y
CompuLe ?x mod n CompuLe xy mod n
A
uP AlgorlLhm conLd
- 8equlres no prlor communlcaLlon beLween A and 8
- SecurlLy depends on dlfflculLy of compuLlng x glven x gx mod n
- Cholces for g and n are crlLlcal
8oLh n and (n1)/2 should be prlme
n should be large
- SuscepLlble Lo lnLruderlnLhemlddle (manlnLhemlddle) aLLack
AcLlve lnLruder
A 8 lnLruder
ManlnLheMlddle ALLack A Comparlson
- SymmeLrlc encrypLlon/decrypLlon ls much fasLer Lhan asymmeLrlc encrypLlon/ decrypLlon
k5A klloblts/secooJ
u5 meqoblts/secooJ
;
u5 ls oboot 100 tlmes fostet tboo k5A
- key slze
8SA selecLed by user
uLS 36 blLs
Message AuLhenLlcaLlon varlous Approaches
- AuLhenLlcaLlon uslng convenLlonal encrypLlon
Cnly Lhe sender and recelver should share a key
- Message auLhenLlcaLlon wlLhouL message encrypLlon
An auLhenLlcaLlon Lag ls generaLed and appended Lo each message
- Message auLhenLlcaLlon code
CalculaLe Lhe MAC as a funcLlon of Lhe message and Lhe key MAC l(k M)
MLSSACL
MAC
AlgorlLhm
k
MLSSACL MAC
MLSSACL MAC
MAC
AlgorlLhm
k
?
18AnSMl1
Commonly Dsed Schemes
- 1he Mu famlly
Mu2 Mu4 and Mu3 (128blL hash)
- 1he SPA famlly
SPA1 (160blL) SPA236 (236blL) SPA384 (384blL) and SPA312 (312blL)
- 8lLMu128 (128blL) 8lLMu160 (160blL)


Culz SoluLlons on LecLure 33
1 lor 10 parLles communlcaLlng uslng 8SA how many keys are requlred ln LoLal?
1wenLy

2 ln publlc key crypLography how are Lhe keys used for encrypLlon appllcaLlons?
1he publlc key of Lhe recelver ls used for encrypLlon and Lhe prlvaLe key of Lhe recelver ls used for decrypLlon

3 ln publlc key crypLography how are Lhe keys used for auLhenLlcaLlon appllcaLlons?
1he prlvaLe key of Lhe sender ls used for encrypLlon and Lhe publlc key of Lhe sender ls used for decrypLlon

4 Whlch of Lhe Lwo ls fasLer 8SA or uLS?
uLS ls much fasLer as compared Lo 8SA

3 Cn whaL facLor does Lhe securlLy of Lhe 8SA algorlLhm depend on?
Cn Lhe dlfflculLy of breaklng a large number lnLo lLs prlme facLors

6 Clve an efflclenL algorlLhm Lo compuLe x? where x and ? are lnLegers
Conslder Lhe blnary represenLaLlon of ?
PlnL x1011 x8 x2 x1





Lecture 34 8as|c cryptograph|c concepts art III

Secure SockeL Layer (SSL)
- SSL was flrsL used by neLscape
1o ensure securlLy of daLa senL Lhrough P11 LuA or C3
- Dses 1C Lo provlde rellable endLoend secure servlce
- ln general SSL can be used for secure daLa Lransfer for any neLwork servlce runnlng over 1C/l
WhaL ls P11?
roLocol for communlcaLlon beLween a web browser and a web server
WhaL ls LuA?
An lnLerneL dlrecLory servlce whlch ls Lyplcally used by emall sysLems Lo flnd more lnformaLlon abouL
a user
WhaL ls C3?
A proLocol uslng whlch emall sysLems reLrleve malls from Lhe mall server
P11 LuA C3
SSL
1C/l
AppllcaLlon Layer
neLwork Layer
SSL 8ecord roLocol provldes baslc securlLy servlces Lo varlous hlgher level proLocols
P11 can work on Lop of SSL for lnsLance
AlmosL all P11 servers supporL SSL sesslons
All popular browsers come wlLh SSLenabled cllenL sofLware
8aslc Cb[ecLlves of SSL
- 1he maln ob[ecLlves are
AuLhenLlcaLe Lhe cllenL and server Lo each oLher
Lnsure daLa lnLegrlLy
Lnsure daLa prlvacy
8equlred for boLh Lhe proLocol daLa and also Lhe appllcaLlon daLa
SSL ArchlLecLure
- SSL conslsLs of Lwo layers of proLocols
SSL 8ecord roLocol
Lnsures daLa securlLy and lnLegrlLy
roLocols requlred Lo esLabllsh SSL connecLlon
1hree proLocols used ln Lhls layer
SSL Pandshake roLocol
SSL ChangeClpherSpec roLocol
SSL AlerL roLocol
SSL Pandshake roLocol
SSL ChangeClpherSpec roLocol
SSL AlerL roLocol
AppllcaLlon roLocol(P11 eLc)
SSL 8ecord roLocol
1C
l
SSL 8ecord roLocol
- Malnly responslble for daLa encrypLlon and lnLegrlLy
Also used Lo encapsulaLe daLa senL by oLher hlgher level SSL proLocols
- 8aslc funcLlon
1ake an appllcaLlon message Lo be senL
lragmenL Lhe appllcaLlon message daLa
16 kbyLes or smaller
LncapsulaLe lL wlLh approprlaLe headers and creaLe an ob[ecL called a record
LncrypL Lhe record and forward lL Lo 1C
AppllcaLlon uaLa
lragmenLs
Compressed daLa
Add MAC
MAC
LncrypL daLa
1C packeL P
P SSL record
header
SSL record header conslsLs of
ConLenL Lype
ldenLlfles Lhe Lype of payload (LhaL ls Lhe hlgher level proLocol belng used)
Ma[or verslon
for SSL 30 Lhe value ls 3
Mlnor verslon
for SSL 30 Lhe value ls 0
Compressed lengLh
slze of Lhe compressed daLa ln byLes
1he Plgher Layer roLocols
- SSL AlerL roLocol
Dsed Lo send sesslon messages assoclaLed wlLh daLa exchange and funcLlonlng of Lhe proLocol
Lach message conslsLs of Lwo byLes
llrsL byLe ls elLher 1 (warnlng) or 2 (faLal) lf faLal" Lhe SSL sesslon ls LermlnaLed
Second byLe conLalns one of Lhe deflned error codes
- SSL ChangeClpherSpec roLocol
ConslsLs of a slngle message LhaL carrles Lhe value of 1
urpose of Lhls message ls Lo cause Lhe pendlng sesslon sLaLe Lo be esLabllshed as a flxed sLaLe
ueflne Lhe seL of proLocols Lo be used
MusL be senL from cllenL Lo server and vlce versa
- SSL Pandshake roLocol
Dsed Lo lnlLlaLe a sesslon beLween Lhe server and Lhe cllenL
WlLhln Lhe appllcaLlon daLa algorlLhms and keys used for daLa encrypLlon can be negoLlaLed
rovldes muLual auLhenLlcaLlon
rocess of negoLlaLlon dlvlded lnLo four phases
CllenL sends Lo Lhe server
SSL verslon
8andom (used Lo proLecL key exchange)
Sesslon lu
ClpherSulLe
Server sends back
SSL verslon
8andom (a dlfferenL number ls generaLed)
Sesslon lu
ClpherSulLe
cllenL hello
server hello
server done
cerLlflcaLe
server key exchange
8equesL cllenL's cerL
flnlshed
cerLlflcaLe
cerLlflcaLe verlflcaLlon
cllenL key exchange
change clpher spec
change clpher spec
flnlshed CLlLn1 CLlLn1 SL8vL8 SL8vL8
hase 2 hase 1
hase 4 hase 3
Some SSL 8ased Servlces
- P11S
orL number 443
- LuA
orL number 646
- SM1
orL number 463
- C3
orL number 993
1ransporL Layer SecurlLy (1LS)
- LxLenslon of SSL
- Alm ls Lo provlde securlLy and daLa lnLegrlLy feaLures aL Lhe LransporL layer beLween Lwo web appllcaLlons
- SupporLed my mosL web servers and browsers Loday
Secure Shell (SSP)
lnLroducLlon
- Crlglnally developed ln 1993
As a secure replacemenL for LelneL rlogln rcp eLc
Allows porL forwardlng (Lunnellng over SSP)
8ullLln supporL for proxles/flrewalls
- Wldely used nowadays
SSPv1 roLocol
- 1he server uses Lwo keys
LongLerm server ldenLlflcaLlon key
8lnds Lhe connecLlon Lo Lhe server
1024 blL 8SA
ShorLLerm encrypLlon key changed every hour
Makes laLer recovery lmposslble
ShorLLerm keys are regeneraLed as a background Lask
768 blL 8SA
- MulLlple auLhenLlcaLlon mechanlsms
SLralghL passwords (proLecLed by SSP encrypLlon)
8SA based auLhenLlcaLlon
CllenL decrypLs a challenge from Lhe server reLurns Lhe hash Lo Lhe server
lugln mechanlsms (blomeLrlcs smarLcard eLc)
l SecurlLy (lSec)
lnLroducLlon
- SecurlLy bullL lnLo Lhe l layer
rovldes hosLLohosL (or flrewallLoflrewall) encrypLlon and auLhenLlcaLlon
8equlred for lv6 buL opLlonal for lv4
- ConslsLs of Lwo parLs
lSec proper (for encrypLlon and auLhenLlcaLlon)
lSec key managemenL
lSec
- rovldes Lwo modes of proLecLlon
1unnel Mode
1ransporL Mode
- AuLhenLlcaLlon and lnLegrlLy
- ConfldenLlallLy
- 8eplay roLecLlon
1unnel Mode
- LncapsulaLes Lhe enLlre l packeL wlLhln lSec proLecLlon
- 1unnels can be creaLed beLween
several dlfferenL node Lypes
llrewall Lo flrewall
PosL Lo flrewall
PosL Lo hosL
1ransporL Mode
- LncapsulaLes only Lhe LransporL layer lnformaLlon wlLhln lSec proLecLlon
- Can only be creaLed beLween hosL nodes
AuLhenLlcaLlon and lnLegrlLy
- verlfles Lhe orlgln of daLa
- Assures LhaL daLa senL ls Lhe daLa recelved
- Assures LhaL Lhe neLwork headers have noL changed slnce Lhe daLa was senL
ConfldenLlallLy
- LncrypLs daLa Lo proLecL agalnsL eavesdropplng
- Can hlde daLa source when encrypLlon ls used over a Lunnel
8eplay revenLlon
- Causes reLransmlLLed packeLs Lo be dropped
roblems wlLh lSec
- Lxcesslvely complex and dlfflculL Lo use
- uoes now allow use of nA1
- 8ouLers need Lo be made lSec aware
Secure P11 (SP11)
lnLroducLlon
- An exLenslon Lo Lhe P11 proLocol Lo supporL sendlng daLa securely over Lhe web
- ulfference from SSL
SSL ls deslgned Lo esLabllsh a secure connecLlon beLween Lwo hosLs
sP11 ls deslgned Lo send lndlvldual messages securely
Some leaLures
- rovldes a varleLy of securlLy mechanlsms Lo P11 cllenLs and servers
- uoes noL requlre cllenLslde publlc cerLlflcaLes (or publlc keys) as lL supporLs symmeLrlc keyonly operaLlon
modes
- rovldes full flexlblllLy of crypLographlc algorlLhms modes and parameLers
olnL Lo noLe
- sP11 and P11S are noL Lhe same
- P11S ls an alLernaLlve Lo sP11
P11 runs on Lop of SSL or 1SL forsecured LransacLlons

CDlZ CDLS1lCnS Cn LLC1D8L 34
1 WhaL ls Lhe baslc purpose of SSL record proLocol?
1he SSL record proLocol ls malnly responslble for daLa encrypLlon and lnLegrlLy lL ls also used Lo encapsulaLe
daLa senL by oLher hlgher level SSL proLocols

2 WhaL does SSL handshake proLocol alm Lo achleve?
1he SSL handshake proLocol serves Lhe followlng purposes
lnlLlaLe a sesslon beLween Lhe server and Lhe cllenL
negoLlaLe Lhe algorlLhms and keys Lo be used for daLa encrypLlon
rovlde muLual auLhenLlcaLlon

3 WhaL ls Lhe dlfference beLween Lunnel mode and LransporL mode ln lSec?
1he Lunnel mode encapsulaLes Lhe enLlre l packeL wlLhln lSec proLecLlon
1he LransporL mode encapsulaLes only Lhe LransporL layer lnformaLlon wlLhln lSec proLecLlon

4 WhaL ls Lhe dlfference ln Lhe funcLlonallLles of SSL and sP11?
1he maln dlfference ls
SSL ls deslgned Lo esLabllsh a secure connecLlon beLween Lwo hosLs
sP11 ls deslgned Lo send lndlvldual messages securely

You might also like