I've looked at this file https://github.com/monero-project/monero/blob/master/src/crypto/slow-hash.c#L543

What does it mean when it says " CryptoNight Step 1: Use Keccak1600 to initialize the 'state' (and 'text') buffers from the data. */?"

1 Answer 1


The Cryptonight description by the Cryptonote team states that

First, the input is hashed using Keccak [KECCAK] with parameters b = 1600 and c = 512.

In the primitive family Keccak, b is the width of bit block of the permutation function.

Given an input bit string N, a padding function pad, a permutation function f that operates on bit blocks of width b, a rate r and an output length d, we have capacity c = b − r and the sponge construction Z = spongef,pad,r, yielding a bit string Z of length d, works as follows

This value of b is also used by SHA-3 for instance.


Regarding your question about the location of the value 1600 in the code:

Function keccak1600 is defined as a special case of function keccak with parameter mdlen equal to the size in bits of the type state_t. This type is an array of 25 uint64_t so the total size is 25*64=1600.

  • Sorry, I am new to programming, so I put that where in this script? hash_process(&state.hs, data, length); memcpy(text, state.init, INIT_SIZE_BYTE);
    – user168783
    Jan 2, 2018 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.