Documentation ¶
Overview ¶
Package ecdh implements ECDH encryption, suitable for OpenPGP, as specified in RFC 6637, section 8.
Index ¶
- Constants
- func Decrypt(priv *PrivateKey, vsG, c, curveOID, fingerprint []byte) (msg []byte, err error)
- func DeriveProxyParam(recipientKey, forwardeeKey *PrivateKey) (proxyParam []byte, err error)
- func Encrypt(random io.Reader, pub *PublicKey, msg, curveOID, fingerprint []byte) (vsG, c []byte, err error)
- func ProxyTransform(ephemeral, proxyParam []byte) ([]byte, error)
- func Validate(priv *PrivateKey) error
- type KDF
- type PrivateKey
- type PublicKey
Constants ¶
View Source
const ( KDFVersion1 = 1 KDFVersionForwarding = 255 )
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(priv *PrivateKey, vsG, c, curveOID, fingerprint []byte) (msg []byte, err error)
func DeriveProxyParam ¶
func DeriveProxyParam(recipientKey, forwardeeKey *PrivateKey) (proxyParam []byte, err error)
func ProxyTransform ¶
func Validate ¶
func Validate(priv *PrivateKey) error
Types ¶
type KDF ¶
type PrivateKey ¶
func GenerateKey ¶
func NewPrivateKey ¶
func NewPrivateKey(key PublicKey) *PrivateKey
func (*PrivateKey) MarshalByteSecret ¶
func (sk *PrivateKey) MarshalByteSecret() []byte
func (*PrivateKey) UnmarshalByteSecret ¶
func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error
Click to show internal directories.
Click to hide internal directories.