Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateSecret ¶
CalculateSecret calculates the shared secret between the two KeyPairs using ECDH.
Types ¶
type KeyPair ¶
type KeyPair struct { PublicKey []byte // contains filtered or unexported fields }
KeyPair contains the public and private keys.
func (*KeyPair) GenerateKeys ¶
GenerateKeys generates a fresh P-256 keypair.
func (*KeyPair) SetPrivateKey ¶
SetPrivateKey sets the private key part of the KeyPair.
func (*KeyPair) SetPublicKey ¶
SetPublicKey sets the public key part of the KeyPair. This should be an uncompressed NIST P-256 point.
Click to show internal directories.
Click to hide internal directories.