<p>Consider the following scenario</p>

<p>User A stores an image on a DHT and receives a SHA-256 hash in return. </p>

<p>User A wants to prove ownership of the data has, so he registers a username on the namecoin blockchain and receives a public-private key pair in return.</p>

<p>User B want proof that user A owns the DHT hash.</p>

<p>2 Questions</p>

<ol>
<li>How does User A 'sign' the DHT hash with his namecoin private key?</li>
<li>How does User B get proof that User A signed the DHT hash with their namecoin private key?</li>
</ol>

CC BY-SA 3.0
2015-02-27T08:24:49.390Z
How do you prevent people from claiming ownership of hashes of data that they don't own?
Nick ODell
CC BY-SA 3.0
2015-02-27T08:46:11.987Z
by signing it with your namecoin private key
guestdude
CC BY-SA 3.0
2015-02-27T14:48:12.960Z
But anyone who has the hash can sign it. For example, following the exchange you describe, User B has a copy of the hash (he had to, in order to verify the signature), and now he can sign it himself and try to convince some User C that the data actually "belongs" to him.
Nate Eldredge
CC BY-SA 3.0
2015-02-27T16:52:17.727Z
The only way you can do something like this is if you keep the data AND sha256 secret. You could maybe make the sha256 into the private key for the secp256k1 curve and only publish the public key (output point on the curve). Then you can prove that you own the data that hashes to the private key by signing with it. Of course, once you actually reveal the data, everything is now known to the world, so I'm not sure what you'd accomplish. In any case, the objections above hold. Unless you keep the hash secret, your scheme won't work.
Jimmy Song
<namecoin><cryptography>
Signing data with a namecoin private key?
guestdude
# Signing data with a namecoin private key?

(Asked by: username_0 on 2015-02-27)

Consider the following scenario

User A stores an image on a DHT and receives a SHA-256 hash in return.

User A wants to prove ownership of the data has, so he registers a username on the namecoin blockchain and receives a public-private key pair in return.

User B want proof that user A owns the DHT hash.

2 Questions

1. How does User A 'sign' the DHT hash with his namecoin private key?
2. How does User B get proof that User A signed the DHT hash with their namecoin private key?

**Tags:** namecoin, cryptography

> **Comments:**
> **username_1**: How do you prevent people from claiming ownership of hashes of data that they don't own?  
> **username_0**: by signing it with your namecoin private key  
> **username_2**: But anyone who has the hash can sign it. For example, following the exchange you describe, User B has a copy of the hash (he had to, in order to verify the signature), and now he can sign it himself and try to convince some User C that the data actually "belongs" to him.  
> **username_3**: The only way you can do something like this is if you keep the data AND sha256 secret. You could maybe make the sha256 into the private key for the secp256k1 curve and only publish the public key (output point on the curve). Then you can prove that you own the data that hashes to the private key by signing with it. Of course, once you actually reveal the data, everything is now known to the world, so I'm not sure what you'd accomplish. In any case, the objections above hold. Unless you keep the hash secret, your scheme won't work.  

---

## 0 answers

