Comments (2)
Hi @rakanalh!
I can imagine a bunch of different reasons why it's slow:
- The library was not really performance focused (see also #37), there might be some low hanging fruits to improve this, but a bit of profiling is needed.
- We use pure-rust crypto, which might not be super optimised.
- And IMHO most likely: keystore files can use different key derivation schemes with different params, the main point of this is to make it hard to brute force the keystore password (i.e. it's time consuming to decrypt the keystore file). Is it possible that your keyfile is simply using some large values?
Also make sure you run in --release
mode.
I'd suggest caching decrypted keyfile if performance is important, but note it has security implications.
from ethsign.
Thanks... i can't say the performance is better in --release
mode.
The use case is being able to list keys in ~/.ethereum/keystore
and trying to unlock one of the keys selected so that the SecretKey
is returned. Though i totally understand the brute-force attach scenario, but in comparison with the python implementation trying to achieve the same use-case, weird enough that the python one would perform better.
Edit: Referring to this https://github.com/ethereum/eth-keyfile#eth_keyfiledecode_keyfile_jsonkeyfile_json-password----private_key
from ethsign.
Related Issues (13)
- Support scrypt for key-derivation. HOT 1
- Support for saving files HOT 5
- Add quickCheck and test enc/dec and sign/verify
- See if it's worth introducing `lazy_static` HOT 1
- ethsign-crypto 0.1.0 from crates.io causes compile failure with ethsign 0.7.1 HOT 2
- Signature verification is very slow. HOT 2
- Can you consider supporting the generation of the keyfile with the Scrypt algorithm? HOT 1
- Switch to k256 crate
- How to verify signature with original message and eth address? HOT 2
- new release HOT 3
- ScretKey::sing & Signature::recover returned error
- Introduce `Message` type to simplify the API HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethsign.