Bitcoin Forum
April 26, 2024, 09:46:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Playing with Address Generation  (Read 1125 times)
hack_ (OP)
Hero Member
*****
Offline Offline

Activity: 501
Merit: 501


View Profile
November 27, 2014, 10:37:01 PM
 #1

Parsing through the source I came across the PUBKEY_ADDRESS , which decides the prefix. I wonder if anyone can tell me how to modify it in such a way that instead of just the first character, I can dictate up to the first 5 characters of an address generated by the reference client.

I am aware that vanity gen does this , and it does it very well. But I would still like to know how to pull it off in the reference client. At some point I hope to create a new optional client , and maybe this can be one of it's perks.

Example use of such a feature: -  I own a company that sells goods for BTC, to make our receiving addresses unique, they are all generated with the prefix 1hack. Would be nice to have a client spit out such addresses without need for an additional program.

By mass producing such addresses , one could actually "mark" that particular sequence to the point where it is easily recognized by users of BTC and customers.


1714124762
Hero Member
*
Offline Offline

Posts: 1714124762

View Profile Personal Message (Offline)

Ignore
1714124762
Reply with quote  #2

1714124762
Report to moderator
1714124762
Hero Member
*
Offline Offline

Posts: 1714124762

View Profile Personal Message (Offline)

Ignore
1714124762
Reply with quote  #2

1714124762
Report to moderator
1714124762
Hero Member
*
Offline Offline

Posts: 1714124762

View Profile Personal Message (Offline)

Ignore
1714124762
Reply with quote  #2

1714124762
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714124762
Hero Member
*
Offline Offline

Posts: 1714124762

View Profile Personal Message (Offline)

Ignore
1714124762
Reply with quote  #2

1714124762
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12899


View Profile
November 27, 2014, 10:47:37 PM
 #2

The version byte (like PUBKEY_ADDRESS) is prepended to the rest of the address data, and only certain values are allowed. You can't change it or add to it without making an address that's incompatible with everyone else's Bitcoin clients. So a mainline Bitcoin address can only start with 1 or 3, and if you want to influence the other characters, you have to do it via brute-force with vanitygen (or similar).

Vanitygen works by generating many addresses and checking them against the given pattern. There's no special trick to it. You can't predict or influence the characteristics of an address before completely generating it. (This is similar to Bitcoin's proof-of-work.)

Quote
By mass producing such addresses , one could actually "mark" that particular sequence to the point where it is easily recognized by users of BTC and customers.

Yeah, except that I can generate an address with the same "mark" as easily as you can, so training people to recognize your prefix actually makes phishing a lot easier.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
hack_ (OP)
Hero Member
*****
Offline Offline

Activity: 501
Merit: 501


View Profile
November 28, 2014, 12:50:18 AM
 #3

The version byte (like PUBKEY_ADDRESS) is prepended to the rest of the address data, and only certain values are allowed. You can't change it or add to it without making an address that's incompatible with everyone else's Bitcoin clients. So a mainline Bitcoin address can only start with 1 or 3, and if you want to influence the other characters, you have to do it via brute-force with vanitygen (or similar).

Vanitygen works by generating many addresses and checking them against the given pattern. There's no special trick to it. You can't predict or influence the characteristics of an address before completely generating it. (This is similar to Bitcoin's proof-of-work.)

Quote
By mass producing such addresses , one could actually "mark" that particular sequence to the point where it is easily recognized by users of BTC and customers.

Yeah, except that I can generate an address with the same "mark" as easily as you can, so training people to recognize your prefix actually makes phishing a lot easier.

I guess I'll have to figure out a way to integrate vanitygen into my client if I ever get round to it. Maybe even throw in a Vanity UI.
Pages: [1]
  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!