Documentation ¶
Overview ¶
Package ecdh implements ECDH encryption, suitable for OpenPGP, as specified in RFC 6637, section 8.
Package ecdh implements ECDH encryption, suitable for OpenPGP, as specified in RFC 6637, section 8.
Index ¶
- func Decrypt(priv *PrivateKey, vsG, m, curveOID, fingerprint []byte) (msg []byte, err error)
- func Encrypt(random io.Reader, pub *PublicKey, msg, curveOID, fingerprint []byte) (vsG, c []byte, err error)
- func X25519Decrypt(priv *PrivateKey, vsG, m, curveOID, fingerprint []byte) (msg []byte, err error)
- func X25519Encrypt(random io.Reader, pub *PublicKey, msg, curveOID, fingerprint []byte) (vsG, c []byte, err error)
- type KDF
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(priv *PrivateKey, vsG, m, curveOID, fingerprint []byte) (msg []byte, err error)
func X25519Decrypt ¶
func X25519Decrypt(priv *PrivateKey, vsG, m, curveOID, fingerprint []byte) (msg []byte, err error)
Types ¶
type PrivateKey ¶
func GenerateKey ¶
func X25519GenerateKey ¶
func X25519GenerateKey(rand io.Reader, kdf KDF) (priv *PrivateKey, err error)
X25519GenerateKey samples the key pair according to the correct distribution. It also sets the given key-derivation function and returns the *PrivateKey object along with an error.
Click to show internal directories.
Click to hide internal directories.