Bitcoin Forum
May 09, 2024, 03:36:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Funny address pair  (Read 1607 times)
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 20, 2014, 04:31:45 PM
 #1

Look at these addresses
https://blockchain.info/address/1LKR8M54CKzZ2pnkmgLmQVzgMTP4md2gMw
https://blockchain.info/address/3M1S3tZVkEJw7zVBtn1Mq8McVyfnNMAuoX

These two addresses have the same hash d3e604621abfc263162af107834b5a04011b9751
And both addresses are spendable
The first one is spendable by private key owner (not me), the second - by everyone (thanks to Eligius)

The public key of 1LKR8M54CKzZ2pnkmgLmQVzgMTP4md2gMw is 03641eee1b2919d6a7a0dd5ea30dbfee0e687948e57e70b347eb8c32feae01d96d
and it is valid bitcoin script acceptable by bip-16

Code:
03 641eee                                                  // push "641eee"
1b 2919d6a7a0dd5ea30dbfee0e687948e57e70b347eb8c32feae01d9  // push "2919...01d9"
6d                                                         // OP_2DROP
1715269015
Hero Member
*
Offline Offline

Posts: 1715269015

View Profile Personal Message (Offline)

Ignore
1715269015
Reply with quote  #2

1715269015
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715269015
Hero Member
*
Offline Offline

Posts: 1715269015

View Profile Personal Message (Offline)

Ignore
1715269015
Reply with quote  #2

1715269015
Report to moderator
1715269015
Hero Member
*
Offline Offline

Posts: 1715269015

View Profile Personal Message (Offline)

Ignore
1715269015
Reply with quote  #2

1715269015
Report to moderator
micaman
Sr. Member
****
Offline Offline

Activity: 345
Merit: 500



View Profile WWW
July 20, 2014, 05:29:15 PM
 #2

The 2nd one is a multisig address. You probably need more than 1 private key to spend those funds.
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 20, 2014, 05:54:16 PM
 #3

The 2nd one is a multisig address. You probably need more than 1 private key to spend those funds.

No. It is p2sh address but not a msig address. I took these funds without knowledge of private key.
TimS
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 20, 2014, 06:02:47 PM
 #4

Cool! A great deal of these address pairs exist. You could search for them like you search for vanity addresses quite easily - the given example only really requires 2 bytes in the public key fixed (1b and 6d), since you can compress any public key to an 03 pub key.
It's confusing to the likes of blockchain.info (it says 3M1... has a negative balance), but they're both perfectly valid and separate addresses (although, being anyone-spend, you don't want to use the second for real stuff).
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 20, 2014, 06:17:03 PM
 #5

Quote
Cool! A great deal of these address pairs exist.
The second address is useless, because everyone can transfer funds to himself.

Quote
You could search for them like you search for vanity addresses quite easily - the given example only really requires 2 bytes in the public key fixed (1b and 6d), since you can compress any public key to an 03 pub key.

Public keys can start with 02, 03 and 04. And there are a lot of different valid bip-16 scripts - we can use a big set of opcodes - OP_DUP, OP_DROP, OP_NOPx... Several forms of OP_PUSH...

Quote
It's confusing to the likes of blockchain.info (it says 3M1... has a negative balance),
It is a bug of bc.i

Quote
but they're both perfectly valid and separate addresses (although, being anyone-spend, you don't want to use the second for real stuff).
It is not my address (I do not know private key), but I like this idea... And thanks for some btc amount which i transfered to my account Smiley
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 20, 2014, 07:29:36 PM
 #6

I am sorry, I am not quite getting this. RIPEMD160 hash is 160 bits. What's the probability of two addresses having the same RIPEMD160 hash?

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
TimS
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 20, 2014, 07:51:46 PM
 #7

I am sorry, I am not quite getting this. RIPEMD160 hash is 160 bits. What's the probability of two addresses having the same RIPEMD160 hash?
Randomly? 1 in 2^160. But you can choose...

An address contains three parts: a version number, the 160 bit hash, and a checksum. Version 00 is used for Bitcoin pubkey hash addresses, and makes the address start with a 1. Version 05 is used for Bitcoin script hashes (typically multi-sig), and makes a prefix of 3.

You can use the same 160 bits to make more than one address by changing the version number. As done here where one is a normal pubkey hash, the other is a P2SH address where the "script" is the pubkey (interpreted as a Bitcoin Script). If this pubkey-as-script allows you to spend the output, then both addresses can be spent from by people with the right information.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8419



View Profile WWW
July 20, 2014, 10:48:35 PM
 #8

These two addresses have the same hash d3e604621abfc263162af107834b5a04011b9751
They have entirely different scriptPubKeys, however. The sameness is only even remotely interesting because of bugs in bc.i (and perhaps some other wallets that just ignore the version bytes).

You might want to attribute where you saw this discussion…
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 21, 2014, 04:21:33 AM
 #9

Quote
You might want to attribute where you saw this discussion…
Sorry, I am not sure that I understand you. What discussion should I attribute?
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 21, 2014, 04:36:53 AM
 #10

Quote
You might want to attribute where you saw this discussion…
Sorry, I am not sure that I understand you. What discussion should I attribute?


Maybe, how did you find this occurrence of same hash?
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 21, 2014, 04:55:10 AM
Last edit: July 21, 2014, 05:07:08 AM by amaclin
 #11

Quote
Maybe, how did you find this occurrence of same hash?
My script monitors for non-standard transactions and notifies me about "something new&interesting".

There were such pairs in blockchain in the past, but I have never seen both addresses of pair spendable
For example:
https://blockchain.info/address/3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy - spendable p2sh address
https://blockchain.info/address/1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E - the private key is known to nobody[?]

gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8419



View Profile WWW
July 21, 2014, 06:07:51 AM
 #12

Quote
Maybe, how did you find this occurrence of same hash?
My script monitors for non-standard transactions and notifies me about "something new&interesting".
Ah, good spotting then. It was a product of this discussion today: http://download.wpsoftware.net/bitcoin/wizards/2014-07-20.html  start at 00:56:13

I made an erroneous assumption that you'd been watching the logs and made the post as a result. Smiley
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 21, 2014, 06:54:33 AM
Last edit: July 21, 2014, 07:51:52 AM by amaclin
 #13

Quote
I made an erroneous assumption that you'd been watching the logs and made the post as a result. Smiley

I assume that you are watching the blockchain

Code:
petertodd:	lol, 3PhyP1FWB8KgwrNgUPbjP7iv6YfoH3GhK7 is kinda hilarious....
02:47:50 gmaxwell: what this?
02:48:41 petertodd: gmaxwell: e.g. 70c8405bd0ec10bea49b78a819dfbf46c1082e7e620588f9da65a90b71e52bbd which spends an output of it...

and discussing my transactions  Grin Grin Grin

Code:
02:32:37	gmaxwell:	kanzure: looks like someone has implemented p2sh by sending as pay-to-pubkeyhash. e.g. just ignoring the version byte.

posted by me on july, 02:
https://bitcointalk.org/index.php?topic=673737.msg7633818#msg7633818
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 22, 2014, 08:11:34 AM
 #14

Quote
Maybe, how did you find this occurrence of same hash?
My script monitors for non-standard transactions and notifies me about "something new&interesting".

Thought you would have a script.  Is it open source?
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 22, 2014, 08:14:35 AM
 #15

Quote
Maybe, how did you find this occurrence of same hash?
My script monitors for non-standard transactions and notifies me about "something new&interesting".
Ah, good spotting then. It was a product of this discussion today: http://download.wpsoftware.net/bitcoin/wizards/2014-07-20.html  start at 00:56:13

I made an erroneous assumption that you'd been watching the logs and made the post as a result. Smiley

If you only discussed today, and OP made the post a few days ago, how could he have seen the logs back then? Smiley
Or was there a related earlier discussion too?   Thanks for the reference on today's discussion.
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 22, 2014, 09:02:45 AM
 #16

Quote
If you only discussed today, and OP made the post a few days ago, how could he have seen the logs back then? Smiley
Or was there a related earlier discussion too?   Thanks for the reference on today's discussion.

Of course I located these things after the transactions were sent and confirmed into the blockchain.
So, I was several hours behind of wizards and their discussion Grin

Quote
Thought you would have a script.  Is it open source?

It is not a script but a set of different methods from dumping all addresses to sniffing bitcoin traffic.
No, it is not opensource, but I would like to share my knowledge with everyone.
Just excuse me, my English is bad.
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 22, 2014, 09:20:17 AM
 #17

Quote
No, it is not opensource, but I would like to share my knowledge with everyone.
Just excuse me, my English is bad.

Thanks for sharing.
I understand now what is happening.

I think instead of "These two addresses have the same hash d3e604621abfc263162af107834b5a04011b9751" this would be clearer:

"These two addresses originate from the same hash d3e604621abfc263162af107834b5a04011b9751"


The first makes it sound like hash(addr1) == hash(addr2) == d3e604621abfc263162af107834b5a04011b9751
Whereas this discussion is about https://en.bitcoin.it/wiki/File:PubKeyToAddr.png  The hash you are talking about is the 20 bytes, and since different prefix byte can be used, this means the same hash can create different addresses.

edit: formatting
amaclin (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 22, 2014, 09:26:34 AM
 #18

Sorry for misunderstanding. English is not my native language. I prefer Java and C++  Smiley
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 22, 2014, 09:53:54 AM
 #19

No problem.  Everyone else seemed to understand what you meant Smiley
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!