如何解密bitcoin.com json AES钱包备份?

时间:2019-06-01 23:27:24

标签: bitcoin

假设您拥有以下格式的bitcoin wallet.json备份:

{
  "ct" : "xyz",
  "iter" : 10000,
  "adata" : "",
  "salt" : "xyz",
  "cipher" : "aes",
  "ks" : 128,
  "v" : 1,
  "mode" : "ccm",
  "iv" : "xyz",
  "ts" : 64
}

其中xyz是唯一值,并且钱包已用密码加密。您可以使用哪些工具来解密此钱包格式?

1 个答案:

答案 0 :(得分:0)

您可以使用旧版本的Bitgo NodeJS包来解密钱包:

// index.js
var BitGoJS = require('./node_modules/bitgo/src/index.js');
var bitgo = new BitGoJS.BitGo();

console.log('Decrypting...');
var password = 'passw0rd';
var encryptedWallet = '{"iv":"xyz","v":1,"iter":10000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"xyz","ct":"xyz"}';
var decryptedString = bitgo.decrypt({ password: password, input: encryptedWallet });

console.log('Private key:', decryptedString);

// package.json
{
  "name": "Decrypt",
  "version": "1.0.0",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "bitgo": "1.0.0"
  }
}

passwordencryptedWallet变量替换为您自己的值后,您就可以npm installnpm start解密钱包了。