This repository contains implementations of various cryptographic algorithms and schemes in the Go programming language.
- Purpose: An arbitrary-precision arithmetic library. This is often a fundamental building block for many cryptographic algorithms.
- Usage:
cd bignumber go run main.go
- Purpose: Demonstrates Elliptic Curve Integrated Encryption Scheme (ECIES) using the
ecies/go/v2library. ECIES is a hybrid encryption scheme providing data confidentiality. - Usage:
cd curve go run main.go
- Purpose: An implementation of the ElGamal encryption scheme. ElGamal is an asymmetric key encryption algorithm for public-key cryptography. This project supports encryption, decryption, signing, and verification.
- Usage:
cd elgamal go run main.go --help # To see available flags and options # Example: Encrypt a message go run main.go --encrypt --p 23 --alfa 5 --B 10 --m 9
- Purpose: An implementation of the SHA-1 (Secure Hash Algorithm 1) hashing function. SHA-1 produces a 160-bit (20-byte) hash value.
- Usage:
cd sha1 go run main.go # Hashes a predefined string go run main.go test.txt # Hashes the content of test.txt (create this file or use another)
To build any of the projects, navigate to the project's directory and use the go build command:
cd <project-directory>
go buildFor example, to build the bignumber project:
cd bignumber
go buildContributions are welcome! Please feel free to submit a pull request or open an issue.