<p>The encrypted JSON file likely contains individual private keys, or seed bytes. The first step would be to actually decrypt it, which can be done via openssl:</p>

<pre><code>openssl aes-256-cbc -d -a -in Test-Copaybackup.aes.json -out wallet.txt
</code></pre>

<p>Once you have that, looking at the decrypted file should tell you what kind of data you're working with. If you see regular private keys, just import them normally. If you see a mnemonic seed or something similar, you'll need to convert it to keys.</p>

CC BY-SA 3.0
2018-03-23T03:54:22.243Z
I've run this command and entered the decryption password. But it shows "error reading input file". Is aes version is different? I couldn't find the aes version used by copay from anywhere.
Prayag k
CC BY-SA 3.0
2018-03-23T05:22:02.790Z
when I removed the -a flag, error changed to "bad magic number"
Prayag k
CC BY-SA 3.0
2018-03-22T18:28:49.270Z
2018-03-22T18:28:49.270Z
Raghav Sood
<p>for (!) testnet accounts I use the following to encrypt the copay exported files: </p>

<p><a href="https://bitwiseshiftleft.github.io/sjcl/demo/" rel="nofollow noreferrer">https://bitwiseshiftleft.github.io/sjcl/demo/</a></p>

<p>add the password in it´s green field and the content of the copay exported file in the blue box and klick decrypt. the decrypted content appears in the red area.</p>

CC BY-SA 4.0
2020-04-27T13:14:37.833Z
2020-04-27T13:14:37.833Z
Michael
<p>I have a bitcoin testnet account in copay wallet. I want to import its private key in bitcoind. So, I exported the private key, but they were encrypted. I got a</p>

<blockquote>
  <p>Test-Copaybackup.aes.json </p>
</blockquote>

<p>file. Therefore, I can't use importwallet rpc in bitcoin-cli, since it requires an unlocked wallet or an unencrypted wallet. What else I do?</p>

<bitcoin-core><bitcoind><copay>
Import private key to bitcoind
Prayag k
# Import private key to bitcoind

(Asked by: username_0 on 2018-03-22)

I have a bitcoin testnet account in copay wallet. I want to import its private key in bitcoind. So, I exported the private key, but they were encrypted. I got a

> Test-Copaybackup.aes.json

file. Therefore, I can't use importwallet rpc in bitcoin-cli, since it requires an unlocked wallet or an unencrypted wallet. What else I do?

**Tags:** bitcoin-core, bitcoind, copay


---

## 2 answers

### Answer by username_1 on 2018-03-22. Score: 1

The encrypted JSON file likely contains individual private keys, or seed bytes. The first step would be to actually decrypt it, which can be done via openssl:

```
openssl aes-256-cbc -d -a -in Test-Copaybackup.aes.json -out wallet.txt

```

Once you have that, looking at the decrypted file should tell you what kind of data you're working with. If you see regular private keys, just import them normally. If you see a mnemonic seed or something similar, you'll need to convert it to keys.

> **Comments:**
> **username_0**: I've run this command and entered the decryption password. But it shows "error reading input file". Is aes version is different? I couldn't find the aes version used by copay from anywhere.  
> **username_0**: when I removed the -a flag, error changed to "bad magic number"  

---

### Answer by username_2 on 2020-04-27. Score: 0

for (!) testnet accounts I use the following to encrypt the copay exported files:

<https://bitwiseshiftleft.github.io/sjcl/demo/>

add the password in it´s green field and the content of the copay exported file in the blue box and klick decrypt. the decrypted content appears in the red area.


---

