Understanding cryptographic algorithms by implementing them in Go
grypto is a collection of cryptographic algorithms implemented in go.
It also contains a simple CLI that can be used to test and demonstrate the different algorithms implemented in the grypto library.
It was implemented by Tim Ebert (@timebertt) as a practical exercise to understand the fundamental mathematical concepts behind cryptographic algorithms that were discussed in a lecture on cryptography in his Computer Science Master studies. 🎓
If you want to get a deeper understanding of the basics of cryptography, maybe you will find this collection helpful. Enjoy! 🤓📖
Please use this only for learning purposes!
The grypto library and CLI were build only to demonstrate and understand the basics of different cryptographic algorithms. There is no guarantee on correctness, security and quality of the implementation. The implementation might not be compatible with proper implementations of the different algorithms and might be vulnerable to attacks. Please use the respective official implementations of the Go standard library (see https://golang.org/pkg/crypto/) in your Go applications.
You can try out grypto by downloading the CLI:
$ go get -u github.com/timebertt/grypto/grypto
Encrypt some secret messages:
$ grypto caesar encrypt -K 3 -I "Caesar Cipher is old but not very secure"
Fdhvdu Flskhu lv rog exw qrw yhub vhfxuh
See what else is possible with grypto:
$ grypto help
Have fun! 🎉
- Caesar Cipher (
grypto caesar
) - (Extended) Euclidean Algorithm (
grypto euclid
) - Modular Exponentiation (
grypto exp
) - Discrete Logarithm (via Enumeration) (
grypto dlog
) - Order of elements in residue system (
grypto order
) - Subgroup generated by elements in residue system (
grypto subgroup
)
More to come! 🚀
Please see the following references further and deeper explanations on the implemented cryptographic algorithms:
- Johannes Buchmann: Einführung in die Kryptographie, Introduction to Cryptography
- Christof Paar, Jan Pelzl: Kryptografie verständlich, Understanding Cryptography, https://crypto-textbook.com/