A (hopefully) considerably copious collection of classical cipher crackers

Overview

ClassicalCipherCracker

A (hopefully) considerably copious collection of classical cipher crackers

Written in Python3 (and run with PyPy)

TODOs

  • Write a "text fitness evaluator" function which evaluates the likelihood that a given string of text is English
  • Write a substitution cipher decoder (which can also server as a ROT13, Caesar, and Atbash decoder)
  • Compile a list of common classical ciphers (drawing from Wikipedia and the National Cipher Competition)
  • Write a word splitter which separates plaintext into words
  • Investigate using AI to identify what cipher a ciphertext might be encrypted with

Terminology

  • Plaintext: a message which is readable and unencrypted
  • Ciphertext: a message which is encrypted
  • Decoder/Decrypter: a program which will decrypt a ciphertext when given the key
  • Cracker: a program that can decrypt a ciphertext without the key, usually by making use of the decrypter

Basic Methodology

A cracker has three major components: the key-finding algorithm, the decrypter, and the text evaluator.

The key-finding algorithm will generate keys which will be used by the decrypter to find the plaintext that the key would generate. This plaintext will be tossed into the text evaluator. If it gets a high score, the current key and plaintext will be saved as a possible answer. As more keys get tested, the best key-plaintext pair will be continuously updated.

If the keyspace is small, then every key will be tested. If brute force isn't feasible, a hill-climbing algorithm will be used, where random changes to the key are either kept or dropped if they create a better text evaluation. The goal of the algorithm is to reach a "hill", where the plaintext is as likely to be the real message as possible. Simulated annealing may also be used in the future.

Code should be written to prioritize speed when run under PyPy, though it should still be reasonably readable. In particular, decrypters must be optimized to run quickly, as they are often called thousands of times in order to crack a cipher. Different versions of decrypters should be tested and timed to determine which is most performant. The same applies to the text fitness evaluator.

Resources

Text Fitness

http://practicalcryptography.com/cryptanalysis/text-characterisation/quadgrams/
https://medium.com/analytics-vidhya/how-to-distinguish-between-gibberish-and-valid-english-text-4975078c5688
https://planetcalc.com/7959/, https://planetcalc.com/8045/
https://gitlab.com/guballa/SubstitutionBreaker/-/blob/development/subbreaker/breaker.py

Word Splitting

http://practicalcryptography.com/cryptanalysis/text-characterisation/word-statistics-fitness-measure/

Owner
Stanley Zhong
Stanley Zhong
dta Convert Dict To Attributes!

dta (Dict to Attributes) dta is very small dict (or json) to attributes converter. It is only have 1 files and applied to every python versions.

Rukchad Wongprayoon 0 Dec 31, 2021
Find all solutions to SUBSET-SUM, including negative, positive, and repeating numbers

subsetsum The subsetsum Python module can enumerate all combinations within a list of integers which sums to a specific value. It works for both negat

Trevor Phillips 9 May 27, 2022
Ssma is a tool that helps you collect your badges in a satr platform

satr-statistics-maker ssma is a tool that helps you collect your badges in a satr platform 🎖️ Requirements python = 3.7 Installation first clone the

TheAwiteb 3 Jan 04, 2022
Simple python script for AD enumeration

AutoAD - Simple python script for AD enumeration This tool was created on my spare time to help fellow penetration testers in automating the basic enu

Mohammad Arman 28 Jun 21, 2022
A Red Team tool for exfiltrating sensitive data from Jira tickets.

Jir-thief This Module will connect to Jira's API using an access token, export to a word .doc, and download the Jira issues that the target has access

Antonio Piazza 82 Dec 12, 2022
Banking management project using Tkinter GUI in python.

Bank-Management Banking management project using Tkinter GUI in python. Packages required Tkinter - Tkinter is the standard GUI library for Python. sq

Anjali Kumawat 7 Jul 03, 2022
A joke conlang with minimal semantics

SyntaxLang Reserved Defined Words Word Function fo Terminates a noun phrase or verb phrase tu Converts an adjective block or sentence to a noun to Ter

Leo Treloar 1 Dec 07, 2021
JPMC Virtual Experience

This repository contains the submitted patch files along with raw files of the various tasks assigned by JPMorgan Chase & Co. through its Software Engineering Virtual Experience Program on Forage (fo

Vardhini K 1 Dec 05, 2021
This collection is to provide an easier way to interact with Juniper

Ansible Collection - cremsburg.apstra Overview The goal of this collection is to provide an easier way to interact with Juniper's Apstra solution. Whi

Calvin Remsburg 1 Jan 18, 2022
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021
lets learn Python language with basic examples. highly recommended for beginners who just start coding.

Lets Learn Python 🐍 Learn python from basic programs. learn python from scratch. 1.Online python compiler: https://www.onlinegdb.com/online_python_co

Subhranshu Choudhury 1 Jan 18, 2022
An extension for Arma 3 that lets you write extensions in Python 3

An Arma 3 extension that lets you to write python extensions for Arma 3. And it's really simple and straightforward to use!

Lukasz Taczuk 48 Dec 18, 2022
Extract gene length based on featureCount calculation gene nonredundant exon length method.

Extract gene length based on featureCount calculation gene nonredundant exon length method.

laojunjun 12 Nov 21, 2022
Metal Gear Rising: Revengeance's DAT archive (un)packer

DOOMP Metal Gear Rising: Revengeance's DAT archive (un)packer

Christopher Holzmann Pérez 5 Sep 02, 2022
A shim for the typeshed changes in mypy 0.900

types-all A shim for the typeshed changes in mypy 0.900 installation pip install types-all why --install-types is annoying, this installs all the thin

Anthony Sottile 28 Oct 20, 2022
Cross-platform config and manager for click console utilities.

climan Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal: https

3 Aug 31, 2021
Rock-paper-scissors basic game in terminal with Python

piedra-papel-tijera Juego básico de piedra, papel o tijera en terminal con Python. El juego incluye: Nombre de jugador Número de veces a jugar Resulta

Isaías Flores 1 Dec 14, 2021
🐍 A Python lib for (de)serializing Python objects to/from JSON

Turn Python objects into dicts or (json)strings and back No changes required to your objects Easily customizable and extendable Works with dataclasses

Ramon Hagenaars 253 Dec 14, 2022
Python library for creating PEG parsers

PyParsing -- A Python Parsing Module Introduction The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the t

Pyparsing 1.7k Jan 03, 2023
Astroquery is an astropy affiliated package that contains a collection of tools to access online Astronomical data.

Astroquery is an astropy affiliated package that contains a collection of tools to access online Astronomical data.

The Astropy Project 631 Jan 05, 2023