Pages:
Author

Topic: VanitySearch (Yet another address prefix finder) (Read 32072 times)

copper member
Activity: 577
Merit: 171
Hey guys

Please provide feedback on any vulnerabilities for https://github.com/raritycheck/BTCMiniKeyGenerator
We want to use this to create BTC mini private keys for our various projects.

Can vanitygen or vanitysearch create mini keys, please? (We dont need vanity addresses just want 30 char min keys)

Regards
Team RC
member
Activity: 351
Merit: 37

The other version was a fork from NotATether where he tried to implement RegEx funcationality. It does not work correctly and you should avoid using it. Just my coins


idk who is author but there's vanitygen which supports regex and is included say to archlinux via aur .
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Why are Legacy and Segwit search times so astonishingly long vs Bech32 search time?
Bech32 addresses aren't case sensitive. Or better: they're only lower-case, so there are less possibilities per position.
legendary
Activity: 3822
Merit: 2703
Evil beware: We have waffles!
Interesting: Just ran some tests to generate my new non-legacy donation address seen in my sig.
EDIT: Having issues importing the new Bech32 address into Blockchain.com so reverted back to original Legacy tips address

Tested times using Legacy (1), Segwit (3) and Bech32 (btc1q) prefixes and was astounded at the reported times to generate it. For all of them the same 9 characters (FuzzyWarm) were added to the prefix.

Hardware is my ThinkPad P15 workstation laptop using Vanity Search1.19
CPU is Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, reports 57% usage
16GB ram
GPU is nVidia Quadro T1000 (14x64 cores), reports 80% usage
All runs are using GPU and 6 of the 12 core threads.

Speeds:
   Legacy speed:  [541.45 Mkey/s][GPU 516.45 Mkey/s][Total 2^34.46][Prob 0.0%][50% in 44.5d][Found 0]
   Segwit speed:  [288.25 Mkey/s][GPU 271.25 Mkey/s][Total 2^31.43][Prob 0.0%][50% in 83.6d][Found 0]
   Bech32 speed: [545.76 Mkey/s][GPU 515.95 Mkey/s][Total 2^32.36][Prob 0.0%][50% in 12:24:35][Found 0]

Summary of initial reported times:
    Legacy 44.5 DAYS
    Segwit 83.6 DAYS
    Bech32 12.5 hrs

Bech32 is the clear winner for speed and was the only one allowed to run to completion & generate my new address, run time was 17hrs 42min.

Question for OP: Why are Legacy and Segwit search times so astonishingly long vs Bech32 search time?
newbie
Activity: 3
Merit: 0
ok, now it makes sense, thank you guys for clarifying that for me, appreciate it 👍
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
It's from "https://github.com/JeanLucPons/VanitySearch/releases", I thought that this is the official version but if it's not, where can I get the official version?
That link is the official version.
The command provided by NotATether will only work in his experimental build.

When I try to run "c:\Users\Main\VanitySearch.exe -t 8 '^1[fF][iI].{2,4}[sS][hH]'" in Windows, it says "Ignoring prefix " -t 8 '^1[fF][iI].{2,4}[sS][hH]'" (must start with 1 or 3 or bc1q)", does anyone know what I'm doing wrong?
For the official version, just start it with your preferred args followed by your address prefix.
e.g.: VanitySearch.exe -stop bc1qsegwt
use: VanitySearch.exe -h to see all the available options.
hero member
Activity: 630
Merit: 731
Bitcoin g33k
Simply said, the version you're referring to is broken and not working correctly. This is an unofficial version where NotATether tried to implement regex funcationality but it does not work as expected, there are lots of bugs. I do not recommend to use and rely on it. Your mileage may vary. Good luck though

citb0in

It's from "https://github.com/JeanLucPons/VanitySearch/releases", I thought that this is the official version but if it's not, where can I get the official version?

You obviously confusing two different programs. The original one is from JLP and this version does not support RegEx. This genuine applications works fine ! but it does not support RegEx

The other version was a fork from NotATether where he tried to implement RegEx funcationality. It does not work correctly and you should avoid using it. Just my coins
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Simply said, the version you're referring to is broken and not working correctly. This is an unofficial version where NotATether tried to implement regex funcationality but it does not work as expected, there are lots of bugs. I do not recommend to use and rely on it. Your mileage may vary. Good luck though

citb0in

Don't use that version, it's been unmaintained for a couple of years  Smiley
newbie
Activity: 3
Merit: 0
Simply said, the version you're referring to is broken and not working correctly. This is an unofficial version where NotATether tried to implement regex funcationality but it does not work as expected, there are lots of bugs. I do not recommend to use and rely on it. Your mileage may vary. Good luck though

citb0in

It's from "https://github.com/JeanLucPons/VanitySearch/releases", I thought that this is the official version but if it's not, where can I get the official version?
hero member
Activity: 630
Merit: 731
Bitcoin g33k
Simply said, the version you're referring to is broken and not working correctly. This is an unofficial version where NotATether tried to implement regex funcationality but it does not work as expected, there are lots of bugs. I do not recommend to use and rely on it. Your mileage may vary. Good luck though

citb0in
newbie
Activity: 3
Merit: 0
WOW you are really true code master man, how long do you think will this take you to have a working GPU build?

Well, I wouldn't call myself that.  Wink

citb0in actually asked me that question already, and we both thought it would take max. a week or two. This was in the beginning of January. But unfortunately (among other things) I discovered that adding the GPU support wasn't as simple as changing a few lines of code (and I refunded him his money last night).

So as it stands, there's only a working CPU build - just now I pushed the code that will enable you to run queries like "./VanitySearch ^1abc" to search for 1abc prefix at the beginning, and also you could already do ./VanitySearch 1abc$ to search for 1abc at the end of the address, and some other things I will list below.

Wildcard searches with *, +, and {m,n} work but they are not very useful as current hardware can only reasonably search for 6-7 characters at a time:

(difficulty estimation is currently wrong for {m,n} and will report much longer time than actual)


Character classes and quantifier example:

./VanitySearch -t 8 '^1[fF][iI].{2,4}[sS][hH]'

Code:
time ./VanitySearch -t 8 '^1[fF][iI].{2,4}[sS][hH]'
VanitySearch v1.19
Benchmarking regex matching speed of prefix "^1[fF][iI].{2,4}[sS][hH]" (case sensitive) for 1 second, please wait... done
Difficulty: 9225725494
Search: ^1[fF][iI].{2,4}[sS][hH] [Compressed]
Start Tue Feb  7 12:12:39 2023
Base Key: CA21EDE5142917948E79FEFD98EBBB2E485ECA54E1C814B482C39A2C8B8D5B37
Number of CPU thread: 8

PubAddress: 1FiF7Sh6Ei8ezjMASNdED1ixyTZ9HY4DbP
Priv (WIF): p2pkh:Kxsq34CD5UBCqhRMZi4WNH1oQjnr3FHjzQqS2kEDb6CN3EpZYauo
Priv (HEX): 0x317261FB480D6C92F777B4F3B18176433CAED4D61E8A3E507A0414E3A6BCCAD4

PubAddress: 1FiZ9bmpedPk1ksHRtUtZEDZ2n7fNz68LP
Priv (WIF): p2pkh:L3zdVyH3kWaRtzJ4eLEc6FwcbrzBRpVgoPZjCC3Gq1d2ZCEENuM6
Priv (HEX): 0xCA21EDE5142917948E79FEFD98EBBB31485ECA54E1C814B782C39A2C8B8D6ACE
[0.20 Mkey/s][GPU 0.00 Mkey/s][Total 2^18.63][Prob 0.0%][50% in 08:45:41][Found 2]
PubAddress: 1FidbgsHsR9B2iEu5KkfYxRE7SPjadWSiS
Priv (WIF): p2pkh:L12uW3KSdEkLQzPutC9E6cpGJe6w9R9udHi4tLCrVEJKkCeikoJJ
Priv (HEX): 0x71CA8897DFCA52F8649A489E5C34216517D724D6E9710FE937FEE419F019AA9F
[0.19 Mkey/s][GPU 0.00 Mkey/s][Total 2^19.55][Prob 0.0%][50% in 09:15:06][Found 3]  ^C

real    0m8.447s
user    0m51.466s
sys     0m0.075s

Note: Make sure you put the regex in single quotes '' otherwise bash might mess them up!

Anyway, I'm going to try to optimize the CPU build first before working on the GPU (regex mode is currently 2x slower than non-regex mode), maybe put some SSE or AVX in there somehow.

When I try to run "c:\Users\Main\VanitySearch.exe -t 8 '^1[fF][iI].{2,4}[sS][hH]'" in Windows, it says "Ignoring prefix " -t 8 '^1[fF][iI].{2,4}[sS][hH]'" (must start with 1 or 3 or bc1q)", does anyone know what I'm doing wrong?
newbie
Activity: 13
Merit: 5
Is it possible to remove the "base key" or atleast edit the actual "base key" ??

I understand that you can set your own seed, but you cannot select an exact base key.

How can you edit the base key, or atleast - how is the base key calculated so that this can be reversed?
hero member
Activity: 630
Merit: 731
Bitcoin g33k
Brothers, I have input file format like this:
...

foo
bar
lore ipsum...
blah
bla

This has now become totally off-topic again. Please stick to the topic, the thread is unnecessarily cluttered. This is in the interest of everyone. VanilaSearch has created a new account just to spam this thread, even choosing a similarity to the topic. Don't feed the troll.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
So it is my own lottery where a winner is only me.

Apart of the fact you are just wasting electricity (you'd be better with mining some altcoins), but you don't care about this detail, I want only to add that if (the hell freezes off and) you jackpot, if you move those coins away that's called stealing.
legendary
Activity: 3808
Merit: 7912
etc, all about additionally 10 millions similar strings.
That's cute. You're wasting computing power to prove to yourself that you'll never find the private key to someone else's Bitcoin address by brute-forcing it. Keep it up, convince yourself how secure Bitcoin is.

Thank you for your wishes.
Do you think my input file is correct? And why some errors or warnings pop up when I load it?

 So rather than take LoyceV's advice about the larger problem you have using VanitySearch with such an input file, you prefer to fix the minor issue of computer memory allocation to continue the insanity?  Maybe it's cold where you are and you need a warm computer to take the chill off.  To each his own.  Provided you have enough memory available, here's the potential fix:

 
The memory needed to transfer results from GPU to CPU depends on the number of prefixes your search for, the number of threads and the rareness of the prefix(es).
The maximum number of hits per kernel call is maxFound = gridSize*1024*6
If you have enough memory available, you can specify -m gridSize*1024*6 to avoid the error.

Note: The corresponding amount of shared memory needed is 28*maxFound + 4 bytes.

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
etc, all about additionally 10 millions similar strings.
That's cute. You're wasting computing power to prove to yourself that you'll never find the private key to someone else's Bitcoin address by brute-forcing it. Keep it up, convince yourself how secure Bitcoin is.
newbie
Activity: 1
Merit: 0
I tried running it on 4090 and below is my speed. Is it a good speed?
[...]
GPU: GPU #0 NVIDIA GeForce RTX 4090 (128x0 cores) Grid(1024x128)
[8645.60 Mkey/s][GPU 8554.04 Mkey/s][Total 2^37.74][Prob 0.0%][50% in 160.9d][Found 0]

The performance of the RTX 4090 is pretty amazing indeed, not just for games. You may reach even higher results by using something like "4096,128" as the grid option. At least, I get between 9300 and 9600 Mkey/s.

Given that the CPU (AMD 7800X3D) alone only achieves 60 or so Mkey/s, it's crazy.

i have noticed when checking out this thing that 30% or more processing power is spent to just compare if address met pattern conditions.

If you're refering to VanitySearch, being open source - can't you improve it then?
member
Activity: 351
Merit: 37
i have noticed when checking out this thing that 30% or more processing power is spent to just compare if address met pattern conditions. really not good. they didnt use any simd stuff even where it needs two may be five instructions to be done and some more on preparation stage
full member
Activity: 1162
Merit: 237
Shooters Shoot...
I am surprised LloyceV would say it should not happen because I know he knows about vanity addresses/search. If one is searching for 1Bxyz, in a given range, you will find many, and obviously if you are searching in a given range, many keys will be "close".
I have never seen this behaviour in vanitygen. I think it should always get a new random starting point after finding a match, otherwise the private keys you create are linked together, and compromising one means someone could brute force your other addresses.

Quote
If you use the rekey, it generates random starting points for each thread and then searches sequentially until the rekey number is met; then it rinses and repeats.
Is "rekey" an option instead of the default?

The rekey option is not default. You have to pass the flag -r and whatever number.

Here is the code that separates the threads:

Code:
for (int i = 0; i < nbThread; i++) {
    if (rekey > 0) {
      keys[i].Rand(256);
    } else {
      keys[i].Set(&startKey);
      Int offT((uint64_t)i);
      offT.ShiftL(80);
      Int offG((uint64_t)thId);
      offG.ShiftL(112);
      keys[i].Add(&offT);
      keys[i].Add(&offG);
    }

So if you use the rekey option, it will generate (whatever your CPU thread x 1024 or your GPU grid size X x Y) random points throughout the curve and then work sequentially, until rekey number is met.

If no rekey flag is passed, the program generates a new base key, every time the program starts, then shifts out 112 bits and 80 bits. The odds of someone starting at the same base key is well, a little less than 2^256.

Code:
// Protect seed against "seed search attack" using pbkdf2_hmac_sha512
  string salt = "VanitySearch";
  unsigned char hseed[64];
  pbkdf2_hmac_sha512(hseed, 64, (const uint8_t *)seed.c_str(), seed.length(),
    (const uint8_t *)salt.c_str(), salt.length(),
    2048);
  startKey.SetInt32(0);
  sha256(hseed, 64, (unsigned char *)startKey.bits64);

  char *ctimeBuff;
  time_t now = time(NULL);
  ctimeBuff = ctime(&now);
  printf("Start %s", ctimeBuff);

  if (rekey > 0) {
    printf("Base Key: Randomly changed every %.0f Mkeys\n",(double)rekey);
  } else {
    printf("Base Key: %s\n", startKey.GetBase16().c_str());
  }

}




Also note, the program also checks the current points, Point +  endo1 + endo2 + symmetries.

Remember, a smaller vanity will result in many matches. If a vanity is 1Bf2f, that's what, roughly 58^4 checks before a match is found?  Which is 11,316,496, which means, roughly every 11,316,496 keys checked, a match will be found. GPUs nowadays, can check up to 25,000,000,000 key/s.

Normally, a person is searching for a longer Vanity address, if they plan on using it, or to distinguish it from other addresses.

I am sure the code can be tweaked to regen points after a match is found, if that would really make someone feel more secure.  Finding matches with close proximity private keys is small with a more difficult vanity address.

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I am surprised LloyceV would say it should not happen because I know he knows about vanity addresses/search. If one is searching for 1Bxyz, in a given range, you will find many, and obviously if you are searching in a given range, many keys will be "close".
I have never seen this behaviour in vanitygen. I think it should always get a new random starting point after finding a match, otherwise the private keys you create are linked together, and compromising one means someone could brute force your other addresses.

Quote
If you use the rekey, it generates random starting points for each thread and then searches sequentially until the rekey number is met; then it rinses and repeats.
Is "rekey" an option instead of the default?
Pages:
Jump to: