Documentation
¶
Overview ¶
pkg/crypto/aead.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePoint ¶ added in v0.1.4
func EncodePoint(p *edwards25519.Point) string
EncodePoint returns the hex string of the compressed point
func EncodeScalar ¶ added in v0.1.4
func EncodeScalar(s *edwards25519.Scalar) string
EncodeScalar returns the hex string of the scalar
func RecoverPublicKey ¶ added in v0.1.4
func RecoverPublicKey(keyHex string) (*edwards25519.Point, error)
RecoverPublicKey takes a split private key (r, k) or a master private key (x) and returns the public key P. Input can be: - 32 bytes hex (Master Scalar x) - 64 bytes hex (Split Key r || k)
func SplitPrivateKey ¶ added in v0.1.4
func SplitPrivateKey(x *edwards25519.Scalar) (string, error)
SplitPrivateKey takes a master private key x and returns a new random split key (r, k) such that x = r + k (mod L). Returns hex encoded string of r || k (64 bytes)
Types ¶
type KeyPair ¶ added in v0.1.4
type KeyPair struct {
Private *edwards25519.Scalar
Public *edwards25519.Point
}
KeyPair holds the scalar private key and point public key
func GenerateMasterKey ¶ added in v0.1.4
GenerateMasterKey generates a random master private key (scalar) and its public key (point)
Click to show internal directories.
Click to hide internal directories.