Questions tagged [sha256]

A 256-bit variant of Secure Hash Algorithm 2

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

What will happen when a collision in SHA256 be found?

Would the protocol migrate to another Hash Algorithm inmediatly? What would be the next? SHA3 or BLAKE 2?
0
votes
0answers
21 views

Padding the blockheader in sha256

The block header size is 80 Byte (640 bits) so we must pad it to a multiple of 512 (In our case to 1024) like this: (blockheader in binary)+1+00000.....000+1010000000 where "1010000000" is ...
3
votes
0answers
68 views

How many bitcoin transactions can be verified per second on commodity hardware in 2020?

I am trying to figure out how many Bitcoin transactions could be verified per second. Am I correct that signature verification is more expansive than computing Merkletrees and hashes and constitutes ...
0
votes
0answers
42 views

download bitcoin core safely: wrong checksum

I've downloaded the "classic" linux bitcoin core 0.19.1 (tgz) on https://bitcoincore.org/en/download/ In the SHA file that's on the website this is the key: ...
1
vote
1answer
228 views

Can you crack SHA-256?

From my understanding, a hash function is an algorithm that takes a unique input and produces a unique output, and a secure hash like SHA-256 cannot be reverse engineered. I saw this thread Won't ...
0
votes
1answer
82 views

How to generate the hash of public key in Bitcoin [closed]

I'm trying to hash the public key with SHA256 and then ripemed160 and get the hash. but it gives the wrong hash Public key: 2b4632d08485ff1df2db55b9dafd23347d1c47a457072a1e87be26896549a8737 Hash ...
3
votes
0answers
73 views

Why can't Grover's algorithm be used for bitcoin mining?

Similar questions have been asked before: Can quantum computing improve Bitcoin mining? Can a Qubit Miner ASIC device be created and what would its impact be on the mining community? However, none ...
1
vote
0answers
28 views

security of the mining algorithms litecoin vs bitcoin - scrypt vs sha256?

how is the cryptanalysis' current state on both sha256 and litecoin's scrypt? is litecoin's scrypt on a security level like sha256? by security i simply mean ways to "break"/"de-cipher" the hash ...
2
votes
1answer
50 views

How does Bitcoin utilize cryptography and secure hash algorithm (SHA) to link records in the blockchain?

I am wondering how Bitcoin uses cryptography and secure hash algorithm such as SHA256 to link the records in the blockchain. And if possible I think it will give me a better understanding if there is ...
3
votes
1answer
176 views

Get a correct SHA256 of a PublicKey as bytes

I’m new in code develop and I’m studying it by myself (books, tutorials, official help of sites…) since a year VB.NET. A lot of information I read is in C# that I rewrite in VB.NET. I’ve started four ...
0
votes
1answer
99 views

Merkle Root for Block 100000: calculation in Excel

I am stuck doing the calculations for the infamous block 100000. I am doing those in excel. I am trying to add as much detail here of the operation I am doing and intermediate results. TX1: ...
0
votes
1answer
47 views

Where is the string that generates the hash with 18-20 zeroes?

When bitcoin miners mine, they have to solve a difficult and extremely repetitive math problem using the SHA256 algorithm. The miners are trying (basically playing lottery and almost always working in ...
5
votes
1answer
473 views

Is Bitcoin PoW actually SHA256 + Merkle generation? Or have I misunderstood coinbase/append?

Miners can mutate nonce (32 bits) + time (mutates once a second). This allows for 232 (~4 billion) hashes per second. That's not enough anymore for our ASICs as they perform in the TH/s now rather ...
0
votes
0answers
62 views

Generating TXID from transaction's data [duplicate]

As I understand, we can generate a TXID by hashing transaction data through SHA256 twice, and as you know probably, A bitcoin transaction is just a bunch of data that describes the movement of ...
0
votes
1answer
58 views

What's the purpose of CSHA256::Write and CSHA256::Finalize

Looking at Bitcoin Core implementation of SHA256, I noticed it was a bit different from OpenSSL's implementation. In OpenSSL, you would initialize a variable with SHA256_CTX when in Bitcoin Core it's ...
1
vote
1answer
95 views

Confused on using SHA256 code from Bitcoin Core

I was looking at Bitcoin Core code to use its SHA256 code but am confused on where I should be looking at. In bitcoin/src/crypto/sha256.h there is CSHA256 and in bitcoin/src/crypto/sha256.cpp there ...
4
votes
1answer
175 views

What are the 3 arguments called in function SHA256?

void sha256(struct sha256 *sha, const void *p, size_t size) { struct sha256_ctx ctx; sha256_init(&ctx); sha256_update(&ctx, p, size); sha256_done(&ctx, sha); } I'm trying ...
0
votes
1answer
33 views

Learning + checking the bitcoin address creation process at each step

I’m learning how hashing algorithms are used around the process of bitcoin address creation. I’ve read lots of great examples online that, step by step, show the output of each sequential hashing ...
0
votes
1answer
524 views

How do i setup 2x TTbiT Usb Miners on CGminer?

I'm having trouble connecting 2x TTbiT Usb Miners(sha256) through CGminer. Does anyone know how to set them up to mine BCH on Multipool?
2
votes
1answer
103 views

How to make a homomorphic preimage/payment hash with current lightning network / Bitcoin implementations?

If I remember / understand it correctly by using the mechanisms from the scriptless scripts paper we could easily create homomorphic preimages / paymenthashes. I think this would be a very desirable ...
0
votes
1answer
126 views

Create a Double sha256 block and trandaction

I have same problem whit create a double sha256 of the transactions and blocks with C++. The hash block it is created with the concatenation of these data, version + previusBlock + merkleRoot + ...
3
votes
3answers
1k views

What is the reasoning behind the choice of 2^256-2^32-977 for the prime on the secp256k1 curve?

In Bitcoin's elliptic curve (secp256k1), the prime p = 2^256 - 2^32 - 2^9 -2^8 - 2^7 - 2^6 - 2^4 - 1 the generator point Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 ...
0
votes
3answers
131 views

Repeated sha256 on brain wallet [closed]

The writer of this article https://pastebin.com/raw/jCDFcESz explains that Sha256('sender') x 2 yields the address 18aMGf2AxQ3YXyNv9sKxiHYCXcBJeJv9d1 I am however getting the address ...
1
vote
2answers
197 views

Electrum's “script hash” form with NBitcoin?

I've come across how scripts are hashed in the electrum (stratum) protocol implementation by looking at the docs. I'm using NBitcoin, and I've tried to generate this hash from a segwit address, first ...
0
votes
2answers
198 views

SHA256 vs RIPEMD160 in SegWit

In Pay-To-Witness-Public-Key-Hash (P2WPKH), the RIPEMD160 hash function is used to hash the public key of the recipient in the locking script. On the contrary, Pay-To-Witness-Script-Hash (P2WSH) uses ...
2
votes
1answer
82 views

Do pools distribute “jobs” to miners based on “failed” solutions which have already been submitted?

My question is this: How exactly does the stratum protocol distribute "work" to miners? More specifically, since mining can be compared (in many regards) to "brute forcing" a cryptographic hash (i.e. ...
0
votes
2answers
140 views

How would you find the Merkle Root with a Block that contains 6 transactions?

Let's use block #100205 https://www.blockchain.com/en/btc/block/0000000000033d0de6f4ebe93b3b142424cdbecf4bd98b948e856c4a55f09f76 This block contains 6 transactions. After the second level of hashing ...
0
votes
1answer
170 views

How to Build Block Header in stratum?

When I studied the stratum on here,I found that there were little difference between the stratum and solo mining for building block header. The stratum tell us that we needed to pad the header to ...
1
vote
1answer
147 views

Creating a Bitcoin address using the 9 steps. Stuck on stage 2

I need to write a script using C++ and the OPENSSL library that takes this: 0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352 performs a SHA256 Hash using the sha256 function from the ...
0
votes
1answer
43 views

How easily can asics be ported over to other sha algorithms?

Let's say I want to rewrite the software behind the hardware of current asics. Would it still mine, for example, sha1 algorithms orders of magnitude faster than a normal cpu would?
1
vote
0answers
36 views

Can you use a mining hardware to find a string for a certian hash

Using a computer to brute force a sha256 will take very long time, but with a mining hardware, it still takes long, but at least chances of finding it are better. But the question is, are mining ...
0
votes
1answer
235 views

How do I double SHA-256 the header of block #59,500?

I'm not sure how to combine all of this information. https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7 Version 1 Time Bits 470771548 (is this the right ...
0
votes
1answer
163 views

Is pre-image attack useful for mining?

I know that SHA256d is strong enough and it's not likely that will be broken soon but let's say someone knows how to find pre-image. The adversary chooses random hash starting with n zeroes (less than ...
0
votes
1answer
54 views

How important is the hash power in solving a block?

What is the role of hash power in solving a black, I have read at numerous place it's more like a lottery to successfully form a block in bitcoin and any such crypto blockchain currencies. Is it ...
0
votes
3answers
679 views

How do you generate a receive address from a string? [closed]

I already have a an address with Bitcoin and would like to generate a receive address using SHA256 hash which is based on a string. I've found an example of creating an address using a SHA256 hash: ...
0
votes
0answers
111 views

retail hardware SHA256d hash rates [duplicate]

Obviously it hasn't been profitable to mine bitcoin on retail hardware for years at this point. Nevertheless, I'm curious. Does anybody have any benchmarks on what the hash rates for retail ...
0
votes
1answer
446 views

Difference between scrypt and sha-256 mining?

So in detail my question is: are both these two algorithms different from each other?. I read somewhere that this two algorithm is used for the different cryptocurrency. if that's true. then why? ...
0
votes
2answers
344 views

Attacking Blochcain/Bitcoin by hash

Assuming that SHA-256 is not save anymore. How could the Bitcoin blockchain get attacked? Ok I could get the input value for the hash function but could I now easily add my own blocks to the chain? I'...
0
votes
1answer
583 views

Bitcoin hash calculation [duplicate]

Best regards I have been doing a lot of research about bitcoin and blockchain. A lot of informacion across the Internet can be found where many people explains the basics of bitcoin an it´s ...
1
vote
1answer
189 views

Why do we inverse the hash of the blockheader?

Let's pick this example blockheader-hashing in Python: from hashlib import sha256 import hashlib header = "...
3
votes
2answers
889 views

Checking the Merkle Root for Block #100000

The below text is copied from the Bitcoin Developer Reference at bitcoin.org: If a block has three or more transactions, intermediate merkle tree rows are formed. The TXIDs are placed in order and ...
0
votes
2answers
370 views

Understanding the Hash Function

Can someone please explain in detail the components of the final hash that determines the winner of the block? My understanding is that the miners are taking The Merkle Root, The time stamp, The ...
3
votes
1answer
108 views

Understanding what is being run through Sha256

When I am running through an example for Sha256 I am not understanding how to arrive at the right answer. If I use the following Hex string: ...
1
vote
1answer
101 views

What does cloud instance owned means?

I am using this website for cloud mining cryptocurrency for free. I was reading about How the Cloud Mining/Hashing Works when I came to this point in which says (Cloud SHA-256) SHA-256 algorithm, 1.0 ...
2
votes
3answers
2k 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....
4
votes
3answers
576 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 #...
2
votes
2answers
1k views

How can I check the hash of a bitcoin block?

Let's pick an example bitcoin block: #499583 This is the block: https://insight.bitpay.com/api/rawblock/000000000000000000677c4077da7c9f01dde5f332ba2fbff962ee699714d5da It starts with ...
1
vote
1answer
712 views

if a Bitcoin mining nounce is just 32 bits long how come is it increasingly difficult to find the winning hash? [duplicate]

I'm learning about mining and the first thing that surprised me is that the nounce part of the algorithm which is supposed to be randomly looped until you get a number smaller than the target hash .. ...
0
votes
0answers
57 views

btc mining, the largest supercomuter in existence? [duplicate]

I'm not sure of the best place to ask this so I'll ask it here. I had read that as far as computing power, the Bitcoin nodes represent the largest distributed super computer in the world in finding ...
1
vote
0answers
255 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 ...