package ecdh
import "github.com/cloudflare/redoctober/ecdh"
Package ecdh encrypts and decrypts data using elliptic curve keys. Data is encrypted with AES-128-CBC with HMAC-SHA1 message tags using ECDHE to generate a shared key. The P256 curve is chosen in keeping with the use of AES-128 for encryption.
Index ¶
- Variables
- func Decrypt(priv *ecdsa.PrivateKey, in []byte) (out []byte, err error)
- func Encrypt(pub *ecdsa.PublicKey, in []byte) (out []byte, err error)
Variables ¶
Functions ¶
func Decrypt ¶
func Decrypt(priv *ecdsa.PrivateKey, in []byte) (out []byte, err error)
Decrypt authenticates and recovers the original message from its input using the private key and the ephemeral key included in the message.
func Encrypt ¶
Encrypt secures and authenticates its input using the public key using ECDHE with AES-128-CBC-HMAC-SHA1.
Source Files ¶
- Version
- v0.0.0-20241112165158-ce2ad370627b (latest)
- Published
- Nov 12, 2024
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 day ago –
Tools for package owners.