https://github.com/serengil/crypto
Elliptic Curve Cryptography and Common Public Key Cryptography Implementations
https://github.com/serengil/crypto
bitcoin crypto diffie-hellman digital-signature discrete-logarithm dsa ecdsa eddsa edwards-curve elgamal elliptic-curve-cryptography encryption homomorphic key-exchange public-key public-key-cryptography rsa
Last synced: 7 months ago
JSON representation
Elliptic Curve Cryptography and Common Public Key Cryptography Implementations
- Host: GitHub
- URL: https://github.com/serengil/crypto
- Owner: serengil
- License: mit
- Created: 2016-04-24T19:50:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T11:35:51.000Z (7 months ago)
- Last Synced: 2025-03-31T12:31:35.564Z (7 months ago)
- Topics: bitcoin, crypto, diffie-hellman, digital-signature, discrete-logarithm, dsa, ecdsa, eddsa, edwards-curve, elgamal, elliptic-curve-cryptography, encryption, homomorphic, key-exchange, public-key, public-key-cryptography, rsa
- Language: Jupyter Notebook
- Homepage: https://www.youtube.com/playlist?list=PLsS_1RYmYQQFPOGVFo_hiSkxC0mEOejku
- Size: 263 KB
- Stars: 98
- Watchers: 6
- Forks: 49
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# crypto
[](https://github.com/serengil/crypto/stargazers)
[](https://github.com/serengil/crypto/blob/master/LICENSE)
[](https://www.patreon.com/serengil?repo=crypto)
[](https://github.com/sponsors/serengil)[](https://sefiks.com)
[](https://www.youtube.com/@sefiks?sub_confirmation=1)
[](https://twitter.com/intent/user?screen_name=serengil)This repository covers cryptography algorithms, tutorials and python implementations.
## Public Key Cryptography
1- Diffie-Hellman Key Exchange [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/Diffie-Hellman.ipynb), [`Tutorial`](https://sefiks.com/2023/05/30/magic-of-diffie-hellman-from-a-programmers-perspective/), [`Video`](https://youtu.be/VzzCDO-o2Fc)
2- Digital Signature Algorithm (DSA) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/DSA.ipynb), [`Tutorial`](https://sefiks.com/2023/06/14/digital-signature-algorithm-dsa-in-python-from-scratch/), `Video`
## Homomorphic Encryption
1- Multiplicatively Homomorphic RSA [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/RSA.ipynb), [`Tutorial`](https://sefiks.com/2023/03/06/a-step-by-step-partially-homomorphic-encryption-example-with-rsa-in-python/), [`Video`](https://youtu.be/PzKch8UQAmQ)
2- Multiplicatively or Additively Homomorphic ElGamal [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/ElGamal.ipynb), [`Tutorial`](https://sefiks.com/2023/03/27/a-step-by-step-partially-homomorphic-encryption-example-with-elgamal-in-python/), [`Video`](https://youtu.be/d-gK211N28U)
3- Additively Homomorphic Paillier [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Paillier.ipynb), [`Tutorial`](https://sefiks.com/2023/04/03/a-step-by-step-partially-homomorphic-encryption-example-with-paillier-in-python/), [`Video`](https://youtu.be/Yerhc9B2zjQ), [`Video`](https://youtu.be/Yerhc9B2zjQ)
4- Additively Homomorphic Okamoto–Uchiyama [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Okamoto%E2%80%93Uchiyama.ipynb), [`Tutorial`](https://sefiks.com/2023/10/20/a-step-by-step-partially-homomorphic-encryption-example-with-okamoto-uchiyama-in-python/), `Video`
5- Additively Homomorphic Benaloh [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Benaloh.ipynb), [`Tutorial`](https://sefiks.com/2023/10/06/a-step-by-step-partially-homomorphic-encryption-example-with-benaloh-in-python-from-scratch/), `Video`
6- Additively Homomorphic Damgard-Jurik [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Damgard-Jurik.ipynb), [`Tutorial`](https://sefiks.com/2023/10/20/a-step-by-step-partially-homomorphic-encryption-example-with-damgard-jurik-in-python/), `Video`
7- Additively Homomorphic Naccache–Stern [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Naccache%E2%80%93Stern.ipynb), [`Tutorial`](https://sefiks.com/2023/10/26/a-step-by-step-partially-homomorphic-encryption-example-with-naccache-stern-in-python/), `Video`
8- Additively Homomorphic Elliptic Curve ElGamal [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/EC-ElGamal.ipynb), [`Tutorial`](https://sefiks.com/2018/08/21/elliptic-curve-elgamal-encryption/), [`Video`](https://youtu.be/062ilU5dOzY)
9- Exclusively Homomorphic Goldwasser–Micali [`Code`](https://github.com/serengil/crypto/blob/master/python/homomorphic/Goldwasser%E2%80%93Micali.ipynb), [`Tutorial`](https://sefiks.com/2023/10/27/a-step-by-step-partially-homomorphic-encryption-example-with-goldwasser-micali-in-python/), `Video`
## Elliptic Curve Cryptography Theory
1- Elliptic Curves in Weierstrass Form [`Tutorial`](https://sefiks.com/2016/03/13/the-math-behind-elliptic-curve-cryptography/), [`Video`](https://youtu.be/iydGkrjJkSM)
2- Elliptic Curves in Koblitz Form [`Tutorial`](https://sefiks.com/2016/03/13/the-math-behind-elliptic-curves-over-binary-field/), [`Video`](https://youtu.be/g8ePU5U5oP8)
3- Edwards Curves [`Tutorial`](https://sefiks.com/2018/12/19/a-gentle-introduction-to-edwards-curves/), [`Video`](https://youtu.be/Yn1kD1rNmns)
4- Twisted Edwards Curves [`Tutorial`](https://sefiks.com/2018/12/26/twisted-edwards-curves/), `Video`
5- Double and Add Method [`Tutorial`](https://sefiks.com/2016/03/27/double-and-add-method/), `Video`
## Elliptic Curve Cryptography Implementations
1- Elliptic Curve Diffie-Hellman Key Exchange (ECDH) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/ECDH.ipynb), [`Tutorial`](https://sefiks.com/2016/04/11/key-exchange-from-carrying-handcuffed-briefcases-to-modern-cryptosystems/), [`Video`](https://youtu.be/445Opx6U3Co)
2- Elliptic Curve Digital Signature Algorithm (ECDSA) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/ECDSA.ipynb), [`Tutorial`](https://sefiks.com/2018/02/16/elegant-signatures-with-elliptic-curve-cryptography/), [`Video`](https://youtu.be/Br8o9KnyPJI)
3- Edwards Curve Digital Signature Algorithn (EdDSA) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/EdDSA.ipynb), [`Tutorial`](https://sefiks.com/2018/12/24/a-gentle-introduction-to-edwards-curve-digital-signature-algorithm-eddsa/), [`Video`](https://youtu.be/8TnRzFt3-K0)
4- Elliptic Curve ElGamal Asymmetric Encryption [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/EC-ElGamal.ipynb), [`Tutorial`](https://sefiks.com/2018/08/21/elliptic-curve-elgamal-encryption/), [`Video`](https://youtu.be/062ilU5dOzY)
5- Elliptic Curve Integrated Encryption Scheme (ECIES) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/ECIES.ipynb), [`Tutorial`](https://sefiks.com/2023/04/27/elliptic-curve-integrated-encryption-scheme-in-python/), [`Video`](https://youtu.be/0hTFoVOeJi0)
6- Elliptic Curve Menezes-Qu-Vanstone (ECMQV) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/ECMQV.ipynb), [`Tutorial`](https://sefiks.com/2023/05/29/elliptic-curve-menezes-qu-vanstone-in-python-from-scratch/), [`Video`](https://youtu.be/JKlTdY07IY4)
7- Elliptic Curve Korean Certificate-based Digital Signature Algorithm (EC-KCDSA) [`Code`](https://github.com/serengil/crypto/blob/master/python/notebooks/EC-KCDSA.ipynb), [`Tutorial`](https://sefiks.com/2023/06/09/elliptic-curve-kcdsa-in-python-from-scratch/), `Video`
8- Bitcoin Address Generation [`Code`](https://github.com/serengil/crypto/blob/master/python/Bitcoin.py), [`Tutorial`](https://sefiks.com/2018/03/26/a-step-by-step-bitcoin-address-example/), [`Video`](https://youtu.be/3n93_yiWH0I)
## Historical Cryptography
1- Caesar Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Caesar.ipynb)
2- Substitution Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Substitution.ipynb)
3- Affine Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Affine.ipynb)
4- Homophonic Substitution Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Homophonic.ipynb)
5- Permutation Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Permutation.ipynb)
6- Hill Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Hill.ipynb), [`Tutorial`](https://sefiks.com/2018/12/04/a-step-by-step-hill-cipher-example/)
7- Vigénere Cipher [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Vigenere.ipynb)
8- Kasiski Examination [`Code`](https://github.com/serengil/crypto/blob/master/python/classical/Kasiski.ipynb)
9- Enigma Machine [`Video`](https://youtu.be/XPd8LCxwrsc)
# Support
There are many ways to support a project - starring⭐ the GitHub repos is one.
You can also enroll one of my courses published on Udemy to support: [`Public Key Cryptography From Scratch In Python`](https://www.udemy.com/course/public-key-cryptography-from-scratch-in-python/?referralCode=8AF2BB504D810A4C99CB), [`Cryptography Basics From Scratch In Python`](https://www.udemy.com/course/cryptography-basics-from-scratch-in-python/?referralCode=0B65C57251E2674FAC2C), [`Elliptic Curve Cryptography Masterclass In Java`](https://www.udemy.com/course/elliptic-curve-cryptography-masterclass/?referralCode=C5E74D486DD29F6DAF4A).
You can support this work on [Patreon](https://www.patreon.com/serengil?repo=crypto) or [GitHub Sponsors](https://github.com/sponsors/serengil).
# License
This repository is licensed under MIT license - see [`LICENSE`](https://github.com/serengil/crypto/blob/master/LICENSE) for more details