Code Monkey home page Code Monkey logo

cryptography-assignments's Introduction

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.

cryptography-assignments's People

Contributors

mehul2205 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.