Minor correction to GenerateSharedSecret documentation. (#696)
This commit is contained in:
parent
2554caee59
commit
f893558d78
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ var (
|
|||
)
|
||||
|
||||
// GenerateSharedSecret generates a shared secret based on a private key and a
|
||||
// private key using Diffie-Hellman key exchange (ECDH) (RFC 4753).
|
||||
// public key using Diffie-Hellman key exchange (ECDH) (RFC 4753).
|
||||
// RFC5903 Section 9 states we should only return x.
|
||||
func GenerateSharedSecret(privkey *PrivateKey, pubkey *PublicKey) []byte {
|
||||
x, _ := pubkey.Curve.ScalarMult(pubkey.X, pubkey.Y, privkey.D.Bytes())
|
||||
|
|
Loading…
Add table
Reference in a new issue