ETH钱包Keystore格式

06/02/2018 08:15 上午 posted in  Ethereum

根据ether framework 创建钱包成功之后返回的JSON:

{
  "x-ethers" : {
    "mnemonicCiphertext" : "4ec6ff1c1307fde22f54535d8f2c49ac",
    "version" : "0.1",
    "mnemonicCounter" : "e6225f53c68204cc0590505b0b0d9cfb",
    "client" : "ethers\/iOS",
    "gethFilename" : "UTC--2018-06-02T09-15-17.0Z--ec34c8681972b22a79f641f42cfdb0e22bffcd64"
  },
  "id" : "39362BF0-1571-41C9-BA5D-1D2E96FB1F8A",
  "address" : "ec34c8681972b22a79f641f42cfdb0e22bffcd64",
  "Crypto" : {
    "ciphertext" : "02a2381e0712b4911e231688ecd84470cc75221192d70f74b5255dc59ec8ba90",
    "cipherparams" : {
      "iv" : "8a92b1f77ad3f0404fdcaf9189cb0027"
    },
    "kdf" : "scrypt",
    "kdfparams" : {
      "r" : 8,
      "p" : 1,
      "n" : 262144,
      "dklen" : 32,
      "salt" : "a6ab1e929bef72f21e1af6d12ed6bdf0296b3d224491274f1fbd1b5a4074e9b4"
    },
    "mac" : "b16fe2af2ec678ee5f08e5d4ca748778b5eaa26003d5bcee71cd08b68f76e60a",
    "cipher" : "aes-128-ctr"
  },
  "version" : 3
}

jsonString String "{"isHDWallet":true,"id":"ec14e04d-6ed1-431e-8873-a9bd069d9534","crypto":{"ciphertext":"16c7a5a56b2ee6a94f95d940b336b99c73450c4cb1f74bb2f532821381efd507f87d8c1ba71b1a35712d8eb36a75895633bf86e85d7ff16ef27380a8209d2512f91b5c4ed299f815eed94d17cc1b79e42dbc35d73f93b030489cdef510b5b687","cipherparams":{"iv":"3d65a2eb4f68012503d1808f11f8cb4b"},"kdf":"scrypt","kdfparams":{"r":6,"p":1,"n":4096,"dklen":32,"salt":"820f1b08b5ab9caf189ee922abf98435fa50b057c6aa6ebd46dd07605c08dd98"},"mac":"726aec73aca75e0704c5322683ec291e50ee861f9dfd3dd7929a159b3c364c8e","cipher":"aes-128-cbc"},"pathToAddress":{"m\/44'\/60'\/0'\/0\/0":"0xC59A230342A13eC78141B3D20215eb78C07c0a27"},"rootPath":"m\/44'\/60'\/0'\/0","version":3}"