Questions tagged [hash]

This tag should be used for questions related to hashes. 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.

Filter by
Sorted by
Tagged with
95
votes
12answers
9k views

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 ...
133
votes
4answers
225k views

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 ...
12
votes
2answers
916 views

How can we be sure that a new block will be found?

How do we know the HASH function will produce an output that fulfills the difficulty, i.e. is below 0000...xxxx...xxx? Is it possible that no proof will be found so that the HASH will produce that ...
3
votes
1answer
828 views

Verifying a bitcoin trx on the Unix cmd line with OpenSSL?

I want to use openssl on unixoide systems to verify a transaction. I step on errors, when trying to verify a bitcoin trx’s hash. Here I am working on Mac OSX and OpenSSL (1.0.2a 19 Mar 2015). I know ...
9
votes
3answers
10k views

ECDSA Signature and the “z” value

The following link contains details on how to reverse the ECDSA signature if given two identical "R" values. http://www.nilsschneider.net/2013/01/28/recovering-bitcoin-private-keys.html I have read ...
17
votes
1answer
13k views

Relationship between Hash-Rate and Difficulty

What is the algebraic relationship between Total Network Hash-Rate and Difficulty?
4
votes
2answers
471 views

What would happen if two public keys had the same Base58 hash?

If two different public keys had the same Base 58 hash, what would happen? Could one key spend money in the other account? What would happen to the monies received by the shared base58 hash?
8
votes
3answers
7k views

How to calculate a hash of a Tx?

How does one calculate the hash of a Tx? Which fields need to be double SHA hashed and in what order?
21
votes
3answers
11k views

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 ...
13
votes
2answers
12k views

What is “Script Hash” address exactly and how does it work?

I found out this address playing with blockchain https://blockchain.info/address/3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8 I found out it's something called "scripthash". How does it work exactly? How does ...
12
votes
2answers
723 views

Is it possible for the network to stop finding valid blocks?

The hashing problem is by design computationally hard, because SHA-256 hashes are for all intents and purposes random strings with no direct link to their inputs, and there's no (known) way to ...
12
votes
3answers
1k views

Can the Bitcoin network be used for cracking?

I'm assuming that the Bitcoin economy is rapidly building a computing cluster capable of unprecedented amount of hash searching. Would it be possible for an attacker to leverage this to crack other ...
17
votes
4answers
14k views

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) ...
3
votes
1answer
336 views

Duplicated hash values in mining reward

This transaction is contained in two MainChain-Blocks: https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468 On Blockexplorer there is a note of this anomaly: ...
27
votes
8answers
15k views

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 ...
32
votes
4answers
5k views

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 ...
11
votes
2answers
2k views

Work distribution in a mining pool

How is work distributed among members of a pool? Regarding the block hashing algorithm and valid hashes of a new node, how is the set of solutions for nonces "distributed" among miners?Is a nonce, ...
6
votes
1answer
4k views

How is a block header hash compared to the target (bits)?

I'm trying to wrap my head around the mining process by doing a small example of block hashing. According to the Wiki entry about difficulty, the target for a block hash can be read from the "bits" ...
11
votes
2answers
2k views

Two blocks, two transactions, same hash

Would a block containing a transaction with an identical hash as a previous transaction be considered valid? That is, if someone made a transaction for generating Bitcoins and solve two blocks with ...
5
votes
1answer
975 views

In Getwork, how does one calculate the value of Hash1?

(I know the hash1 and midstate are eventually going to be deprecated, but I'm a little curious about them) In Getwork there is a field hash1. From a sample call to bitcoind I received its value as: '...
26
votes
2answers
9k views

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?
35
votes
2answers
8k views

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 ...
12
votes
3answers
14k views

Why are Bitcoin calculation “useless”?

The FAQ says: Why don't we use calculations that are also useful for some other purpose? To provide security for the Bitcoin network, the calculations involved need to have some very ...
12
votes
2answers
22k views

How is the network hash rate calculated?

Miners work on finding blocks but don't sent anything until they find the block. Considering that, how can sites like bitcoincharts.com display a graph of the network hash rate?
19
votes
3answers
64k views

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 ...
9
votes
1answer
1k views

Why does Bitcoin use two rounds of SHA256?

Each blocked is hashed twice. Why isn't one application of SHA256 enough?
7
votes
2answers
1k views

What would happen if two blocks had the same hash?

Consider the following scenario: January 2016 block A gets submitted. Its hash is 0001010. January 2017 block B gets submitted. Its hash is also 0001010 (collision). 10 minutes later, block C gets ...
5
votes
1answer
195 views

ScriptSig content during signature (quadratic hashing)

As far as I know, the quadratic hashing problem came from the fact that every time a transaction is verified (or signed), the "unsigned transaction" that is hashed and verified changes depending on ...
3
votes
1answer
1k views

What values are hashed in the SHA-256 algorithm, and what would be the next iteration until a possible header is found?

I've been doing a lot of reading on mining and software related to mining but I can't quite get my head wrapped around the specific nature of what is being hashed together. So far I feel like the ...
3
votes
2answers
4k views

Given the probability of finding a block, and time taken, can I infer hashrate?

I'm trying to externally calculate the hashrate of a given miner based only on an arbitrarily defined target that I assign, then calculate probability it will be found. Once this probability is ...
12
votes
3answers
2k views

What will happen when SHA 256 needs to be replaced?

MD5 used to be the hash algorithm. Everyone loved it, but now, not so much. What will happen to bitcoin if flaws are found in SHA256 in the future?
4
votes
1answer
300 views

Which is the smallest hash that has ever been hashed?

Let's assume, the hash 00000000000000000024c0bdbec66a889778c00bc69be0a96cbbd98b75c3ce09 of block #499644 is smaller than 0000000000000000002d429f39afec70c938e888c3417d690bbc85e83529991c of block #...
3
votes
1answer
2k views

How to calculate the BIP34Hash?

I know this going to be a repeat question, however I am still puzzled with the implementation of the BIP34 especially where it come to its hash. Referring to the chainparams.cpp at github : https://...
0
votes
1answer
432 views

How can someone mine bitcoins at billions or trillions of hashes per second when the nonce is only 2^32 in size?

According to another similar question on Bitcoin Stack Exchange, https://en.bitcoin.it/wiki/Block_hashing_algorithm shows how the mining algorithm works for Bitcoin. The problem is, it shows the ...
0
votes
3answers
294 views

how does solving hashes and building blockchain help the human race?

I guess I am naive about what miner really does to benefit the human race. What kind of problems does miner's computer solve? The hash just looks like a whole string of numbers and letters to me. ...
41
votes
1answer
11k views

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 ...
26
votes
1answer
5k views

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 ...
16
votes
5answers
2k views

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. ...
11
votes
4answers
6k views

Where is Double hashing performed in Bitcoin?

where in the Bitcoin Protocol is SHA256(SHA256(x)) performed and why?
9
votes
4answers
10k views

hash versus hash pointer

I am doing coursera online course on Bitcoin and Cryptocurrency Technologies. It defines the concept of hash pointer in the first lecture as pointer to where some information is store and ...
5
votes
3answers
115k views

How many hashes create one Bitcoin?

Irrespective of the length of time required to calculate one hash, how many hash operations are required to produce one Bitcoin?
3
votes
1answer
1k views

given a json of a block, how do I calculate its hash?

Here is the genesis block with its hash. How the hash was calculated? { "hash":"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", "ver":1, "prev_block":"...
9
votes
1answer
490 views

When a transaction is broadcast to the network, what is actually being sent?

When a transaction is broadcasted to the network, what is being sent? Is it a hash? if yes, is it going to be the hash of: previous transaction + public key of the receiver?
6
votes
3answers
1k views

Does every nonce really have an equal chance of winning?

I set out to test the claim: "Every nonce has an equal chance of winning." Time Evolution So, I plotted, with gnuplot, the nonce values vs. hashes for all the valid blocks in the blockchain:(Also, ...
3
votes
1answer
829 views

Why change the nonce instead of just rehashing?

Why do miners increase the nonce to compute a block hash rather than just generating a random block hash? It seems to me that both approaches would have the same likeliness of finding a result that ...
3
votes
1answer
2k views

About performing SHA-256 hashing on the public key

I am following this link, trying to perform SHA-256 on a given public key. However, I cannot get the expected result. I am using the sha256 library in python hashlib The input is ...
2
votes
1answer
528 views

How to tell which part of the previous tx I need to make the hash to sign for an old given tx?

I have recently been taught (here) how to create the hash to sign for a given "input script" for an existing transaction. I then sought to test my abilities and sought out a difficult transaction to ...
14
votes
2answers
2k views

How many Integer Operations on a GPU are necessary for one Hash?

I thought it was the ALU OPs like here: https://bitcointalk.org/index.php?topic=7964.0 ArtForz speaks of much higher values, though: https://bitcointalk.org/index.php?topic=4689.msg68933#msg68933 ...
6
votes
2answers
9k views

What is the approach to calculate an Ethereum address from a 256 bit private key?

For a given private key generated by MyEtherWallet, I would like to see I have the tools to independently arrive at similar results. Wrote a wrapper around Keccak to accept both hexadecimal and ...
5
votes
1answer
2k views

Why do transaction/blockchain based gambling sites use such complicated methods for proving fairness?

Doesn't the block hash or the transaction id provide enough entropy (for example, by using block_hash % 37 to generate a random number between 0 and 36)? Block Chain Roulette determines the lucky ...