All Projects → pwang00 → Cryptographic-Attacks

pwang00 / Cryptographic-Attacks

Licence: other
Repository containing implementation of attacks on modern public key cryptosystems and symmetric key ciphers.

Programming Languages

Sage
50 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cryptographic-Attacks

sage tools social science
Tools and technologies for social science research, a SAGE whitepaper
Stars: ✭ 19 (-59.57%)
Mutual labels:  sage
sage
An Open Source Knowledge Graph written in Rust
Stars: ✭ 12 (-74.47%)
Mutual labels:  sage
sage-next
familiar-zebra.surge.sh
Stars: ✭ 18 (-61.7%)
Mutual labels:  sage
sage-woocommerce
No description or website provided.
Stars: ✭ 64 (+36.17%)
Mutual labels:  sage
drop-feeds
Drop Feeds is a Sage / Sage++ like addon (webextension) for Firefox Quantum
Stars: ✭ 18 (-61.7%)
Mutual labels:  sage
dicy
A builder for LaTeX, knitr, literate Agda, literate Haskell and Pweave that automatically builds dependencies.
Stars: ✭ 22 (-53.19%)
Mutual labels:  sage
blade-generate
Forces generation of Blade template cache files for Sage9.
Stars: ✭ 64 (+36.17%)
Mutual labels:  sage
libVES.c
VESvault End-to-End Encryption API: Encrypt Everything Without Fear of Losing the Key
Stars: ✭ 28 (-40.43%)
Mutual labels:  rsa-cryptosystem
RSA-ATTACK
RSA加密应用常见缺陷的原理与实践
Stars: ✭ 155 (+229.79%)
Mutual labels:  rsa-attacks
wordpress-scaffold
The scaffold for GRRR's WordPress Pro setup.
Stars: ✭ 16 (-65.96%)
Mutual labels:  sage
wp-smtp
Simple package for handling WordPress SMTP with .env when using the Roots stack.
Stars: ✭ 31 (-34.04%)
Mutual labels:  sage
sage-xpress
A collection of Roots/Sage 9.x-beta providers for rapid theme development. Xpress adds configurable app-like functionality to the Sage Container.
Stars: ✭ 26 (-44.68%)
Mutual labels:  sage
selene
A opinionated Wordpress base theme based on Sage.
Stars: ✭ 31 (-34.04%)
Mutual labels:  sage
BourbonySage
*No Longer Maintained* Fork of Sage 8.5.0 using Bourbon, Neat & Bitters
Stars: ✭ 21 (-55.32%)
Mutual labels:  sage
vim-sage
Vim plugin for SageMath (Sage) mathematics software system
Stars: ✭ 17 (-63.83%)
Mutual labels:  sage
Sage9-Woocommerce-Integration
How to use Woocommerce (3.4.3) with Sage 9.0.1 (Blade + SoberWP controllers), WP 4.9.7 (17/07/2018)
Stars: ✭ 26 (-44.68%)
Mutual labels:  sage
Sage
WordPress starter theme with a modern development workflow
Stars: ✭ 11,531 (+24434.04%)
Mutual labels:  sage
Sage
Mirror of the Sage source tree -- please do not submit PRs here -- everything must be submitted via https://trac.sagemath.org/
Stars: ✭ 1,656 (+3423.4%)
Mutual labels:  sage

Cryptographic Attacks

Repository containing my Sage and/or Python implementations of attacks on popular ciphers and public key cryptosystems.

Overview

As of yet, there are implementations for attacks against RSA, Diffie-Hellman and its elliptic curve variant, AES-ECB, and AES-CBC. There are also miscellaneous factoring attacks, which may be applicable for targeting many public key schemes, and some notes on topics such as elliptic curve pairings. I plan to finish all existing public key attacks in the future and significantly expand attack support for symmetric key primitives, as the latter has been relatively lacking for the past few years. Additionally, I aim to add more general purpose algorithms in the domains of factoring, state recovery for non-cryptographically secure PRNG (such as ones that use linear congruential generators or linear-feedback shift registers), and more, the reason being that doing so should allow for more flexibility when attacking cryptographic primitives.

Currently Implemented Attacks

Public Key Cryptographic Schemes

RSA

Diffie-Hellman

Factoring algorithms (applicable for many public key primitives)

Elliptic Curves

  • MOV attack for curves of low embedding degree

Symmetric Key Ciphers

AES

Installing SageMath

SageMath is available on both Windows and Un*x.

To install SageMath on Windows, download an installer from the following link: https://github.com/sagemath/sage-windows/releases

To install on Ubuntu and other Linux distros, I believe sudo apt install sagemath, or something along those lines will get the job done.

SageMath also has a presence in the cloud:

  • SageMathCell: (useful as a quick go-to for evaluating Sage code without the need to save, also be mindful of no external connections)

  • CoCalc: (optimal for hosting personal projects in the cloud)

It is also possible to host a personal SageMath server, though I have never tried this.

Current Notes

The Notes directory contains my notes on miscellaneous cryptography-related topics. As of now, I have written up a summary of the first few chapters of Craig Costello's Pairings for Beginners and a SageMath script demonstrating elliptic curve point addition and doubling in projective coordinates.

Future Works

Existing Attacks

  1. Implement the small-subgroup confinement attack for Diffie-Hellman and its Elliptic Curve counterpart.
  2. Implement the MOV attack for elliptic curves of low embedding degree.

Future Attacks

  1. Boneh-Durfee attack for d < N^0.292
  2. BLS rogue public key attack
  3. Fault attack on standard (non-CRT) RSA
  4. Small-subgroup confinement attack on Diffie-Hellman
  5. Linear / differential cryptanalysis against DES/AES
  6. Invalid point attacks on Elliptic Curve Diffie-Hellman
  7. State recovery on linear congruential generators (LCGs), truncated and non-truncated
  8. State recovery on linear feedback shift registers (LFSRs)

Miscellaneous

  1. Add docstrings to each attack to better describe their functionalities.
  2. Add more general purpose scripts that may prove useful for breaking some cryptographic schemes
  3. Improve overall code quality, efficiency, and consistency

Feel free to let me know if there are any bugs.

Frequently Asked Questions

Q: Why use SageMath instead of pure Python?

A: Sage provides many convenient number-theoretic functions and constructors for algebraic structures commonly used by or used against cryptographic primitives, such as groups, polynomial rings, fields, and elliptic curves. This saves a lot of time since it allows focus to be placed solely on implementing attacks and useful general purpose algorithms rather than the structures that they depend upon.

Relevant Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].