/cryptography

Some crypto scripts which is useful in study and ctf

Primary LanguagePython

cryptography implements

My own implementions and some re-modified code from some other authors.

You can just read these easy codes to get a quick start to cryptography

Also this is a repo which is used to store some homework codes in CS152, so you can just read them if you have some problems when doing homework :)

  • CS152 implements:
    • Pollard_Rho (factorize & DLP)
    • Pohig_Hellman
    • Pollard p-1
    • Shank's Algorithm (BSGS)
    • Elgamal & It's signature
    • AES KeyExpansion
    • Miller Rabin Test
    • Wiener attack
    • jacobi (modified from libnum)
    • paiilier cryptosystem
    • Single server covering code
    • Covering code PIR 2 servers
    • Covering code PIR 4 servers
  • Other implements which are useful in CTF
    • Gaussian Reduction
    • HNP solver (SVP & CVP methods)
    • SquareRoots solver (Find all roots)
    • agcd solver (MP & SDA methods)
    • extending_wiener attack over RSA with 2 & 3 es
    • backpack cryptosystem solver
    • Simple version of Bloomer May attack over RSA
    • lcg attacker with 3 conditions
    • related-message attack over RSA (with half-gcd modified from rkm's implements and groebner basis)