Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
decode aion binary keystore file using aion-rlp module
/*
use aion-rlp to decode an aion keystore v3 binary encoded file
the output is shown by index
the next step is decrypt aes-128-ctr
*/
const fs = require('fs');
const path = require('path');
const rlp = require('aion-rlp');
const keystorePath = "/path/to/my/keystore"
fs.readFile(keystorePath, function(err, buf) {
if (err !== undefined && err !== null) {
console.error("error reading file", keystorePath, err);
return;
}
rlp.decode(buf).forEach(function(buf, index) {
console.log("rlp index", index, buf.toString());
});
});
@tcrowe

This comment has been minimized.

Copy link
Owner Author

commented Oct 23, 2018

Index 3 must then be decoded as well to goto the next step

In my keystore it has aes-128-ctr and scrypt plain text possibly giving the clues for the next step of decryption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.