Questions tagged [sha-256]

SHA-256 is part of the SHA-2 family of hash functions with a 256-bit output and a 128-bit security level.

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

Why is the SHA256 in libsnark so slow?

When I use the merkle proof example of libsnark, I find that it takes more time to calculate the merkle tree than to calculate the proof. As shown in the log below, it takes 0.04s to calculate a ...
user avatar
1 vote
1 answer
76 views

TLS 1.2 client finish message

Im working on TLS1.2 on cipher suite ECDHE_ECDSA_AES_128_CBC_SHA256. Im currently at the stage of client encrypted message where I always got error on wireshark from the server saying that Fatal, ...
user avatar
1 vote
1 answer
75 views

How to crack sha256 used as streamcipher with known or guessable block

Using SHA-256 as a stream cipher appears to bear cryptographic weaknesses, however, I am not quite sure how to implement them in decryption. Assume that I have an encryption function using 64-byte ...
user avatar
0 votes
2 answers
120 views

What does it mean if two files created by the same person shares the same SHA256 hash?

Okay so I've got an assignment for cyberlaw and this could be irrelevant to the question. But I have a situation where someone signed a a will using an advanced electronic signature, but this ...
user avatar
0 votes
2 answers
89 views

Can I use half of 256 bit key as AES 256 IV?

After some google research, I have found out the IV used in AES 256 bit encryption must be a 128 bit key. My AES256 encryption is processed with key of random 256 bit key and IV generated of text ...
user avatar
0 votes
1 answer
77 views

Are RSA-SHA256 signatures prone to length extension attacks?

I need to sign a message using a private key and verify the message with a public key, while making sure the message hasn’t been tampered. I know that SHA-256 itself is prone to length-extension ...
user avatar
  • 103
0 votes
1 answer
92 views

SHA-256 compression functions without padding

Looking at the example of the null input (512 bits), it takes as input: input (Hex): ...
user avatar
  • 37
1 vote
1 answer
79 views

SHA-256 in binary-circuit-based MPC

For a binary-circuit-based MPC, the multiparty will provide its inputs to calculate the result, which indicated the function $f(x_1, x_2, \dots,x_n)$ needs to accept $2$ or more inputs. Why do there ...
user avatar
  • 37
2 votes
1 answer
326 views

Understanding Hash collisions - why bad?

I read few answers about the question: why are hash collisions so dangerous? But did not get a really satisfying answer. Assume we are the first people who found a SHA256-collision, like sha256($§&...
user avatar
  • 23
3 votes
1 answer
222 views

Can I treat SHA-256 hashes as 64 fair dice rolls with numbers between 1 and 16?

My understanding was that SHA-256 is pretty random or "random" enough. I assumed that would mean that every character would behave like a 1 to 16 dice roll. With this assumption, I would ...
user avatar
  • 133
2 votes
1 answer
176 views

Is there a quantum algorithm to find SHA256 collisions?

As I understand, the Bitcoin network can be seen as a supercomputer looking for SHA256 collisions. It hasn't found one yet (March 2022). Also, in the post-quantum cryptography era, you would be ...
user avatar
6 votes
1 answer
758 views

RSA Signature using SHA-256 is secure?

Is following RSA signature scheme secure against forgery and prevents breaking text book RSA? $$y = \operatorname{SHA-256}(m)$$ $$s = y^d\bmod N$$ where $m$ is message of arbitrary length, $y$ is the ...
user avatar
  • 1,998
2 votes
2 answers
211 views

What are the first bits of a bitstring, for instance generated using SHA-256? [closed]

I have a string that generates from SHA-256 x = fea5f97f9ca1e1a0a2ae344f4e12a3ab0c4d9221e6bb5d70bc567e39f8fbc3d5 What's are the first 10 bits are of the value of <...
user avatar
0 votes
1 answer
93 views

Compressing SHA256 to be a viable database id?

Don't know a lot about cryptography, so need some help on this. I would like to use a SHA256 string as a unique id in my database for users, but scaling that would be difficult. Is it possible to ...
user avatar
1 vote
1 answer
71 views

Is this simple Proof of Work algorithm based on SHA256 susceptible to length extension attack?

Each block's contents are hashed into 32 bytes using $\operatorname{SHA-256}$ (call this string $a$). In order for the block to be accepted, there must be a 256bit nonce (call this string $b$) ...
user avatar
1 vote
0 answers
105 views

SHA-256 Hash Crack

Suppose, If a SHA-2 hash does get broken completely with hardly any power, where would it get reported and is there currently a bounty on it?
user avatar
3 votes
1 answer
172 views

How to create recreatable hashes?

I recently stumbled upon a YouTube video explaining a casino game. In simple words, they randomly generate a multiplier for your initial investment. This multiplier is supposed to be backed by a hash ...
user avatar
  • 133
0 votes
1 answer
107 views

Concatenation in Merkle Trees

Consider a simple Merkle Tree with leaves alice +100 and bob +50. Using the SHA256 hash algorithm, the digest of the respective ...
user avatar
4 votes
1 answer
611 views

Risks of Using SHA1 Instead of SHA256 for RSA with OAEP Padding

I'm presently implementing a simple RSA-based encryption as follows in PHP (using openssl_public_encrypt): ...
user avatar
  • 153
1 vote
2 answers
1k views

How insecure would a cipher based on iterative hashing be?

I was just wondering how the following construction could be insecure. I can tell that known-plain attacks are possible, but I'm not sure about anything else. Let the user pick a password and hash it ...
user avatar
  • 19
1 vote
2 answers
138 views

reversing hash function makes possibilities increase exponentially, yet there is a finite number of inputs. How?

When trying to reverse a hash function, there is loss, e.g. a+b=c given c=5, try to go back to a,b (previous step) (a,b)=(5,0),(4,1),(3,2),(2,3),(1,4),(0,5) but, ...
user avatar
0 votes
0 answers
88 views

Bug Bounty for a reversed Hash

this is just a general question, Is there is a bug bounty from the NSA or anyone else for reversing a SHA HASH, specifically SHA-256?
user avatar
2 votes
1 answer
70 views

Should I use HMAC to create a multiple part HASH token

I have a web API with a custom API authentication system that users each have a SecretKey and a public ApiKey. Using these two keys client(or user) can generate a token for the authentication on the ...
user avatar
0 votes
2 answers
98 views

Bringing a key to 256 bit by a hash algorithm

For example, if I use Rijndael for encryption, I have to specify a key of a certain length. For user convenience, I want the user to be able to use a key of any length. Then, to get the key to the ...
user avatar
  • 37
0 votes
1 answer
86 views

Reverse SHA256 Hashed Value from Multiple Instances where Part of Hashed Value is known

I apologize in advance if this question has been answered already. However, I have not been able to find an existing answer - despite the case being pretty simple and common I imagine. Perhaps there ...
user avatar
0 votes
1 answer
236 views

SHA-256 doesn't follow a uniform distribution?

I have been playing with SHA-2-256 in Julia and I noticed that the hashes produced don't appear to follow a uniform distribution. My understanding of secure hashing algorithms is that they should ...
user avatar
  • 11
2 votes
1 answer
132 views

How strong if I combine two hash functions, such as MD5(SHA256(input))?

If I try to do MD5(SHA256(input)), what is the strength of this so-called double hashing approach? Is it as strong as SHA256, or as strong as MD5, or as strong as ...
user avatar
1 vote
2 answers
116 views

Can I use SHA256 from BIP39 passphrase for auth credentials?

I am working on an E2E encrypted app. I am using OpenPGP.js and storing public and private keys on the server. The private key is encrypted with a BIP39 passphrase which is stored in browser ...
user avatar
1 vote
2 answers
1k views

What is the difference between "Elliptic Curve Function" and "Hash Functions" like SHA256?

I am reading about bitcoin and I am a little confused about "elliptic curve function" and "SHA256". Do they have the same properties? Can both be used to generate private and ...
user avatar
0 votes
1 answer
643 views

Does the signature length of RS256 depend on the size of the RSA key used for signing?

The following NodeJS code, when run (v16.8.0), logs 512 to stdout. ...
user avatar
  • 105
2 votes
3 answers
170 views

$2^{64}$ versions of the same message

I am reading a textbook and in there they explain the property of hash functions. In particular, they give an example of how unlikely it would be to find a second input value that would match the hash ...
user avatar
0 votes
2 answers
286 views

Is it possible to get the SHA256 hash collision with partial known data

I have a text sentence that consists of 448 digits [0-9] [a-f] (in HEX format). This text sentence is partially cut off, but I know the middle, and the beginning ...
user avatar
0 votes
0 answers
28 views

Protect PII in-transit via hash comparison

I'm being asked to provide a solution for my internal customer. All network communication is internal and no applications nor their servers are accessible via the internet. REQUESTOR application will ...
user avatar
  • 1
2 votes
1 answer
592 views

How to generate a circuit for SHA-256?

In "A Boolean Circuit for SHA-256" by Steven Goldfeder, the author gives a Boolean circuit for SHA-256. I find this method very complicated. May I ask how to construct a Boolean circuit for ...
user avatar
  • 707
0 votes
2 answers
110 views

When inputting a stream of raw binary values to a SHA256 hash and a value of 10000000 is encountered in the input stream, does the hash end?

I am acquiring binary data from a sensor and storing it in a file. As each byte of data is read from the sensor, it goes into a SHA256 hash. The length of the acquired data stream varies from one ...
user avatar
0 votes
0 answers
47 views

How to find the right data for generate a partial SHA-256

I have 12 bytes (5 fixed and 8 variable) of data that will be passed to SHA-256, at the end only the last 5 (most significant) bytes of the 20 generated are checked, is there a way to generate the 8 ...
user avatar
  • 99
1 vote
1 answer
157 views

API key generation technique

I am designing an web api which needs to grant access to various client apps via an api key sent as http header. I know, not really how it should be done but I have no control over this part. My ...
user avatar
  • 11
4 votes
0 answers
223 views

Uniqueness and Schnorr signatures

I am trying to analyse a "uniqueness" game around Schnorr signatures. The game is described in $\textbf{B.}$ and I try to provide in $\textbf{1.}$ and $\textbf{2.}$ some incomplete answers ...
user avatar
0 votes
0 answers
421 views

Generating certificate using ECDSA_P256 algorithm but with sha256RSA signature

If you have a look at a certificate encrypting google.com it advertises a 256-bit ECC key with ECDSA_P256 parameter. The signature algorithm is sha256RSA. I've been ...
user avatar
1 vote
1 answer
38 views

Number of Legitimate Bitcoin Wallets from unsequenced set of 24 Words

If someone found a scrambled BIP-39 24 word sequence how hard would it be to determine the correct sequence that yields someone's wallet. Are there multiple different unique sequences of the same 24 ...
user avatar
0 votes
0 answers
137 views

How does one construct a SNARK circuit for proving the knowledge of a SHA256 pre-image?

Usually one explains how the R1CS/QAPs and SNARKs work using examples of circuits with multiplication and addition nodes, and constructing polynomials from that is relatively straightforward. SHA-2 ...
user avatar
1 vote
0 answers
43 views

Matching accounts across multiple data leaks via their hashed passwords

I've heard about several instances where OSINT researchers were able to match user accounts from multiple data leaks purely based on their hashed passwords, assuming accounts had the same password on ...
user avatar
  • 111
0 votes
2 answers
774 views

Doubt regarding converting hex to byte in SHA-256 input

Hash functions such as SHA-256 takes a binary string as input. Now given a hex string when we convert it to a normal text string the computed SHA-256 value would be the same. Herein lies my problem ...
user avatar
  • 141
-1 votes
1 answer
111 views

How to pad in the SHA256 Algorithm (an example using Bitcoin Header)?

For any bitcoin block we combine various Header fields to create a string which is an input to a 2 pass SHA algorithm. The resultant hash must match with the Hash in the Block header for the Block to ...
user avatar
  • 141
0 votes
1 answer
77 views

A query regarding SHA256 Algorithm

I am trying to code SHA256 from scratch to understand its implementation based on the wiki pseudo code as its clear enough. But I am running into problems with the calculation of W[i] for the first ...
user avatar
  • 141
0 votes
0 answers
35 views

If the source code of SHA256 hashing algorithm is available in public, why can't it be hacked? [duplicate]

If the SHA256 algorithm is public, why can't attackers use it to create more collisions rendering the algorithm useless?
user avatar
  • 1
2 votes
2 answers
161 views

Does SHA-256 have (128-time + 128-space = 256-overall)-bit collision resistance?

First, we consider those hash functions that can actually provide 256-bit pre-image security, and not something like SHAKE128<l=256bits> where the sponge ...
user avatar
  • 6,621
2 votes
2 answers
1k views

How to unhash sha256? Alternatives to brute force?

I know it's almost impossible to do, SHA256 is a one-way function that can't be easily reversed, just like there are operations that have no reverse, take: $f(x) = x+5$ , it's easy to see that if you ...
user avatar
-1 votes
1 answer
229 views

Does this paper find cryptographic weakness of SHA-256?

I found only the abstract and tables of this paper https://dl.acm.org/doi/abs/10.1145/3409501.3409513 From the abstract In this paper, the researchers proved that the modified SHA256 is viable to ...
user avatar
  • 106
2 votes
1 answer
72 views

In sha256, is it possible to use less information than the full preimage to prove that the prefix of the preimage is a certain string

Alice split a long string P into two segments A and B. A is relatively short and B is long. H = sha256(A + B) Bob does not know P, but knows H. Is it possible for ...
user avatar
  • 23

1
2 3 4 5
11