Questions tagged [hash]

A hash is the output of a hash function, a function which .is a mathematically reproducible but irreversible process that takes in an arbitrary length input and produces a fixed length output. The same input will always result in the same output. Hashing is central to Bitcoin mining as well as the generation of Bitcoin addresses.

A hash is the output of a hash function, a function which .is a mathematically reproducible but irreversible process that takes in an arbitrary length input and produces a fixed length output. The same input will always result in the same output. Hash functions often create output which is random looking, and secure hash functions cannot be reversed, i.e. the input cannot be known just by having the hash, and two inputs are unlikely to result in the same output.

Hashing is central to Bitcoin mining as part of the Proof of Work. In Bitcoin, the hash function used for the PoW is SHA256 double. Hashes are also used in Bitcoin addresses and as unique identifiers for blocks and transactions.

505 questions
163
votes
6 answers

What are bitcoin miners really solving?

As with mining, what are the bitcoin miners really solving? I read they are solving hashes, but what does that really mean. Can we see what they are solving? Can someone give an example of what a bitcoin mining machine sees to solve?
Patoshi パトシ
  • 10,956
  • 18
  • 80
  • 151
113
votes
13 answers

Is there a way to set up proof-of-work systems so they would be even more useful?

One of the arguments made against Bitcoin's design choices is that it wastes resources authenticating transactions. In particular, finding small hashes is completely useless for the world. Are there approaches (or other crypto-currencies) that use…
Artem Kaznatcheev
  • 2,016
  • 2
  • 15
  • 24
45
votes
2 answers

Nonce size - Will it always be big enough?

If I understand correctly, the block only has 4 bytes (32 bits) for the nonce. Is it possible for the difficulty to become high enough that there are no nonce solutions? If so, then what options does a miner have?
Michael Pickens
  • 903
  • 1
  • 7
  • 11
42
votes
1 answer

How are transaction hashes calculated?

I'm trying to calculate the hash of transactions in bitcoin blocks, but I'm not getting the right answers. For example, the genesis block has a single transaction. Here's how I'm attempting to calculate its hash... Transactions are encoded as: a 32…
Chris Moore
  • 14,745
  • 6
  • 65
  • 87
39
votes
5 answers

Why are hashes in the bitcoin protocol typically computed twice (double computed)?

According to the wiki specification of the bitcoin protocol, hashes are typically "computed twice". For example: hello 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round of…
35
votes
1 answer

Why are Bitcoin addresses hashes of public keys?

Currently, Bitcoin addresses and their checksums are constructed from the public key by a using repeated hashing with SHA256 and RIPEMD160. Now I understand the reasoning behind using hashing for constructing the checksum, but why wasn't just the…
Noah
  • 1,469
  • 12
  • 19
33
votes
3 answers

Why does Bitcoin use two hash functions (SHA-256 and RIPEMD-160) to create an address?

Why do we use 2 hash functions (both SHA and RIPEMD) to create an address? Why not just use one hash function?
anapaso
  • 783
  • 1
  • 7
  • 10
29
votes
9 answers

How can I generate a vanity Bitcoin address?

I once found a program that was capable of creating Bitcoin addresses with specific words in them, but can't find it now. Is there a trusted program, in the Ubuntu repositories for example, that can generate these 'vanity' addresses?
user893
25
votes
1 answer

Why does hashing public keys not actually provide any quantum resistance?

In the discussions about taproot, it was mentioned that outputs will include the public key directly instead of hashing them. It is stated that, currently, hashing does not really provide quantum resistance. Why is that?
Andrew Chow
  • 67,209
  • 5
  • 76
  • 149
25
votes
7 answers

How do you perform double-SHA-256 encoding?

The Bitcoin Protocol-specification gives an example of double-SHA-256 encoding. hello 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round of sha-256) 9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50…
Shomari
  • 665
  • 1
  • 6
  • 20
24
votes
2 answers

Relationship between Hash-Rate and Difficulty

What is the algebraic relationship between Total Network Hash-Rate and Difficulty?
Kinnard Hockenhull
  • 2,423
  • 3
  • 26
  • 36
24
votes
3 answers

How do I implement a Merkle Tree?

I`m slowly implementing some Bitcoin protocols, and I'm not sure how to properly understand the Merkle Tree from the Bitcoin wiki: https://en.bitcoin.it/wiki/Protocol_specification#Merkle_Trees I have strings a, b, c, I double-hash them and I get…
ThePiachu
  • 42,931
  • 25
  • 138
  • 347
21
votes
3 answers

What does the mining difficulty number really mean?

I'm new to bitcoin; please bear with me. I'm looking into mining, how it works, and how to get started. I see a "mining difficulty" from many sources and list a 3 billion something number without units. What exactly does this number mean and how…
frеdsbend
  • 1,668
  • 3
  • 21
  • 39
19
votes
7 answers

Where is Double hashing performed in Bitcoin?

where in the Bitcoin Protocol is SHA256(SHA256(x)) performed and why?
joe
  • 301
  • 1
  • 3
  • 8
18
votes
5 answers

Is Bitcoin future-proof?

As I understand things, the security and integrity of Bitcoin rely on the assumption that its hashing is "hard" in some sense. However, in the past, processing power has increased exponentially. This has made some problems solvable in a reasonable…
Michael McGowan
  • 3,364
  • 3
  • 24
  • 23
1
2 3
33 34