Questions tagged [sha256]

A 256-bit variant of Secure Hash Algorithm 2

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

Assemble Miner at Home

is it possible to assemble multiple boardd with required chips to create home miner. I have seen some miners with certain amount of boards and chips on them, so i was wondering 8f i can substitute ...
2
votes
1answer
40 views

Translate c++ function into python: sha256 hash mismatch [closed]

This is not related to bitcoin but it uses most of the bitcoin codebase. I would like to translate some c++ code into python but struggle really hard to get the hashes right. This is the function I ...
4
votes
1answer
132 views

What previously existing technologies made Bitcoin possible?

When watching a tutorial, they mentioned that Bitcoin is based off 4 or 5 technologies that existed for at least a decade before Bitcoin. Satoshi Nakamoto was the first person to combine them all into ...
2
votes
2answers
37 views

Can Litecoin & Bitcoin have overlapping Transaction Ids (txid) [closed]

Im currently coding my own transaction lookup page for cryptos. Since Litecoin and Bitcoin are so similar to their txid. I wanted to ask if its actually possible that these 2 currencies have ...
1
vote
1answer
22 views

What exactly happens to leaves when forming nodes?

If you hash TXIDs with sha256 twice, you get the leaves of the merkle tree. As far as I understand the two outputs of the TXIDs are concatenated / paired. What does that mean? Are they added together?
0
votes
0answers
12 views

Why is the SHA256 regularly applied twice? [duplicate]

I have come across at least two times in bitcoin computations that the sha256 algorithm is applied twice - merkle root computation and address computation. Why is this? Not sure of an appropriate tag -...
0
votes
1answer
48 views

Why is SHA-256 mining secure?

My understanding is the when you are mining bitcoin you are looking for a string, or maybe a binary number (a) such that if you 'add' a to the block (b) you get a number (c) whose hash begins with a ...
1
vote
1answer
247 views

I found a BTC hash. Now what?

I used a mining program written in python and after a lot of time, it found a hash that looks something like this: 0000de957fbfdfc77582e0d0b20c53d2d1d83d8bb8cfe3693521f672bf2a6021 except it has 19 0's ...
1
vote
0answers
25 views

Minimum characters to uniquely identify bitcoin trasanction in blockchain

What is the minimum number of characters (TXID from the beginning) which is generally considered to uniquely identify a bitcoin transaction in the blockchain? (Similarly to git and a commit SHA - ...
0
votes
1answer
75 views

Will a recursive sha256 run over all 2^256 inputs before a collision?

Will a recursive sha256 run over all 2^256 inputs before a collision? Here'a a python program showing my question - will this loop for 2^256 times - given endless memory or will it terminate before - ...
1
vote
1answer
103 views

Lowest numbered Bitcoin hash? [duplicate]

I was thinking about which bitcoin block has the lowest numbered hash. What I mean by a hash as a number is that. For example, the number "1" has a lower hash than "2" in SHA256. ...
0
votes
0answers
43 views

What is the fastes ways to get priv to pub at bitcoin in python ( compressed )?

What is they fastest lib, way to get compressed pub keys from priv keys ? i was try "bit" lib and "bitcoin python libs" but they slow and bitcoin( dont give compressed keys )
1
vote
1answer
74 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
40 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 ...
5
votes
0answers
192 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 expensive than computing Merkletrees and hashes and therefore ...
0
votes
0answers
75 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
3k 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
194 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
94 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
38 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
61 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
550 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
140 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
81 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
493 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
111 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
93 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
132 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
217 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
39 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
782 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?
4
votes
2answers
144 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
172 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 + ...
6
votes
3answers
2k 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
186 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
263 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
293 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
97 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
158 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
217 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
189 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
45 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
286 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
233 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
61 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
819 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
118 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
653 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
424 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'...