Kangaderoo
Member
Offline
Activity: 89
Merit: 11
|
|
February 26, 2015, 08:13:50 PM |
|
Shouldn't every ECDSA key -> pubkey -> hashamahash -> base58check- > address be valid?
This is correct, every key should give a valid address... that is if the all calculations were fully completed. vanitygen doesn't complete address for the check-sum part. These last bytes are all set to 0 to make sure the length is correct. The first part of the generated address ~25 chars will not change due to this check-sum. By skipping this part a lot of speed is gained when searching for longer match. (this part is actually always executed in the -regex mode, the speed difference can be observed) Only when a match is found the checksum is calculated en and the WIF and final address is stored. When matching a valid bitcoin address i.e. just the leading "1" this match requires the check-sum to be generated. This part is currently not as optimized for speed as the generator part; for the function of vanitygen this optimization is actually not needed. On the CPU the hashing is done in batches of 256 ECDSA keys, I have to recheck the code but I think that when a match is found the remaining 255 might no longer be checked/validated. The ECDSA part of the generation is more than 70% of the cpu time. Probably the reason the "1" and "1A" are relative equal in speed, statistically each batch will have about 10 "1A" matches. The ECSDA engine and the hashing up to the checksum is very optimized. When optimizing the checksum and base58 part as well, skipping the match check, just storing all results to file would make this prog a faster 'any address' generator.
|
BTC:1NeoArmnGyWHKfbje9JNWqw3tquMY7jHCw
|
|
|
|
|
|
|
The block chain is the main innovation of Bitcoin. It is the
first distributed timestamping system.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
TheRealSteve
|
|
February 26, 2015, 08:43:58 PM |
|
On the CPU the hashing is done in batches of 256 ECDSA keys, I have to recheck the code but I think that when a match is found the remaining 255 might no longer be checked/validated.
That would certainly explain the ~0.39% (1/256*100%) As for the rest: yeah, as expected. If organofcorti isn't already working on it himself, I'm sure he'd appreciate somebody making the appropriate changes. I know just enough about the code to be dangerous, so count me out. Happy to throw in for a bounty though - guy does nice things with data collection/analysis/visualization
|
|
|
|
Kangaderoo
Member
Offline
Activity: 89
Merit: 11
|
|
February 26, 2015, 09:00:42 PM |
|
Probably the reason the "1" and "1A" are relative equal in speed, statistically each batch will have about 10 "1A" matches.
Just to correct myself, 256 /58 (base 58) is just over 4 not 10
|
BTC:1NeoArmnGyWHKfbje9JNWqw3tquMY7jHCw
|
|
|
Kangaderoo
Member
Offline
Activity: 89
Merit: 11
|
|
February 26, 2015, 09:27:09 PM |
|
I did a little code review, The following can be found in the 'vanitygen.c' file vxcp->vxc_delta=vxcp->vxc_delta-step; for (j=0;j<step;j++){ memcpy(vxcp->vxc_binres+1,MDBufChar+j*32,20); switch (test_func(vxcp)) { case 1: npoints = 0; rekey_at = 0; i = nbatch; j = step; break; case 2: break; goto out; default: break; } vxcp->vxc_delta++; } }
The test_func(vxcp) returns a "1" when a match is found, all counters are reset, so it is not evaluating the remaining codes. When using the -k (keep searching) and the -q (just don't want to many screen updates) it seems that all 256 keys in the batch are evaluated. if the following lines are remarked. case 1: // remark npoints = 0; // remark rekey_at = 0; // remark i = nbatch; // remark j = step; break;
Since it is now determining the checksum for each match the speed is not increased by 256 but on my system the output file is about twice the size after a short run.
|
BTC:1NeoArmnGyWHKfbje9JNWqw3tquMY7jHCw
|
|
|
organofcorti
Donator
Legendary
Offline
Activity: 2058
Merit: 1007
Poor impulse control.
|
|
February 27, 2015, 05:18:10 AM |
|
Thanks Kangaderoo, TheRealSteve and K1773R. You've given me some things to try now, I'll see how it goes.
|
|
|
|
salfter
|
|
March 02, 2015, 11:19:27 PM |
|
I've made a vanitygen ebuild (for Gentoo) available: https://github.com/salfter/portageIt's under app-crypt. If the opencl USE flag is enabled, oclvanitygen is built as well. The ebuild uses my vanitygen fork, which includes nonnakip's patch for newer Radeons: https://github.com/salfter/vanitygenSo far, I've tested it on an AMD A4-3300. oclvanitygen (using the latest fglrx driver in Portage) runs about 4x faster than vanitygen.
|
|
|
|
DonQuijote
Legendary
Offline
Activity: 1551
Merit: 1002
♠ ♥ ♣ ♦ < ♛♚&#
|
|
March 02, 2015, 11:35:55 PM |
|
~/vanitygen $ env LD_LIBRARY_PATH=./sdklib ./oclvanitygen -d 0:1 -d 0:2 -d 0:3 -k 1Nasty Difficulty: 259627881 Pattern: 1Nasty Address: 1Nastyf64qw5xXuBD6ybVLvTVhncLmU9zb Privkey: 5JizejJoHntiZbG6JHofV97559RjeeYGbHKAwUj63tNrMrMpWri [25.01 Mkey/s][total 96468992][Prob 9.2%][50% in 6.2s][Found 1] ^C ~/vanitygen $
didn't work still the program sees 1 vga only.
i did this to see what the programs sees: ~/vanitygen $ env LD_LIBRARY_PATH=./sdklib ./oclvanitygen -d 3:1 -k 1Nasty Difficulty: 259627881 Available OpenCL platforms: 0: [Advanced Micro Devices, Inc.] AMD Accelerated Parallel Processing 0: [Advanced Micro Devices, Inc.] Tahiti 1: [AuthenticAMD] AMD Athlon(tm) II X2 270 Processor ~/vanitygen $
it sees 1 vga only? :/
Did you check the drivers? Is everything updated? Does your PC detects 3 VGAs? ~~MZ~~ (they are not in crossfire, i will try to install drivers again i think ). I dont know how to check in linux if the pc reads 4 vga. Is there any program for that? like... aida64? but for linux :p i followed the guide in page 75, meaby is something wrong wrriten here: # This is the procedure to get oclvanitygen running with AMD Raedon 7xxx # on a fresh install of Ubuntu 64-bit. (tested with Ubuntu 12.04 and 14.04) # install tools, dependencies and driver sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) restricted" sudo apt-get update sudo apt-get install build-essential git libssl-dev libpcre3-dev opencl-headers fglrx-dev sudo reboot # get source and compile oclvanitygen git clone https://github.com/samr7/vanitygen.gitcd vanitygen wget https://nastyfans.org/download/patch-oclvanitygen-amd.diffpatch -p1 < patch-oclvanitygen-amd.diff wget https://nastyfans.org/download/AMD-APP-SDK-v2.7-lib-lnx64.tar.gzmkdir sdklib tar -xzvf AMD-APP-SDK-v2.7-lib-lnx64.tar.gz -C sdklib make oclvanitygen # run oclvanitygen (from inside vanitygen directory) env LD_LIBRARY_PATH=./sdklib ./oclvanitygen -D 0:0 -k 1Nasty Is it working now? Is it the last "working guide" Thanks
|
THE INGENIOUS GENTLEMAN DON QUIXOTE OF LA MANCHA
|
|
|
salfter
|
|
March 13, 2015, 04:38:01 PM |
|
I've made a vanitygen ebuild (for Gentoo) available: https://github.com/salfter/portageIt's under app-crypt. If the opencl USE flag is enabled, oclvanitygen is built as well. The ebuild uses my vanitygen fork, which includes nonnakip's patch for newer Radeons: https://github.com/salfter/vanitygenSo far, I've tested it on an AMD A4-3300. oclvanitygen (using the latest fglrx driver in Portage) runs about 4x faster than vanitygen. These have now been updated so that calc_addrs.cl gets loaded from /usr/lib/oclvanitygen and the object code generated at runtime from it gets saved to /tmp. This makes oclvanitygen nearly as easy to use as vanitygen, as you don't need to keep these files in your home directory (or whatever).
|
|
|
|
onewiseguy
|
|
March 14, 2015, 05:28:52 PM |
|
Does this vanity gen still work?
|
|
|
|
TheRealSteve
|
|
March 14, 2015, 06:03:28 PM |
|
Does this vanity gen still work? That's a question that needs expanding. What exactly are you trying to get an answer to? Can you still run vanitygen? Yes. Can you still use vanity addresses? Of course. Can you still run oclvanitygen? Might depend on your graphics card. Works fine here.
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
March 14, 2015, 06:07:55 PM |
|
Does this vanity gen still work?
I don't have any problem running vanitygen, ie it works for me. Did you experience some issue with it?
|
|
|
|
mitus-2
|
|
March 14, 2015, 06:08:52 PM |
|
Does this vanity gen still work?
sure it works fine
|
|
|
|
onewiseguy
|
|
March 14, 2015, 06:13:03 PM |
|
Does this vanity gen still work? That's a question that needs expanding. What exactly are you trying to get an answer to? Can you still run vanitygen? Yes. Can you still use vanity addresses? Of course. Can you still run oclvanitygen? Might depend on your graphics card. Works fine here.sorry :/ meant no stealing no back doors. and can it be used on mac:)
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
March 14, 2015, 06:14:59 PM |
|
Does this vanity gen still work? That's a question that needs expanding. What exactly are you trying to get an answer to? Can you still run vanitygen? Yes. Can you still use vanity addresses? Of course. Can you still run oclvanitygen? Might depend on your graphics card. Works fine here.sorry :/ meant no stealing no back doors. and can it be used on mac:) No back doors. But this is an open-source program so you can download the source and see for yourself. As I recall, I downloaded a source tarball and built it (I don't know if they distribute binaries). As far as running on mac, I would guess you'll have luck. I've only run it on GNU/Linux but given the *nix similarities I would suppose you'll be fine.
|
|
|
|
onewiseguy
|
|
March 14, 2015, 06:15:35 PM |
|
Does this vanity gen still work?
I don't have any problem running vanitygen, ie it works for me. Did you experience some issue with it? Better question is there a img file for mac already to run
|
|
|
|
onewiseguy
|
|
March 14, 2015, 06:17:22 PM |
|
Does this vanity gen still work? That's a question that needs expanding. What exactly are you trying to get an answer to? Can you still run vanitygen? Yes. Can you still use vanity addresses? Of course. Can you still run oclvanitygen? Might depend on your graphics card. Works fine here.sorry :/ meant no stealing no back doors. and can it be used on mac:) No back doors. But this is an open-source program so you can download the source and see for yourself. As I recall, I downloaded a source tarball and built it (I don't know if they distribute binaries). As far as running on mac, I would guess you'll have luck. I've only run it on GNU/Linux but given the *nix similarities I would suppose you'll be fine. thanks checking now. Appreciate the response. I would pay for some one to do it since i would think it will take a while on a mac. but afraid of private key being used :/ any legit services out there?
|
|
|
|
TheRealSteve
|
|
March 14, 2015, 06:27:30 PM |
|
sorry :/ meant no stealing no back doors. and can it be used on mac:)
Good questions! The official repo has no back doors last I checked, which is a week-ish ago. You'd have to do a diff between any of the third party ones. and the official one to double-check if any of those contain any changes other than optimizations/etc. I do recommend using one that's more actively being maintained, like salfter's, or an earlier one like WyseNinja's Although I don't know off-hand about any published OS X binaries, the source code comes with a Makefile that includes OS X support. Should just be a matter of downloading the repo and running 'make'; though that may require further steps ( alternative steps).
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
March 14, 2015, 06:28:52 PM |
|
Does this vanity gen still work? That's a question that needs expanding. What exactly are you trying to get an answer to? Can you still run vanitygen? Yes. Can you still use vanity addresses? Of course. Can you still run oclvanitygen? Might depend on your graphics card. Works fine here.sorry :/ meant no stealing no back doors. and can it be used on mac:) No back doors. But this is an open-source program so you can download the source and see for yourself. As I recall, I downloaded a source tarball and built it (I don't know if they distribute binaries). As far as running on mac, I would guess you'll have luck. I've only run it on GNU/Linux but given the *nix similarities I would suppose you'll be fine. thanks checking now. Appreciate the response. I would pay for some one to do it since i would think it will take a while on a mac. but afraid of private key being used :/ any legit services out there? Well, yes, I don't know how to sort that out because if I or anyone else ran this program for you then by definition we'd be finding your priv/public key and you'd need to get that info from us. However, consider this: the vanity address you want will take longer (on average) to find the longer the vanity string is, BUT, you might just get lucky. vanitygen randomly searches and so it's totally possibly (but improbable) to find a long vanity string very soon. How long is the vanity string you're trying to find? I was able to find 5 and 6 character vanity strings in a half day or so on a low-power, portable laptop.
|
|
|
|
TheRealSteve
|
|
March 14, 2015, 06:44:54 PM |
|
thanks checking now. Appreciate the response. I would pay for some one to do it since i would think it will take a while on a mac. but afraid of private key being used :/ any legit services out there? Actually, yes. ANY service that lets you use your own public key* in a split key generation method. The split key generation method ensures that you can get your vanity address without the person generating it knowing what the private key for that address is, but you will know. Vanitygen includes support for this. * Note that this very specifically excludes any services that offer to generate that key for you. Even if they pinkie swear not to store it on their servers or anything like that. For more information, see: https://bitcointalk.org/index.php?topic=81865.msg901491#msg901491
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
March 14, 2015, 06:48:19 PM |
|
Thanks therealsteve, for correcting me there. I had a feeling I had seen something of this sort before but I guess I discounted it without actually looking around. ppreciate you setting the record straight and providing a link to the appropriate system (I'm reading about it now).
|
|
|
|
|