diff options
| author | d0x471b <0x471@protonmail.com> | 2022-12-31 03:45:30 +0300 |
|---|---|---|
| committer | d0x471b <0x471@protonmail.com> | 2022-12-31 03:45:30 +0300 |
| commit | 0f1d7d51de1baa21256fdb7ddafe54aab66172f7 (patch) | |
| tree | 30373f9b64ba6301096f26cdade55ebac4f5e59f /cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go | |
| parent | 517ad8d13a6b23328927154226575605be70669f (diff) | |
Diffstat (limited to 'cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go')
| -rw-r--r-- | cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go b/cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go new file mode 100644 index 0000000..88d93e2 --- /dev/null +++ b/cli/vendor/github.com/btcsuite/btcd/btcec/v2/ciphering.go @@ -0,0 +1,16 @@ +// Copyright (c) 2015-2016 The btcsuite developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +package btcec + +import ( + secp "github.com/decred/dcrd/dcrec/secp256k1/v4" +) + +// GenerateSharedSecret generates a shared secret based on a private key and a +// 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 { + return secp.GenerateSharedSecret(privkey, pubkey) +} |
