Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDH ¶
type ECDH interface { GenerateKey(io.Reader) (crypto.PrivateKey, crypto.PublicKey, error) Marshal(crypto.PublicKey) []byte Unmarshal([]byte) (crypto.PublicKey, bool) }
ECDH 秘钥交换算法的主接口
func NewCurve25519ECDH ¶
func NewCurve25519ECDH() ECDH
NewCurve25519ECDH 使用密码学家Daniel J. Bernstein的椭圆曲线算法:Curve25519来创建ECDH实例 因为Curve25519独立于NIST之外, 没在标准库实现, 需要单独为期实现一套接口来支持ECDH
func NewEllipticECDH ¶
NewEllipticECDH 指定一种椭圆曲线算法用于创建一个ECDH的实例 关于椭圆曲线算法标准库里面实现了4种: 见crypto/elliptic
Click to show internal directories.
Click to hide internal directories.