Bitcoin Forum
April 30, 2024, 11:27:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Create a wallet address from a hash a photo / digital file?  (Read 975 times)
CryptoCoinUser (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
July 17, 2014, 03:41:09 PM
Last edit: July 17, 2014, 04:23:49 PM by CryptoCoinUser
 #1

Hi.
Is it possible to provably associate a new Bitcoin wallet address with a JPG photo (or some other digital file) by basing it on the address on a hash of that file?
Given the file, one should be able to verify that the address "came" from the file, among other sources.
This is similar to what services like http://www.proofofexistence.com/ that record & time-stamp a hash of a file in the blockchain via provably un-spendable transactions, but can this be done for a working receiving wallet address?
What would that be used for?
I can see people wanting "vanity" wallets based on their mug shot, or a photo of a loved one - the base58 address would still appear random, but just for the idea of it being *based* on something special.
Or maybe the photo can be used as an easily-recognizable "private key", granted most photos are not private.
If the above is possible, a merchant accepting bitcoins can make a wallet based on the picture of the invoice / receipt that he sends to the customer anyway.
I can also think of a use for a wallet that's provably made from a hash of a Craigslist listing page.
I do know that the easiest way to prove you control an address is to sign a message, but that requires more interaction between the two parties.
Thanks.
1714519627
Hero Member
*
Offline Offline

Posts: 1714519627

View Profile Personal Message (Offline)

Ignore
1714519627
Reply with quote  #2

1714519627
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714519627
Hero Member
*
Offline Offline

Posts: 1714519627

View Profile Personal Message (Offline)

Ignore
1714519627
Reply with quote  #2

1714519627
Report to moderator
1714519627
Hero Member
*
Offline Offline

Posts: 1714519627

View Profile Personal Message (Offline)

Ignore
1714519627
Reply with quote  #2

1714519627
Report to moderator
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
July 17, 2014, 04:48:51 PM
 #2

Not sure I understand you, but you can use the hash of (almost) anything and make it a private key. This would result in a specific address, but if you gave the (unmodified) picture to anyone, theyd have your private key. Thats probably not what you want.

Im not really here, its just your imagination.
TimS
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 17, 2014, 05:01:10 PM
 #3

I think this would be possible using a Pay to Script Hash (P2SH) address. The script that's hashed would be something like this:

  • push the sha256 hash of the data in question (JPG file, craigslist URL or page text, etc.; not the whole data, just the hash) onto the stack
  • discard the top item on the stack (the sha256 hash)
  • [a normal pay-to-pubkey-hash script]

Note that the image/data is neither the private nor public key, it's only included in the script/address as throwaway data. To verify that the P2SH address is what they think it is, you'd only need the image/data and the address you're actually paying to: they can recreate the P2SH address and verify that it matches the address you advertised. Thus the image/data is provably a part of the address (although it's not the only part you need to recreate the address).
Also note that spending from this address would, today, be a non-standard transaction. Sending to it would be standard, because the script hash hasn't entered the blockchain at all, it doesn't know the script there is non-standard.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4612



View Profile
July 17, 2014, 07:25:32 PM
 #4

If I understand what you're trying to do, then I agree that it should be possible to accomplish with a Pay to Script Hash address.

Essentially, you'd start with an bitcoin ECDSA private key that is completely random and not in any way related to the photo.

You'd then generate the public key.

Next you'd generate a SHA256 hash of the image and use that as a separate private key.

You'd then generate the public key associated with that private key.

You now have 2 private keys (one publicly known to anyone that has the image, and one that you keep secret), and 2 public keys.

Using the 2 public keys, you generate a 2 of 2 P2SH multisig address.

Now, by publishing the image and the redeem script, it can be proven that the SHA256 hash of the image is one of the two private keys necessary to sign transactions spending bitcoins that were received at that address.  However, only the person that controls the random private key actually has the ability to provide the necessary second signature.
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!