- CRYPTOCURRENCY
-
by admin
Ethereum: What class of complexity is the proof of Bitcoin work (Hashcash)?
To accurately address this, I will define the idealized hypothetical “perfect” hash function H (N), which has nice scalability properties. Then I will formulate the problem of perfect hascash for time complexity p (n). This will help us understand whether Bitcoin’s evidence (Hashcash) is NP-full or other.
Problem: Perfect hash function
A great hash function H (N) would be an algorithm that takes a large entrance to N and creates a fixed size output, which is usually represented as a number. In the context of a cryptographic application, such as digital signatures and relations, a well -designed hash function can provide stable security against various types of attacks.
Hashcash is one of the following examples of work evidence -based hash functions. It is designed to confirm transactions on the Bitcoin network, ensuring that they are valid and cannot be spent twice. Here’s how it works:
- The miners (knot on the Bitcoin network) generates a unique identifier for each transaction.
- The miners calculate the confusion of the transaction using a combination of its content and the block number.
- The resulting hash value is compared to the target value that can be set to the transaction sender.
If both hashs coincide, this means that the transaction is successfully confirmed (i.e. “found” in the database). In this case, the miner is rewarded with the newly dried Bitcoin coins.
Problem Perfect Hashcash
Now let’s define the problem of the perfect Hashcash we can use to assess the complexity of Hashcash computing:
Problem: Given the input N, find all possible exits X so that h (n) = x modulo 2^64.
In other words, given a large number N, we need to build all possible X values in the range [0, 2^64] using Hash Function H (N). The main insight here is that h (n) can be depicted as follows:
h (n) ≡ x (mod 2^64)
where h (n) is the entrance hash value n.
Time complexity analysis
To analyze the complexity of the perfect Hashcash time, we can use the following:
- Calculate the Hash value H (N) using given inputs and cryptographic hash function (eg SHA-256).
- Find all possible outputs in the X range [0, 2^64] corresponding to the equation H (N) = X modulo 2^64.
- Count the number of useful solutions.
Perfect Hashcash time complexity can be analyzed based on the possible number of input N and iterations needed to find a solution for each entrance.
Class of complexity of computing **
Using a possible number of entrances N, we can appreciate the perfect complexity of Hashcash computing. In general, the complexity of the HASH features is classified in two main classes: P (N) and NP (N).
* P (N) Problems are those that can be solved during polynomial with a deterministic algorithm that works during O (N^D) (where D is the depth of the problem) where n is the size of the input.
* NP (N) Problems are those that can be tested during polynomial through a witness (such as a solution to the problem). If there is a solution, it must also be tested.
In this case, since the perfect Hashcash involves finding all possible outputs X for a specific input N, we can assess its calculation complexity as follows:
- If n is relatively small (for example, <10^8), then perfect hascash can take o (2^n) time.
- Larger entrances to find the solution needed to find the solution increases polynomially with the input size.
Conclusion
In conclusion, although we have not clearly proved that Hashcash is NP-full or other, our analysis shows that it can be P (N). However, it is still an open problem and requires further investigation.