ethereum / eth-keyfile

Tools for handling the encrypted keyfile format used to store private keys.
MIT License
79 stars 49 forks source link

Add zeros to iv #27

Closed valar999 closed 4 years ago

valar999 commented 4 years ago

What was wrong?

Parity does not accept iv with length != 16. It throws this error:

2020-02-19 17:49:37 UTC Invalid key file: "/opt/parity/keys/ethereum/keyfile" (Error("Invalid cipher params", line: 1, column: 149))
Consensus signer account not found for the current chain. You can create an account via RPC, UI or `parity account new --chain chain.json --keys-path /opt/parity/keys`.

How was it fixed?

iv.zfill(16) to make len(iv) always correct

Cute Animal Picture

![Cute animal picture]()