Bitcoin Forum
April 24, 2024, 11:25:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ... 191 »
  Print  
Author Topic: Vanitygen: Vanity bitcoin address generator/miner [v0.22]  (Read 1152809 times)
wtfvanity
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500


WTF???


View Profile
March 13, 2013, 10:45:44 PM
 #961

Can anyone explain what this bit of code is doing? (in pattern.c of the source)

Code:
if ((b58pow - (p - zero_prefix)) < 6) {
/*
* Do not allow the prefix to constrain the
* check value, this is ridiculous.
*/
fprintf(stderr, "Prefix '%s' is too long\n", pfx);
goto out;
}

It seems I'm hanging on this piece when trying to generate an address over 28 characters (And yes, yes, I realize it's a pipe dream to ever find anything close to that - let me have my fun!)

A bitcoin address has a checksum to make sure that it is a valid address. If you are generating an address that is 30 characters long, the possibilities of getting your string and the checksum are zilch.

Waste a couple of weeks looking for a 12 character address before you go for ones near 30.

https://en.bitcoin.it/wiki/Address

Oh yeah, I understand that an address will never be found - finding the address is not my goal. I'm simply asking if the code can be modified to handle a larger string, and if so how?

Change the < 6 to some smaller number.

          WTF!     Don't Click Here              
          .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
1713957951
Hero Member
*
Offline Offline

Posts: 1713957951

View Profile Personal Message (Offline)

Ignore
1713957951
Reply with quote  #2

1713957951
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713957951
Hero Member
*
Offline Offline

Posts: 1713957951

View Profile Personal Message (Offline)

Ignore
1713957951
Reply with quote  #2

1713957951
Report to moderator
1713957951
Hero Member
*
Offline Offline

Posts: 1713957951

View Profile Personal Message (Offline)

Ignore
1713957951
Reply with quote  #2

1713957951
Report to moderator
1713957951
Hero Member
*
Offline Offline

Posts: 1713957951

View Profile Personal Message (Offline)

Ignore
1713957951
Reply with quote  #2

1713957951
Report to moderator
nimda
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


0xFB0D8D1534241423


View Profile
March 13, 2013, 11:01:28 PM
 #962

Yes it can; lower the number or drop that code entirely.

If you want to waste CPU/GPU cycles, though, please do something like Folding@Home instead.
cancis
Newbie
*
Offline Offline

Activity: 38
Merit: 0



View Profile
March 14, 2013, 02:03:08 PM
 #963

Yes it can; lower the number or drop that code entirely.

If you want to waste CPU/GPU cycles, though, please do something like Folding@Home instead.

I had commented out that section, but the code kept hanging. I will try reducing to 1 or 0 so the code is still executing (but essentially useless) and see what difference that makes.

And yes, I do Folding@Home. As I said, this is not an actual attempt at a +28 char vanity address generation - it won't be running more than 24 hours. I was simply asking for info on how to modify the code.
wtfvanity
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500


WTF???


View Profile
March 14, 2013, 02:18:51 PM
 #964

Yes it can; lower the number or drop that code entirely.

If you want to waste CPU/GPU cycles, though, please do something like Folding@Home instead.

I had commented out that section, but the code kept hanging. I will try reducing to 1 or 0 so the code is still executing (but essentially useless) and see what difference that makes.

And yes, I do Folding@Home. As I said, this is not an actual attempt at a +28 char vanity address generation - it won't be running more than 24 hours. I was simply asking for info on how to modify the code.

You commented out just the segment you quoted? You would also have to find out where it is called and comment out that as well. Simply reduce the number from 6 to 1 and you should be good.

          WTF!     Don't Click Here              
          .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
March 14, 2013, 02:23:57 PM
 #965

samr7 when are you going to fix the bug with the -X switch? if i want to create an address for an altcoin and specify the version with -X vanitygen says something like this (just an example)
Code:
Prefix 'XYZ' not possible
Hint: valid bitcoin addresses begin with "1"

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
cancis
Newbie
*
Offline Offline

Activity: 38
Merit: 0



View Profile
March 15, 2013, 05:44:48 AM
 #966

Yes it can; lower the number or drop that code entirely.

If you want to waste CPU/GPU cycles, though, please do something like Folding@Home instead.

I had commented out that section, but the code kept hanging. I will try reducing to 1 or 0 so the code is still executing (but essentially useless) and see what difference that makes.

And yes, I do Folding@Home. As I said, this is not an actual attempt at a +28 char vanity address generation - it won't be running more than 24 hours. I was simply asking for info on how to modify the code.

You commented out just the segment you quoted? You would also have to find out where it is called and comment out that as well. Simply reduce the number from 6 to 1 and you should be good.

Ah! Makes sense Wink I was at the end of a 12 hour python marathon - not thinking as I should. Thanks!
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
March 19, 2013, 05:19:29 AM
 #967

Thanks i gave up though. The gpu is actually pretty good on these ivy bridges. Unless vanity also requires amd like bitcoin, then yeah

Device: Intel(R) HD Graphics 4000
..
clBuildProgram: CL_BUILD_PROGRAM_FAILURE
Build log:
:173:19: error: __constant variables are required to be initialized
__constant bignum bn_zero;
                  ^
1 diagnostic generated.

error: front end compiler failed build.
Available OpenCL platforms:
0: [Intel(R) Corporation] Intel(R) OpenCL
  0: [Intel(R) Corporation] Intel(R) HD Graphics 4000

Intel compiler, for a GPU slower than a CPU will be. It doesn't seem to recognize that bignum is being initialized to the value of bn_zero. I would try installing a newer Intel OpenCL SDK and see if it understands code that works fine on AMD. Otherwise vanitygen would need to be altered (de-optimized) to support a GPU platform no Bitcoin miner would be using.

nagnagnag2
Full Member
***
Offline Offline

Activity: 142
Merit: 100


View Profile
March 19, 2013, 07:57:06 PM
 #968

What version of ATI drivers do I need?

no one knows the answer for this?
gdsl
Member
**
Offline Offline

Activity: 68
Merit: 10


Al Berg


View Profile WWW
March 19, 2013, 07:59:12 PM
 #969

What version of ATI drivers do I need?

no one knows the answer for this?

Catalyst 11.11 should do the trick

nagnagnag2
Full Member
***
Offline Offline

Activity: 142
Merit: 100


View Profile
March 19, 2013, 09:10:42 PM
 #970

Catalyst 11.11 should do the trick

Perhaps should add that I have a 7970 card and running ubuntu 12.10 kernel 3.5.x
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 20, 2013, 05:51:47 AM
 #971

Can the latest version (v0.22) make compressed keys? The ones that start with Letters and not 5 for the private key part. Sure I can convert it, but I'd want to generate a few hundred compressed keys (offline) for cold storage.

christop
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile
March 20, 2013, 04:43:22 PM
 #972

Can the latest version (v0.22) make compressed keys? The ones that start with Letters and not 5 for the private key part. Sure I can convert it, but I'd want to generate a few hundred compressed keys (offline) for cold storage.
I'm curious why you want compressed keys (or what the purpose of a compressed key is, really). A compressed key is actually longer than an uncompressed key (52 characters vs 51 characters) so it won't save you any storage space.

Tips are always welcome: 17Z63hLi2ox4fCMhDqVJrLTJiXVcBMJpMo
Alpaca socks donations: 1sockzDWcF8mrC59CgiN7HAJm6xL7TiRW
Herodes
Hero Member
*****
Offline Offline

Activity: 868
Merit: 1000


View Profile
March 20, 2013, 07:11:52 PM
 #973

I haven't read this entire thread, as it's simply too long to read. Wink

Anyway - I decided to store some coins locally, and I decided the safest way would be to run VanityGen and produce adresses along with private keys on an air-gapped computer.

I have a 150MB ISO-image (grml64-small_2013.02.iso) that I've modified with WinISO to add a directory containing these files:

libcrypto.so.0.9.8
libpcre.so.3
readme.txt
vanitygen

Vanitygen is compiled with the instructions in the first post in this thread, from source.

readme.txt simply states:

Code:
run on command line:

export LD_LIBRARY_PATH=.

This makes sure vanitygen searches in the current directory for libraries.

Now, simply run:

Code:
./vanitygen 1mono

to find adresses containing '1mono'-prefix. Or choose any other prefix you'd like, but remember it should start with 1 (or at least so I think).

You will now get the bitcoin address and it's corresponding private key. All what you need now is to note down that key and address, whenever you feel like saving something to that address, just send some coins there. Whenever you want to redeem the coins, import the private key to your wallet. There's many guides for this, so I won't repeat that.

The files, after you've booted can be found in /lib/live/mount/medium/vanitygen if you used WinISO (On Windows 7) to put it in the root of the iso-image.

To prepare the USB disk (make it bootable and add iso), I used Universal USB Installer 1.9.3.0. (On windows 7)

Following these instructions, you should be able to create your own bootable vanitygen usb-stick, if you can't be arsed to do it, let me know, in this thread or on pm, and I'll make the iso available if there's any demand for it.

The reason it's safe to do this is that you run it on a machine with no network connection. Make sure to unplug the network cable, or disable the wifi. Then, when the address and private key is generated, once the machine is shut down, there's no trace left of your key, apart from what you have noted down.

Note that printing it with a printer, or taking a picture of the code with your telephone may expose you to other kind of attacks.

Air-gapped, live bootable USB seems very secure. Then check the balance with blockchain.info or any other block explorer site.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 21, 2013, 12:45:44 AM
 #974

Can the latest version (v0.22) make compressed keys? The ones that start with Letters and not 5 for the private key part. Sure I can convert it, but I'd want to generate a few hundred compressed keys (offline) for cold storage.
I'm curious why you want compressed keys (or what the purpose of a compressed key is, really). A compressed key is actually longer than an uncompressed key (52 characters vs 51 characters) so it won't save you any storage space.

That's just 1 byte more for the human readable public key. This isn't an issue. The compressed key is half the size of the uncompressed key in transactions and in the block chain. That saves a lot of space, which also translates into lower transaction fees in the long term.

deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
March 21, 2013, 12:49:06 AM
 #975

The files, after you've booted can be found in /lib/live/mount/medium/vanitygen if you used WinISO (On Windows 7) to put it in the root of the iso-image.

To prepare the USB disk (make it bootable and add iso), I used Universal USB Installer 1.9.3.0. (On windows 7)
..
Consider:
-Your windows machine is completely PwnD, making any code that touched it untrustable and/or
-Your adversary can remotely access or physically steal the USB device and recover anything you've deleted or had in RAM (swap file).

Better still would be to disconnect all hard drives and storage media on the target machine, and only boot and run off a live CD with a compile environment. You then only have to figure out how to get vanitygen code to the machine securely (removable non-writable media), and how to get the address/privkeys off the machine securely (print, burn CD) without creating any persistent digital copy whatsoever.

If you don't actually need vanity addresses, easier is just to use the bitaddress HTML/JavaScript generator code offline.
pc
Sr. Member
****
Offline Offline

Activity: 253
Merit: 250


View Profile
March 21, 2013, 12:51:32 AM
 #976

If generating keys using an airgapped live-cd-booted computer (with any software, not just vanitygen), you want to make sure that your system's randomness pool has enough entropy before you start using it. When you start eliminating all outside forces on your computer, you can end up also making it much harder for your computer to generate the random numbers used for private keys. I would guess that for most systems just bashing on the keyboard and moving the mouse a bit before you start generating is sufficient, but I wouldn't take my word for that.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
March 21, 2013, 01:17:28 AM
 #977

I would guess that for most systems just bashing on the keyboard and moving the mouse a bit before you start generating is sufficient, but I wouldn't take my word for that.
Some rand generators use this method to obtain entropy data, but that doesn't do anything by itself.

Vanitygen uses OpenSSL to generate it's random private keys, which is pretty well vetted. If you have concerns that the startup state may be deterministic, you can use something like gpg key generator which does use random keyboard input to increase entropy, and then feed the gpg key data into vanitygen as a random seed.

There are rare hardware platforms that include a real hardware random number generator, notably VIA C3 processors and Intel 840 chipsets. These can feed urandom true hardware randomness with a kernel patch.

extra credit: spot the bitcoin developer
https://www.kernel.org/doc/Documentation/hw_random.txt
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
March 21, 2013, 01:39:50 AM
 #978

...
extra credit: spot the bitcoin developer
https://www.kernel.org/doc/Documentation/hw_random.txt

Done  Smiley

Copyright 2000,2001 Jeff Garzik <jgarzik @ pobox.com>

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
nimda
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


0xFB0D8D1534241423


View Profile
March 21, 2013, 01:54:20 AM
 #979

Can the latest version (v0.22) make compressed keys? The ones that start with Letters and not 5 for the private key part. Sure I can convert it, but I'd want to generate a few hundred compressed keys (offline) for cold storage.
I'm curious why you want compressed keys (or what the purpose of a compressed key is, really). A compressed key is actually longer than an uncompressed key (52 characters vs 51 characters) so it won't save you any storage space.

That's just 1 byte more for the human readable public key. This isn't an issue. The compressed key is half the size of the uncompressed key in transactions and in the block chain. That saves a lot of space, which also translates into lower transaction fees in the long term.
Can't the compressed key be derived from WIF?
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
March 21, 2013, 01:58:33 AM
 #980

Can the latest version (v0.22) make compressed keys? The ones that start with Letters and not 5 for the private key part. Sure I can convert it, but I'd want to generate a few hundred compressed keys (offline) for cold storage.
I'm curious why you want compressed keys (or what the purpose of a compressed key is, really). A compressed key is actually longer than an uncompressed key (52 characters vs 51 characters) so it won't save you any storage space.

That's just 1 byte more for the human readable public key. This isn't an issue. The compressed key is half the size of the uncompressed key in transactions and in the block chain. That saves a lot of space, which also translates into lower transaction fees in the long term.
Can't the compressed key be derived from WIF?

Nope they hash out to different bitcoin addresses
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ... 191 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!