ecdh

package
v0.0.0-...-75dfb8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2016 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

View Source
var Curve = elliptic.P256

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

func Encrypt(pub *ecdsa.PublicKey, in []byte) (out []byte, err error)

Encrypt secures and authenticates its input using the public key using ECDHE with AES-128-CBC-HMAC-SHA1.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL