roynalnaruto / eth-keystore-rs Goto Github PK
View Code? Open in Web Editor NEWA minimalist library to interact with encrypted JSON keystores
License: Apache License 2.0
A minimalist library to interact with encrypted JSON keystores
License: Apache License 2.0
and their interfaces have changed a lot...
Currently files are written by convention using the UUID as the file name but I would prefer to follow the newer convention that geth
uses which is UTC date concatenated with the public address of the key.
Also I have a use case for the keystore where I am storing other private secrets (for TOTP authentication) which I would like to write using a fixed file name, eg: totp.json
.
If I do the work to allow callers to set the file name will you be willing to land the changes?
Thanks ๐
While it is not defined as part of the spec and could be interpreted as bad for privacy, geth
serializes the address that corresponds to the key as part of the keystore JSON. What do you think about adding an Option<[u8; 20]>
or Option<String>
that represents the address field to the EthKeyStore
?
Example of a key created by geth:
{
"address": "00000398232e2064f896018496b4b44b3d62751f",
"crypto": {
"cipher": "aes-128-ctr",
"ciphertext": "4f784cd629a7caf34b488e36fb96aad8a8f943a6ce31c7deab950c5e3a5b1c43",
"cipherparams": {
"iv": "76f07196b3c94f25b8f34d869493f640"
},
"kdf": "scrypt",
"kdfparams": {
"dklen": 32,
"n": 262144,
"p": 1,
"r": 8,
"salt": "1e7be4ce8351dd1710b0885438414b1748a81f1af510eda11e4d1f99c8d43975"
},
"mac": "5b5433575a2418c1c813337a88b4099baa2f534e5dabeba86979d538c1f594d8"
},
"id": "6c4485f3-3cc0-4081-848e-8bf489f2c262",
"version": 3
}
Relevant struct in geth
: https://github.com/ethereum/go-ethereum/blob/fb3a6528cfa49f623570575c4fe9e8a716cfcdf7/accounts/keystore/key.go#L67
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.