Code Monkey home page Code Monkey logo

ctf-crypto's Introduction

CTF Crypto

This contains the code I use to perform various Cryptography Attacks in CTFs. This only contains attacks on common cryptography systems, not custom cryptosystems / hashing functions made by the CTF creators.

All code is designed for python3, though it likely can be modified for python2 by removing timeouts.

RSA Tool

Note that this is Linux only, due to my usage of "signal" for timeouts.

Factorization Methods contained:

  • Check FactorDB
  • GCD for Multiple keys
  • Sieved Fermat Factorization
  • Wiener Attack
  • Pollards P-1 (Not a good implementation)
  • Pollards Rho (Fairly Broken)

RSA specific methods

  • Partial Key Recovery for n/2 bits of the private key
  • TODO Partial Key Recovery for n/4 bits of the private key
  • Decoding despite invalid Public Exponent

Diffie Hellman

  • Baby Step Giant Step Algorithm

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.