Author

Topic: How to encrypt a puzzle (Read 755 times)

copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
August 17, 2015, 01:38:32 PM
#9
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?
The number was 1. You can't use a raw hash for anything that can be brute-forced. The correct way to do it is to encrypt the answer using a well-known symmetric cipher (such as AES) and a strong (random) key, and publish the encrypted answer and a hash of the encryption key (and when the answer is to be revealed, publish the key itself).

Yes, thats why I said above "depending on the complexity of the problem". Its still possible for things with a low complexity e.g. numbers between 1 and 10 if I dont tell you the format of the solution.

E.g. I could have hashed:

The solution is the number "one"; today is 2015.08.17

This would require me to reveal the solution at a certain time and everyone can use the hash to check that I did not cheat.

I had the impression that OP wanted to enable users to check themselfes whether a result is correct or not. In this case encryption would not be a possible solution.
hero member
Activity: 504
Merit: 502
August 17, 2015, 04:47:41 AM
#8
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?
The number was 1. You can't use a raw hash for anything that can be brute-forced. The correct way to do it is to encrypt the answer using a well-known symmetric cipher (such as AES) and a strong (random) key, and publish the encrypted answer and a hash of the encryption key (and when the answer is to be revealed, publish the key itself).

Is there a simple and practical way to achieve this? Would you please post some reading material? Thanks
legendary
Activity: 4326
Merit: 3041
Vile Vixen and Miss Bitcointalk 2021-2023
August 17, 2015, 12:00:42 AM
#7
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?
The number was 1. You can't use a raw hash for anything that can be brute-forced. The correct way to do it is to encrypt the answer using a well-known symmetric cipher (such as AES) and a strong (random) key, and publish the encrypted answer and a hash of the encryption key (and when the answer is to be revealed, publish the key itself).
staff
Activity: 3374
Merit: 6530
Just writing some code
August 15, 2015, 02:49:07 PM
#6
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks

Hash the solution if possible and provide the hash. It allows users to check whether their solution is correct. It does allow for a brute force attack on the hash, but depending on the complexity of the solution that should be no problem.

Yeah, how does one do such thing?

E.g. here -> http://www.xorbin.com/tools/sha256-hash-calculator

Enter your solution as "data", click Calculate... and publish the hash.

E.g.:
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?

Sounds more complicated that I thought. No idea what the number is.
That's the idea. You can't know from the hash what was hashed, but when you have an answer, you can easily check to see if the answer is right.
hero member
Activity: 504
Merit: 502
August 15, 2015, 01:04:27 PM
#5
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks

Hash the solution if possible and provide the hash. It allows users to check whether their solution is correct. It does allow for a brute force attack on the hash, but depending on the complexity of the solution that should be no problem.

Yeah, how does one do such thing?

E.g. here -> http://www.xorbin.com/tools/sha256-hash-calculator

Enter your solution as "data", click Calculate... and publish the hash.

E.g.:
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?

Sounds more complicated that I thought. No idea what the number is.
copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
August 15, 2015, 12:54:37 PM
#4
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks

Hash the solution if possible and provide the hash. It allows users to check whether their solution is correct. It does allow for a brute force attack on the hash, but depending on the complexity of the solution that should be no problem.

Yeah, how does one do such thing?

E.g. here -> http://www.xorbin.com/tools/sha256-hash-calculator

Enter your solution as "data", click Calculate... and publish the hash.

E.g.:
I hashed (sha256 using the above site) a number between 1 and 10, this is the hash 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
which number was it?
hero member
Activity: 504
Merit: 502
August 15, 2015, 12:52:31 PM
#3
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks

Hash the solution if possible and provide the hash. It allows users to check whether their solution is correct. It does allow for a brute force attack on the hash, but depending on the complexity of the solution that should be no problem.

Yeah, how does one do such thing?
copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
August 15, 2015, 12:22:12 PM
#2
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks

Hash the solution if possible and provide the hash. It allows users to check whether their solution is correct. It does allow for a brute force attack on the hash, but depending on the complexity of the solution that should be no problem.
hero member
Activity: 504
Merit: 502
August 15, 2015, 10:49:33 AM
#1
Hi,

Let´s say I have a puzzle. I want to publish the solution online at the same time I present the puzzle to the public, but the solution should be encrypted.

How can I do this is practical terms? I want to prove that the results of the puzzle were uploaded and untouched, only protected by a key. Therefore impossible to manipulate.

The key would be given out to the public in the future to prove the solution.

Thanks
Jump to: