Ethereum: What complexity class is Bitcoin’s work certificate (hashcash)?
To solve this question, I specify exactly the idealized hypothetical “perfect” hash activity, H (n) with comfortable scalability properties. Then I shape the problem with the complete Hashcash’s complexity of the class p (n). This helps us to understand whether Bitcoin’s work certificate (hashcash) is NP or otherwise.
Problem: Complete Hash Function
The perfect hash function H (n) would be an algorithm that takes a large result n and produces a fixed size output, typically presented as a number. In connection with encryption applications, such as digital signatures and non-Cons, the well-designed hash function can provide solid safety against different types of attacks.
Hashcash is one such example of work and work-based Hash activities. It is designed to validate the events on the Bitcoin network, ensuring that they are valid and cannot be dual practices. This is how it works:
- The miner (Node on Bitcoin) creates an individual identification for each event.
- The minister calculates the Hash value of the event using the combination of its content and block number.
3.
If these two hashs are responding, it means that the event has been successfully validated (ie “found” in the database). In this case, the ministry is rewarded with recently beaten Bitcoin coins.
Problem complete hashcash
We are now setting a complete Hashcash problem that allows us to evaluate Hashcash’s deferred complexity:
Problem: Input N, Find all possible outputs x so that H (n) = x Module 2^64.
In other words, when a large number of n is given, we have to create all the potential values of X in the area [0, 2^64] using the Hash function h (n). The most important idea here is that H (n) can be presented as follows:
H (n) ≡ x (mod 2^64)
where H (n) is the decentralization value n.
Time complexity analysis
To analyze the complexity of the complete hashcash, we can use the following steps:
- Calculate the hash value h (n) using the income and encryption substance (eg, SHA-256).
- Find all possible outputs in the area [0, 2^64], which satisfy the equation H (n) = x Module 2^64.
- Calculate the number of valid solutions.
The complexity of the complete Hashcash time can be analyzed by taking into account the number of potential income n and the number of iterations needed to find a solution for every income.
Calculated complexity class
With the help of the potential N N n, we can evaluate the complete Hashcash computational complexity. Usually, the complexity of the hash functions is classified into two main categories: P (N) and NP (N).
* P (N) Problems are those that can be solved during the deterministic algorithm (where D is the depth of the problem), where N is a supply size during the polynomial period.
* NP (n)
Problems are those that can be secured during the polynomial time with a witness (eg solution to the problem). If there is a solution, it must also be verifiable.
In this case, because the complete Hashcash includes finding all possible results X for a specific income n, we can evaluate its computational complexity as follows:
- If n is relatively small (eg <10^8), then the perfect hashcash can take the o (2^n) time.
- For higher income, the number of iterations needed to find a solution increases polynomically with the size of the income.
conclusion
In summary, although we have not explicitly prove that Hashcash is NP or otherwise, our analysis suggests that it can be p (n). However, this is an open problem and requires further research.