package ecdh
Import Path
crypto/internal/fips140/ecdh (on go.dev )
Dependency Relation
imports 10 packages , and imported by one package
Package-Level Type Names (total 5, in which 4 are exported)
/* sort exporteds by: alphabet | popularity */
type Curve [P] (struct)
Type Parameters:
P: Point [P]
Fields (total 3, in which 1 is exported )
N []byte
/* 2 unexporteds ... */ /* 2 unexporteds: */
curve curveID
newPoint func() P
As Outputs Of (at least 4, all are exported )
func P224 () *Curve [*nistec .P224Point ]
func P256 () *Curve [*nistec .P256Point ]
func P384 () *Curve [*nistec .P384Point ]
func P521 () *Curve [*nistec .P521Point ]
As Inputs Of (at least 5, in which 4 are exported )
func ECDH [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
func GenerateKey [P](c *Curve [P], rand io .Reader ) (*PrivateKey , error )
func NewPrivateKey [P](c *Curve [P], key []byte ) (*PrivateKey , error )
func NewPublicKey [P](c *Curve [P], key []byte ) (*PublicKey , error )
/* at least one unexported ... */ /* at least one unexported: */
func ecdh [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
type PrivateKey (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
d []byte
// bigmod.(*Nat).Bytes output (fixed length)
pub PublicKey
Methods (total 2, both are exported )
(*PrivateKey) Bytes () []byte
(*PrivateKey) PublicKey () *PublicKey
As Outputs Of (at least 2, both are exported )
func GenerateKey [P](c *Curve [P], rand io .Reader ) (*PrivateKey , error )
func NewPrivateKey [P](c *Curve [P], key []byte ) (*PrivateKey , error )
As Inputs Of (at least 2, in which 1 is exported )
func ECDH [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
/* at least one unexported ... */ /* at least one unexported: */
func ecdh [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
type PublicKey (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
curve curveID
q []byte
// uncompressed nistec Point.Bytes output
Methods (only one, which is exported )
(*PublicKey) Bytes () []byte
As Outputs Of (at least 2, both are exported )
func NewPublicKey [P](c *Curve [P], key []byte ) (*PublicKey , error )
func (*PrivateKey ).PublicKey () *PublicKey
As Inputs Of (at least 2, in which 1 is exported )
func ECDH [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
/* at least one unexported ... */ /* at least one unexported: */
func ecdh [P](c *Curve [P], k *PrivateKey , peer *PublicKey ) ([]byte , error )
The pages are generated with Golds v0.8.4 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .