Skip to content

Cryptography Notebook is a repository containing some of the cryptographic implementations I have done for learning purposes.

Notifications You must be signed in to change notification settings

Kiooku/Cryptography-Notebook

Repository files navigation

Cryptography Notebook

What is that ?

It's a repository with some of the cryptographic implementations I have done for learning purposes.

Until then by solving cryptography challenges on CryptoHack and Root-Me.

Currently, I'm reading "An Introduction to Mathematical Cryptography" (Second edition), and in order to apply the mathematical knowledge and get a better understanding, I decided to create this repository.

Learn, understand, and create project is a long process, which is why the repository will contain more implementation month after month.

Content of the repository

Symmetric Ciphers

Note

Work in progress

  • AES (ECB / CBC / CFB / OFB / CTR)

Asymmetric Ciphers

Note

Work in progress

Implementations

Attacks

Diffie-Hellman
ElGamal
RSA

Man-in-the-Middle Attack (MITM)

  • Diffie-Hellman MITM

ID-Based Public Key Cryptosystem

  • The Boneh Franklin Id Based PKC

Commitment Schemes

Identification Schemes

Digital Signatures

Note

Work in progress

Hash Functions

Note

Basic knowledge -> Need to learn more

Message Authentification

Key Derivation Function

Secret Sharing Schemes

  • Shamir's secret sharing

  • Blakley's scheme

PRNG

Note

Need to learn

  • ANSI X9.17 PRNG

  • DSA PRNG

  • RSAREF PRNG

  • fsrRand

One-Time pad

Note

One-Time pad can be really simple to code, so I did it in assembly

End-to-end encryption

Zero-Knowledge Proofs

Note

Need to learn

Homomorphic Encryption

Note

Ongoing learning of lattices to understand homomorphic encryption

Post-Quantum

Note

Ongoing learning of lattices and learning with errors to understand Post-Quantum cryptography

Mathematics

Algorithm and Theorem

Note

Work in progress

  • Euclidean algorithm

  • Shanks’s Babystep–Giantstep Algorithm

  • Chinese Remainder Theorem

  • Pohlig-Hellman Algorithm

  • Miller–Rabin test for composite numbers

  • Pollard’s p − 1 factorization algorithm

  • Gaussian elimination

  • Fermat's Factorization

  • Kraitchik’s Factorization

  • A three step factorization procedure (Relation Building / Elimination / GCD Computation)

  • Quadratic sieve

  • Index calculus

  • Pollard's $\rho$ Method

Elliptic Curves

  • Addition
  • Double-and-Add Algorithm
  • Lenstra's Elliptic Curve Factorization Algorithm
  • Miller algorithm
  • Weil Pairing
  • MOV algorithm

Lattices

  • Create a Lattice class

  • Create a Knapsack class

  • Gram-Schmidt Algorithm

  • Hadamard ratio

  • Babai's closest vertex algorithm

  • Babai's closest plane algorithm

  • Gaussian Lattice reduction

  • LLL algorithm

Learning with errors (LWE)

Note

Need to learn

Cryptography projects

Resources