Skip to main content
Open navigation menu
Close suggestions
Search
Search
en
Change Language, English
Upload
Sign in
Sign in
0 ratings
0% found this document useful (0 votes)
7 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, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
7 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
Go to previous items
Download
Save
Save Crypto Lab For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
Go to next items
Download
—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
} 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
Python Assignments
PDF
No ratings yet
Python Assignments
16 pages
NIS Assign 3
PDF
No ratings yet
NIS Assign 3
12 pages
XII Practical Rough Record
PDF
No ratings yet
XII Practical Rough Record
18 pages
DSA
PDF
No ratings yet
DSA
44 pages
Security Lab Manual for C Programming
PDF
No ratings yet
Security Lab Manual for C Programming
82 pages
Cryptography Lab Programs for B.Tech
PDF
No ratings yet
Cryptography Lab Programs for B.Tech
25 pages
Cryptography Concepts and Techniques
PDF
No ratings yet
Cryptography Concepts and Techniques
25 pages
Caesar Cipher Project Report for CBSE
PDF
No ratings yet
Caesar Cipher Project Report for CBSE
12 pages
DocScanner 04-Dec-2023 8-06 PM
PDF
No ratings yet
DocScanner 04-Dec-2023 8-06 PM
22 pages
C Language
PDF
No ratings yet
C Language
100 pages
Security Laboratory Bonafide Certificate
PDF
No ratings yet
Security Laboratory Bonafide Certificate
78 pages
Security Laboratory Manual for CSE
PDF
No ratings yet
Security Laboratory Manual for CSE
83 pages
Python Programming Assignment
PDF
No ratings yet
Python Programming Assignment
32 pages
Cryptography Lab MCA Practical Guide
PDF
No ratings yet
Cryptography Lab MCA Practical Guide
62 pages
Cryptography Lab Manual for C&NS
PDF
No ratings yet
Cryptography Lab Manual for C&NS
36 pages
CNS Lab Manual
PDF
No ratings yet
CNS Lab Manual
31 pages
Information and Network Security Lab Manual
PDF
No ratings yet
Information and Network Security Lab Manual
32 pages
Computer Practical
PDF
No ratings yet
Computer Practical
38 pages
Java Program File
PDF
No ratings yet
Java Program File
22 pages
CNSUNIT1
PDF
No ratings yet
CNSUNIT1
18 pages
Microprocessor Lab
PDF
No ratings yet
Microprocessor Lab
25 pages
Caesar Cipher Implementation Guide
PDF
No ratings yet
Caesar Cipher Implementation Guide
107 pages
DSA Record
PDF
No ratings yet
DSA Record
25 pages
CS Practical
PDF
No ratings yet
CS Practical
33 pages
Cryptography Assignment Instructions
PDF
No ratings yet
Cryptography Assignment Instructions
4 pages
PCS 679 Network System Security Lab Manual
PDF
No ratings yet
PCS 679 Network System Security Lab Manual
36 pages
CNS PR
PDF
No ratings yet
CNS PR
34 pages
IS Unit3
PDF
No ratings yet
IS Unit3
13 pages
Attacking Classic Crypto Systems Lab
PDF
No ratings yet
Attacking Classic Crypto Systems Lab
18 pages
Security Laboratory Bonafide Certificate
PDF
No ratings yet
Security Laboratory Bonafide Certificate
78 pages
CNS Lab Manual (AY-2025-26)
PDF
No ratings yet
CNS Lab Manual (AY-2025-26)
28 pages
Cryto Final Lab Mds
PDF
No ratings yet
Cryto Final Lab Mds
20 pages
Cryptographic Algorithms Overview
PDF
No ratings yet
Cryptographic Algorithms Overview
7 pages
Muhd Faizun Nazim Bin MD Fauzan - NWS21070675
PDF
No ratings yet
Muhd Faizun Nazim Bin MD Fauzan - NWS21070675
20 pages
Cns Lab Manual 3-2 It
PDF
No ratings yet
Cns Lab Manual 3-2 It
69 pages
Program C++, HTML, SQL ...
PDF
No ratings yet
Program C++, HTML, SQL ...
32 pages
Vigenere Cipher Decryption Guide
PDF
No ratings yet
Vigenere Cipher Decryption Guide
83 pages
Classical Cipher Techniques Explained
PDF
No ratings yet
Classical Cipher Techniques Explained
11 pages
CN Lab File
PDF
No ratings yet
CN Lab File
43 pages
CD Lab-File
PDF
No ratings yet
CD Lab-File
15 pages
Cryptography Lab Practical Record
PDF
No ratings yet
Cryptography Lab Practical Record
70 pages
Information Security Syllabus GTU
PDF
No ratings yet
Information Security Syllabus GTU
3 pages
Nis 6-16
PDF
No ratings yet
Nis 6-16
54 pages
CN
PDF
No ratings yet
CN
23 pages
Security Laboratory Lab Manual 2022-23
PDF
No ratings yet
Security Laboratory Lab Manual 2022-23
57 pages
Information Security Lab Manual
PDF
No ratings yet
Information Security Lab Manual
41 pages
Information Security Lab Manual PC751
PDF
No ratings yet
Information Security Lab Manual PC751
83 pages
Playfair Cipher Encryption Guide
PDF
No ratings yet
Playfair Cipher Encryption Guide
5 pages
Cryptography Lab: Java & Python Projects
PDF
No ratings yet
Cryptography Lab: Java & Python Projects
26 pages
Al Bhed Cipher Programming Assignment
PDF
No ratings yet
Al Bhed Cipher Programming Assignment
3 pages
C and Java Cryptography Programs
PDF
No ratings yet
C and Java Cryptography Programs
34 pages
Cryptography Lab Practical Record
PDF
No ratings yet
Cryptography Lab Practical Record
61 pages
Caesar and Monoalphabetic Ciphers Code
PDF
No ratings yet
Caesar and Monoalphabetic Ciphers Code
25 pages
Hand Written Notes Unit-5
PDF
No ratings yet
Hand Written Notes Unit-5
23 pages
Logic Gate
PDF
No ratings yet
Logic Gate
6 pages
Security Laboratory Manual CS6711
PDF
No ratings yet
Security Laboratory Manual CS6711
83 pages
Playfair Cipher Program Guide
PDF
No ratings yet
Playfair Cipher Program Guide
7 pages
B22EF0605 - CNS Lab
PDF
No ratings yet
B22EF0605 - CNS Lab
59 pages
Vigenere and Playfair Cipher Programs
PDF
No ratings yet
Vigenere and Playfair Cipher Programs
6 pages