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
-3 votes
1 answer
242 views

What's the deal with Belgian cryptographers? [closed]

Some of the most widely-used/advanced cryptography products these days - AES and SHA3 - were invented by Belgians. It seems that fact is hardly a coincidence. Since I'm a complete layman, I can make ...
user avatar
  • 113
0 votes
1 answer
58 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 ...
user avatar
  • 103
1 vote
2 answers
123 views

Why is the output size exactly half the capacity for sha-3?

For the SHA-3 family of hash functions, the output size $d$ is always chosen as $d=c/2$, i.e. exactly half the capcity. What is the rational for this? Naively, I think that $d=c$ would make more sense ...
user avatar
  • 113
1 vote
2 answers
77 views

If secret S is not known to an attacker, while constant K and SHA3(K + SHA3(S)) are known to an attacker, is S discoverable?

I'm trying to understand how secure S is from an attacker. Let's say in an instance where they have enormous hashing power available to them, as would be the case where they own cryptocurrency mining ...
user avatar
  • 111
1 vote
1 answer
48 views

What input bits are revealed when revealing the first 256 bits of the output Keccak-f permutation?

Given the Keccak-f[1600] permutation I am interested in the following property: What bits in the output are influenced by what bits of the input? That is, if I change for example say the second bit of ...
user avatar
0 votes
1 answer
57 views

Selecting parameters for PBKDF2 using SHA3

I'm using PBKDF2 to generate an ED448 signing key, and I'm trying to figure out the optimal salt size for SHA-3. I recall reading a recommendation to use a salt size equal to the PRF's internal-state ...
user avatar
2 votes
1 answer
162 views

How can I understand the math behind crypto, especially that used in blockchains / distributed ledgers?

A bit of a background about me; Computer Engineer but during my studies I didn't dive too deep into the maths, especially the crypto maths that is used to make the blockchain and cryptography work. I'...
user avatar
2 votes
0 answers
89 views

Clarification about the iota function of SHA-3

I am trying to implement SHA-3 using this document and have a question about the iota step. This step consists in a single XOR between the central (0, 0) lane of the state (illustration of the state p....
user avatar
0 votes
0 answers
36 views

What is the difference between HMAC-SHA3-512 and KMAC? [duplicate]

Reading through the wikipedia entry for HMAC I see that SHA-3 can be used with the HMAC algorithm to give HMAC-SHA3-512. I also know that there is KMAC, which from ...
user avatar
  • 133
4 votes
1 answer
289 views

Is KMAC just SHA-3-256(KEY || message)

According to keccak strengths you have: Unlike SHA-1 and SHA-2, Keccak does not have the length-extension weakness, hence does not need the HMAC nested construction. Instead, MAC computation can be ...
user avatar
1 vote
0 answers
38 views

Exact security requirements for extendable output functions (XOF)?

In the FIPS202 document "SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions" an extendable-output functions is defined as: An extendable-output function (XOF) is a ...
user avatar
0 votes
0 answers
69 views

How do I use XOF (SHAKE and cSHAKE) in openssl CLI and JavaScript

I am learning about hash functions and I just read about XOF (namely shake and cShake). I will like to test this functions out by myself but I can't seem to find how to use it via the OpenSSL CLI or ...
user avatar
10 votes
3 answers
5k views

Why is SHA3 more secure than SHA2?

Why are SHA3 algorithms considered more secure than their SHA2 counterparts? Surely in part, it is due to their resistance to length extension attacks. But specifically, when considering collision ...
user avatar
0 votes
2 answers
57 views

Using hash of data as proof of integrity and preventing collision

Rather than storing user data when interacting with an app, I am storing the SHA3-256 of the data. This is because data storage in this particular environment is very limited. The data can be several ...
user avatar
  • 103
-2 votes
2 answers
99 views

What are the security flaws of SHA? [closed]

I have been researching SHA algorithms extensively, specifically SHA1, SHA2-256, SHA2-512, SHA3-256, and SHA3-512, and have found many instances of successful collision attacks as well as methods. In ...
user avatar
1 vote
2 answers
82 views

is it safe to combine scrypt with other hash algorithms?

I'm currently writing a file encryption program, and I designed this scheme to derive a key from user input password: ...
user avatar
1 vote
0 answers
151 views

Lightweight encrypting for BLE advertising packets

I'm new to encryption and this is my first time working with it. I'm currently working on a home project which consists of the equipment in my garage to be attached with a BLE device which sends ...
user avatar
1 vote
1 answer
113 views

Does anyone know why NISTs SHA3 256 output Hash for the 1600 bit file is different to other SHA3 256 output hashes?

I have been trying to implement my own SHA3 256 function in python to try and learn and understand how it works. I have been comparing my hashes with an online sha3 tool found here https://emn178....
user avatar
0 votes
0 answers
60 views

Using a bit sequence of zeros followed by one byte in Keccak

For what purpose it is not right to use a bit sequence of 2000+ zeros followed by one byte in Keccak? Is there a possible application of such input for Keccak? If yes, after which transformation?
user avatar
9 votes
1 answer
1k views

Outlook of trustworthiness of SHA-2

On the Wikipedia page of SHA-2, the following is written: Currently, the best public attacks break preimage resistance for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512, and ...
user avatar
0 votes
1 answer
79 views

Different inputs but able to generate consistent outputs across different SHA engines

Say I'm feeding in few thousand bits data (INPUT AAAA) into both SHA256 & SHA3 256 engines at the same time. (Both engines using different hashing architecture) and hence it will generate ...
user avatar
  • 61
2 votes
1 answer
41 views

Can you use a dynamic key and data size for KMAC?

I've asked before if some kind of canonical encoding should be used on the input parameters of SHA-3 before it could be used as replacement for HMAC. However, if I read the current NIST specifications ...
user avatar
  • 84.5k
3 votes
1 answer
135 views

Can a SHA3 engine be used to construct a Keccak implementation?

I am working on a cSHAKE-128 & cSHAKE-256 implementation that takes advantage of a number of hardware accelerators I have at my disposal, specifically for SHA-3 256/384/512 and SHAKE 128/256. ...
user avatar
3 votes
1 answer
120 views

SHA3 hexadecimal paddig odd length string

Section B2 of FIPS-202 specification describes the Hexadecimal Form of Padding Bits which is basically the translation of the bit padding 0110*1. However at the beginning they suppose that the message ...
user avatar
  • 33
1 vote
1 answer
83 views

SHA3-512 similar message digest

How is it possible to find a similar message-digest for SHA3-512 for the first 80 bits or so? There was a Q/A on this site where the answer stated that 80 bits that $2^{42}$ computations are required. ...
user avatar
-1 votes
1 answer
163 views

Are there any crypto hash implementation beyond 512 bits of output?

My question is this: Are there any crypto hash implementations beyond 512 bits of output? Could you give me the link? Thank you so much for your time. Greetings.
user avatar
-5 votes
2 answers
194 views

Are the common hash algorithms already dead? [closed]

I have one honestly question: How can we are so confident with the use of the common hash algorithms (nowadays there are so many pages with cracking tools: crackstation, gpuhash, etc) ? Are we lost ...
user avatar
1 vote
3 answers
188 views

Using sha3 as a deterministic source of psuedo-random bytes for xor encryption

The following code generates a deterministic stream of pseudo-random bytes, using SHA3. ...
user avatar
  • 701
3 votes
2 answers
314 views

Is it possible to create a ciphersuite for TLS 1.3 using only the Keccak-sponge/duplex?

Now that Keccak has been chosen as SHA-3 we see that there have been defined quite a few related modes, including authenticated cipher modes, the KMAC message authentication mode, XOF's and whatnot. ...
user avatar
  • 84.5k
0 votes
1 answer
144 views

Does hashing PII in logs provide any real security?

I have PII in my logs that I would like to replace with hashes (e.g. sha3-256(salt + email)). The idea is that I can always go back to my logs and find all the log ...
user avatar
0 votes
1 answer
58 views

How to use Botan to verify a web3 wallet/password?

The specification here seems quite clear, but unfortunately I'm still doing something wrong... I have this (single small c++ file) repository which very straightforwardly follows the password/wallet ...
user avatar
  • 121
4 votes
2 answers
220 views

How does KECCAK operate on a state array filled with zeros?

Im trying to implement a sponge in Java. The state starts out as an empty 200 byte array of all zeros. In the KMAC samples document from NIST, the following happens: (black line is a pdf page break) ...
user avatar
3 votes
1 answer
255 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 ...
user avatar
7 votes
2 answers
2k views

What is the sponge construction in simple terms?

I suggested to my client to use SHA3 instead of SHA2. I know that SHA3 is based on Keccak algorithm which won the NIST's competition. I want to explain the structure of sponge functions in very simple ...
user avatar
0 votes
0 answers
60 views

Security implication of concatenating two hashes using different algorithms

Background Hashing files is an expensive thing for CPU. I am tasked to write a secure digital signature scheme. For that, I decided to check the integrity of files using Hash/Digest. To be more secure,...
user avatar
1 vote
2 answers
259 views

Padding of SHA-3

SHA-3 uses Padding, so the original message has a certain length. In the case of SHA-3-512 each block has the size of 576, so any message must be padded, such that it is a multiple of the blocksize ...
user avatar
1 vote
1 answer
201 views

Layman understanding of SHAKE128 XOF

Need some help. I am not versed in hashing and just started programming with PHP and currently need to hash some strings but required it to be unique. Found that OpenSSL can hash with SHAKE128 but ...
user avatar
1 vote
2 answers
326 views

Safest alternative for hashing credit card numbers to use the hash as fingerprint?

Same question asked here in 2014 but since a lot has changed since then, I would like to get feedback from experts on the latest best practices. The problem Our requirement is to provide the ...
user avatar
1 vote
1 answer
71 views

How does re-hashing affects security strength?

I am currently saving hashed passwords for my website. Passwords are salted and then hashed using SHA3-512. I understand the security level of SHA3-512, as it is for all Keccak algorithms, is half the ...
user avatar
1 vote
2 answers
263 views

SHA-3 for Integrity

We used to use CRCs to check the integrity of files. For safety analysis we could associate a probability for detecting a corrupted bit in a large file. Now we are using an RSA Signed SHA-3 hash for ...
user avatar
1 vote
1 answer
215 views

Recommended Shake256 digest size for KMAC based HKDF

On the wiki page for HKDF, in the Python Implementation, there is a hash_length variable for the ...
user avatar
  • 593
1 vote
2 answers
379 views

SHA3 the Left & Right Encode Functions

In this paper (Section 2.3.1, Pg.5), I came across the left_encode and right_encode functions, and I have some questions about ...
user avatar
  • 593
1 vote
2 answers
413 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 ...
user avatar
  • 593
0 votes
1 answer
113 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 (...
user avatar
  • 593
1 vote
1 answer
244 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....
user avatar
  • 117
0 votes
1 answer
86 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 ...
user avatar
  • 117
12 votes
3 answers
3k 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 ...
user avatar
  • 393
3 votes
2 answers
420 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 ...
user avatar
  • 447
52 votes
4 answers
15k 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 ...
user avatar
  • 692
3 votes
1 answer
446 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 ...
user avatar
  • 75