Documentation ¶
Index ¶
- func DeriveCurve25519PubKey(priKey []byte) ([]byte, error)
- func NewCurve25519Key() (key []byte)
- func PrivateKeyToCurve25519(privateKey ed25519.PrivateKey) []byte
- func PublicKeyToCurve25519(edBytes ed25519.PublicKey) ([]byte, error)
- func SharedKeyByCurve25519(priKey, pubKey []byte) ([]byte, error)
- func SharedKeyByEd25519(priKey ed25519.PrivateKey, pubKey ed25519.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveCurve25519PubKey ¶
DeriveCurve25519PubKey .
func NewCurve25519Key ¶
func NewCurve25519Key() (key []byte)
NewCurve25519Key generate rand [32]byte
func PrivateKeyToCurve25519 ¶
func PrivateKeyToCurve25519(privateKey ed25519.PrivateKey) []byte
PrivateKeyToCurve25519 converts an ed25519 private key into a corresponding curve25519 private key such that the resulting curve25519 public key will equal the result from PublicKeyToCurve25519.
func PublicKeyToCurve25519 ¶
PublicKeyToCurve25519 converts an Ed25519 public key into the curve25519 public key that would be generated from the same private key.
func SharedKeyByCurve25519 ¶
SharedKeyByCurve25519 generate shared key based on `curve25519` keys
func SharedKeyByEd25519 ¶
SharedKeyByEd25519 generate shared key based on `ed25519` keys
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.