Skip to content

Mehul2205/Cryptography-Assignments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptoGraphy

These are the lab assignments performed during the course of cryptography

Lab 1

  • WAP in python to implement client and server communication.

  • WAP in python to implement Euclidean algorithm to find the GCD.

  • WAP in python to implement extended Euclidean algorithm to find the GCD along with s and t values.

  • WAP in python to find out the additive and multiplicative inverse pairs of set Zn.

  • WAP in python to find out the additive and multiplicative inverse of an integer b using extended Euclidean algorithmof set Zn.

Lab 2

  • WAP to find the solutions of equations: a.14x=12mod 18 b.3x+4=6 mod 132.

  • WAP to implement Additive cipher(key=20), Multiplicative cipher(key=15)and affine cipher(key=15,20). To encrypt the message “this is an exercise”.

  • WAP to perform brute force attack on the cipher text“dvvkzecfssprkkve”.

  • WAP to perform brute force attack on the cipher text “YMJHFJXFWHNUMJWNXTSJTKYMJJFWQNJXYPSTBSFSIXNRUQJXYHNUMJWX”

  • WAP to use brute force attack to decipher the message :Assume Affine cipher is used and “ab” is encrypted by “GL”.

  • WAP to perform statistical attack on the ciphertext:

ymnxhtzwxjfnrxytuwtanijdtzbnymijyfnqjipstbqjiljtknrutwyfsyyjhmstqtlnjxfsifuuqnhfyntsymfyfwjzxjinsymjnsyjwsjyizjytymjgwtfisfyzwjtkymnxknjqiymjhtzwxjhtajwxtsqdxjqjhyjiytunhxkthzxxnslknwxytsxtrjfiafshjiytunhxnsnsyjwsjyyjhmstqtlnjxjlbnwjqjxxqfsxrtgnqjnsyjwsjyrzqynhfxyfsiymjsfxjqjhyntstkhzwwjsyfsisjcyljsjwfyntsfuuqnhfyntsxfsixjwanhjxjluunuyaatnudtzbnqqqjfwsmtbymjnsyjwsjybtwpxfsimtbxjwanhjxfsifuuqnhfyntsxfwjuwtanijiytzxjwxtkymjnsyjwsjyymnxpstbqjiljbnqqmjqudtz

  • WAP to perform statistical and pattern attack over the ciphertext:

ziolegxkltqodlzgofzkgrxetngxzgzithkofeohstlqfrzteifojxtlgyltexkofuegdhxztklqfregdhxztkftzvgkalvoziygexlgfofztkftzltexkoznzitegxkltoltyytezoctsnlhsozofzgzvghqkzlyoklzofzkgrxeofuzitzitgkngyeknhzgukqhinofesxrofuigvdqfnesqlloeqsqfrhghxsqkqsugkozidlvgkaturtlklqrouozqsloufqzxktlqfrltegfrhkgcorofurtzqoslgyktqsofztkftzltexkoznhkgzgegslqsugkozidlqfrziktqzltuohltecokxltlyoktvqsslitfetngxvossstqkfwgzizitgktzoeqsqlhtezlgyegdhxztkqfrftzvgkaltexkoznqlvtssqligvziqzzitgknolqhhsotrofzitofztkftzziolafgvstrutvossitshngxofrtloufofuqfrrtctsghofultexktqhhsoeqzogflqfrftzvgkahkgzgegslqlvtssqlwxosrofultexktftzvgkal

Lab 3

  • Generate the cipher text of the plain text “we are discovered, save yourself” using playfair cipher.

  • Generate the cipher text of the plain text “PL AY FA IR ME SS AG E” using playfair cipher and the secret key is “COMMONLOUNGE”.

  • WAP to encrypt the message “She is listening” using the 6-character keyword “PASCAL” with Vigenere cipher.

  • WAP to perform cryptanalysis over ciphertext “fupcmtgzkyukbqfjhuktzkkixtta” using hill cipher.

Lab 4

  • Alice needs to send the message “Enemy attacks tonight” to Bob.They agreed to use keyed transposition cipher with key value:31452. Implement double transpositioncipher over it and generate the ciphertext.

  • Create a key stream with linear feedback shift register with 4 cells in whichb4= b1 exor b0 Show the value of output for 20 transitions(if the seed is 0001).

  • Write a code to encrypt a message A Midsummer Night's Dream, which is a comedy written by Shakespeare.You have to use key: SWINDONand keyed transpositioncipher row-column.

  • Findthe result of multiplying P1=000100110and P2=10011110 with irreducible polynomial100011010(nine bits).

Lab 5

  • Implement DES Algorithm by using the helping PDF.

  • Implement AES Algorithm by using the helping PDF.

  • Implement a client and a server on different computers. Perform the communication between these two entities by using RSA cryptosystem. (Client.ipynb and Server.ipynb)

  • Implement a client and a server on different computers. Perform the authentication of senderbetween these two entities by using RSA digital signature cryptosystem. (UDPClient.ipynb and UPDServer.ipynb)

Lab 6

  • Write a program to implement Chinese Remainder Theorem.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy