dcrd/dcrec
Josh Rickmar 62fa0661bd secp256k1: Remove Encrypt/Decrypt functions
The Encrypt and Decrypt functions implemented an encryption and
ciphering scheme using secp256k1 for ECDH key exchange and AES-256-CBC
for ciphering of message plaintext, combined with HMAC-SHA256 for
message authentication (as the CBC block mode is otherwise vulnerable
to message tampering).

This change removes these functions because they are unused within the
Decred project, and we wish to discourage their use.  Instead, we
recommend callers to derive a shared key using secp256k1 for use with
a modern symmetric encryption scheme.  This remains possible through
the ECDH function GenerateSharedSecret (which is not being removed at
this time) and using this key with an AEAD cipher such as AES-256-GCM
or ChaCha20-Poly1305.

Examples which demonstrated use of the Encrypt/Decrypt functions have
been replaced with an example demonstrating usage of
GenerateSharedSecret to encrypt a message using AES-256-GCM.

While here, the doc comment for GenerateSharedSecret has been updated
to reflect that the function has been changed to correctly conform to
RFC 5903.
2020-06-06 23:17:02 -05:00
..
edwards multi: remove superfluous fmt.Sprintf 2020-03-27 16:05:30 -05:00
secp256k1 secp256k1: Remove Encrypt/Decrypt functions 2020-06-06 23:17:02 -05:00
common.go multi: Address some golint complaints. 2018-10-10 19:50:06 -05:00
go.mod build: Tidy module sums (go mod tidy). 2019-03-25 11:37:00 -05:00