Skip to content

Commit

Permalink
add msb x coord cracking
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancdotorg committed Jul 25, 2016
1 parent c7d96b4 commit 0442966
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions brainflayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ static void ehash160(hash160_t *h, const unsigned char *upub) {
memcpy(h->uc, hash+12, 20);
}

/* msb of x coordinate of public key */
static void xhash160(hash160_t *h, const unsigned char *upub) {
memcpy(h->uc, upub+1, 20);
}



Expand Down Expand Up @@ -314,6 +318,7 @@ void usage(unsigned char *name) {
u - uncompressed address\n\
c - compressed address\n\
e - ethereum address\n\
x - most signifigant bits of x coordinate\n\
-t TYPE inputs are TYPE - supported types:\n\
sha256 (default) - classic brainwallet\n\
sha3 - sha3-256\n\
Expand Down Expand Up @@ -520,6 +525,9 @@ int main(int argc, char **argv) {
case 'e':
pubhashfn[i].fn = &ehash160;
break;
case 'x':
pubhashfn[i].fn = &xhash160;
break;
default:
bail(1, "Unknown hash160 type '%c'.\n", copt[i]);
}
Expand Down

0 comments on commit 0442966

Please sign in to comment.