Jump to content

xrp-vanity address generator


segra

Recommended Posts

Hey All,

Have been putting this together for some fun/learnings over the last couple of weeks.

Given an i7 @ 3.6GH/z; running with 8 threads, you can obtain  about 37,000 keys per second.

 

Multiple prefixes can be searched at once without really affecting performance

https://github.com/segrax/xrp-vanity

Quote

./xrpvanity 4 XRP rWET
xrp-vanity
Search Threads: 8

Prefix difficulty:              4553521 rXRP
Prefix difficulty:              4553521 rWET

[2017-08-19 20:36:53] rXRPmxYJkZv62ULvRbrGhsfsfgkFNhqQg => sh4tVp3FBCeda6WumVdhj43BuPWWL
[2017-08-19 20:38:40] rXRPpuecmxEVEjjbZoDe777UYg5tac9dH => saUk8nDtNevADo58Kc8y7raZFTRMd
[2017-08-19 20:39:22] rWETXYMtiF7qwAhCfURTqp1tytFiqPfvi => sh1ZFEi38oXyahqXfRbwt2HMKSxaJ
[37.38 Kkey/s][total 7394035][Prob 4.9%][50% in 39.2s]     

A few pieces, such as difficulty/probability are taken from samr7's Bitcoin vanity generator.


Have fun

Link to comment
Share on other sites

4 hours ago, segra said:

Have been putting this together for some fun/learnings over the last couple of weeks.

Given an i7 @ 3.6GH/z; running with 8 threads, you can obtain  about 37,000 keys per second.

Awesome!! That's about 10x faster than the node.js version.  (And this is why things like rippled are written in C++...)

A couple of questions:

1) Can it search only for strings at the beginning of addresses?
2) What's with the b58 table at the beginning of prefix.cpp? (I'm asking this as on a brief skim of the code I'm guessing the answer could unlock a bunch about what your code is doing.)

Thanks!

Link to comment
Share on other sites

Just now, Professor Hantzen said:

Awesome!! That's about 10x faster than the node.js version.  (And this is why things like rippled are written in C++...)

A couple of questions:

1) Can it search only for strings at the beginning of addresses?
2) What's with the b58 table at the beginning of prefix.cpp? (I'm asking this as on a brief skim of the code I'm guessing the answer could unlock a bunch about what your code is doing.)

Thanks!

  1. Yeah, at the moment
  2. Its the reverse of the Ripple base 58 alphabet,
    1. You search for 'rS'
    2. 'r' has the ASCII value 0x72
    3. g_Alphabet_B58_ReverseMap[0x72] == 0     (g_RippleAlphabet[0] = 'r)
    4. 'S' has the ASCII value 0x53
    5. g_Alphabet_B58_ReverseMap[0x53] == 0x19 (g_RippleAlphabet[0x19] = 'S')

g_RippleAlphabet = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz";

Link to comment
Share on other sites

2 minutes ago, T8493 said:

Where is the "secp256k1.cl" file in this repository?

 

Thats unused at this time,

it was the original goal to use the GPU, but after some discoveries while learning wNAF (used in big number multiplication), i decided to release it as just a CPU generator for the moment as it was considerably faster than any other xrp address generator available

 

Link to comment
Share on other sites

3 hours ago, Tinyaccount said:

Noice!    So do you have the r and s keys?   Idle hands do the devils work....   :) 

Haha,
I would hope anyone feeling the need to ask such a question, wouldn't believe the answer given by me.

But I know that this forum has a number of members who can review the code and see if anything malicious is going on

Link to comment
Share on other sites

2 minutes ago, Professor Hantzen said:

Huh - I just saw ".cpp" and assumed.  Never heard of OpenCL - the main.cpp sure looks like C++ to me?

OpenCL is a version of C for GPUs, originally I started working on this to implement some of it using a GPU, I never removed the file from the git repo as i dont consider this finished yet, its just at the CPU only stage right now. Although I must admit, i have no idea how much the GPU will speed things up from here :)

 

Link to comment
Share on other sites

14 minutes ago, segra said:
  1. Yeah, at the moment
  2. Its the reverse of the Ripple base 58 alphabet,
    1. You search for 'rS'
    2. 'r' has the ASCII value 0x72
    3. g_Alphabet_B58_ReverseMap[0x72] == 0     (g_RippleAlphabet[0] = 'r)
    4. 'S' has the ASCII value 0x53
    5. g_Alphabet_B58_ReverseMap[0x53] == 0x19 (g_RippleAlphabet[0x19] = 'S')

g_RippleAlphabet = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz";

Thanks - why do you need to map it this way?  The code is well-commented - but maybe I'm missing the comment at the beginning of prefix.cpp that explains what it does overall?

Link to comment
Share on other sites

13 minutes ago, Professor Hantzen said:

Thanks - why do you need to map it this way?  The code is well-commented - but maybe I'm missing the comment at the beginning of prefix.cpp that explains what it does overall?

 

Instead of base58 encoding the entire AccountID for a generated public key, it simply compares the value of it to the range of the prefix

eg. the prefix 'rS' multiples out to a 'big number' range of 

 

Low: 04BA6627CBA86E6B6102C76096E28AC9C917FBD680000000
High: 04EAD0A44471BA84277387AC220A52E65641E730FFFFFFFF

Any public key (the SHA256 and RIPEMD160 result) which matches the 'rS' prefix, will be a big number in between the low and high

 

Maybe an easier way to look at it, is it searches for something like >= rS00000000000000000000000 and <= rSFFFFFFFFFFFFFFFFFFFFFFF (this 2 values are 100% made up for visual explanation purposes)

Edited by segra
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...