What's the deal with Deno? We talk with a major contributor to find out. Listen now.

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
0
votes
0answers
41 views

Can I and How Decrypt this Online

Although I had a security course in school a long time ago, I am effectively new to cryptography. I have an encrypted text, the encryption key of 44 characters, the encryption method, (Fernet, which ...
1
vote
1answer
44 views

Collision resistance of hash functions with short, fixed-length inputs?

Regular hash functions like SHA-256 have a variable length input and measure security against collision attacks in bits. For SHA-256 this is 128 bits. When I limit the input length of SHA-256 to for ...
3
votes
4answers
1k views

How to calculate the odds of finding “20” at least three times in a sha256 string?

For example, what are the odds of this happening: Can this even be calculated?
1
vote
1answer
85 views

Is this SHA-256 modification still valid?

We typically model a hash function (in particular $\mathrm{SHA}$-$256$) as a function $H:\{0,1\}^{2^{64}-1} \to \{0,1\}^{256}$ with some special properties that makes them useful in practice. In this ...
0
votes
0answers
37 views

Image Hashing (SHA256) [duplicate]

I'm wondering about the concept of image hashing specifically SHA256. Like how do we do it? Can we hash the image based on the binary file? or do we need to convert the data into strings first then do ...
4
votes
1answer
564 views

How is it possible that these two encryption functions yield the same result?

I opened this post in stackoverflow some time ago where I explained a problem I had about not finding a way that would allow to successfully get the result of a string encrypted with a "aes-256-...
0
votes
1answer
35 views

HMAC SHA256 - fixed vs dynamic key - security and collision impacts

Assume we should apply an hmac sha256 on different messages made of incremental numbers (Ex. 1 to 1 billion). Does it make sense in terms of security to apply a different fixed key for each message? ...
2
votes
1answer
80 views

are outputs of sha256 independent when padded with different seed each time, in other words, when inputs can be somewhat related

So I was wondering about what will be the dependence of the outputs when I padded one input with two different strings two times for technically generating two different strings, say the input string ...
1
vote
0answers
39 views

Getting Sha256 values in any arbitrary range with almost equal probability [duplicate]

I went through this post SHA256 output to 1-6 number range?, this post, SHA256 output to 0-99 number range? and I felt like the exact way mentioned in the first one is really helpful. I am looking for ...
0
votes
1answer
63 views

Explaining the reason of radically more accuracy while using different set of hash functions instead of same set of hash functions on some operations

So I am looking for an explanation of an experiment. In this experiment, I took a set of k hash functions. Say the total number of data points I am working on is d. Call an algorithm A which used that ...
3
votes
1answer
97 views

Why HAIFA and sponge constructions are not prone to length extension attacks?

I was writing in a document about the flaws of the MD construction which pushed cryptographers to create different and more robust constructions. However, I don't know why HAIFA and Sponge ...
0
votes
0answers
75 views

Probability of collision when we use a particular part of sha 256 hashed value

So I was supposed to use hash some co-ordinates and I was supposed to use k 3-wise independent hash functions in order for the mathematical explanations behind that algorithm to be hold. But after ...
10
votes
1answer
1k views

Why does SHA2-224 use different IV's than SHA2-256?

Given that it's otherwise just a truncation, I can guess that being able to compute the 224 value from the 256 value is an unwanted property, but that's just speculation.
1
vote
1answer
59 views

What is the best way of deterministically choosing N of M, given 32 bytes of sha256?

I have a list of M=10,000..100,000 items and 32 bytes of sha256 H. I want to choose N=10..100 items (without order). Is there an efficient way to do this? Or should I use something like ...
13
votes
5answers
6k views

Is it easy to crack a hashed phone number?

I want to SHA256 hash phone numbers in order to hide them. Is this a good idea? Are there any other ways I could make this safe?
0
votes
1answer
62 views

Can I find a number, such that the its SHA-256 hash is all-0 [duplicate]

I want to find a number, such that the result of its SHA-256 hash is all 0. I don't know if this number exists.
2
votes
1answer
124 views

Can we calculate the “previous hash value” in the SHA256 compression function with a known message block and final hash?

Suppose we have a $512$-bit (or $512\times n$ bit) message that we'd like to hash using SHA-256. I've looked at the implementation, and from what I understand, after padding, there will be a total of $...
0
votes
1answer
45 views

AES-256 CTR with ESSIV, is this correct?

I am having some problems encrypting disk using AES-256 in CTR mode, with ESSIV iv generation (I am aware of couple of flaws, although this mode is enough for now). What I have here is: ...
1
vote
1answer
68 views

SHA256 hash malleability

Can an SHA-256 plaintext be malleable? For example: Given $y = hash(x)$ , can an attacker find $z$ so that $z = hash(f(x))$. Here $f()$ might be the addition of a suffix to the message, an XOR ...
0
votes
1answer
49 views

Is it okay to reuse a single symmetric key for a large volume of messages and HMACs, so long as “nonces” are randomly generated for both of them?

https://www.reddit.com/r/crypto/comments/fnku50/nonce_reuse_vs_iv_reuse/ Nonce reuse with the same key is catastrophic to security. The same premise holds for initialization vectors. If the key ...
2
votes
2answers
111 views

What is the difference between a PRF and a PRP, and are cryptographic hash functions the same as HMAC (PRFs or PRPS)?

I read one answer to a similar question that put forth that a hash function is distinct from a PRF, however I've also found materials purporting that cryptographic hash functions are PRFs, and I'm not ...
0
votes
0answers
29 views

Is Joux's multicollision attack applicable for truncated SHA256?

Joux presents an elegant way to generate k-way multi-collisions with about as much effort as generating a single collision: https://www.iacr.org/archive/crypto2004/31520306/multicollisions.pdf ...
1
vote
1answer
105 views

Hash based stream cipher where the input is a constant, key, nonce and counter

This is a question out of curiosity ! A hash function produces an output that is considered computationally infeasible to reverse. Let's consider, for the sake of illustration purposes a tried and ...
0
votes
0answers
45 views

Should I update my fedora encrypted system?

I have installed my Fedora Workstation version 23 using native disk encryption. Since it, I am upgrading it using dnf system-upgrade plugin. Today, I have fedora 32. Some time ago, I’ve discovered ...
0
votes
1answer
37 views

SHA-256 for unique token

I need to create an unique token for a web service. I'm doing that in the following in the following way: ...
0
votes
1answer
70 views

SHA-256 Hashing Functionality

It seems all these options are correct to me fingerprint of the provided input. A one-way deterministic hash function. symmetric hash function A hash function that generates a digest. ...
0
votes
1answer
38 views

Can we use a hash-based stream cipher against DPA attacks?

There have been lots of DPA researches against block ciphers. I was wondering if we use a cryptographically secure hash of an incremental counter as a stream cipher, will it withstand DPA attacks? ...
0
votes
2answers
76 views

For uniterated SHA-256 of salted password, should the password precede the salt?

This is a follow-up to this question (thanks to answers from @fgrieu and @kelalaka ) about the format of a salt when hashing a salted password. I realize this is pretty much academic, as the proposed ...
1
vote
2answers
149 views

What format should a salt be when it is concatenated with the password?

Assume that, in the available environment, it is not possible to use modern password hashing functions (bcrypt, scrypt, Argon2, PBKDF2, etc.), so it is necessary to roll my own stand-in, until they ...
0
votes
0answers
79 views

Combining Hashes - NTLM and SHA

i have been recently learning about different types of hashing and the encryption/decryption methods of such hashes. Im currently trying to find the preimage of this hash i have been given as a ...
2
votes
0answers
18 views

How to find k-way second preimages

For example: Assuming someone has found a second preimage for SHA-256. In other words, for SHA256(M1)=H, someone has found M2 which SHA256(M2)=H Now, is it possible to generate k-way second ...
1
vote
0answers
65 views

“Reversing” SHA256 [duplicate]

Let's say I give you the sha256 hash of my password, which I'll call X. Now, the sha256 algorithm is a one-way function, meaning you can give it some input and get an output, but you can't get the ...
2
votes
0answers
51 views

Is there a reason behind the number of bit rotations used in SHA-256?

SHA-256 uses the following bitwise functions during the hash algorithm: $$\begin{align*} \Sigma_0^{\{256\}}(x)&=\operatorname{ROTR}^{ 2}(x)\oplus\operatorname{ROTR}^{13}(x)\oplus\operatorname{...
2
votes
1answer
105 views

Random oracle based on SHA-256

I am given the following problem. Consider SHA-256 to be a random oracle in a practical application. Construct an (almost) random oracle $\{0,1\}^*→\{0,1\}^{3000}$ based on SHA-256. Does it mean ...
0
votes
0answers
103 views

Is it possible to reverse the final rounds of SHA-256

I've seen a lot of preimage and collision attacks on SHA-256 that target the first few rounds. So far, the best attacks break preimage resistance for the first 52 rounds out of 64 rounds. However, I'...
1
vote
1answer
333 views

Understanding example of ECDSA P256

I am new to cryptography, I found the below Example on a nice website, but I am not able to understand the most of the terms used (H:Hash, K:Random number,E=?, Kinv=?,Rx=?=RY?,R=Private key?,D?,S? ...
1
vote
2answers
242 views

521-bit ECC keys are the same strength as RSA 15,360-bit keys

521 bit ECC uses key sizes 7.5 times smaller than the RSA standard while offering encryption that is magnitudes more secure. An RSA 2048-bit key's secure enough for banking, but a 521-bit ECC key is ...
0
votes
0answers
153 views

How to bruteforce password from HMAC-SHA256 hash (if you have the key)?

Short of creating one's own script / program, is there an existing, readily available way of iterating through a list of potential passwords to find which one corresponds to a hash (HMAC-SHA256), ...
0
votes
1answer
66 views

Xor'ing sha256 words instead of adding

In sha-256, when the words go through the compression function, they get added to the previous hash. In case of the first 64 rounds, they get added to the initial words ($\bmod 2^{32}$ of course). ...
0
votes
2answers
216 views

How to pad a 448 bit message for SHA256?

I recently implemented a very simple SHA256 hashing program in C++, since the SHA256 hash function's block size is 512 bits or 64 bytes, and messages less than that size have to be padded as per the ...
2
votes
1answer
130 views

SHA-256 security for initial 32 bits

I have concerns regarding truncated SHA-256 hashes in an application I am building at the moment: Nomenclature secret - the full 256-bit SHA-256 result of hashing ...
3
votes
1answer
71 views

If I allow arbitrary initial hash values for SHA-256, what would be the weaknesses?

The initial hash values (IV) of SHA256 are fixed. However, let's say I modify the SHA256 hash function to allow the attacker to use arbitrary IVs rather than fixed IVs. What kind of weaknesses would ...
0
votes
0answers
18 views

Does every 256 bit number have a distinct sha256 result? [duplicate]

If I were some how able to create a table of all 256 bit inputs and outputs of sha256, would each of the inputs have a distinct output?
4
votes
2answers
1k views

Is it safe to convert a 256-bit nonce into a 192-bit nonce by SHA-256ing and then truncating it?

I'd expect a 192-bit nonce derived from a 256-bit nonce by computing the SHA-256 hash and then truncating it to 24 bytes to behave like an approximately uniformly randomly generated 192-bit nonce and ...
1
vote
1answer
52 views

Can I retrieve a re-hashed (hash) value, for instance by additional hashing?

I have a double-SHA-256 of some text $$ h_2 = \operatorname{SHA256}(\operatorname{SHA256}(m)).$$ I don't need the plain text ($m$), but somehow I need to get first $$h_1 = \operatorname{SHA256}(m).$$ ...
1
vote
1answer
84 views

If I concatenate two colliding SHA-256 messages with the same prefix and suffix, will the resulting hash output still collide with each other?

So let's say that there are two messages, $x_1$ and $x_2$, which hash to the same output. In other words, these two messages collide with each other: $$\operatorname{SHA256}(x_1)=\operatorname{SHA256}...
1
vote
1answer
143 views

Problem understanding SHA-256

I'm reading this paper: fips180-4-draft-aug2014 I'm on page 23 where they have two values for SHA-256: T1 and T2. While I understand the operations done, I don't understand the bigger picture. Why ...
1
vote
0answers
57 views

Does fixing partial bits of a SHA256 hash increase the probability of finding a preimage using the meet-in-the-middle attack?

Let’s say I want to find a partial rather than full preimage using the meet-in-the-middle attack. For example, my goal is to find a preimage so that the first 76-bit output of the hash are all ...
1
vote
1answer
49 views

Difference between MAC(key, msg) and SHA(key || msg)

I know that SHA(key || msg) is vulnerable to string concatenation attack. However, what if we specified key bit-length and msg bit-length? For example, key bit-length is 256 bit and msg bit-length is ...
2
votes
1answer
171 views

Finding the IV values of SHA-256 given all message blocks

Given all message blocks $w[i],i \in 0:63$ and assume that $n<128$ (arbitrary) bits $x_1,x_2,...,x_n$ of the IV values are unknown (e.g., $h_7$ bits are unknown) while other IV values coincide with ...

1
2 3 4 5
9