mirror of
https://github.com/arnaucube/cryptofun.git
synced 2026-02-28 05:16:46 +01:00
a440bab76a6171f33fa5e9ebfe7593ec10dcb838
cryptofun 
Crypto algorithms from scratch. Academic purposes only.
RSA
https://en.wikipedia.org/wiki/RSA_(cryptosystem)#
- GenerateKeyPair
- Encrypt
- Decrypt
- Blind
- Blind Signature
- Unblind Signature
- Verify Signature
- Homomorphic Multiplication
Paillier
https://en.wikipedia.org/wiki/Paillier_cryptosystem
- GenerateKeyPair
- Encrypt
- Decrypt
- Homomorphic Addition
Shamir Secret Sharing
https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing
- create secret sharing from number of secrets needed, number of shares, random point p, secret to share
- Lagrange Interpolation to restore the secret from the shares
Diffie-Hellman
https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
- key exchange
ECC
https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
- define elliptic curve
- get point at X
- Add two points on the elliptic curve
- Multiply a point n times on the elliptic curve
To run all tests:
go test ./... -v
Languages
Go
100%