<p>I cross posted this question on another forum and revived the below answer</p>

<blockquote>
  <p>The security of these systems tend to depend on the precise set of behaviors that should be allowed. You may be able to find a simpler system, depending on the behaviors. For example, it may make more sense to have the 5 provide cryptographic commitments for their vote during the 24 hour period. Then, when 5 commitments are seen or 24 hours has passed, each one reveals their vote. This handles the specific issue you mention of skewing the results, but does demand that the parties broadcast 2 messages at different times, rather than just one message.</p>
</blockquote>

<p>From this i consulted with a few other people can came up with the below which should work </p>

<blockquote>
  <p>Each of the 5 parties could publish Hash(vote || random bytes), because of the random bytes it would not be possible to find the vote by hashing guesses. Then after all commitments are published or 24 hours has passed each party would publish the plaintext = (vote || random bytes), and all other parties could hash that to verify that it is equal to the original commitment.</p>
</blockquote>

<p>This solution is elegant in that it relies only on the parties participating to reveal the information  </p>

CC BY-SA 3.0
2018-03-02T01:07:02.613Z
2018-03-02T01:07:02.613Z
Kam
<p>So imagine we have 5 different parties, all of these parties test if a particular thing is true or false over the course of 24 hours. The network needs to come to a consensus about the majority outcome of these parties votes. So the 5 different parties need to submit their votes onto a blockchain, however if within the 24 hour time-frame one of the parties submits their vote early there comes potential for one of the other party members to look at the early submitted vote and copy that vote skewing the real result.</p>

<p>What is the way to prevent copying in this situation, can a hash time locked contract be opened that collects the encrypted votes from each party and then after the 24 hours reveal the result to the network? </p>

<p>Or is there something simple im missing, the basic idea is I want to cryptographicaly hide something and then reveal it at a certain block height</p>

<smartcontracts>
Reveal a result after block height
Kam
# Reveal a result after block height

(Asked by: username_0 on 2018-02-28)

So imagine we have 5 different parties, all of these parties test if a particular thing is true or false over the course of 24 hours. The network needs to come to a consensus about the majority outcome of these parties votes. So the 5 different parties need to submit their votes onto a blockchain, however if within the 24 hour time-frame one of the parties submits their vote early there comes potential for one of the other party members to look at the early submitted vote and copy that vote skewing the real result.

What is the way to prevent copying in this situation, can a hash time locked contract be opened that collects the encrypted votes from each party and then after the 24 hours reveal the result to the network?

Or is there something simple im missing, the basic idea is I want to cryptographicaly hide something and then reveal it at a certain block height

**Tags:** smartcontracts


---

## 1 answers

### Answer by username_0 on 2018-03-02. Score: 1

I cross posted this question on another forum and revived the below answer

> The security of these systems tend to depend on the precise set of behaviors that should be allowed. You may be able to find a simpler system, depending on the behaviors. For example, it may make more sense to have the 5 provide cryptographic commitments for their vote during the 24 hour period. Then, when 5 commitments are seen or 24 hours has passed, each one reveals their vote. This handles the specific issue you mention of skewing the results, but does demand that the parties broadcast 2 messages at different times, rather than just one message.

From this i consulted with a few other people can came up with the below which should work

> Each of the 5 parties could publish Hash(vote || random bytes), because of the random bytes it would not be possible to find the vote by hashing guesses. Then after all commitments are published or 24 hours has passed each party would publish the plaintext = (vote || random bytes), and all other parties could hash that to verify that it is equal to the original commitment.

This solution is elegant in that it relies only on the parties participating to reveal the information


---

