LearnBitcoin

Bitcoin Dev Archive 2013

Bitcoin addresses -- opaque or not

6 messages, 11 to 22 Jun 2013. Started by Melvin Carvalho.

Melvin Carvalho (3), Wladimir J. van der Laan, Pieter Wuille, Luke Dashjr

Permalink Original thread on gnusha.org

Melvin Carvalho permalink original

There was some confusion on IRC as to whether bitcoin addresses are opaque or not.

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

For the sake of argument let's say that opaque means that you can tell nothing about the address by examining the characters.

My understanding was that they are NOT opaque, and that if that has changed, it will invalidate much at least some wiki page, for examples at least some of the following would now be false:

-------- "A Bitcoin address, or simply address, is an identifier of 27-34 alphanumeric characters" -- FALSE

"with the number 1 or 3" -- FALSE

"you can send bitcoins to a person by sending bitcoins to one of their addresses" -- FALSE

"Addresses are created simply by generating random numbers and then performing mathematical operations to derive matching pairs of "public" and "private" keys" -- FALSE

"The probability that a mistyped address is accepted as being valid is 1 in 232, that is, approximately 1 in 4.29 billion" -- FALSE

"If you would like to validate a Bitcoin address in an application, it is advisable to use a method from this thread rather than to just check for string length, allowed characters, or that the address starts with a 1 or 3." -- FALSE

"For most properly-generated Bitcoin addresses, there is at least one secret number known as a private key" -- FALSE

"They consist of random digits and uppercase and lowercase letters, with the exception that the uppercase letter "O", uppercase letter "I", lowercase letter "l", and the number "0" are never used to prevent visual ambiguity" -- FALSE

"Some Bitcoin addresses can be shorter than 34 characters (as few as 27)" -- FALSE

"Several of the characters inside a Bitcoin address are used as a checksum so that typographical errors can be automatically found and rejected" -- FALSE

"The checksum also allows Bitcoin software to confirm that a 33-character (or shorter) address is in fact valid and isn't simply an address with a missing character" -- FALSE --------

I also here that there is a LIKELY change from the base58 encoding ... when was this established?

There's either been some bit changes to the fundamentals of bitcoin here or there's been some misunderstandings. It would be good to clear things up as to what exactly an address is now beleived to be, and reflect that in the wiki.

Wladimir J. van der Laan in reply to Melvin Carvalho permalink original

On Tue, Jun 11, 2013 at 3:11 PM, Melvin Carvalho <melvincarvalho@gmail•com>wrote:

Quoted text (12 lines)
> There was some confusion on IRC as to whether bitcoin addresses are opaque
> or not.
>
> https://en.bitcoin.it/wiki/Address
>
> For the sake of argument let's say that opaque means that you can tell
> nothing about the address by examining the characters.
>
> My understanding was that they are NOT opaque, and that if that has
> changed, it will invalidate much at least some wiki page, for examples at
> least some of the following would now be false:
>

How do you define opaque? As far as humans are concerned the addresses are opaque. They don't tell anything about your country or location, your bank, your name, they don't even form some kind of hierarchy.

From the viewpoint of the code you could argue they have a meaning "address type + hashed public key, base58 encoded" thus are not fully opaque. But it's a long shot, as a hashed value is still very opaque.

Quoted text (3 lines)
> I also here that there is a LIKELY change from the base58 encoding ...
> when was this established?
>

No, there have been no changes to base58. The encoding is still exactly the same as when Satoshi coined it. Can you show an example of what you mean?

Wladimir

Pieter Wuille in reply to Melvin Carvalho permalink original

On Tue, Jun 11, 2013 at 3:11 PM, Melvin Carvalho <melvincarvalho@gmail•com> wrote:

Quoted text (11 lines)
> There was some confusion on IRC as to whether bitcoin addresses are opaque
> or not.
>
> https://en.bitcoin.it/wiki/Address
>
> For the sake of argument let's say that opaque means that you can tell
> nothing about the address by examining the characters.
>
> My understanding was that they are NOT opaque, and that if that has changed,
> it will invalidate much at least some wiki page, for examples at least some
> of the following would now be false:

I'm afraid this is the result of a misunderstanding.

Yesterday on IRC you were asking why the URI specification doesn't include the semantics and encoding of addresses. Some people, including me, argued that addresses should be considered opaque. That doesn't mean they don't have well-specified definition, only that for the purposes of URI parsing and handling, code shouldn't know or care what they represent or how they are formatted. Addresses are specified in one place, and the URI format simply passes addresses through.

The reason for keeping them independent is that the address format could change (say, a new type is added, like P2SH (BIP13) before), and there is no reason why this should break or even concern URI handling code. Clearly, anything that actually interprets addresses in order to construct transactions will need changing. It's just two separate concerns, and they should be dealt with separately.

Luke Dashjr in reply to Melvin Carvalho permalink original

On Tuesday, June 11, 2013 1:11:33 PM Melvin Carvalho wrote:

Quoted text (2 lines)
> For the sake of argument let's say that opaque means that you can tell
> nothing about the address by examining the characters.

This is true or false based on CONTEXT.

Obviously, an implementation of transaction handling (eg, wallets) needs to be able to translate addresses to and from what they represent.

On the other hand, things like URI handlers do not (and should not) try to interpret the address as anything other than an arbitrary word (\w+).

Quoted text (3 lines)
> My understanding was that they are NOT opaque, and that if that has
> changed, it will invalidate much at least some wiki page, for examples at
> least some of the following would now be false:

The wiki goes into much detail on how addresses work, which is not the concern of most software in the Bitcoin ecosystem, but may be of interest to humans and developers working on the one component that operates the "black box" that addresses are.

Quoted text (3 lines)
> --------
> <snip>
> --------

These aren't FALSE, they are "true at the moment, but subject to revision by newer standards".

Quoted text (2 lines)
> I also here that there is a LIKELY change from the base58 encoding ... when
> was this established?

I stated (on IRC) that it was likely Bitcoin would change from the base58 encoding for addresses ... at some unspecified time in the future, to some unspecified new encoding that addressed known limitations of base58. What those changes will be, or when, are not all established at this time. The only currently-planned change to addresses (very loosely defined) is inclusion of the Payment Protocol URIs. But the point is that software developers shouldn't assume that addresses will remain base58 forever.

Luke

Melvin Carvalho in reply to Luke Dashjr permalink original

On 11 June 2013 17:29, Luke-Jr <luke@dashjr•org> wrote:

Quoted text (13 lines)
> On Tuesday, June 11, 2013 1:11:33 PM Melvin Carvalho wrote:
> > For the sake of argument let's say that opaque means that you can tell
> > nothing about the address by examining the characters.
>
> This is true or false based on CONTEXT.
>
> Obviously, an implementation of transaction handling (eg, wallets) needs
> to be
> able to translate addresses to and from what they represent.
>
> On the other hand, things like URI handlers do not (and should not) try to
> interpret the address as anything other than an arbitrary word (\w+).
>

I think this statement may need to be justified.

Quoted text (20 lines)
>
> > My understanding was that they are NOT opaque, and that if that has
> > changed, it will invalidate much at least some wiki page, for examples at
> > least some of the following would now be false:
>
> The wiki goes into much detail on how addresses work, which is not the
> concern
> of most software in the Bitcoin ecosystem, but may be of interest to humans
> and developers working on the one component that operates the "black box"
> that
> addresses are.
>
> > --------
> > <snip>
> > --------
>
> These aren't FALSE, they are "true at the moment, but subject to revision
> by
> newer standards".
>

Got it.

Quoted text (16 lines)
>
> > I also here that there is a LIKELY change from the base58 encoding ...
> when
> > was this established?
>
> I stated (on IRC) that it was likely Bitcoin would change from the base58
> encoding for addresses ... at some unspecified time in the future, to some
> unspecified new encoding that addressed known limitations of base58. What
> those changes will be, or when, are not all established at this time. The
> only
> currently-planned change to addresses (very loosely defined) is inclusion
> of
> the Payment Protocol URIs. But the point is that software developers
> shouldn't
> assume that addresses will remain base58 forever.
>

Does this mean that people should not be investing in "vanity addresses"?

Quoted text (3 lines)
>
> Luke
>
Melvin Carvalho in reply to Luke Dashjr permalink original

On 11 June 2013 17:29, Luke-Jr <luke@dashjr•org> wrote:

Quoted text (13 lines)
> On Tuesday, June 11, 2013 1:11:33 PM Melvin Carvalho wrote:
> > For the sake of argument let's say that opaque means that you can tell
> > nothing about the address by examining the characters.
>
> This is true or false based on CONTEXT.
>
> Obviously, an implementation of transaction handling (eg, wallets) needs
> to be
> able to translate addresses to and from what they represent.
>
> On the other hand, things like URI handlers do not (and should not) try to
> interpret the address as anything other than an arbitrary word (\w+).
>

Luke, if you think that the sole purpose of a URI scheme is to be used as a URI handler, I think you've not fully understood the concept. URIs are the global variable of the internet, and as such the need to play nicely with all other URI schemes on the net. They need to be able to be linked to, to be defined and documented. This is important for bitcoin to get right because bitcoin: needs to treated in a special way on the internet, I just saw today that it was treated by some software as a relative URL, which is going to break a ton of stuff.

Quoted text (35 lines)
>
> > My understanding was that they are NOT opaque, and that if that has
> > changed, it will invalidate much at least some wiki page, for examples at
> > least some of the following would now be false:
>
> The wiki goes into much detail on how addresses work, which is not the
> concern
> of most software in the Bitcoin ecosystem, but may be of interest to humans
> and developers working on the one component that operates the "black box"
> that
> addresses are.
>
> > --------
> > <snip>
> > --------
>
> These aren't FALSE, they are "true at the moment, but subject to revision
> by
> newer standards".
>
> > I also here that there is a LIKELY change from the base58 encoding ...
> when
> > was this established?
>
> I stated (on IRC) that it was likely Bitcoin would change from the base58
> encoding for addresses ... at some unspecified time in the future, to some
> unspecified new encoding that addressed known limitations of base58. What
> those changes will be, or when, are not all established at this time. The
> only
> currently-planned change to addresses (very loosely defined) is inclusion
> of
> the Payment Protocol URIs. But the point is that software developers
> shouldn't
> assume that addresses will remain base58 forever.
>

I am opposed to address changes in general, until he wider implications are fully understood.

Quoted text (3 lines)
>
> Luke
>