README 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # NOTE
  2. This implementation is direct fork of Kylom's implementation. I claim no authorship over this code apart from some minor modifications.
  3. Please be aware this code **has not yet been reviewed**.
  4. ecies implements the Elliptic Curve Integrated Encryption Scheme.
  5. The package is designed to be compliant with the appropriate NIST
  6. standards, and therefore doesn't support the full SEC 1 algorithm set.
  7. STATUS:
  8. ecies should be ready for use. The ASN.1 support is only complete so
  9. far as to supported the listed algorithms before.
  10. CAVEATS
  11. 1. CMAC support is currently not present.
  12. SUPPORTED ALGORITHMS
  13. SYMMETRIC CIPHERS HASH FUNCTIONS
  14. AES128 SHA-1
  15. AES192 SHA-224
  16. AES256 SHA-256
  17. SHA-384
  18. ELLIPTIC CURVE SHA-512
  19. P256
  20. P384 KEY DERIVATION FUNCTION
  21. P521 NIST SP 800-65a Concatenation KDF
  22. Curve P224 isn't supported because it does not provide a minimum security
  23. level of AES128 with HMAC-SHA1. According to NIST SP 800-57, the security
  24. level of P224 is 112 bits of security. Symmetric ciphers use CTR-mode;
  25. message tags are computed using HMAC-<HASH> function.
  26. CURVE SELECTION
  27. According to NIST SP 800-57, the following curves should be selected:
  28. +----------------+-------+
  29. | SYMMETRIC SIZE | CURVE |
  30. +----------------+-------+
  31. | 128-bit | P256 |
  32. +----------------+-------+
  33. | 192-bit | P384 |
  34. +----------------+-------+
  35. | 256-bit | P521 |
  36. +----------------+-------+
  37. TODO
  38. 1. Look at serialising the parameters with the SEC 1 ASN.1 module.
  39. 2. Validate ASN.1 formats with SEC 1.
  40. TEST VECTORS
  41. The only test vectors I've found so far date from 1993, predating AES
  42. and including only 163-bit curves. Therefore, there are no published
  43. test vectors to compare to.
  44. LICENSE
  45. ecies is released under the same license as the Go source code. See the
  46. LICENSE file for details.
  47. REFERENCES
  48. * SEC (Standard for Efficient Cryptography) 1, version 2.0: Elliptic
  49. Curve Cryptography; Certicom, May 2009.
  50. http://www.secg.org/sec1-v2.pdf
  51. * GEC (Guidelines for Efficient Cryptography) 2, version 0.3: Test
  52. Vectors for SEC 1; Certicom, September 1999.
  53. http://read.pudn.com/downloads168/doc/772358/TestVectorsforSEC%201-gec2.pdf
  54. * NIST SP 800-56a: Recommendation for Pair-Wise Key Establishment Schemes
  55. Using Discrete Logarithm Cryptography. National Institute of Standards
  56. and Technology, May 2007.
  57. http://csrc.nist.gov/publications/nistpubs/800-56A/SP800-56A_Revision1_Mar08-2007.pdf
  58. * Suite B Implementer’s Guide to NIST SP 800-56A. National Security
  59. Agency, July 28, 2009.
  60. http://www.nsa.gov/ia/_files/SuiteB_Implementer_G-113808.pdf
  61. * NIST SP 800-57: Recommendation for Key Management – Part 1: General
  62. (Revision 3). National Institute of Standards and Technology, July
  63. 2012.
  64. http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf