The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [sha-3]

SHA-3, also known as Keccak, is a cryptographic hash function standardized by NIST as a new alternative to the SHA-2 hash function family.

Filter by
Sorted by
Tagged with
1
vote
2answers
48 views

Split hash for 2 keys

These are the steps: Hash ECDH shared secret with SHA3-512 Concatenate odd bytes and rehash with SHA3-512 for AES-256 key Concatenate even bytes and rehash with SHA3-512 for KMAC key Is this key ...
0
votes
1answer
41 views

Hashing high entropy key into AES format

If I have a high entropy key (ECDHE shared secret), what type of hash should I use to format this into an AES-256 key? Is Sha256 or Sha3_256 sufficient to maintain entropy or do I need to use a KDF (...
1
vote
1answer
75 views

SHA3-512 troubleshooting - is there a worked example for hashing the “zero-length string”?

(I wondered if this question should be asked on StackOverflow instead because it's a programming related issue, but it's bound to the intricacies of SHA3, which I figured was a better fit for Crypto....
0
votes
1answer
44 views

How to interpret a specific mathematical notation in “FIPS 202” (SHA-3 / Keccak)

tl;dr What does "d <= |Z|" mean in the context of bit array manipulations? As a learning exercise I'm working on an implementation of SHA-3. I am not a cryptography specialist in any way but I ...
12
votes
3answers
2k views

SHA3-255, one bit less

I need a SHA3-255 or 511. What if I simply truncate a standard SHA3-256 or 512? Apart from the doubled probability of hash collision, are there any other things I should be aware of? I could also ...
2
votes
2answers
120 views

Is there an input length range for SHAKE128 hash function?

For SHAKE128 hash function in SHA3VS document, I find this paragraph: Therefore, for testing SHAKE128, (168*2)+1) = 337 unpredictable messages will be generated with lengths from 0 to 337 336 ...
47
votes
4answers
9k views

Why isn’t SHA-3 in wider use?

SHA-3 was released by NIST just over 4 years ago this week. In my experience it does not seem to be as widely used as I might have expected. I see SHA-2 and even SHA-1 more often. What are your ...
2
votes
1answer
132 views

Where do the constants for SHA-1/2/3 come from?

My request is: I need to know the source of constants (shift constants, IV, or S-Box) for the following algorithms: SHA-1 SHA-2 (all sizes) SHA-3 Examples: BLOWFISH uses the hexadecimal ...
6
votes
2answers
730 views

SHAKE-128/256 or SHA3-256/512

Would it be better to use SHAKE-128/256 or SHA3-256/512? In what situation should I chose one over the other?
0
votes
0answers
38 views

How padding works on SHA-3? [duplicate]

I'm studying SHA-3 and I dont understand quite a bit how the padding 10*1 works. Can someone explain me step by step how is it work? Also I know that on SHA3-512 r is 576. On the sponge construction ...
5
votes
2answers
4k views

What is the difference between SHA-3 and SHA-256?

I am new about cryptography, I learned that SHA-3 (Secure Hash Algorithm 3) is the latest member of the Secure Hash Algorithm family of standards, released by NIST....
0
votes
1answer
170 views

SHA-3 Step by step?

Can somebody explain me or give me a link of a step by step SHA-3 explanation it has been really hard for me to undesrtand it. I would love to see an explanation since it's input untill the digest is ...
0
votes
1answer
64 views

What does the minimal number of round of “nr” use Keccak to avoid “collision attack”?

What does the minimal number of round of "nr" use Keccak to avoid collision attack? $$nr = 12+2L$$
1
vote
1answer
85 views

OAEP security with variable length hash function

I'm implementing a hobby cryptosystem for fun and to increase my knowledge on the subject, and I was wondering if the OAEP construct was still sufficient as an all-or-nothing-transform if variable ...
1
vote
2answers
103 views

Integrity check of a binary firmware file with hash function

I need to provide a mechanism that it is possible to verify the integrity of a firmware image flashed on an embedded system. The procedure should be, that if someone has doubt on the firmware’s ...
3
votes
2answers
263 views

What do the security definitions of SHA-3 mean, quantitatively?

In the SHA-3 standard (page 31) the security of SHA-3 is defined quantitatively, for example, they are saying SHA3-256 provides 256 bits of preimage resistance. How is this number of bits to be ...
2
votes
1answer
116 views

What is the minimum message length to obtain the full potential of a hash?

Suppose I want to commit to a uniformly picked nonce of fixed length $n$ bits without revealing the nonce, so I use a secure hash function $H$ mapping messages to digests of length $d$ bits. Suppose $...
0
votes
1answer
157 views

Computational Complexity of SHA-3 (SHAKE128)

Please, I got the question "what is the computational complexity of SHA-3 (SHAKE128)"? What does that mean and how can I calculate that?? *I am using SHA-3 (SHAKE128) in my mechanism to hash fix ...
4
votes
2answers
249 views

Intuition for SHA3 sponge construction

I would like to get some intuition on the security of the sponge construction. I'm referring to this diagram and notation. Let's consider the case where we have don't apply $f$ in the squeezing ...
0
votes
1answer
135 views

How long would it take to crack a double hash if salt and final hash are public?

I have a hash of a file $H_1$ and then I add salt and rehash it: $H_2$. I make my $H_2$ and salt public and I use my $H_1$ as a password. How long would it take for this to be cracked with someone ...
4
votes
1answer
188 views

What does Keccak being “efficiently invertible” mean?

Reading through Wikipedia, I saw this: It has been shown that the Merkle–Damgård construction, as used by SHA-2, is collapsing and, by consequence, quantum collision-resistant, but for the sponge ...
21
votes
1answer
3k views

Why is SHA-3 robust against Length-Extension Attacks?

If a length extension attack can occur because of $H(\text{K}\mathbin\|\text{Message})$, what changed in SHA-3 from SHA-2 that prevents this from occurring?
0
votes
1answer
205 views

rotation offsets for KECCAK-$f$[800]

So let's say you're trying to do SHA3-224. If you're on a 64-bit machine you'd presumably use KECCAK-$f$[1600]. In-so-far as I understand it'd have the following parameters: Rate: 448 (2*224) ...
3
votes
1answer
211 views

why was padding changed when keccak became sha3?

In the original Keccak you would pad by adding a 1 bit proceeded by a predetermined amount of 0 bits and then another 1 bit. When Keccak was standardized to sha3 the padding was changed. It was then (...
1
vote
2answers
285 views

mapping a 256 bit random number to a 3 bit number

I am making a 2 player dice game that runs for n rounds. To create random dice roles im using a concept a understood from randao. each user generates n sha3 hashes recursively of a random seed : e.g. ...
4
votes
2answers
686 views

Benchmark (hash rate) for SHA-3 (SHAKE128)

To estimate the time for brute-force attack we need to compute keyspace size divided by hash rate, where the hash rate (hash/second) varies depending on the computer's capabilities. The website https:...
1
vote
1answer
195 views

Benchmark for SHA-3 (Shake128) [duplicate]

I am trying to find the average of hash rate (benchmark) for SHA-3(Shake128) for a normal and supercomputer in order to estimate the brute-force attack which I can get if from ( keyspace / hash rate )....
4
votes
1answer
402 views

How secure is using a hash function as Key Derivation Function?

I am developing a personal project and I have the following need: given a randomly generated seed (with enough entropy) I need to generate a number $x$ of Ed25519 key pairs. These key pairs are not ...
1
vote
0answers
45 views

Hash Function SHA-3 [duplicate]

I would like to discuss the minimum input of hash function to consider strong (e.g Shack128 (SHA-3)). I have a mechanism based on SHA-3, but the input is just 40-bit, some friends told me 40-bit input ...
3
votes
0answers
452 views

SHA3 hardware implementation [closed]

I am studying SHA3 in order to create a hardware implementation, preferably in verilog. I have downloaded VHDL reference implementation from https://keccak.team/hardware.html. The code is great, and ...
0
votes
1answer
257 views

0.75 confidence in bit prediction through $\chi^{-1}$

When checking the S-Box implementation of $\chi$ in Keccak I wanted to see if there were any fixed bits in the forward direction of $\chi$ that could be leverage to reveal truncated state bits. I ...
1
vote
1answer
371 views

Will the ECDSA with SHA-3 implementation be quantum-proof?

I know, that ECDSA could be broken by quantum computers, but since there is post-quantum hash function SHA-3, does not this make the digital signature resistant to them?
8
votes
2answers
2k views

Why is SHA3 prefixed with SHA despite the fact that it is structurally different from SHA2 and SHA1?

Why is SHA-3 prefixed with “SHA” despite the fact that it is structurally different from SHA-2 and SHA-1? SHA-0, 1 & 2 and MD5 is based on Merkle–Damgård construction, while SHA-3 falls under ...
3
votes
2answers
535 views

Is it secure to hash an AES key?

Let's say I want a way of generating a deterministic public ID for a specific symmetric cryptographic key (AES, for example). Would it be secure to use SHA-3 (or SHAKE) to hash the key, and then ...
0
votes
1answer
181 views

How would Keccak attain a 512-bit security level?

I am well aware that the general consensus is that a hashing algorithm with a security of 512 bits is unnecessary, but I'm just curious about how that would be implemented for Keccak despite that. ...
12
votes
2answers
4k views

Why is SHA-3 a Sponge function?

A sponge function is supposed to be able to generate an arbitrary length of output. Yet, SHA3 (Bouncycastle) constrains me to choose an output length between 224, 256, 384, and 512. Evidently, these ...
3
votes
1answer
197 views

Strength of Hash obtained by XOR of parts of SHA3

I create a hash with SHA3-384. I split the resulting array into two. The first called head has the first 320 bits and the second called tail has the last 64 bits. Next, I XOR head and tail. Which ...
-3
votes
1answer
253 views

Hexadecimal and ASCII give different SHA3 hashes, why?

Hex and ASCII are encoded with the same binary code. Why is it that a message in ASCII and the same message in hexadecimal produce different hashes? For example, the message ...
2
votes
1answer
1k views

Use sha3 for passwords hashing

Is use of sha3 justifiable? Is sha3 better than sha2 in (m)any aspects? P.S. I want to use hashing for passwords in a database
1
vote
1answer
163 views

What does this part of the SHA-3 algorithm mean?

I was reading through this paper and came across (pg. 11 of PDF, 5 of paper) the right_encode(x) and left_encode(x) pseudo-code ...
4
votes
1answer
501 views

What is an extendable output function?

The standardization of SHA-3 included the specification of two functions, SHAKE128 and SHAKE256. Both SHAKEs are referred to as extendable output functions, but what makes a function an extendable ...
0
votes
1answer
295 views

Cache Timing Attack SHA-3

I’ve been tinkering with SHA-3 for a little bit, and I have some questions regarding the applicability of cache timing attacks on this particular hash function. The two sub functions that I believe ...
1
vote
0answers
77 views

Is there any cipher standard based on SHA-3, where it is not used as part of RFC2104?

I'm thinking about using a cipher, which uses AES CTR+SHA-3. My basic idea is this: IV|AES-CTR(PLAINTEXT_SIZE|PLAINTEXT|SHA-3(KEY|PLAINTEXT_SIZE|PLAINTEXT)) So, ...
0
votes
1answer
239 views

Correct integer input value for keccak 256 [closed]

Assuming that we use k = sha3.keccak_256()(pysha3 package). How should one convert integer input for a function ...
4
votes
3answers
676 views

What is the current time limit of Keccak inversion? [closed]

All sub-functions are referenced with respect to Keccak. It’s my understanding that the sub-function theta() would result in the largest resource allocation when attempting to invert Keccak. If this ...
4
votes
1answer
116 views

What is the expected number of different sequences of bits in the collection that contains $2^{800}$ elements?

Let $F$ denote a function that returns the first $800$ bits of the input. Let $G(N)$ denote a function that returns the last $800$ bits of the binary encoding of the given number $N$. For example, ...
4
votes
1answer
130 views

Is it theoretically possible for the output of SHAKE to be an infinite concatenation of the same 512-bit block?

Let $X$ denote a particular 512-bit sequence. Let $A,B,C$ denote sequences of bits such that: $$len(X || A) = len(X || B) = len(X || C) = 1600$$ $$\operatorname{Keccak-}f(X||A) = X||B$$ $$\...
2
votes
1answer
218 views

Reasoning behind SHA-3 state array indexing

I was reading through the SHA3 standard (https://dx.doi.org/10.6028/NIST.FIPS.202) and in the standard it defines how to construct 3D state array from a 1D array. The state array is defined as ...
1
vote
1answer
479 views

Shake 128/256 Output Length Restrictions

Are there any restrictions on the specified output length when using shake-128 or shake-256, to the extent that certain output lengths should be avoided/or not used entirely? Edit: If someone ...
1
vote
1answer
147 views

does SHA* collide more or less than a random function?

There were several questions here regarding how surjective SHA-1/2 is, how many values don't have a pre-image from a fixed size input. I and others answered when modelling the relevant hash function ...