Giter Club home page Giter Club logo

cns-lab's Introduction

Cryptography and Network Security Lab

This repository contains programs implemented in Cryptography and network security Lab in my 7th semester of SIT(VTU).

  1. Perform encryption and decryption using mono-alphabetic cipher. The program should support the following :

    • Construct an input file named plaintext.txt (consisting of 1000 alphabets, without any space or special characters)
    • Encrypt the characters of plaintext.txt and store the corresponding ciphertext characters in ciphertext.txt
    • Compute the frequency of occurrence of each alphabet in both plaintext.txt and ciphertext.txt and tabulate the results
  2. Write a program to perform the following using Playfair cipher technique

    • Encrypt a given message M with different keys {k1,k2,...,kn}. Print key and cipher text pair
    • Decrypt the cipher texts obtained in (i) to get back M
  3. Write a program to perform the following using Hill cipher:

    • Encrypt a message M with a given key matrix of size 2X2 and 3X3
    • Decrypt the cipher text obtained in (i) by computing inverse of the respective key matrix.
  4. Write a program to perform encryption and decryption using transposition technique with column permutation given as key.

  5. Generate and print 48-bit keys for all sixteen rounds of DES algorithm, given a 64-bit initial key.

  6. Given 64-bit output of (i-1)th round of DES, 48-bit ith round key Ki and E table, find the 48-bit input for S-box.

  7. Given 48-bit input to S-box and permutation table P, find the 32-bit output Ri of ith round of DES algorithm.

  8. Implement the following with respect to RC4:

    • Print first n key bytes generated by key generation process.
    • Illustrate encryption/decryption by accepting one byte data as input on the above generated keys.
  9. Write a program to generate large random number using BBS random number generator algorithm and check whether the generated number is prime or not using RABIN-MILLER primality testing algorithm.

  10. Implement RSA algorithm using client-server concept. The program should support the following :

    • Client generates {PU, PR} and distributes PU to Server.
    • Sever encrypts message M using client’s public key {PU}.
    • Client decrypts the message sent by server using its private key {PR}.
  11. Implement RSA algorithm to process blocks of plaintext (refer Figure 9.7 of the text book), where plaintext is a string of characters and let the block size be two characters. (Note: assign a unique code to each plain text character i.e., a=00, A=26). The program should support the following.

    • Accept string of characters as plaintext.
    • Encryption takes plaintext and produces ciphertext characters.
    • Decryption takes ciphertext characters obtained in step ii and produces corresponding plaintext characters
    • Display the result after each step
  12. Implement RSA algorithm using client-server concept. Using this illustrate secret key distribution scenario with confidentiality and authentication. The program should support the following :

    • Both client and server generate {PU, PR} and distribute PU to each other.
    • Establish a secret key K between client and server by exchanging the messages as shown in below figure. fig-12
  13. Compute common secret key between client and server using Diffie-Hellman key exchange technique. Perform encryption and decryption of message using the shared secret key (Use simple XOR operation to encrypt and decrypt the message.)

  14. Implement DSS algorithm for signing and verification of messages between two parties (obtain H(M) using simple XOR method of hash computation on M).

Download Manual

cns-lab's People

Contributors

adityapranavbhuvanapalli avatar git-akshat avatar nateshmbhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cns-lab's Issues

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.