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
0 answers
22 views

Is it possible to limit possible inputs of a SHA256 output

my question is as in the title. For example, there are 2^256 different values ​​that a SHA256 code can take. But is it possible to shorten this number somehow?
Arda Gürses's user avatar
-1 votes
0 answers
39 views

example for 2 data with same sha256 sum [duplicate]

Is there any example for data that has the same sha256sum value? Or is it impossible to find out with current computational power?
Amruth A's user avatar
0 votes
0 answers
24 views

Nothing relevant: Do you know of any sha256 entries that have a majority of 0 nodes? [closed]

Although I know that it is easy to create a program to achieve this, in fact I have it, but I would like to know if there is a database on the Internet.
Oenaby's user avatar
  • 1
3 votes
2 answers
3k views

What’s the smallest known sha256 hash that was ever produced?

Basically the same question as this one, except in my case the value to be hashed doesn’t have to be a valid Bitcoin block, but is a bytearray of arbitrary length and content (and that my use case is ...
user2284570's user avatar
0 votes
0 answers
46 views

Multiparty Computation of SHA-256

I'd like to find a mechanism to evaluate the SHA-256 compression function using multi-party computation, but I'm not sure what's possible given the current state of the art and would appreciate some ...
Reid Rankin's user avatar
14 votes
5 answers
9k views

Boss insists on storing SHA2(p) || SHA3(p), claiming it "doubles security"

My friend in the software industry came to me with one of his "dumb boss" war stories. This particular time, his (non-technical but eager to learn) manager came to him and told him to, in ...
squinged's user avatar
  • 143
2 votes
1 answer
62 views

Rationale for BLAKE2 message schedule?

BLAKE2 uses a message schedule I did not see before. It uses permutations of pieces of the message block. The BLAKE2 book did not state the rationale for such a choice and how it contrasts with the ...
LightTunnelEnd's user avatar
3 votes
2 answers
762 views

How much entropy is lost due to collision?

If entropy is hashed with SHA-256 for example, and the input has exactly 256 entropy bits, how much entropy is reduced after hashing due to collision? Is there any reference that explains how to ...
Daniel Ghattas's user avatar
0 votes
1 answer
147 views

How do bad actors manipulate game results in real time within 'provably fair' gaming systems?

Ive been assigned research involving online gaming companies and their use of cryptographic algorithms to produce 'provably fair' results. The largest player in the industry uses a method involving a ...
Joey Jolly's user avatar
1 vote
2 answers
2k views

Why is SHA256 used as a layer on top of Digital Signature [duplicate]

Digital Signatures use an asymmetric algorithm, meaning that if I want to apply a digital signature to a document I sign it with my own private key and send it to the recipient. The recipient, thanks ...
Tarta's user avatar
  • 129
1 vote
1 answer
164 views

Is the sha256 x86 extension close to optimal in silicon? (as it relates to a VDF)

I came across the Solana network utilizing sha256 as a "proof of history". They are using it as a pseudo-VDF (verifiable delay function). The reason it's pseudo is because verification is ...
LightTunnelEnd's user avatar
1 vote
2 answers
3k views

How weak is using AES with a 128 bit key but 64 bits of the secret key are public constants?

Respected community, I was wondering how weak would AES-128 be, if we provide only a 64 bit key with the other remaining 64 bits either zero bits or public constants, known to the attacker. Is it easy ...
Aravind A's user avatar
  • 1,010
0 votes
1 answer
276 views

Why hash algorithms have many different digest size variants?

1- Why SHA2 has SHA224, SHA256, SHA384 and SHA512 variants? 2- Can we say SHA512 more secure than SHA256? 3- Symmetric ciphers use at most 2^256 security level and I saw on the internet people saying ...
user avatar
1 vote
0 answers
101 views

Zero Knowledge Proof for SHA-256 preimages [duplicate]

I need to design some protocol where actors will leverage Zero Knowledge Proofs (ZKP) to prove that they know the pre-image of some specific SHA256 hash without revealing the pre-image itself. Ideally,...
Bernardo Rodrigues's user avatar
1 vote
0 answers
114 views

Is it better to use PBKDF2 with SHA-512 and 1e6 iterations or SHA-256 and 6e6 iterations?

I'm implementing encryption in my browser extension that will allow users to encrypt their data and then share them with others. And since shared links can be leaked, I want to protect the data as ...
icl7126's user avatar
  • 111
0 votes
0 answers
167 views

HMAC-SHA256 key length against key recovery attack

I have trouble finding information on the security strength of HMAC-SHA256 against key recovery attacks with respect to the key size. To fit a certain application I must use a 128-bits key with a HMAC-...
dragonfire2000's user avatar
1 vote
2 answers
42 views

Let $X$ be the set of 256-bit strings and $x \rightarrow H(x)$ a map on this set, where $H$ is SHA-256. How often is $H^-1(y)$ empty?

It cannot be "frequent" because that implies $H$ is not really 256-bit. Are there statistical or mathematical bounds on this? Finding the inverse is computationally difficult, but what ...
Warren MacEvoy's user avatar
2 votes
1 answer
652 views

HMAC SHA256 walkthrough examples

I'm trying to implement HMAC SHA256 (I've implemented SHA256 successfully). I am trying to find examples where they show the results after each HMAC stage (XOR, append, H etc). Does anyone know of any ...
intrigued_66's user avatar
0 votes
0 answers
56 views

Explanation of KeePass 2 database key calculation?

I am currently taking a course in university where we are working with a KeePass 2 database file. I am still very new to everything which has to do with encryption. First I am going to provide the ...
David Krell's user avatar
-2 votes
1 answer
106 views

What is the critical importance of SHA and other hash families? [closed]

Assume integer factoring, discrete log are classical safe and LWE, McEliece etc are quantum safe. This question is only about SHA and hash families in general on why we need them if we have pkc ...
Turbo's user avatar
  • 908
1 vote
0 answers
85 views

Inconsistent SHA256 checksums [closed]

I encounter an odd issue when I calculate SHA256 checksums in Javascript. I use the following code: ...
randmin's user avatar
  • 111
2 votes
1 answer
212 views

Implementing a Merkle tree using a 128 bit hash function?

I need to implement a Merkle tree using a 128 bit hash function. In general, any hash function that guarantees pre-image, second pre-image and collission resistance should be fine to implement a ...
Lorenzo's user avatar
  • 139
2 votes
1 answer
893 views

When using AES-256 in combination with HMAC-SHA, should we use SHA-256 or SHA-512?

When using AES-256 (cipher mode CBC and padding mode PKCS7) in combination with HMAC-SHA for authenticated encryption (assuming alternatives like TLS and AES-GCM cannot be used), should we use SHA-...
SeekingAnswers's user avatar
1 vote
1 answer
1k views

What does the 256 in SHA3-256 and SHAKE256 refer to?

I am simply wondering what the bit-length in the algorithm variant in the table below refers to? For the hash functions I assume that this refers to the ouput length in bits. For instance for SHA3-256 ...
Rory's user avatar
  • 335
1 vote
1 answer
124 views

Collision Resistance in Random Bit Generator

Consider following simple RBG where SHA-256 of random noise (more than 200Bytes of 4 bits entropy per byte) is computed to produce 256 output bits $\text{output} = \operatorname{SHA-256}(\text{...
crypt's user avatar
  • 2,397
5 votes
2 answers
2k views

Is there a way to calculate a hash with two people so that no one knows the pre-image but if they get together they do?

I'm trying to find a way to have multi party hash computation, more specifically for SHA256. I want for two people to be able to compute a hash so that none of them knows the pre-image but when they ...
Dani Vilardell's user avatar
1 vote
0 answers
286 views

Is my TypeScript scrypt implementation using Web Crypto API safe and correct? (Open Source)

I want to use TweetNaCl.js for encrypting user data that is stored in LocalStorage. Therefore, I want to prompt the user to provide a PIN/password that shall be ...
kyr0's user avatar
  • 111
1 vote
0 answers
47 views

Verifying ECDSA-SHA256 HTTP Signature [duplicate]

With PHP, I'm trying to setup a HTTP signature verification for webhook requests coming from BlockCypher: https://www.blockcypher.com/dev/bitcoin/?php#webhook-signing This is their public key: ...
Carlos's user avatar
  • 33
2 votes
1 answer
1k views

is this how RS256 works in JWT?

I'm a newbie that is studying about JWT using RS256 algorithm for signing and verification. I have drawn a diagram that represents my understanding of how RS256 works. Basically, below is what I ...
William Le's user avatar
3 votes
2 answers
530 views

is SHA512 with 256 bit set is similar or same as SHA256?

I'm new in Cryptography, if i will use SHA512, but only with 256 bits, is it equal or similar to SHA256? I'm trying to understand if there is a way to use SHA512 as SHA256
ish's user avatar
  • 31
0 votes
1 answer
86 views

Correlation between IV value and the output of a hash function

As we know, the IV and the output of SHA-256 are identical in size. Suppose the input value to the SHA-256 is completely transparent. Is there any correlation between IV value and output? Is it ...
abbas's user avatar
  • 165
1 vote
1 answer
289 views

How do most implementations of SHA-256 work?

Why is it that most implementations define an sha256_init, sha256_update, and sha256_final ...
user avatar
8 votes
1 answer
195 views

AES vs. SHA2 in key-stream generation

A KDF in Counter Mode (e.g., see NIST SP 800-108r1, Section 4.1, similar to HKDF) produces the output as what AES-CTR would do if one replaces AES with SHA2 (or, to be exact, with HMAC). However, NIST,...
uk-ny's user avatar
  • 128
3 votes
1 answer
1k views

Why does SHA-256 have any to do with scrypt?

I was reading the Wikipedia page for scrypt because I wanted to learn more about it and I came across their pseudocode for the algorithm. What confused me was the following line: I don't understand ...
Darcy Sutton's user avatar
1 vote
1 answer
135 views

Is there any point in extending an 80-bit key before using it for HMAC-SHA256?

I have been asked to make a HMAC-SHA256 password digest from: a password some salt, and an 80-bit secret key. I've been advised that I should be using a key of 256 bits or more for HMAC-256. The key ...
fadedbee's user avatar
  • 916
3 votes
2 answers
998 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 ...
CryptoGuru's user avatar
1 vote
0 answers
362 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.
Gregory Magarshak's user avatar
5 votes
1 answer
674 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 ...
Darcy Sutton's user avatar
1 vote
1 answer
114 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 ...
thatbangaloreanguy's user avatar
2 votes
1 answer
257 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 ...
Donnie's user avatar
  • 33
4 votes
2 answers
1k 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 ...
CryptoGuru's user avatar
1 vote
1 answer
495 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-...
CryptoGuru's user avatar
1 vote
1 answer
1k 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 ...
Hyunhum's user avatar
  • 11
-2 votes
1 answer
217 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 ...
Angelo M.'s user avatar
-1 votes
2 answers
915 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 ...
Hasbo's user avatar
  • 13
1 vote
1 answer
863 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 ...
Aviv Aviv's user avatar
  • 113
8 votes
1 answer
808 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?
Myria's user avatar
  • 2,575
0 votes
2 answers
803 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 ...
user15045901's user avatar
0 votes
1 answer
145 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 ...
Tom's user avatar
  • 1,221
0 votes
2 answers
338 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)?
user103667's user avatar

1
2 3 4 5
12