Questions tagged [keccak]

A cryptographic hash algorithm which uses a sponge construction. Use this tag for questions which relate to the use and implementation of the Keccak sponge function family in general. For questions which relate specifically to the SHA-3 family of hash functions, use the sha-3 tag instead. SHA-3 is powered by Keccak, but the two terms are not the same.

Keccak is a cryptographic hash algorithm which uses a sponge construction. An input message is "absorbed" into the sponge state, and then the hash result is "squeezed" out of the sponge state. The state is subjected to permutations after each block of data has been read into and out of the sponge. By repeatedly squeezing the sponge, Keccak allows output of an arbitrary length.

Details of the algorithm can be found at the Keccak sponge function family homepage.

Keccak was submitted as a candidate for the NIST (National Institute of Standards and Technology) SHA-3 Competition, and was selected as the winner in October of 2012.

Keccak powers the SHA-3 family of hash functions, but SHA-3 is just a subset of the possible Keccak applications. It is important not to confuse the two terms Keccak and SHA-3. While SHA-3 specifies exact settings for each of its functions, the Keccak sponge family permits a large variety of configurations. The parameters which define a Keccak sponge construction are:

bitrate: the maximum number of bits which can be absorbed or squeezed before the state will be permuted.

capacity: the number of bits within the sponge state which are not directly modified by an absorption and not directly read by a squeeze, but which do play a part in the permutation of the state.

domain suffix: an optional sequence of bits which will be appended to the end of the original message, before padding is applied. The domain suffix allows differentiation between different Keccak applications (such as SHA3, SHAKE, RawSHAKE, etc).

output length: the length in bits of the hash result which will be generated.

The sum of the bitrate and the capacity give the "width" of the permutation state, and this width must be one of: 25, 50, 100, 200, 400, 800, 1600. The bitrate, capacity, and output length must each be greater than zero. Beyond that, Keccak is very flexible.

66 questions
1
vote
1 answer

Any MS libraries offering Keccak-256 / SHA-3 (.net core)?

Are there any MS libraries (.net core/standard) out there (currently research, beta or otherwise) offering Keccak / SHA-3 implementations ?
Sentinel
  • 3,582
  • 1
  • 30
  • 44
1
vote
0 answers

Gas apple syntax error again

On this instruction : jmp *KeccakP1600_Permute_NroundsTable-8(rT1) Clang said : error: 32-bit absolute addressing is not supported in 64-bit mode where KeccakP1600_Permute_NroundsTable: .quad KeccakP1600_Permute_Nrounds1 .quad …
Stephane
  • 391
  • 1
  • 2
  • 13
1
vote
1 answer

Difference between Merkle–Damgård and sponge-function used in KECCAK

Hello to the nice Stackoverflow community! I have difficulties understanding the difference between the Merkle–Damgård construction and the sponge-function used in KECCAK. The Merkle–Damgård Construction takes in the message-blocks iteratively, but…
tietze111
  • 321
  • 1
  • 2
  • 15
1
vote
2 answers

Is a hash function (e.g. SHA) platform independent?

I need to compare hashed data from different platforms. The hash function used is Keccak's SHA3. I started with the assumption that the hash generated values were platform independent; but then these two online tools proved me the…
sdia
  • 65
  • 7
1
vote
1 answer

Simple implementation of SHA-3 Keccak hashing to the wrong output in C#?

I am trying to get the HashLib library @ https://hashlib.codeplex.com/ working for the new SHA-3 Keccak algorithm. I've written a simple Console application that supposedly has to output the correct hash code, but it doesn't! using System; using…
user1933076
  • 13
  • 1
  • 1
  • 3
0
votes
0 answers

SHA-256 and KECCAK-256 swap

From one input I got two different results (via SHA3 (1) and via KECCAK256 (2)). Is it possible to find a possible input for the Keccak-256 function that would result in the same output hash, given the known input and output for the SHA3-256? It…
Ilya
  • 1
  • 1
0
votes
1 answer

How to make "MessageDigest KECCAK-384 and Signature NONEwithRSA"

I would like to apply a KECCAK-384 hash with an RSA signature to some data, but I need to do it in two steps - apply the hash first and then sign the data. The Signature.sign() function appears to need the right digest DER data structure to sign…
0
votes
1 answer

NIST Round 3 Classic McEliece Missing Libkeccek.a.headers/SimpleFIPS202.h

I am attempting to build the KAT's for the round 3 submission for Classic McEliece, based off the reference implementation on this…
0
votes
1 answer

There is a difficulty in running "nist round 3 classic mceliece"

There is a difficulty in running "nist round 3 classic mceliece". I'd like to run the classic mceliece submitted to Nist. but when i run "make" crypto_hash.h: 3:10: fatal error: libkeccak.a.heads/Simple FIPS202.h: No such file or directory exists 3…
jaewon
  • 1
0
votes
0 answers

C# Keccak256 Hash is different than expected

My Console App is usin .Net 6.0. I want to generate a crypto wallet KeyPair that corresponds to the public address. However when I hash it with Keccak 256, Using Nethereum Sha3Keccak as shown below, the hash is different than expected. The string…
user3410566
  • 45
  • 2
  • 15
0
votes
1 answer

How to concatenate 2 String in Solidity and encode Keccak256?

i'm working at a smart-contract that has a merkle-tree function in it. Basically i'm passing the proof from a firebase function that take in input the address and the n° of token reserved by the user, and gives as output the proof to the front-end…
0
votes
1 answer

Failing to validate merkle proof on smart contract

I'm using a copy of Invisible Friends NFT contract (https://etherscan.io/address/0x59468516a8259058bad1ca5f8f4bff190d30e066#code) and I'm currently in a process of creating a minting page. Everything is going well except validating merkle proofs for…
Rene
  • 11
  • 4
0
votes
1 answer

How can I encode string variable to keccak in python?

I want encode block_string variable to keccak. This is my current function. In this code I use sha256 (hashlib library) for encode block_string value but I want to use keccak instead of sha256: def hash(block): block_string =…
xdevman
  • 11
  • 3
0
votes
2 answers

How to implement this method in Ruby? or is there third party lib to do this?

I have this ts function: import { keccak_256 } from "js-sha3"; import { Buffer } from "buffer/"; export function getNamehash(name: string) { let node = "0000000000000000000000000000000000000000000000000000000000000000"; if (name) { let…
Siwei
  • 19,858
  • 7
  • 75
  • 95
0
votes
0 answers

C++ Using KeccakCode Package

I downloaded some post quantum algorithms from NIST and tested them. Some codes need to use Keccak package, so I downloaded it. $ git clone https://github.com/gvanas/KeccakCodePackage When I tried to build the required static library, $ make…