1
$\begingroup$

Trying to understand PBKDF2 in detail. It is clear that the password and the salt is given to the PRF (which is HMAC-SHA-1 in the specification). But what is the role of the INT_32_BE(i)? What does it call? Is it ORed (||) with the salt? And what is the value of INT_32_BE(i) any way? Is it 1? Can anyone clear this out?

U1 = PRF(Password, Salt || INT_32_BE(i))
$\endgroup$

1 Answer 1

3
$\begingroup$

The article you linked to explains everyting

Salt concatenated with i encoded as a big-endian 32-bit integer

So, || is concatenation, INT_32_BE is a function that encodes the 32 bit integer i as big endian. On a big endian system, INT_32_BE would do nothing. On a little endian architecture, it would do the encoding.

i goes from 1 to dklen/hlen. dklen/hlen is the number of hash function outputs needed to construct a key of the right length.

$\endgroup$
4
  • 1
    $\begingroup$ huh??? ... say what..? $\endgroup$
    – Giliweed
    Sep 29, 2014 at 15:32
  • 2
    $\begingroup$ @Giliweed, what is not clear? Endianess? $\endgroup$
    – mikeazo
    Sep 29, 2014 at 15:33
  • 1
    $\begingroup$ I'm not clear about what is "big endian" $\endgroup$
    – Giliweed
    Sep 29, 2014 at 15:35
  • 1
    $\begingroup$ I suppose it bears mentioning that the purpose is to make each block of the output different. $\endgroup$
    – otus
    Sep 29, 2014 at 21:00

Your Answer

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

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