Giter Club home page Giter Club logo

classical-encryption-methods's Introduction

classical-encryption-methods

This script provides a menu with four distinct types of classical encryption methods: Playfair cipher, Hill cipher, Vigenere cipher, and Vernam cipher. Each cipher is implemented in a distinct function, and the script allows users to encrypt or decrypt a given text using their preferred technique.

Playfair Cipher: This method involves creating a 5x5 grid of letters based on a key, and encrypting pairs of letters according to their position in the grid. It substitutes pairs of letters instead of individual letters.

Hill Cipher: This method uses linear algebra, encrypting text by multiplying each block of letters (converted to numerical values) by a matrix (formed from the key), modulo 26.

Vigenere Cipher: This is a method of encrypting alphabetic text by using a simple form of polyalphabetic substitution. A key is used to generate a repeating key string, which is then used to shift the letters in the plaintext.

Vernam Cipher: Also known as the one-time pad, it's a symmetric encryption technique where plaintext is combined with a random key. It's theoretically unbreakable if the key is random, as long as the message, and used only once.

Each cipher function in the script follows a similar structure:

Prompt the user for a key and a choice between encryption and decryption.
Perform necessary transformations on the key and the text (like resizing the key to match the text length in Vigenere and Vernam ciphers, or creating a matrix in the Hill cipher).
Implement the specific algorithm for encryption or decryption.
Output the encrypted or decrypted text.

classical-encryption-methods's People

Contributors

shashankb001 avatar

Watchers

 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.