/crypto-attacks

Python implementations of cryptographic attacks and utilities.

Primary LanguagePythonMIT LicenseMIT

Crypto attacks

Python implementations of cryptographic attacks and utilities.

Requirements

Implementations

CBC

CBC + CBC-MAC

CBC-MAC

CTR

ECB

Elliptic Curve Cryptography

Elliptic Curve Generation

  • MNT curves
  • Prescribed order
  • Prescribed trace
  • Supersingular curves

ElGamal Encryption

ElgGamal Signature

Factorization

GCM

  • Forbidden attack [More information: Joux A., "Authentication Failures in NIST version of GCM"]

Hidden Number Problem

IGE

Knapsack Cryptosystem

  • Low density attack [More information: Coster M. J. et al., "Improved low-density subset sum algorithms"]

Linear Congruential Generators

OFB

Pseudoprimes

RC4

RSA

Shamir's Secret Sharing

Small roots

  • Boneh-Durfee method [More information: Boneh D., Durfee G., "Cryptanalysis of RSA with Private Key d Less than N^0.292"]
  • Coron method [More information: Coron J., "Finding Small Roots of Bivariate Integer Polynomial Equations: a Direct Approach"]
  • Herrmann-May method (Boneh-Durfee with unravelled linearization) [Herrmann M., May A., "Maximizing Small Root Bounds by Linearization and Applications to Small Secret Exponent RSA"]
  • Howgrave-Graham method [More information: May A., "New RSA Vulnerabilities Using Lattice Reduction Methods (Section 3.2)"]
  • Jochemsz-May method [More information: Jochemsz E., May A., "A Strategy for Finding Roots of Multivariate Polynomials with New Applications in Attacking RSA Variants"]