Bitcoin Forum
May 25, 2024, 05:04:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Checking addresses against an MPK  (Read 1116 times)
LicensedCrab (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 08, 2014, 09:01:44 PM
 #1

I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
December 08, 2014, 09:13:57 PM
 #2

I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.

What is an MPK?
LicensedCrab (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 08, 2014, 09:33:41 PM
 #3

I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.

What is an MPK?
master public key (the public key for your wallet. This is what generates all of your addresses)
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
December 08, 2014, 09:37:08 PM
 #4

I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.

What is an MPK?
master public key (the public key for your wallet. This is what generates all of your addresses)

maybe he means master private key within the context of a deterministic wallet.
I don't know for sure but I am guessing the answer is no to #2, you'd have to
loop through various addresses, there's no way to work backwards from an address,
find the eliptic curve points and match them up to the MPK.  

DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
December 08, 2014, 09:37:53 PM
 #5

Which wallet?  Are you talking about Electrum, Armory, or something else?
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
December 09, 2014, 03:12:00 AM
 #6

I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.

In all likelihood, every address belongs to you after a sufficiently large number of iterations. It's because the mpk produces an address by adding to your first secret key a deterministic offset which is a hash. The later should eventually cover every possible value. It's not a proof - there could be a cycle, but it would make the hash function distinguishable from random IMO.

You don't need a script cause you own them all 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!