2
$\begingroup$

According to RFC 5246 Section 5

PRF(secret, label, seed) = P_<hash>(secret, label + seed)

and

P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
                       HMAC_hash(secret, A(2) + seed) +
A(0) = seed
A(i) = HMAC_hash(secret, A(i-1))

According to my understanding first iteration of P_hash is

P_hash(secret, seed) = HMAC_hash(secret, A(0) + seed) and A(0) = seed

So,

P_hash(secret, seed) = HMAC_hash(secret, seed + seed)

Is it correct? Or is the first iteration rather

P_hash(secret, label) = HMAC_hash(secret, A(1) + Seed)

and

A(1) = HMAC_hash(secret, A(0))
$\endgroup$
2
$\begingroup$

Simply by substituting A(0) in A(1), and then A(1) in P_hash, one obtains your second suggestion. I don't understand how you came up with the first one?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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