ed25519

package
v0.0.0-...-af99a29 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveCurve25519PubKey

func DeriveCurve25519PubKey(priKey []byte) ([]byte, error)

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

func PublicKeyToCurve25519(edBytes ed25519.PublicKey) ([]byte, error)

PublicKeyToCurve25519 converts an Ed25519 public key into the curve25519 public key that would be generated from the same private key.

func SharedKeyByCurve25519

func SharedKeyByCurve25519(priKey, pubKey []byte) ([]byte, error)

SharedKeyByCurve25519 generate shared key based on `curve25519` keys

func SharedKeyByEd25519

func SharedKeyByEd25519(priKey ed25519.PrivateKey, pubKey ed25519.PublicKey) ([]byte, error)

SharedKeyByEd25519 generate shared key based on `ed25519` keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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