New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for cracking Monero wallets #3151
Conversation
Things to do,
Update: Mapping the new Keccak "API" to our existing Keccak implementation doesn't look trivial. |
This is a very slow hash,
|
src/monero_fmt_plug.c
Outdated
/* | ||
* Format for cracking Monero wallet hashes. | ||
* | ||
* This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 2018!
src/monero_fmt_plug.c
Outdated
#define FORMAT_NAME "monero Wallet" | ||
#define FORMAT_TAG "$monero$" | ||
#define TAG_LENGTH (sizeof(FORMAT_TAG) - 1) | ||
#define ALGORITHM_NAME "AES+ChaCha+Various 64/" ARCH_BITS_STR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use to have +
in algo names. I'd prefer spaces or perhaps /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and perhaps it should say "pseudo AES" or something, since it's not a normal one.
src/monero_fmt_plug.c
Outdated
return saved_key[index]; | ||
} | ||
|
||
void cn_slow_hash(const void *data, size_t length, char *hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps create (and source) a slow_hash.h
?
I have addressed your code comments, thanks! I am now testing cracking of Unicode passwords. |
Update,
I don't like the duplicated implementations. Hopefully, we will be able to unify them somehow. |
Monero wallet code base also supports Note: Search for "old format before JSON wallet key file format" string in |
Maybe we don't need to support the old wallet format. Even the oldest downloadable release of Monero (i.e. 0.9.1 Hydrogen Helix) uses the new JSON wallet format.
|
In what way was it not trivial? I just had a (very) quick look and I didn't see anything weird. Can't you just write wrapper macros?
Do they produce different hashes? This should be investigated. I see there are flavours of Blake2... Here's test vectors for all of them: https://github.com/BLAKE2/BLAKE2/tree/master/testvectors You have my "permission" to merge this as-is, although I'd rather see these issues fixed first (or it probably won't happen at all). |
I have opened an issue about this code duplication stuff, and assigned it to myself. Hopefully, I will get the motivation and free time to work on it soon. |
NOTE: I still have to clean up this code!
This fixes #3144.