Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
18 views
37 pages
Crypto Lab
lab coded
Uploaded by
vepil62103
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Crypto Lab For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
18 views
37 pages
Crypto Lab
lab coded
Uploaded by
vepil62103
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Crypto Lab For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Crypto Lab For Later
You are on page 1
/ 37
Search
Fullscreen
—uwdxite__o c_ pro amo Compute. the foltarin ia) —CicD_b ~euclidear Needs : al | 4d Ore Db — Extended _¢ uctidean Method ——— | | i —_Muttt {eatJe Imbene by. extended Euclidean Mettat sl | ee include
_3_ — entey choice ’, “invalid choice - . Multiplicative ‘nverse of 3 modulo 2 is 7 first “Value of t and S is: 124 0 pi___|4¢ include < String. | | | define __MAX_ Msor_ fe, ood | }—Noid_—_eneayptionCchay mers c3,int_key ‘int_iS ae “include _< Stdiorh i |_| fox Geo’ 1 Le sérlentmen) pitt) € if Cmescis to! £6 mew cites ‘2! ) | meso) = mea cid =a! key 20 )# ‘a! 5 | y else if C mest) >= tat 4h mewcid <= *z') to — meutid <(imesci='a' egy Yael a 3 | x) | eine ey) Bienes for (ico ; \< StrlemCmen) j iet) £ “LE Gem ci 9= tq! _\b mescid<='z') { at me.) = _CC men ci) ~'a! = key + 26 Jee) ea’; Base “ Cmencin>='al th mes<2'2 2 | mes ci = C Ceci) ta! buy 426) 120 4°00) Teacher's Signature || —}———Chat__me [MAx_ MsG-Lew] | ee intl i Putile + sncrgpted fc, * decrypted decry = pe ate fees eye a 7 | —|-_brine c* exvor") « “tnt ks : oe 4 -fges. (mew, MAX_MsoreLeNn , inputfile ) a ‘inputfile > | m espn Cmes, “~n")"] =" \o' - f ana ah Nigzsd, eC 8fecl* ie n= Encey pita file _=_Fopem (“encaypied txt", *w" ) > if “Cemenppiedgiie == Mut )¢ primstCevrov" J Yedum 4 4 | rintt Comcaypird ple» “ts! men | sen es aeons m ge writen to cmeypitd txt hn'); sea fi aoe e decry pied « txt”) Ww euuaige == .NuLL) | | ‘Teacher's Signature |Output oo Y open input file and xead plain text og " CRYPTOGRAPHY” ' plain-text is 4 close file — Enter key ae 1 Open encaypted file and Waite encaypted text dn it which is " HupUrTLWFUND " > =encypted mesane watten to encaypted + txt 4 i wank -to deeyption open dexypted file and wrt yin i& dewpted text foY "HWDUYTLWFUMD" " “ayprography" - J Deeypicd meg — woaliiem to clecuy pred Oct| —|_—for Cink iso ; 1x26; eed Tf CCiek) pages) relumn i; B17 ve —relum =} 3 ; 5 : ; hat flonase Pue*thty = fofem (filename, “O° ) 9 if C£ptr == Nuit) <___brintf C*evor')} as 1 P : ate Cint_iz0; plain-text 12 ‘\o' yet) { | cm eee “rf CisuppexC plaintext) { pees f pute Cty * © plain text cl - ‘a! )) 12 AY |b elseif Cislower Cplain text cin) £ Teacher’ Signature—— - = Date Page No. are HC plain-text 9-=¢ ‘dae + tot L pied: ‘ ee ——— ee Fre C plan tent i, ol 5 4 felose Cepty) |e | ———+ ; a 7 | Tiere = epee filemame, "0": | i4_(qpere= Nu) £ | peint-f Cenoy" )) Cin 0 Spin tak Fae) | ig Cisupper col | it Cisupper Cc phere tert TOL ppt Chine cl phex—text (iJ ~'a)J1 24 : pte; —| _ | | 4 elce iF Cislouer Coipher text cia) £ | ‘ca func C chy -IndexR_* Cipher. eft (= ta! 1.26 + ot, fps ee 4 lee £ - | ‘Teacher's Signaturefae Page No, 10 fe (_cipper tex text, oe 7 } i yh (fpty ds - | a | cia | | tint mom cot _| | eh Laem. text | | Chay Ciphex text C100). | “Int keys | | Gointf C emter Plain text_t sy | can Chps" — | brint f C" entex | eat Cyd" ae | enutypt C plain text , ke emckypted txt”); \ 7 ' i So | printf ¢ a commpiete \n") | | « = fopen (emcunpted.tx4" x"); | if ie | | res | t \ | —t is jnt_f=0; ___|__ while = — praetor fog Cpe) { = cor) 4 ipher - text Ci) = " \o foto Cpe) 2 i ‘Teacher's SignatureCc —— Soe i en rie ipler— text» kay" toh) Tie ecepioe coogi aoa y (| xetum_o; a 3 orserhar'e SionatureEnter plain text + CRYPTOIRAPHY €ntey key Zp decrypted mesage EVWRZCMVARBW Will be Written 4 file demmypted- 4xt - Aaayption complete - I] rey pred message opMBDUGPASXM Will be Witten +o emexypeeal: txt enayplon Complete.ik _modSnidere ¢ int «) f ee for. Cint iz 0; icoe; ite) ¢ If Coek)ypr¢ eee Eee Gia ci —text_CiI | aa ao CiD_= Cougs * (plan tent Cl. ='A')iexey2) y 26 + 1A'D > 3 ekce 1 ( islowey ( plaintext UI) £ | [Fhe on pint ct ab aga : Ice — ay cipher text CiJ_s plain .texk ci; + ‘Teacher's Signaturebg cine kext sblencplain tet J = 10" 4 pt Copa a Hg “ink Jag 4 —— char * plain-text )_¢ | nt _key indore = ey, hese , eet | | baint{ kuy laesn't exist” ) | peter | 4 | w (int _izo; ciphertext Ci]}='\0' 5 jet) ie | if i. Upper Cipher. text Li) _¢ ;—Plosm text.) = _C CC Celpher text Ci) = A! key 2 )n26 26 W-26 J Ty ote ie fna pe e ———_ Ps LCC eiphee tent Ulla tye deat $20.26 T inverse )+/-26 + 'a ¥y else € : a a + = = L 1 a J Plain—text Cs: iJ ee } | Teacher’ Signaturent maine) € Ch? plain text 100], ei phor-text Clad)» dermay plea text; ——int _key Ss ee ; Teacher $s Signatureoutput enter plain text > cryptography enter fint key 2 5 Enter second key + & Encxy pon Cipher-text = spytzampi fry Deayptien . Pin -text = ceybragraphy.[-Pzograms__+o implement _polyalphabetic cipher —_| : zi | & pbk )j int f= 0) I
96 £& encxypt 7 < 23 | encrypt UD == 327 | 2 13 : — | iok_xemovespees_Cchax * plain, int ps) nt_f, Count =o; | forCint_i=0; je ps; ist) t [ if-Cplain cO_} = * ') | Teacher’ Signature[ Expt. No. _ -— ——Plown C count ++) = ploim Ci); | plain tcount J =! \o': | yeti count _ [og Volt generate Table Conor keystr 02, io pea chay baer) inti ki flags 0, * dindy i | —|———cliety = Cint*) cotlsr (26, gizeoftint |): = for (ico jitcess ite) £ | if Couystr cid Je jd | dicty Cheystyd, -97) = 2; | y je 999. Sy | y Ckeo! Kesey eet) | Lf Coiety Cheysty C ea 2)t chicly Ckeyaty CkJ- 97) - a far th Gers) £ | j itt jee for (k=O; kere; ket 4 If Coucty 42220) { i | keyTtiT I = (chav). Cat27j Utts Teacher's SignatureDate Expt. No, cet eta seu } a if (jes) £ | fea jee; - | f j=0; | 5394 cea | 4 ay_3ty CI. int pts) $ ____ aja —ubs-5 = | for Cleo < gubsg} ize2) € 1 £ ¢ soci] = = six tist]> xt fo r paid gle Sty Gad 2 tx Cit] = tA! ubS-& +2) } | 14 | str L&ubs-sJ = '\0! if Csubs s-2 [ 20) £ | ee ty (sube-sJ = ‘Jo! | 3 : Se Ned vet A fle Ai 3 | Void search ( chav feyTcs)C9), chay ae charhsyrt_anc7 J | £ finé (43 an if Cazes | asi! en | else if (b22)') | ele te | Teacher's Signature| ___ ete ie Cent Cag a =6)E | owrQJ2i> + axrcalej; Yay | —Woick_enceypt Cchay sty €7., chay keyTCsIts], int ps) ea & int i acu; | for Geo 5 jcpsi drz2) £ if Catols=a@js £ | StrU) = keyT Caco caci+t! )y-S1; Getse if Cac == 4cs)) £ | jje TL amt I-5 1 Ca cI)s Sty G41) =k Cac2dt) 7-5) FaeII y 9 else € . an | | sty Cid = keyTLaco) a3] y SO Gt) = kyl Ca@D Cac]; | HT, 6 7 4 34 = | ks 2 wemovespaces keys SQ | ps = remove spacer (Sp pede pss prepart Csr po) | gene lable Cray, bey TD | 1 Teacher's Signature | iemcruspt CS key ps) Ee — -toupper Gse C ste, ps)j —|—_paint$ C *ciphertert ifs jn” » Sty 2, | for deception | Void _playtaix Decypt Char ate C1, char keyt (7) £ |_|__Void_tolawercaze ( char_plaine2, int_ps) || _—-for Cint_i=o;_j
<3) ktt) leapt CIC} = deerypt GICI+ bCIKI* encrypt 1G) -peintt CE A us"): for (iz0; “ig: i++) Ue eee te “c's ccna) Cfmad Coeouypt )C07.26) 4975); Void 9 ebkus Mesagec) inti,ge chay. msg C3) j — | panefC_tntex X35 matrix for ky : in fox _Ciz0; (<3; itt) for (jz0; yes; dts Scanf C's" Zacsjcj]); Sa yp ge] 4 =i ated Sconf C's" , msg Ji for_(iz0 jen") Itt) me (1) Co] = meg Ci -91; 4 Votd invewe () { tnt ip jk : —| _____proat 21.4, Se ‘Teacher's Signature| | for Cis 0; ica ne }—}—_—for G=0j yea; jira £ t— if (iz 24) boiacjd= 1; bocj= oO: else 4 fox (k=O; koa) kes) S$ fox (i=0; ica; jet) Yt pis CCfleei go ClKICKT; foil y=o, j634 jtt) L Peo Giie pot cagj+ ccocjJ* = pt eck g bcigga= bei2G9-9 = p< heed Gd Lass sire(teo te 3 je ee for Cjso -ys
} Scanf—Cy.c yn)", bicheat) palate cn nter_key") scant Chi Peiny", key): a paiotf ce ‘phe text i"): \ | fox. Cint j=0; j=0; ic 7 di +t LA Cpr = StolenCkeyy) ob 208 \ | y . jet Ani = nuypt Croycj])= "A chox_enaypidchaa_= (tn aie I paint C'.e" , enouypted chay > ‘Teacher's Signature|__}—Puintt Center the ciphertext SED 7 oe Sant CC 4\n7" oo ferdnt£ Centon the sey cant (“4 C*\n]" oy PHOeL C" decipnen text 2° ) for int 1=0; y20 5 i< Stem (ciphestert) j jee ire) od if CU7= A&Hen (key )) £ j=o/ 4 nt hift = ouppeh—Ckesgcy2) = ‘a j________| char _ecuypted cha: C Ctoupper Ceipherteat Ci? J~'4!— shiz OG) 226 + Al pring £ Citic", deesuypedehoy ) nt maim c? & int option | while) £. printf C"\n a+ encuypedi pune en Dee pe nes ee eee brintf C "in rrker _youer. Option 2"); "td", Lofton? ia Teacher's SignatureDate Page No. _ beak ou 3 exit Co)! break i dlefoult i poinef C'indnvalid chosen") bed RE wxetusn 0%sen ———_—_—— __——— output + Le ency Pt 2+ Decwpt 6 But Enter your option = + enter plauntext 2 cay tography enter key lab cipher cext : NRZATPRRBAHE enter your opH'on 2 enter ciphertext + NRZATPRRBAHZ (ab enter ky Deciphered teat = coypragraphy- entey you open 33 ext >— Expt. No. iiassisseaiassscl —7 — : ————— — we Shey oof eae Saepeeenaaeere _ | ae include < steliot bh 7 ————— — | + include < stoing-h 7 foe eee ed -# _define Mar — | eengt chor Alphobeisek O> “Ancoerumireunaopoestuvxrz", | | | void _encayption Conay_plaimienk C2, chav FST 3 Eg nn sa) Oe ace ea eee | ink m= stoten (key) -for_int i= 0; jem} jer t | |____clphexrextiJ_2_alpnabet.set_C(cptass -'a' + Ceyer7 = A) 261; od, \nt k20 4 for Cint lem; icny Ter) £ ei © iphertext CID = _AlphobetSet CCC plountentOJ 141) + Cpiass sort Kun ='A' J) 1-26 1) keto _ciphexTenct CnJ_=_'\0' fe - | voia _ deoxy pion Cehay “cipneteut C2, char fulliny 2 Teacher's Signature _cr S 3 | Zz $ fs | __Date Pepe No. [char planted) fT] jp ——ek_0_= Stem CeiphexTere Dd ory Cnt j=o' fcn: i++) {int k = C ciphentent Ci] -!A! )— Cfulleey iD =A!) ; i¢ (k
10! 2 int mama ¥. intf C' “entey key * Sc GS Peete et Diz ang. 4 jot pT length Adolen ( plaisText )" en muy eet tata eet printf C*ciphentect if 5). *s _ciphexTeut i __| txcpy Cfullkers , key) Int tdx = G6; ‘Teacher’ Signatureoo. | : = — | | for Cint \ = Strtenckey i j< statem(cepheitent) itt) ¢ | fullkny 19 = ploinTenk Clax “fe ptiong th]: jpdenie %output Enter PlainText = eryptograPh 4 entey key < DE Cipher Eext LBMSDPL RSSTZ deoypted Text » IXE -
You might also like
Gate C Notes
PDF
No ratings yet
Gate C Notes
141 pages
Smart Interviews Notes
PDF
No ratings yet
Smart Interviews Notes
75 pages
Information Security Lab Manual Pages
PDF
No ratings yet
Information Security Lab Manual Pages
21 pages
CHEM
PDF
No ratings yet
CHEM
18 pages
Computer Practical
PDF
No ratings yet
Computer Practical
38 pages
CD Lab-File
PDF
No ratings yet
CD Lab-File
15 pages
CNS 41 (File)
PDF
No ratings yet
CNS 41 (File)
36 pages
Basic Handnote of CSE-101 Course
PDF
No ratings yet
Basic Handnote of CSE-101 Course
43 pages
Information Security Lab Manual
PDF
No ratings yet
Information Security Lab Manual
79 pages
Crypto Da2
PDF
No ratings yet
Crypto Da2
11 pages
Ins Lab Manual
PDF
No ratings yet
Ins Lab Manual
49 pages
MPMC2
PDF
No ratings yet
MPMC2
9 pages
Computer - Practical 2021
PDF
No ratings yet
Computer - Practical 2021
16 pages
CP Important Question Bank Which Can Come
PDF
No ratings yet
CP Important Question Bank Which Can Come
32 pages
Program C++, HTML, SQL ...
PDF
No ratings yet
Program C++, HTML, SQL ...
32 pages
Adobe Scan 15 Nov 2023
PDF
No ratings yet
Adobe Scan 15 Nov 2023
17 pages
CPP Practicals
PDF
No ratings yet
CPP Practicals
22 pages
CD Record
PDF
No ratings yet
CD Record
30 pages
C Language 1
PDF
No ratings yet
C Language 1
15 pages
MP Lab
PDF
No ratings yet
MP Lab
10 pages
CNS Neww Lab File 2
PDF
No ratings yet
CNS Neww Lab File 2
26 pages
Arrays - Class 1
PDF
No ratings yet
Arrays - Class 1
13 pages
Lab Report 3-4
PDF
No ratings yet
Lab Report 3-4
47 pages
10 To 40 (C S Practicals)
PDF
No ratings yet
10 To 40 (C S Practicals)
20 pages
AKU PPS Pyq 2019
PDF
No ratings yet
AKU PPS Pyq 2019
11 pages
Difie - Hellman & SHA-1 - Algorithm
PDF
No ratings yet
Difie - Hellman & SHA-1 - Algorithm
11 pages
Acfrogbbuhzdbgbvwad1ufatu1f I A4qmkus1f47kyplmfl5sdb66rqn7qsbah30nofvhwdiopf59tzvy O3hjzpsw97c1hym Ez38fhrgqmdr1iqs8soqtd5r8kkfpnoeates2wnhgbuhty9gy
PDF
No ratings yet
Acfrogbbuhzdbgbvwad1ufatu1f I A4qmkus1f47kyplmfl5sdb66rqn7qsbah30nofvhwdiopf59tzvy O3hjzpsw97c1hym Ez38fhrgqmdr1iqs8soqtd5r8kkfpnoeates2wnhgbuhty9gy
84 pages
FPL Set A
PDF
No ratings yet
FPL Set A
13 pages
MCS-011 Problem Solving and Programming
PDF
No ratings yet
MCS-011 Problem Solving and Programming
13 pages
Cryptography and Network Security (Practical File)
PDF
No ratings yet
Cryptography and Network Security (Practical File)
45 pages
Byts Week - 4
PDF
No ratings yet
Byts Week - 4
18 pages
Computer Science Basic Programs
PDF
No ratings yet
Computer Science Basic Programs
25 pages
INS Lab File
PDF
No ratings yet
INS Lab File
33 pages
C
PDF
No ratings yet
C
25 pages
Codes For Cryptography
PDF
No ratings yet
Codes For Cryptography
31 pages
E - I 2
PDF
No ratings yet
E - I 2
61 pages
Cryptography and Network Security Lab4
PDF
No ratings yet
Cryptography and Network Security Lab4
10 pages
Class 12 Cs Practica
PDF
No ratings yet
Class 12 Cs Practica
53 pages
Notesof C Language by Abhay Kumar Awasthi Till Recursion
PDF
No ratings yet
Notesof C Language by Abhay Kumar Awasthi Till Recursion
27 pages
Computer Science Practical Amit Bikram Mishra Class Xii Science A
PDF
No ratings yet
Computer Science Practical Amit Bikram Mishra Class Xii Science A
18 pages
CN Observation Notes
PDF
No ratings yet
CN Observation Notes
33 pages
Python Notes
PDF
No ratings yet
Python Notes
25 pages
DocScanner 13 Sept 2023 20-07
PDF
No ratings yet
DocScanner 13 Sept 2023 20-07
30 pages
INS Lab Manual
PDF
No ratings yet
INS Lab Manual
49 pages
DSA
PDF
No ratings yet
DSA
44 pages
PPS Unit-2 Notes
PDF
No ratings yet
PPS Unit-2 Notes
32 pages
Cryptography and Network Security Lab
PDF
No ratings yet
Cryptography and Network Security Lab
36 pages
C++ Unit 2
PDF
No ratings yet
C++ Unit 2
46 pages
C-Programming ShortNotes
PDF
No ratings yet
C-Programming ShortNotes
7 pages
CNS 4TH Year
PDF
No ratings yet
CNS 4TH Year
16 pages
ISassignment 2-20-SE-84
PDF
No ratings yet
ISassignment 2-20-SE-84
11 pages
Is Contenthalf
PDF
No ratings yet
Is Contenthalf
19 pages
Ns Record
PDF
No ratings yet
Ns Record
12 pages
Cryptography and Network Security Lab 1
PDF
No ratings yet
Cryptography and Network Security Lab 1
11 pages
OSfile
PDF
No ratings yet
OSfile
28 pages
PPS Record 27-35 Programs - 240113 - 141016
PDF
No ratings yet
PPS Record 27-35 Programs - 240113 - 141016
28 pages
Crypto (1)
PDF
No ratings yet
Crypto (1)
27 pages