Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

In what order is the blockheader hashed?

In what order are the hash of the previous block, the root of the merkle and the nonce hashed to produce the hash of the next bitcoin block?
zman's user avatar
  • 11
6 votes
1 answer
461 views

How can a collision attack reveal the private key?

From "Mastering Bitcoin: Programming the Open Blockchain 3d edition, Ch4" : All addresses based on hash functions are theoretically vulnerable to an attacker independently finding the same ...
Vanconts's user avatar
0 votes
1 answer
37 views

Computing HASH160 of a Taproot X-only 32 byte Public Key

I know that Taproot does not use pubkey hashes, but I want to compute a HASH160 of a 32 byte Taproot X-only public key anyway. The rationale is to compare it to an existing 20 byte HASH160 from a ...
Alec Matusis's user avatar
3 votes
0 answers
48 views

What is the advantage of using truncated HASH256 over CRC32?

Some of the checksums in Bitcoin are the first 4 bytes of the HASH256 of the data. HASH256 is just double SHA256, so SHA256(SHA256(data)). What is the advantage of that over using a dedicated checksum ...
dbv's user avatar
  • 131
1 vote
1 answer
35 views

What is one word seed word exactly?

I have the following code import hashlib import binascii def word_to_private_key(word): sha256_hash = hashlib.sha256(word.encode()).digest() private_key = binascii.hexlify(sha256_hash).decode(...
Asif Iqbal's user avatar
0 votes
1 answer
53 views

Verify Hash from bitaddress.org without the original HTML file

Can I verify that I used an authentic version of bitaddress.org if I only have the SHA256 hash string I generated from the HTML file? >> sha1sum bitaddress.org.html How can I do this on Linux? ...
Ohumeronen's user avatar
-2 votes
1 answer
26 views

Problem identifying the transaction hash for a new segwit uxto wallet

How do I the transaction id or transaction hash of a new segwit wallet I just created and sent tokens to? The transaction hash I see from blochian.info refers to the hash of the previous transaction. ...
TrustCode's user avatar
3 votes
3 answers
383 views

What is the numeric precision of Network Difficulty?

My understanding is that Difficulty (aka Network Difficulty) is an approximate representation of the Target, a 256-bit number which is hard to reason about or work with in human-readable Decimal ...
sha2fiddy's user avatar
0 votes
2 answers
84 views

What is TXID?Is it used to calculate merkleroot [duplicate]

I downloaded the block template where each transaction contains 'data', 'txid', 'hash'. I read in some articles that the Merkelroot is calculated using 'txid'. Is true? Why txid not hash, and what's ...
Jack Green's user avatar
0 votes
2 answers
70 views

How to calculate Merkle Root? Need to reverse?

I downloaded the necessary information and made the coinbase. Then I calculated the merkle root... But I always get an error message when I submit a block: "bad-txnmerkleroot". Tere is my ...
Jack Green's user avatar
5 votes
1 answer
222 views

What are hash functions used for in bitcoin?

What are hash functions used for in bitcoin? I am looking for a comprehensive list.
BitcoinFanatic's user avatar
0 votes
1 answer
206 views

Address Reuse and ECDSA Concern

I have a question about address reuse. Admittedly, I'm a little confused on the matter, so please bear with me if the framing of my question doesn't make much sense. Recently I started using Sparrow ...
anonpleb's user avatar
0 votes
0 answers
31 views

How to hash a message (tx message) to get message hash? [duplicate]

I am trying to create a raw TX and sign it. I know that to sign a transaction we need the message hash (here m) value which is double sha256 hash of something like this: 01000000 #Version 01 #Number ...
madhurkant's user avatar
1 vote
1 answer
144 views

What is the Electrum seed "hash"?

When creating a new wallet, Electrum generates a seed which is a bunch of human-readable words. However, in the wallet file, the seed is like a 129-length string, it looks like a hash. Is that a hash? ...
Dan's user avatar
  • 191
-3 votes
1 answer
61 views

Whats the hashing process [closed]

How can my BTC address "14EWK38NoTu8MDeCf5zWWjXyE7F4xU9S9S" turned into something like "2203c6eae793d27105b3ed165ca7fa76360e9d05e2f3". what is the process
Habibullah Noori's user avatar
4 votes
1 answer
248 views

What is this || notation in BIP 341?

SHA256(SHA256(tag) || SHA256(tag) || x) What is the || notation? Is this the conjunction of the different elements? Bitwise OR? or modulus?
Will Jackson's user avatar
2 votes
1 answer
110 views

Why is wtxid called "hash" in Bitcoin Core's getrawtransaction RPC?

In the industry txid is known as "transaction hash". Why wasn't the "hash" field called "wtxid"?
harbar's user avatar
  • 23
12 votes
1 answer
1k views

Why does Bitcoin Core print SHA256 hashes (uint256) bytes in reverse order?

When converting uint256 (the datatype used to represent hashes) to string in Bitcoin Core, the bytes are reversed. When debugging functional tests, this can create potential confusion when comparing ...
James O'Beirne's user avatar
1 vote
1 answer
786 views

How do I generate master key from the root seed

I created a mnemonics and it is hashed using pbdkf2 function to get a root seed. So this root seed should be hashed again with HMAC-SHA512 to get the master key (Master private key and chain code). So ...
Athul A's user avatar
  • 69
0 votes
1 answer
527 views

how to hash a bitcoin address for transactions?

can someone tell me how bitcoin hash a btc address? when you try to hash it on this website, you will get the same result as down below Bitcoin Address : 1JKRgG4F7k1b7PbAhQ7heEuV5aTJDpK9TS Result (...
just.callme.client's user avatar
0 votes
1 answer
299 views

Do taproot addresses use a new private key in Ledger Live?

Are all Bitcoin receiving addresses in Ledger Live for like legacy, segwit and taproot? Are they the hashed public address or the public address? I know for segwit that ledger generates new addresses ...
Dodi Alf's user avatar
8 votes
1 answer
331 views

Are miners advertised hash rate single or double hash speeds?

Modern miners on the market have up to 110 TH/s. Is this the true hash rate (singular SHA-256 hashes per second) or the net hashes relating to Bitcoin specifically (since Bitcoin involves double ...
Matt Tainsh's user avatar
1 vote
1 answer
450 views

replicating Hash160 with SHA256/RIPEMD160

I have a dumb question about Hash160 (specifically, going from a public key to Hash160). If I take a public key: ...
FKAjasmine's user avatar
3 votes
2 answers
122 views

What is difference between hmac_sha256, hkdf_sha256 and hmac_sha_512?

In the open source (https://github.com/bitcoin/bitcoin/tree/master/src/crypto) there are these algrithms that as I know connected with gerenation the new keys and master key. So I try to understand ...
Gregory Morychev's user avatar
0 votes
1 answer
124 views

How can we know the first bytes of a hash for a given input format string?

In the bitcoin developer wallet guide, when talking about Mini Private Key Format, when they explain how the format works, they describe some steps: The first character of mini keys is ‘S’. In order ...
javi11br's user avatar
  • 117
0 votes
1 answer
99 views

OP_SHA256 - Hashing the string representation

I'm building my own Bitcoin script interpreter for learning purposes. I've compared my results with https://siminchen.github.io/bitcoinIDE/build/editor.html And the script OP_16 OP_SHA256 which ...
leslie's user avatar
  • 52
1 vote
1 answer
137 views

Proof of work: comparing computed hash with target hash

According to the source code here is where the hash computed by a miner is compared with the target hash: bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params& params) { ...
smartmouse's user avatar
0 votes
0 answers
632 views

RSZ value with witness data

Have anyone got a script on how to find the RSZ value of a bitcoin transaction with witness data, scanned just by inputting the hashes? Will you please share your code? Or at least, point me to the ...
Roy Nahar's user avatar
1 vote
1 answer
262 views

Structure of a bitcoin transaction, in particular the link to the previous transaction

I'm reading 'Blockchain and distributed ledgers' by Alexander Lipton and Adrien Treccani. I'm trying to understand how individual transactions are linked together. On page 338, they give the 'details ...
Neil D's user avatar
  • 113
0 votes
0 answers
63 views

Why is randomness needed in Proof-of-Work?

In Proof-of-Work (PoW) mining, a miner that contributes 10% of the network hash rate will on average receive 10% of the mining rewards. "On average" means that 10% of blocks are mined by ...
arni's user avatar
  • 101
0 votes
1 answer
73 views

What prevent users from cheating in an HTLC contract

I was reading about HTLC and how Charlie have to create a random number and generates its SHA256 hash that is supposed to be used by Bob in the end to finalize the payment he has received from Alice. ...
Saxtheowl's user avatar
  • 2,800
0 votes
1 answer
55 views

Hash publication - Bitcoin whitepaper Section 3 Timestamp server

In section 3.Timestamp Server of the Bitcoin whitepaper it says: The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be ...
user1086516's user avatar
0 votes
3 answers
916 views

Finding Hash with 11 leading zeroes

For an exercise, I'm trying to find a sha256 hash with 11 leading zeroes. For this reason, I wrote a Python script that basically tries all intergers from 1 to N and brute forces the hash. Now my N is ...
Howdy's user avatar
  • 1
0 votes
1 answer
209 views

OP_HASH160: Computing script hash in a concrete P2SH transaction

I'm having troubles with understanding how script hash is computed in P2SH transactions. From BIP-16 documentation (https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki): scriptSig: [...
user avatar
0 votes
1 answer
308 views

Scripthash from bitcoin address with Golang

I broke my head looking for a solution. I want use bitcoin address for electrumx Take bitcoin address from docs example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa And i need convert to ...
Timofey Belanenko's user avatar
0 votes
1 answer
213 views

Repeating identical outputs in bitcoin transaction

I am building a script that is indexing all bitcoin transactions in real time with all their details etc. But I am looking here at this transaction - https://www.blockchain.com/btc/tx/...
Dan's user avatar
  • 27
4 votes
1 answer
2k views

How is mining the exact same hash on every computer avoided?

How does the mining clients make sure that the seeds are not the exact same computed on every mining rig in the world with for example a GTX 1080 with the same speed? So that it is not the quickest ...
Henning's user avatar
  • 41
0 votes
1 answer
62 views

Is it correct to refer to hashes found through proof of work as "proof of work numbers"?

I've seen come commentators refer to 'proof of work numbers'. I suppose these are the hashes found through proof of work, but not entirely sure. EDIT** Regarding where I got the 'proof of work numbers'...
StatsScared's user avatar
0 votes
2 answers
121 views

What is the difference between a 'hot' and 'cold' wallet

Problem I don't understand the difference between a 'hot' crypto wallet, and a 'cold' crypto wallet. Assumptions My understanding of blockchains is that they use public/private cryptography in order ...
fortune's user avatar
0 votes
1 answer
97 views

Is the winning hash the same as the nonce?

Is the miner is trying to solve the nonce or a winning hash? "The SHA-256 hash of a block's header must be lower than or equal to the current target for the block to be accepted by the network.&...
HeyDoeFarm's user avatar
0 votes
2 answers
222 views

Why does SHA256 miner hash have to be lower than the current target 256bit hex? [duplicate]

I'd like to ask if someone can help explain this definition found on https://en.bitcoin.it/wiki/Target "The SHA-256 hash of a block's header must be lower than or equal to the current target for ...
HeyDoeFarm's user avatar
1 vote
1 answer
216 views

How often does target hash change and how to find it?

So basically I was researching target hash and trying to figure out how I can find it. I know there are posts out there that have said that Bitcoins target hash is a 256 bit number with 32 bits of ...
Joe's user avatar
  • 63
-1 votes
1 answer
130 views

How can i achieve this signature?

I want to make a signature in bitcoin where the nonce and private are the same. For example, the private key is 0x1000 and the nonce for the R value is also 0x1000
Unknown's user avatar
3 votes
0 answers
60 views

How to calculate the hashes in Lightning

I was wondering how I calculate the hashes regarding BOLT03 Specification: The Revocation Pubkey is calculated like this: revocationpubkey = revocation_basepoint * SHA256(revocation_basepoint || ...
ziggie's user avatar
  • 51
1 vote
0 answers
107 views

What needs to be changed in Bitcoin if SHA-256 is broken? [duplicate]

I come up with a little bit "catastrophical“ question. I declare that I understand the degree of improbability of such a scenario in our lifetime, but I would still be interested in your opinion. ...
Adam's user avatar
  • 11
0 votes
0 answers
16 views

Mining against candidate block hash or previous block hash? [duplicate]

When mining...; a) Is the block header hash of the candidate block used b) OR the block header hash of the previous block + noonce used? If it is a), which I presume, is it then correct that the ...
BOH's user avatar
  • 1
2 votes
1 answer
67 views

Bitcoin transaction inquiry

if suppose a someone offers a prize for anyone that can solve a specific challenge, how will the solver make sure that he/she collects the reward? Does the solver need to send the solution directly to ...
Miyamoto Musashi's user avatar
0 votes
1 answer
118 views

Why does my hash not line up with the one in the scriptPubKey?

I got some btc in testnet, here are the outputs. this is the UTXO that i get my btc { "value": 17.24756333, "n": 1, "scriptPubKey": { "asm": "...
KHJUAF403456ZS3K564WAEF's user avatar
0 votes
1 answer
97 views

One address 2+ private keys. Bitcoin future

Since bitcoin uses cryptography algorithms to create private and public keys there is a possibility it could repeat. Person 1: L54w...KraG -> bc1...kq4 Person 2: L3mV...JU8G -> bc1...kq4 So ...
Varun W.'s user avatar
0 votes
1 answer
255 views

What actual steps are required to calculate a block's header hash?

From my knowledge a header hash will be calculated like this: serialize all header fields, including "the nonce" hash the serialized header once hash the hashed serialized header again ...
n.r.'s user avatar
  • 113

1
2 3 4 5
11