You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.5 KiB

  1. # cryptofun [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucode/cryptofun)](https://goreportcard.com/report/github.com/arnaucode/cryptofun)
  2. Crypto algorithms from scratch. Academic purposes only.
  3. ## RSA
  4. https://en.wikipedia.org/wiki/RSA_(cryptosystem)#
  5. - [x] GenerateKeyPair
  6. - [x] Encrypt
  7. - [x] Decrypt
  8. - [x] Blind
  9. - [x] Blind Signature
  10. - [x] Unblind Signature
  11. - [x] Verify Signature
  12. - [x] Homomorphic Multiplication
  13. ## Paillier
  14. https://en.wikipedia.org/wiki/Paillier_cryptosystem
  15. - [x] GenerateKeyPair
  16. - [x] Encrypt
  17. - [x] Decrypt
  18. - [x] Homomorphic Addition
  19. ## Shamir Secret Sharing
  20. https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing
  21. - [x] create secret sharing from number of secrets needed, number of shares, random point p, secret to share
  22. - [x] Lagrange Interpolation to restore the secret from the shares
  23. ## Diffie-Hellman
  24. https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
  25. - [x] key exchange
  26. ## ECC
  27. https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
  28. - [x] define elliptic curve
  29. - [x] get point at X
  30. - [x] get order of a Point on the elliptic curve
  31. - [x] Add two points on the elliptic curve
  32. - [x] Multiply a point n times on the elliptic curve
  33. ## ECC ElGamal
  34. https://en.wikipedia.org/wiki/ElGamal_encryption
  35. - [x] ECC ElGamal key generation
  36. - [x] ECC ElGamal Encrypton
  37. - [x] ECC ElGamal Decryption
  38. ## ECC ECDSA
  39. https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
  40. - [x] define ECDSA data structure
  41. - [x] ECDSA Sign
  42. - [x] ECDSA Verify signature
  43. ---
  44. To run all tests:
  45. ```
  46. go test ./... -v
  47. ```