Documentation ¶
Overview ¶
Package key defines some types related to curve25519 keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Private ¶
type Private [32]byte
Private represents a curve25519 private key.
func (Private) B32 ¶
B32 returns k as the *[32]byte type that's used by the golang.org/x/crypto packages. This allocates; it might not be appropriate for performance-sensitive paths.
func (Private) SharedSecret ¶ added in v1.4.0
type Public ¶
type Public [32]byte
Public represents a curve25519 public key.
func NewPublicFromHexMem ¶ added in v0.98.0
NewPublicFromHexMem parses a public key in its hex form, given in m. The provided m must be exactly 64 bytes in length.
func (Public) B32 ¶
B32 returns k as the *[32]byte type that's used by the golang.org/x/crypto packages. This allocates; it might not be appropriate for performance-sensitive paths.
func (Public) MarshalText ¶ added in v0.98.0
func (Public) ShortString ¶ added in v0.98.0
ShortString returns the Tailscale conventional debug representation of a public key: the first five base64 digits of the key, in square brackets.