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

1
vote
0answers
4 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
36 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 + ...
2
votes
3answers
793 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
59 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 ...
0
votes
0answers
36 views

SHA256 hash generating python

Can somebody give me complete python code that outputs a valid and random sha256 mining hash using python? I know bitcoin with a laptop is incredibly unprofitable, especially with python, I am just ...
1
vote
2answers
57 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
59 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 ...
1
vote
1answer
48 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
95 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
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
83 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 ...
0
votes
0answers
26 views

What is the error rate when mining blocks ?

I am doing the Coursera course on Bitcoin and Crypto tech, and there is a formula defined : Goodput = Throughput * Success Rate. 'Throughput' is defined as how quickly we are finding blocks, whilst '...
1
vote
1answer
85 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
33 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
34 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
122 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
0answers
13 views

Using libblkmaker with Litecoin/Catcoin

Can I use libblkmaker for generating Litecoin and Catcoin blocks? Is another PoW hashing algo an obstacle?
0
votes
0answers
41 views

Why does the bitcoin wiki's guide on building bitcoin addresses seem to have the wrong hashes?

I'm trying to follow this wiki on bitcoin address creation, but I'm getting different results when I walk through it myself Starting from step 4, we have the extended RIPEMD-160 hash ...
0
votes
1answer
117 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
48 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
410 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
95 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
327 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
244 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
484 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
120 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
1answer
521 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
310 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
86 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
93 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 ...
3
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....
4
votes
1answer
271 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
781 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
535 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
54 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
224 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 ...
0
votes
1answer
1k views

Converting a bitcoin miner for other use [duplicate]

Is it possible if you purchased a bitcoin miner such as an antminer that cracks sha256 and edit the software so it could just crack normal sha256 hashes such as that you could use it with things like ...
0
votes
1answer
2k views

New params of chainparams.cpp. What put on them and how generate?

What do these parameters do and what to insert there uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); //what this do ? end what put to here consensus....
2
votes
0answers
138 views

Double Hashing Merkle Trees [duplicate]

I under that merkle tree use double hashing (HA = SHA256(SHA256(Transaction A)). Curious for answers to the following: Why is there a need to hash it twice? What is the difference between hashing it ...
0
votes
1answer
94 views

How to check two hashes are equal using block data and the nonce?

This is my first question on this community (the 100 points were just given to me by the site). The information given is from a block i found looking from the docs api. What am supposed to do with the ...
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://...
9
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
1answer
768 views

Is this how I should calculate a Double SHA256

So I have a function called sha256 which will take a string and return the SHA-256 hash. var First = sha256('myfirstSHA'); And the output is the hex: ...
0
votes
1answer
2k views

How long does it take to perform a single SHA256?

I'm not talking about hashes/s, but specifically, the amount of time required to perform a single SHA256 on the fastest computers known. How long does a very fast ASIC take to perform one SHA2? Is ...
0
votes
1answer
258 views

How do you hash data for mining?

I was examining the block hashing algorithm and I tried to hash some blocks with my c++ sha256 to check results. The hashes were wrong all the time so I thought I couldn't build the block header ...
2
votes
2answers
3k views

Fastest device to perform single-threaded SHA256 hashing

I am in the process of designing a cryptographic Proof of Storage (PoS) that relies on single threaded computation of SHA256 hashes. In practice, my algorithm is equivalent to computing for some ...
3
votes
1answer
328 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(...
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 ...
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. ...
4
votes
2answers
837 views

Private Brain Key Generation and Public Address Not Matching Java

I am trying to generate a public and private key set from a input string in Java. (Yes I am aware this can be a dangerous practice) I am using bitcoinj for a outside library. I currently have: //...