Bitcoin Forum
December 11, 2024, 09:23:30 AM *
News: Latest Bitcoin Core release: 28.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 ... 191 »
  Print  
Author Topic: Vanitygen: Vanity bitcoin address generator/miner [v0.22]  (Read 1153659 times)
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1189


View Profile WWW
July 07, 2011, 09:54:57 AM
 #61

If you tell me your address, i only need 2^160 attempts (=EC multiplication + hashing) to find a private key whose address collides. That's all i need to steal your funds.

Hence, unless you use send-to-pubkey (which the default client only uses for generations), bitcoin keys have a security level of no more than 160 bits.

I do Bitcoin stuff.
Yeti
Member
**
Offline Offline

Activity: 112
Merit: 10

Firstbits: 1yetiax


View Profile
July 07, 2011, 11:47:49 AM
 #62

I have the targets stored in a text file.  I tried encapsulating each regex in single and double quotes, both errored out.  It seemed that the command window changed the double quotes to an o with two dots over it, and the single quotes to one of those AE letter combos.  Not sure what's up with that.

Regardless, still getting the invalid character '[' error without pipes in the text file.  Any other suggestions?
You mean like ö and æ? Wink Seems the character encoding is off, though it could only be a display error if you use an SSH session.
Usually " and ' shouldn't give "funny" characters, because they are even contained in 7-bit ASCII. Thus no collision when using different 8-bit encodings. Problems usually arise when the shell uses "fancy" quotation marks like ‘, ’, “ or ”, which are not contained in all character sets / have a different byte interpretation in other charsets.

1YetiaXeuRzX9QJoQNUW84oX2EiXnHgp3 or http://payb.tc/yeti

Since Bitcoin Randomizer is dead, join the Bitcoin Pyramid (referrer id #203)! Be quick, be on top! Instant payout as soon as one of your referrals deposits!
dserrano5
Legendary
*
Offline Offline

Activity: 1974
Merit: 1030



View Profile
July 07, 2011, 12:12:14 PM
 #63

I have the targets stored in a text file.  [...] It seemed that the command window changed the double quotes to an o with two dots over it

Hmm, that's probably due to some encoding issue. Why don't you try generating things step by step? First a plain "1", which should always succeed, then "1a", then "1a" inside a file (no quotes needed), then "1[Aa]" in the command line (unquoted, single and double), then the same in a file... until it bombs.
samr7 (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 430

Firstbits: 1samr7


View Profile
July 07, 2011, 12:55:12 PM
 #64

I just pasted version 0.5.

  • Now with worker threads and CPU count detection, suggested by davux and others
  • Exact prefixes can now be matched case-insensitively with "-i", for SgtSpike
  • Fixed an integer overflow problem with the status display

By default, it will use all available CPU cores.  If you want the old single-threaded behavior, run with "-t 1".
samr7 (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 430

Firstbits: 1samr7


View Profile
July 07, 2011, 01:04:38 PM
 #65

Regardless, still getting the invalid character '[' error without pipes in the text file.  Any other suggestions?

What's the exact error message?  Is it, "Invalid character '[' in prefix?"

The only suggestion (which might get me in trouble) is to run with "-r".
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 07, 2011, 04:12:10 PM
 #66

Ok, last request I promise.  Cheesy

Can results be logged to a text file?
drrussellshane
Hero Member
*****
Offline Offline

Activity: 546
Merit: 500


View Profile
July 07, 2011, 04:32:00 PM
 #67

Regardless, still getting the invalid character '[' error without pipes in the text file.  Any other suggestions?

What's the exact error message?  Is it, "Invalid character '[' in prefix?"

The only suggestion (which might get me in trouble) is to run with "-r".

So can the brackets [] not be used for finding an address with a specific prefix?

Buy a TREZOR! Premier BTC hardware wallet. If you're reading this, you should probably buy one if you don't already have one. You'll thank me later.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 07, 2011, 04:38:39 PM
 #68

Regardless, still getting the invalid character '[' error without pipes in the text file.  Any other suggestions?

What's the exact error message?  Is it, "Invalid character '[' in prefix?"

The only suggestion (which might get me in trouble) is to run with "-r".

So can the brackets [] not be used for finding an address with a specific prefix?
It can.  The -r switch was the trick.
kseistrup
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


Unselfish actions pay back better


View Profile WWW
July 07, 2011, 05:03:55 PM
 #69

The source code in the original article doesn't seem to be complete, where can I download the full .c file?  Please put it on github or a dropbox or something.

Cheers,

Klaus Alexander Seistrup
dserrano5
Legendary
*
Offline Offline

Activity: 1974
Merit: 1030



View Profile
July 07, 2011, 06:15:04 PM
 #70

Can results be logged to a text file?

Add '> file' to the command line. The greater-than character means "redirect output to file".


It can.  The -r switch was the trick.

I assumed you were using it Smiley.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 07, 2011, 06:18:07 PM
 #71

Can results be logged to a text file?

Add '> file' to the command line. The greater-than character means "redirect output to file".


It can.  The -r switch was the trick.

I assumed you were using it Smiley.
Thanks.  Thought I tried '> file' already, but maybe it failed because I didn't use a space.

Haha, and rightly so!  It's even in the help file shown...  I failed, my bad.
samr7 (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 430

Firstbits: 1samr7


View Profile
July 07, 2011, 07:51:01 PM
 #72

The source code in the original article doesn't seem to be complete, where can I download the full .c file?  Please put it on github or a dropbox or something.

Oh my, the forum truncated that post and left the code tag open.  Sorry about that, the source code is up on github now, and pastebin.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 08, 2011, 07:13:11 AM
 #73

New error.  Cheesy

Quote
Could not add prefix '1worLd': overlapping?

I get this for a good number of targets.  Can't see a particular pattern to the ones that error out, and they are only in the list once...
samr7 (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 430

Firstbits: 1samr7


View Profile
July 08, 2011, 08:02:07 AM
 #74

New error.  Cheesy

Quote
Could not add prefix '1worLd': overlapping?

I get this for a good number of targets.  Can't see a particular pattern to the ones that error out, and they are only in the list once...

New version 0.6 is now up.  This version should be more specific about which prefixes it thinks overlap each other.  Try it out and let me know what you find.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 08, 2011, 08:39:15 AM
 #75

New error.  Cheesy

Quote
Could not add prefix '1worLd': overlapping?

I get this for a good number of targets.  Can't see a particular pattern to the ones that error out, and they are only in the list once...

New version 0.6 is now up.  This version should be more specific about which prefixes it thinks overlap each other.  Try it out and let me know what you find.
Thanks, that definitely helps!  I just didn't understand what the error meant, but this makes it crystal clear.
brendio
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
July 08, 2011, 10:05:58 AM
 #76

I just tried running the windows binary, but get the error "vanitygen.exe - Entry Point Not Found; The procedure entry point GetActiveProcessorCount could not be located in the dynamic link library KERNEL32.dll"

Am I missing a dependency?

samr7 (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 430

Firstbits: 1samr7


View Profile
July 08, 2011, 10:57:46 AM
 #77

I just tried running the windows binary, but get the error "vanitygen.exe - Entry Point Not Found; The procedure entry point GetActiveProcessorCount could not be located in the dynamic link library KERNEL32.dll"

Am I missing a dependency?

Yep, you were missing a major dependency: Windows 7.  Cheesy

Sorry about that.  Version 0.7 is up now, and has been tested on XP SP3.
Shevek
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
July 08, 2011, 11:33:25 AM
 #78

samr7, please read the following. I have a honest proposal for pulling your code with more security and... speed!

First, I suppose you are familiar with openssl-API. I'm not (otherwise, I'd rewrite the code myself), but after some revision of your program I've found points of improvement. On the other hand, elliptic curve mathematics are familiar to me ;-) So, this is my proposal.

1) Get a good 256-bit random number. It will act as a seed. You can obtain it from three sources.

E1 = 32 bytes from random.org. Here it is a sample code that dumps the result in a file; I suppose you can adapt it:

Code:
wget "http://www.random.org/cgi-bin/randbyte?nbytes=32&format=file" -O - > E1

E2 = 32 random bytes from hotbis. Sample code:

Code:
wget "https://www.fourmilab.ch/cgi-bin/Hotbits?nbytes=32&fmt=%20bin" -O E2

E3 = 32 random bytes from local sources. For example, /dev/urandom, but you can use other not so quality sources.

Finally, obtain the seed number, "s":
Code:
s = SHA256(E1 | E2 | E3) mod p

where "p" is the prime order of the curve (I suppose you can take it, and perform this operation, from openssl-API)

2) Get the first public address

The public key is calculated with EC-product:

Code:
 PubKey = s*Q 

where "Q" is the fixed point in the curve. Now address is:

Code:
PubAdd = base58(RIPEMD160(SHA256(PubKey))+checksum)

or similar, isn't it?

3) Start the loop

Code:
Loop start:
    If pattern matchs "PubAdd", then go end
    Else do:
        PubKey <- PubKey + Q (EC-Add operation)
        s <- (s + 1) mod p
        PubAdd = base58(RIPEMD160(SHA256(R))+checksum)
    Endif
 Loop end
 P' = s*Q (EC-product)
 if (P' == PubKey)
     PrivKey = base58(s+checksum)
     print PubAdd, PubKey, PrivKey
 else
     something went bad
 endif
 

So, the biggest improve is, that heavy EC-product is computed only twice!!! New test address is taken from single EC-add operation which is relatively cheap in compute resources.

But you must be sure that 256 initial seed is really random.

What's your opinion?
   

Proposals for improving bitcoin are like asses: everybody has one
1SheveKuPHpzpLqSvPSavik9wnC51voBa
brendio
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
July 08, 2011, 11:34:18 AM
 #79

Thanks. Working away on my address now.

kseistrup
Hero Member
*****
Offline Offline

Activity: 566
Merit: 500


Unselfish actions pay back better


View Profile WWW
July 08, 2011, 12:38:57 PM
 #80


Finally, obtain the seed number, "s":
Code:
s = SHA256(E1 | E2 | E3) mod p

Shouldn't that be

Code:
s = SHA256(E1 ^ E2 ^ E3) mod p

where ^ is bitwise xor?

Cheers,

Klaus Alexander Seistrup
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 ... 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!