Skip to content
PrinceOfBorgoPublic

About

Cryptanalysis tools for cyber competitions.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broken-rs

A Rust toolkit for classical cryptanalysis and a few modern cryptographic attacks.

Contents

  • src/lib/ – the broken_rs library
    • ciphers/ – implementations and breakers for Caesar, affine, Vigenère (IoC and n-gram based), autokey, simple/homophonic substitution and XOR ciphers
    • statistics/ – fitness measures: chi-squared, index of coincidence, n-gram and word scoring
    • tests/ – periodicity tests: Kasiski, Friedman and twist
    • distinguishers/ – AES-128 4-round distinguisher
    • collision_finder.rs – multithreaded search for hash values satisfying a predicate
    • alphabet.rs, utils.rs – shared helpers
  • src/bin/ – command-line tools built on the library
  • examples/ – hash collision search examples (collision1–collision4)
  • ngrams/ – n-gram frequency tables for several languages (English, Danish, Finnish, French, German, Icelandic, Italian, Polish, Russian, Spanish, Swedish)
  • words/ – word frequency lists (English, Swedish)

Binaries

Name Purpose
break_caesar Break a Caesar cipher
break_affine Break an affine cipher
break_vigenere Break a Vigenère cipher
break_vigenere_ngrams Break a Vigenère cipher using n-gram scoring
break_autokey Break an autokey cipher
break_simple_substitution Break a simple substitution cipher
aes_4_rounds Run the AES 4-round distinguisher
ngrams_score Score text against n-gram statistics
kasiski, friedman, twist Estimate the key length of polyalphabetic ciphers

Usage

cargo build --release
cargo run --release --bin break_vigenere -- --help
cargo run --release --example collision1

About

Cryptanalysis tools for cyber competitions.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages