Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sha256]

A 256-bit variant of Secure Hash Algorithm 2

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) ...
15
votes
2answers
22k views

How can I convert a SHA256 hash into a Bitcoin base58 private key?

How can I take the output of sha256sum sudofox@ubuntu:~$ echo -n 'Hi guys!' | sha256sum 7542fb6685f9fd8f37d56faf62f0bb4563684a51539e4b26f0840db361e0027c - and turn it into a Base58Check encoded ...
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 ...
5
votes
2answers
7k views

How do I calculate the txid of this raw transaction?

I'm trying to parse a bitcoin block using Python. I called getrawtransaction over JSON-RPC. I got this: ...
7
votes
2answers
2k views

If SHA256 and/or RIPEMD-160 were broken, would all bitcoin addresses be compromised?

If not, what else would be needed to steal all funds from all people and completely break bitcoin? I bet some will say ECSDA gives bitcoin an additional layer of protection. I counter this by saying ...
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 ...
4
votes
1answer
288 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
5answers
8k views

Using ASIC for password cracking - mad concept?

All ASIC for Bitcoin do a double SHA256 hash on an arbitrary string. But maybe they might be used for pen testing :-) Lets assume we have single SHA256 hash we want to crack. We also have an ASIC ...
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://...
22
votes
4answers
18k views

Is bitcoin mining itself compromising the security of SHA256

Following good scientific practice I propose a Theory/Hypothesis and now ask you to test it. Initially this is a "thought" experiment but may progress to real testing depending on your thoughts. Back ...
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 ...
11
votes
4answers
6k views

Where is Double hashing performed in Bitcoin?

where in the Bitcoin Protocol is SHA256(SHA256(x)) performed and why?
5
votes
3answers
114k 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?
8
votes
2answers
15k views

How to generate a Bitcoin Private Key Checksum

I want to understand how a bitcoin private key is made up. Looking at this graphical generator https://royalforkblog.github.io/2014/08/11/graphical-address-generator/#hello I understand step 1, how ...
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, ...
4
votes
1answer
3k views

Can Artificial Intelligence be used to mine BitCoins faster?

Can Artificial Intelligence be used to find more efficient mining algorithms? Is there only one algorithm that can be used to mine? EDIT: Asking about running the SHA(SHA(block header)) more ...
2
votes
4answers
11k views

Correct way to convert a 256-bit private key to WIF?

On the Bitcoin wiki it has steps to convert a private key to WIF. So I tried following these steps in attempt to get the same result. So I took the private key. ...
10
votes
1answer
721 views

Did Satoshi intend to allow midstate computation to speed up hashing?

The design of Bitcoin allows computers to compute a hash with 2 iterations of the SHA256 compression function instead of 3 on all but 1 out of every 2^32 attempts. When Satoshi chose SHA256d for ...
3
votes
4answers
5k views

If SHA256 produces an alphanumeric hash, how can a hash be “less than a certain value”?

I was under the impression that Bitcoin's method for validating a hash involved making sure the hash started with a pre-determined number of zeroes. However, after reading the docs here, I see the ...
4
votes
1answer
108 views

What is the point of comparing sha256 of downloaded file with published on the same website code? [closed]

Some websites publish sha256 to check authenticity of downloaded file. I suppose this is to protect against man-in-the-middle attack - that my file was not altered during download. What prevents man-...
2
votes
3answers
1k views

Convert between String/Hex/Byte in Java for sha256 - wrong format?

I am trying to convert a bitcoin address and have the following code from here (Calculate Segwit address from public address, 2nd answer): Step1: $ printf 1L88S26C5oyjL1gkXsBeYwHHjvGvCcidr9 > adr....
2
votes
1answer
341 views

How to compute double sha256 shown in examples of bip 143?

How do I compute the double sha256 shown in example of bip 143? The example in Native P2WPKH hashPrevouts: dSHA256(...
1
vote
0answers
228 views

What parts of SHA-256 hashing an ASIC miner really does, and what remains a CPU job?

I know that ASIC does not perform transactions ledgering, it is a CPU job. I also know that SHA256 consists of two logical parts: a digest function, which reduces any big message, like ~1MB block, to ...
1
vote
2answers
536 views

Bitcoin Address generation

The bitcoin wiki says this: How to create Bitcoin Address 0 - Having a private ECDSA key 18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725 1 - Take the corresponding public key ...
0
votes
0answers
36 views

Why Does an Online SHA Generator not work for Double Hashing data? [duplicate]

Let's say you use: https://passwordsgenerator.net/sha256-hash-generator/ You plug in data and it produces the first hashed value. If you plug that output in for the second SHA256 it outputs the wrong ...
0
votes
1answer
3k views

Solving a block and verification of transactions [duplicate]

My understanding of mining is that the reason an award of Bitcoin comes along with the solving of the current block is to give people incentive to actually try to solve the block. My understanding is ...