Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: The Goat Master on October 24, 2013, 12:38:14 AM



Title: Addresses - Shortening and Changing first character
Post by: The Goat Master on October 24, 2013, 12:38:14 AM
Using the bitcoin code, is it possible to change the starting character as well as the length of the address?

(e.g. instead bitcoin addresses start with B and are always 15 characters long)

What are the starting character base 58 codes?  (The ones used in base58.h to mark new addresses, example: F is 35)


Title: Re: Addresses - Shortening and Changing first character
Post by: danneu on October 24, 2013, 08:00:57 PM
I'm not sure I understand.

Here's what an address is off the top of my head:

Code:
(base58/encode (concat version-byte,
                       (rmd160 (sha256 public-key)),
                       (take 4 (sha256 (sha256 (concat version-byte
                                                       (rmd160 (sha256 public-key))))))

You can't change any of that without garbling data.


Title: Re: Addresses - Shortening and Changing first character
Post by: kjj on October 25, 2013, 05:25:33 PM
The short answer is no.

The address encoding scheme includes a version byte which forces the first byte to take on a specific value (or one of two values, depending on the byte).  For it to be a bitcoin address, it must be 0 or 5, giving a leading character of 1 or 3.

See here (https://en.bitcoin.it/wiki/List_of_address_prefixes), but note that the list is both incomplete (in the sense that there are many other address systems not listed, and new ones showing up every day), and far too long (in the sense that only a couple of them are actually valid for bitcoin).

As to the length, there isn't much to be done there.  The length is fixed by the size of the hash and the encoding system.  Some hashes lead to (very slightly) shorter addresses.  Key compression does not help here (because the hash of the compressed key is used, and that hash is the same size as the hash of the uncompressed key).

There are other schemes that are capable of generating short-ish addresses.  See Casascius's mini format, for an eample.


Title: Re: Addresses - Shortening and Changing first character
Post by: algorista on October 26, 2013, 03:33:32 AM
At some point a system similar to DNS should arise, to improve the situation of addresses being not memorizable.


Title: Re: Addresses - Shortening and Changing first character
Post by: gmaxwell on October 26, 2013, 05:17:51 AM
At some point a system similar to DNS should arise, to improve the situation of addresses being not memorizable.
You should not be reusing addresses. If you want memoriable addresses, use a https URL that issues a bitcoin payment URL in response to loading it.


Title: Re: Addresses - Shortening and Changing first character
Post by: r3wt on October 26, 2013, 05:24:11 AM
At some point a system similar to DNS should arise, to improve the situation of addresses being not memorizable.
You should not be reusing addresses. If you want memoriable addresses, use a https URL that issues a bitcoin payment URL in response to loading it.

you're an effing genius dude. one problem with in face transactions would be getting your address from your mobile device to the machine at the checkout. qr codes cover this issue.

the remaining issue is online payments. your url idea could be a great start.

+1


Title: Re: Addresses - Shortening and Changing first character
Post by: algorista on October 26, 2013, 04:35:07 PM
At some point a system similar to DNS should arise, to improve the situation of addresses being not memorizable.
You should not be reusing addresses. If you want memoriable addresses, use a https URL that issues a bitcoin payment URL in response to loading it.

That's a good idea! Simple and effective.


Title: Re: Addresses - Shortening and Changing first character
Post by: The Goat Master on October 26, 2013, 09:54:09 PM
At some point a system similar to DNS should arise, to improve the situation of addresses being not memorizable.
You should not be reusing addresses. If you want memoriable addresses, use a https URL that issues a bitcoin payment URL in response to loading it.

That's a good idea! Simple and effective.

e.g. If you go to mybitcoinaddy.com, it would load bitcoin:123243124321 and make a tx to send to that addy?
(I forget the exact link)


Title: Re: Addresses - Shortening and Changing first character
Post by: inform on October 26, 2013, 10:21:06 PM
Yeah nice idea  ::)


Title: Re: Addresses - Shortening and Changing first character
Post by: e4xit on October 29, 2013, 01:55:23 PM
Careful with this, but you could have a look at this site for ideas:

https://btc.to/