<p>It seems like you are looking for an encryption scheme which allows operations to be performed on cipher text, which would result in the same as the same operations being applied to the unencrypted data.</p>

<p><strong>Example: Homomorphic encryption which supports addition</strong></p>

<ul>
<li>E(data0) + E(data1) = E(data0 + data1)</li>
<li>k being the encryption key, and E(...) the encrypted cipher text.</li>
</ul>

<p><strong>In then case of HD keys, the desired encryption scheme would need to enable the following</strong></p>

<ul>
<li>hd_child_derivation(E(m)) = E( hd_child_derivation(m) )</li>
<li>hd_child_derivation() involving a HMACSHA512 function and EC-point operations</li>
</ul>

<p>I am not sure which encryption schemes would fulfil the above requirements, but fully homomorphic encryption schemes seem to be possible: <a href="https://crypto.stanford.edu/craig/craig-thesis.pdf" rel="nofollow noreferrer">https://crypto.stanford.edu/craig/craig-thesis.pdf</a> </p>

CC BY-SA 4.0
2019-02-06T18:06:01.897Z
Thanks for the answer. I'll try to build something upon it and check if it's possible =)
Kyll
CC BY-SA 4.0
2019-02-05T16:46:06.267Z
2019-02-05T16:46:06.267Z
James C.
<p>Given either a seed or the private part of a master node, that is encrypted using AES-256-CBC (or another secured symmetrical cypher) with key <code>K</code>, is it possible to run derivation such as described in BIP32 to obtain derived private keys also encrypted using the same algorithm and the same key <code>K</code>?</p>

CC BY-SA 4.0
2019-02-05T15:31:36.980Z
Though EC-point operations exhibit homomorphic properties: (a+b)G = A+B, homomorphic encryption of a HD key pair and deriving its encrypted child is not possible from what I can think of:

Such an encryption scheme would need both encrypted and unencrypted key pass through the HD child derivation step with their relationship intact. Given that the HD child derivation involves a one-way HMACSHA512 function, this seems very hard.
James C.
CC BY-SA 4.0
2019-02-05T16:18:50.063Z
@JamesC. Shoot. If you can provide some relevant links and a more detailed explanation, feel free to turn your comment into an answer.
Kyll
CC BY-SA 4.0
2019-02-05T21:52:01.310Z
look into bip38. this does what you want. i am not a cryptologist so can't explain how it does it but it does do it.
Abdussamad
<bip32-hd-wallets><encryption>
Is it possible to run HD derivation with an encrypted master node or seed?
Kyll
# Is it possible to run HD derivation with an encrypted master node or seed?

(Asked by: username_0 on 2019-02-05)

Given either a seed or the private part of a master node, that is encrypted using AES-256-CBC (or another secured symmetrical cypher) with key `K`, is it possible to run derivation such as described in BIP32 to obtain derived private keys also encrypted using the same algorithm and the same key `K`?

**Tags:** bip32-hd-wallets, encryption

> **Comments:**
> **username_1**: Though EC-point operations exhibit homomorphic properties: (a+b)G = A+B, homomorphic encryption of a HD key pair and deriving its encrypted child is not possible from what I can think of:  Such an encryption scheme would need both encrypted and unencrypted key pass through the HD child derivation step with their relationship intact. Given that the HD child derivation involves a one-way HMACSHA512 function, this seems very hard.  
> **username_0**: @JamesC. Shoot. If you can provide some relevant links and a more detailed explanation, feel free to turn your comment into an answer.  
> **username_2**: look into bip38. this does what you want. i am not a cryptologist so can't explain how it does it but it does do it.  

---

## 1 answers

### Answer by username_1 on 2019-02-05. Score: 1

It seems like you are looking for an encryption scheme which allows operations to be performed on cipher text, which would result in the same as the same operations being applied to the unencrypted data.

**Example: Homomorphic encryption which supports addition**

* E(data0) + E(data1) = E(data0 + data1)
* k being the encryption key, and E(...) the encrypted cipher text.

**In then case of HD keys, the desired encryption scheme would need to enable the following**

* hd\_child\_derivation(E(m)) = E( hd\_child\_derivation(m) )
* hd\_child\_derivation() involving a HMACSHA512 function and EC-point operations

I am not sure which encryption schemes would fulfil the above requirements, but fully homomorphic encryption schemes seem to be possible: <https://crypto.stanford.edu/craig/craig-thesis.pdf>

> **Comments:**
> **username_0**: Thanks for the answer. I'll try to build something upon it and check if it's possible =)  

---

