Git Product home page Git Product logo

crypto's Introduction

Cryptography

This repo contains various small crypto related scripts, that I wrote during the course of Cryptography in NTUA. The viginere decypher was an exercise for that class.

Viginere decypher

The ciphertext is known to be encrypted using the viginere method. Find_length.py uses the index of coincidence(IC) to find the most probable length of the key. The partial output of this programm is:
[(46, 0.0644927536231884), (30, 0.06666666666666668),
(12, 0.06672113289760347), (6, 0.06721132897603486),
(18, 0.06969696969696969), (27, 0.05952380952380953), ...]
Under the asssumption that the key is a small phrase the most probable length is 6.
Find_key.py uses the chi-squared statistic to compare the distribution of each column shifted with the ceasar cipher(each column corresponds to a letter of the key) to the english language distribution. The number of shifts and the corresponding letter with the smallest chi-squared value is a letter of the key.
Finally, we decode the cypher and it is a speech by Martin Luther King and the key is LUTHER.

crypto's People

Contributors

voulgaris-sot 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.