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
3 votes
2 answers
503 views

Password Hashing based on Common Passwords

If an attacker has a database of 1,000 users' hashed passwords which are hashed with SHA-256 with a 128-bit salt and all of these users used 10,000 common passwords. How many hashes will the hacker ...
1 vote
0 answers
47 views

What is more secure, HMAC with SHA-1, or with SHA-256 and take a substring?

I'm going to guess the latter, but just wanted to ask here. I want to have a relatively short signature, and my goal is to take a substring of the resulting hash.
5 votes
1 answer
493 views

How can a preimage attack on SHA-256 always succeed within 2^256 evaluations when done though brute force?

I was reading the Wikipedia page for SHA-256 (SHA-2) and came across the following statement: For a hash function for which $L$ is the number of bits in the message digest, finding a message that ...
1 vote
1 answer
34 views

Mod operation while verifying an ECDSA signature with SECT233R1

I'm trying to perform ECDSA verification in hardware. I'm using the SECT233R1 curve (NIST B-233). I have a question about the hash function used while doing so. I want to use the SHA256 hash function ...
2 votes
1 answer
53 views

Generic attack on Hmac sha256

Is there any generic attack on HMAC SHA 256 ? I am currently reading up on attacks on Hmac sha-256. However most of the papers I've found are about side channel attacks such as Differential power ...
  • 33
4 votes
2 answers
319 views

Password hashing and salting with SHA-256 on $2^{64}$ password space

If a password is randomly chosen from a space of $2^{64}$ passwords and is stored as an SHA-256-bit hash and a 128-bit salt, how many hashes does an attacker need to perform to recover the password in ...
1 vote
1 answer
186 views

Which hash functions provide 128 bit resistance?

I was wondering out of the functions (MD5, SHA-1, SHA-256, and SHA-512), do all provide 128-bit pre-image resistance and 128-bit second-image resistance? Also, out of these hash functions, do only SHA-...
1 vote
1 answer
151 views

How long does it take to decrypt AES encrypted message with salt(for pbkdf2 key) and iv known

I'm new to crypto! The situation is, Aes-256-cbc encrypted message(including not encrypted iv & salt) is revealed. We also know pbkdf2 function uses 10000 rounds with sha256. All we need to ...
  • 11
0 votes
1 answer
77 views

Does a pseudo-random number have the same security as its SHA digest message?

Is a random number generated by a CSRNG equivalently secure as the SHA hash of that number? I know that RNGs generate numbers that look random, and aren't necessarily random. For example, in a range ...
-1 votes
2 answers
174 views

Can I 100% trust the PBKDF2(HMAC-SHA256) AES-256 CBC encryption algorithm for file encryption purposes or not, and why? (Winrar) [closed]

I am not an expert in cryptography and therefore I would like to address this problem to people who have been working on this topic for a long time and thus verify the facts from several sources. I ...
  • 3
0 votes
1 answer
85 views

Is sha-256 better then sha-1 in aspects othen then the hash size?

Assume I create a hash using SHA-256 and then take only the first 160 bits of the hash, as the result. is the result more cryptographically secured than SHA-1? Or are the two algorithms equally secure ...
  • 103
8 votes
1 answer
561 views

Does "SHA-256/192" use different initial values from SHA-256?

I've seen some mentions of a "SHA-256/192" online. Clearly, this means the output of SHA-256 is truncated to 192 bits, but does it also use different Initial Values like SHA-512/256?
  • 2,328
0 votes
2 answers
149 views

PKCS#7 SignedData - how is the "encryptedDigest" constructed for RSAES‐PKCS‐v1_5?

I need to use Azure Key Vault HSM to sign arbitrary data in a PKCS#7 CMS. There are plenty of libraries and packages that can do this if you supply them with the private key, but obviously I don't ...
0 votes
1 answer
90 views

Merkle–Damgård construction - the bigger input, the longer time to compute hash?

I'm trying to understand Merkle–Damgård construction. We can hash as many blocks of data as we want, if I understand it right. But then it looks like when input is bigger, then also time to compute ...
  • 1,129
0 votes
2 answers
129 views

SHA256 - alternative algorithm to receive same hash?

My question is whether it is possible to use "another" algorithm than the sha256 to hash data but end up with the identical sha256 hash (obviously without using the sha256 algorithm)?
2 votes
1 answer
102 views

Create a control hash string from different sources, is there a difference, advantage or disadvantage in comparison when using this ways?

I wanna create from several inputs/sources should be formed into one hash value for controlling of different thinks later. Example: String + File String + String File + File String + File + String ...
0 votes
0 answers
281 views

Generate SHA256 fingerprint from RSA public key (string only)

I have the public key, the string itself (not a file), and I am trying to figure out the SHA256 fingerprint, as in the image attached. The default key generated by PuttyGen is SSH-2 RSA with a SHA256 ...
0 votes
0 answers
59 views

What is the minimum length of shortened HMAC to be considered safe?

Is it safe to truncate HMAC? What is the minimum length of a truncated HMAC so that HMAC is still considered to be safe to use? Are there any standards on when it comes to shortening HMAC? In my case, ...
  • 1
0 votes
1 answer
131 views

Should I use hash of passphrase as AES256 key

As title I have a password-like passphrase (8 chars at least) that is then hashed with argon2(with the salt is SHA256 of that passphrase). Then use it as AES256 key along with a random IV generated by ...
4 votes
1 answer
113 views

What is the rationale for including addition in SHA-256?

Short Version: SHA-256 uses addition alongside a variety of bit-wise operations. What's up with that? I was reading a description of how SHA-256 worked and it included a description of the various ...
  • 701
0 votes
1 answer
65 views

False positive error rate of truncated hash match

I’m having difficulty calculating the false positive error probability of matching a prefix of a hash that was truncated to m bits. Say I have string S1 that produces a SHA256 hash H1. I then save the ...
1 vote
1 answer
119 views

How to generate a SNARK arithmetic circuit for SHA256?

I am using zkSNARK to prove knowledge of preimage for SHA256. However, the library used only supports field operations (such as add and multiply), and it compiles down to arithmetic circuits. Thus, ...
1 vote
0 answers
109 views

Creating a basic SHA256 hasher in Circom

I want to create a SHA256 hasher in Circom so I can validate that a person knows the pre-image of a SHA256 hash without revealing the pre-image. This is my current code but it doesn't work: ...
0 votes
1 answer
53 views

Double hashing scheme on not collision resistant hash

Given an hash H that is not collision resistant, for example 80-bit digest, if we use the following double hashing scheme: H(SHA2-256(x)). Does this scheme increase the collision resistance?
  • 1
0 votes
1 answer
54 views

Fastest method of CNF equation solution verification

I am trying to find a way to mine bitcoin faster than an ASIC by using a CNF representation of sha(sha(hash)), which would be an equation containing a few hundred thousand clauses, let's call it n ...
0 votes
1 answer
497 views

Can OpenSSL sign an ED25519 certificate with ECDSA-with-SHA256?

We are trying to generate some self-signed certificates to test our cybersecurity firmware before switching to a "real" CA-signed chain of trust. The specification we are coding to mandates ...
3 votes
1 answer
158 views

NIST expression for HMAC security strength

In NIST SP800-107, NIST claims that the security strength of HMAC is MIN(security of HMAC key, $2L$). $L$ is the length of the output of the underlying hash function. Let's take HMAC-SHA256 as an ...
0 votes
1 answer
146 views

Is it possible to break SHA-256 with hash tables?

If x is the value you're hashing, $t(x)$ is the hash of that value, and $t(x+s)$ is that value with salt, then hashed. You could create a hash table where the key is $t(x+s)$, the value is $x+s$, and ...
1 vote
1 answer
94 views

Probabilistic SHA-256 hash tending all values to 0.5

I wrote SHA-256 with arrays of integers representing the bits (e.g. [1,0,...,1]), and then I altered it to accept partial values (e.g. [0.5, 0.79, 0.0, 1]), as in each value has an x chance of being '...
0 votes
2 answers
188 views

Is it possible to perform Hash(a) + "b" -> Hash(a||b)

Assume that we have (know): Hash(A) Length of A A's character type ([0->9],[a->z]) A is a string Everything about B (original string, Length, etc.) HashMethod SHA256 Note: A's original value is ...
1 vote
1 answer
134 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 ...
1 vote
1 answer
163 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, ...
1 vote
1 answer
116 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 ...
0 votes
2 answers
174 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 ...
0 votes
2 answers
146 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 ...
0 votes
1 answer
258 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 ...
  • 103
0 votes
1 answer
226 views

SHA-256 compression functions without padding

Looking at the example of the null input (512 bits), it takes as input: input (Hex): ...
  • 37
1 vote
1 answer
129 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 ...
  • 37
2 votes
1 answer
620 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($§&...
  • 23
3 votes
1 answer
271 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 ...
  • 133
2 votes
1 answer
330 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 ...
  • 123
6 votes
1 answer
2k 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 ...
  • 2,008
2 votes
2 answers
466 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 <...
0 votes
1 answer
139 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 ...
1 vote
1 answer
118 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$) ...
1 vote
0 answers
114 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?
3 votes
1 answer
190 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 ...
  • 133
0 votes
1 answer
278 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 ...
4 votes
1 answer
1k 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): ...
  • 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 ...
  • 19

1
2 3 4 5
12