Skip to main content

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
5 votes
5 answers
1k views

Which hash algorithms support binary input of arbitrary bit length?

Background In theory, hash functions produce a binary number having bounded (often fixed) length from binary data of arbitrary length. In practice, specifications and implementations constrain the ...
smartcaveman's user avatar
0 votes
0 answers
24 views

SSL certificate fingerprint mismatch between OPNsense and browser

I've configured an OPNsense firewall's web GUI to use a self-signed certificate with the following SHA-256 fingerprint However, when I open the web GUI from a web browser, it is showing a different ...
Mr.Z's user avatar
  • 101
2 votes
2 answers
144 views

Is the quality of hash function essential in HKDF?

Hash functions have a number of properties needed, including the property that no collisions must be able to be found. Generally, if we can find collisions for hash functions, we consider the hash ...
juhist's user avatar
  • 1,613
0 votes
0 answers
66 views

Is sha256 quantum secure? [duplicate]

I've been reading about the security implications of quantum computing on cryptographic algorithms and came across some discussions regarding SHA-256. I understand that SHA-256 is currently considered ...
Nerses Asaturyan's user avatar
1 vote
2 answers
592 views

Sha256: Any significance in being able to find message schedules that lead from different initial hash values but produce the same hash?

Is there any significance in being able to find message schedules that result in the same hash but require different initial hash values? Can generate every 5-10~ minutes for any hash. Confirmed ...
Leo Costa's user avatar
1 vote
0 answers
60 views

Why are Functions within sha-256 picked with certain exact magic numbers?

SHA-256, as described in its original paper, contains certain specific functions such as Σ1(X) = RotR(X, 2) ⊕ RotR(X, 13) ⊕ RotR(X, 22) or ...
Jan's user avatar
  • 11
2 votes
1 answer
111 views

Rationale for the choice and majority functions of SHA-2

I've been trying to learn why the different stages to the SHA-2 family of algorithms were added - SHA-256 in particular. Here's the pseudocode for the message schedule: ...
Jason Stackhouse's user avatar
0 votes
0 answers
31 views

i want to verify the following p2pkh transaction

I know to veify the p2pkh transaction we have to place the unlocking script and locking script in a stack and than evalute the stack. In such cases the the scriptpubkey_asm is of the form <OP_DUP ...
Code's user avatar
  • 1
1 vote
1 answer
137 views

What is the purpose of making salted passwords public?

So I was reading through an article about how passwords are salted and hashed through a cryptographic function here, and found out that hashed passwords, along with the plaintext salt values are ...
mantot123's user avatar
  • 111
0 votes
0 answers
42 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
4 votes
2 answers
4k 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
62 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
69 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
810 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
886 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
250 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
4k 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,060
0 votes
1 answer
377 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
106 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
273 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 ...
Juraj's user avatar
  • 111
0 votes
0 answers
272 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
44 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
1k 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
-2 votes
1 answer
118 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
  • 972
1 vote
0 answers
124 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
344 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
  • 149
2 votes
1 answer
1k 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
2k 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
152 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,492
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
380 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
49 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
2k 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
752 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
96 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
  • 175
1 vote
1 answer
384 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
221 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
  • 138
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 ...
Hera Sutton's user avatar
1 vote
1 answer
159 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
  • 948
3 votes
2 answers
1k 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
449 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
727 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 ...
Hera Sutton's user avatar
1 vote
1 answer
134 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
343 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
2k 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
655 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
2 votes
1 answer
2k 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 Cho's user avatar
-2 votes
1 answer
270 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
2 3 4 5
13