danielhavir / go-ecies

Golang implementation of the ECIES encryption scheme using AES, Poly1305 and P-256/P-521 elliptic curves
5 stars 4 forks source link

Elliptic Curve Integrated Encryption Scheme

Description

This is an ECIES Go implementation, a hybrid asymmetric–symmetric key encryption algorithm based on the Diffie–Hellman key exchange, specifically uses one of the following combinations:

  1. Mode P256
    • P-256 curve (FIPS 186-3, section D.2.3)
    • AES-128 for symmetric encryption with the CTR (Counter) mode
    • Poly1305 for message aunthentication (MAC with 32-bit key with length of 16bytes, i.e. 128 bits)
    • SHA-256 for hashing and key-derivation function
  2. Mode P521
    • P-521 curve (FIPS 186-3, section D.2.5)
    • AES-256 for symmetric encryption with the CTR (Counter) mode
    • Poly1305 for message aunthentication (MAC with 32-bit key with length of 16bytes, i.e. 128 bits)
    • SHA-512 for hashing and key-derivation function

Setup

Install Go

See the installation script

Uninstall Go

See the uninstallation script

Get Go's crypto library

Build

Run

Default options

Examples

Help

References

Reference implementations