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.
512
questions
5
votes
1
answer
432
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 ...
0
votes
0
answers
20
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 ...
3
votes
0
answers
39
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 ...
1
vote
1
answer
31
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(...
0
votes
1
answer
49
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? ...
-2
votes
1
answer
22
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.
...
3
votes
3
answers
369
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 ...
0
votes
2
answers
80
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 ...
0
votes
1
answer
59
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 ...
5
votes
1
answer
197
views
What are hash functions used for in bitcoin?
What are hash functions used for in bitcoin?
I am looking for a comprehensive list.
0
votes
1
answer
189
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 ...
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 ...
1
vote
1
answer
117
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? ...
-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
4
votes
1
answer
247
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?
2
votes
1
answer
109
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"?
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 ...
1
vote
1
answer
666
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 ...
0
votes
1
answer
480
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 (...
0
votes
1
answer
277
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 ...
8
votes
1
answer
328
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 ...
1
vote
1
answer
397
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: ...
3
votes
2
answers
113
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 ...
0
votes
1
answer
119
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 ...
0
votes
1
answer
95
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 ...
1
vote
1
answer
121
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)
{
...
0
votes
0
answers
599
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 ...
1
vote
1
answer
245
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 ...
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 ...
0
votes
1
answer
72
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.
...
0
votes
1
answer
54
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 ...
0
votes
3
answers
847
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 ...
0
votes
1
answer
202
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: [...
0
votes
1
answer
298
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 ...
0
votes
1
answer
183
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/...
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 ...
0
votes
1
answer
61
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'...
0
votes
2
answers
117
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 ...
0
votes
1
answer
96
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.&...
0
votes
2
answers
216
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 ...
1
vote
1
answer
195
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 ...
-1
votes
1
answer
126
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
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. ...
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 ...
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 ...
0
votes
1
answer
117
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": "...
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 ...
0
votes
1
answer
244
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
...
3
votes
2
answers
482
views
Calculate/Verify the Hash of a Bitcoin Block Header
I want to calculate/verify the hash for block #722,460.
Here is the JSON:
"hash": "00000000000000000002b73f69e81b8b5e98dff0f2b7632fcb83c050c3b099a1",
"confirmations": ...
1
vote
1
answer
145
views
How many times and where exactly is ECDSA used in Bitcoin?
I'm currently a little confused about where exactly ECDSA is used in the transaction process... some resources seem to say it's used once, whereas others seem to say it's used three times.
Which is ...