<p>You can use <a href="https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman" rel="nofollow">Elliptic Curve Diffie-Hellman</a>, assuming you have the public keys, and not just addresses.  Bitcoin addresses are derived from public keys, not public keys themselves, so you'd be required to share the raw public keys.</p>

<p><a href="http://andrea.corbellini.name/2015/05/30/elliptic-curve-cryptography-ecdh-and-ecdsa/" rel="nofollow">Here's another resource</a>, which links to a <a href="https://github.com/andreacorbellini/ecc/blob/master/scripts/ecdhe.py" rel="nofollow">python example</a> creating a shared symmetric key with the <a href="https://en.bitcoin.it/wiki/Secp256k1" rel="nofollow">secp256k1 curve</a> used by Bitcoin.</p>

CC BY-SA 3.0
2016-06-21T17:19:11.650Z
2016-06-21T17:19:11.650Z
Jestin
<p>Is there some means by which I could derive <code>symmetric keys</code> using bitcoin <code>public keys</code> or <code>HD Wallet public key</code> which I have shared with a second user.</p>

<private-key><public-key><encryption>
Derive symmetric keys
jgm
# Derive symmetric keys

(Asked by: username_0 on 2016-06-21)

Is there some means by which I could derive `symmetric keys` using bitcoin `public keys` or `HD Wallet public key` which I have shared with a second user.

**Tags:** private-key, public-key, encryption


---

## 1 answers

### Answer by username_1 on 2016-06-21. Score: 2 | Accepted answer

You can use [Elliptic Curve Diffie-Hellman](https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman), assuming you have the public keys, and not just addresses. Bitcoin addresses are derived from public keys, not public keys themselves, so you'd be required to share the raw public keys.

[Here's another resource](http://andrea.corbellini.name/2015/05/30/elliptic-curve-cryptography-ecdh-and-ecdsa/), which links to a [python example](https://github.com/andreacorbellini/ecc/blob/master/scripts/ecdhe.py) creating a shared symmetric key with the [secp256k1 curve](https://en.bitcoin.it/wiki/Secp256k1) used by Bitcoin.


---

