<p>It's not clear what the strategy is. It just says "and solve the system of equations". </p>

<p>The entire structure of cryptographic hashes like SHA256 is carefully designed to make doing this as difficult as possible, and there's not even a hint of <em>how</em> to solve that system of equations.</p>

<p>This is precisely what ordinary miners do, except they try to solve the system of equations by guessing possible solutions and seeing if they solve the equations. If there is a simpler way to solve them, what is it?</p>

CC BY-SA 4.0
2020-01-04T05:28:04.023Z
I think he is referring to Boolean functions or something.
Biology nerd
CC BY-SA 4.0
2020-01-04T05:48:09.730Z
@Biologynerd Which is exactly what bitcoin miners do.
David Schwartz
CC BY-SA 4.0
2020-01-04T05:26:42.907Z
2020-01-04T05:26:42.907Z
David Schwartz
<blockquote>
  <p>Now, I'm not a math guy, but from what I can gather, this strategy takes up a lot of computing memory. Therefore, my question is - is this strategy theoretically feasible?</p>
</blockquote>

<p>If it is feasible, SHA256 is broken and we should switch to something else.</p>

<p>The whole point of proof-of-work is to find a function for which partial preimages can practically only be found by iterating candidate solutions (or at least using work proportional to the number of candidate solutions tried).</p>

<p>If an algebraic way to solve these equations exists, it means SHA256 is not sufficiently distinguishable from a random function, as the relation between input and output obeys some tractable algebraic formulas. It wouldn't just be a break for its use in Bitcoin, but to SHA256 in general.</p>

<blockquote>
  <p>Can it be as efficient as ASIC mining?</p>
</blockquote>

<p>If it works and is feasible, it'd likely be faster as it would permit solvers that scale better with increasing difficulty.</p>

<p>Thankfully, this approach is infeasible.</p>

CC BY-SA 4.0
2020-01-04T07:16:26.480Z
2020-01-04T07:16:26.480Z
Pieter Wuille
<p>This guy on bitcointalk.org suggested a potentially faster method for mining bitcoins using CPUs: <a href="https://bitcointalk.org/index.php?topic=265759.0" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=265759.0</a> </p>

<p>To quote from the author: </p>

<p>"Rather than computationally solving for SHA256(SHA256(block_header)), the approach is to solve it symbolically.   What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total).   Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash.  These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size.</p>

<p>The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.)  For the purposes of mining at difficulty 1, you can discard all but the first 32 equations.  </p>

<p>Now to mine using this method:  You have to collapse the equations and simplify.   Take the current, real block_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.)  Reduce.  </p>

<p>Now you have a system of 32 equations, and 32 unknowns.   Set all 32 equations equal to one another, and solve the system of equations.    </p>

<p>What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.)</p>

<p>Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example:</p>

<p>a^b == (a+b)%2<br>
(a | b) == ( (a*b)%2 + a%2 + b%2 );<br>
(a &amp; b) == (a * b) % 2 "</p>

<p>Now, I'm not a math guy, but from what I can gather, this strategy takes up a lot of computing memory. Therefore, my question is - is this strategy theoretically feasible? Can it be as efficient as ASIC mining?</p>

CC BY-SA 4.0
2020-01-04T04:48:31.600Z
The key question is whether there is any way to solve this system of equations that's significantly faster than "guess and check", which would take about 2^32 guesses, which is about the same amount of time as via the usual hashing.  In general one wouldn't expect that, because it's the NP-complete [Boolean satisfiability problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem).
Nate Eldredge
<mining-theory>
Is it possible to mine bitcoins faster on CPUs with this strategy?
Biology nerd
# Is it possible to mine bitcoins faster on CPUs with this strategy?

(Asked by: username_0 on 2020-01-04)

This guy on bitcointalk.org suggested a potentially faster method for mining bitcoins using CPUs: <https://bitcointalk.org/index.php?topic=265759.0>

To quote from the author:

"Rather than computationally solving for SHA256(SHA256(block\_header)), the approach is to solve it symbolically. What I mean by this is, rather than treating the block header input bits as 0 or 1, treat each input bit as an individual symbolic variable (640 in total). Next, perform the double SHA256, and produce a set of equations that represents each bit in the final hash. These will obviously be huge, but you can PolynomialReduce after each step of the hashing to reduce the equation size.

The SHA256 output is 32 bytes, so what you end up with is a system of 256 equations, consisting of 640 variables each (which include all the logical operators applied from the double hash.) For the purposes of mining at difficulty 1, you can discard all but the first 32 equations.

Now to mine using this method: You have to collapse the equations and simplify. Take the current, real block\_header in question, and fill in actual values in your 32 equations for every bit except for the 32-bit nonce (608 in total.) Reduce.

Now you have a system of 32 equations, and 32 unknowns. Set all 32 equations equal to one another, and solve the system of equations.

What you end up with are 3 possible solutions: A nonce that produces 32 "0" bits (what we want), a nonce that produces all "1" bits (discard) or no solution (increment extraNonce.)

Note to make reduction and solving the system of equations simpler, convert the logical operators (xor, or, and) into arithmetic operations and do the reduction and solving in the modulo 2 number ring, for example:

a^b == (a+b)%2  
(a | b) == ( (a\*b)%2 + a%2 + b%2 );  
(a & b) == (a \* b) % 2 "

Now, I'm not a math guy, but from what I can gather, this strategy takes up a lot of computing memory. Therefore, my question is - is this strategy theoretically feasible? Can it be as efficient as ASIC mining?

**Tags:** mining-theory

> **Comments:**
> **username_1**: The key question is whether there is any way to solve this system of equations that's significantly faster than "guess and check", which would take about 2^32 guesses, which is about the same amount of time as via the usual hashing.  In general one wouldn't expect that, because it's the NP-complete [Boolean satisfiability problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem).  

---

## 2 answers

### Answer by username_2 on 2020-01-04. Score: 2

It's not clear what the strategy is. It just says "and solve the system of equations".

The entire structure of cryptographic hashes like SHA256 is carefully designed to make doing this as difficult as possible, and there's not even a hint of *how* to solve that system of equations.

This is precisely what ordinary miners do, except they try to solve the system of equations by guessing possible solutions and seeing if they solve the equations. If there is a simpler way to solve them, what is it?

> **Comments:**
> **username_0**: I think he is referring to Boolean functions or something.  
> **username_2**: @username_0 Which is exactly what bitcoin miners do.  

---

### Answer by username_3 on 2020-01-04. Score: 1

> Now, I'm not a math guy, but from what I can gather, this strategy takes up a lot of computing memory. Therefore, my question is - is this strategy theoretically feasible?

If it is feasible, SHA256 is broken and we should switch to something else.

The whole point of proof-of-work is to find a function for which partial preimages can practically only be found by iterating candidate solutions (or at least using work proportional to the number of candidate solutions tried).

If an algebraic way to solve these equations exists, it means SHA256 is not sufficiently distinguishable from a random function, as the relation between input and output obeys some tractable algebraic formulas. It wouldn't just be a break for its use in Bitcoin, but to SHA256 in general.

> Can it be as efficient as ASIC mining?

If it works and is feasible, it'd likely be faster as it would permit solvers that scale better with increasing difficulty.

Thankfully, this approach is infeasible.


---

