X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Futils%2FMWCryptHKDF.php;h=d0fe6ccca44bbba8857f728ce342889cb3af77d6;hb=9bbb26ffbd16edbaccce27461730fa9e172aa048;hp=3bddd7794a6cd8880a41cabb1c7eeb366f7ca22a;hpb=84851a43f3ea8ea146c4d82c55fd01b9fa302347;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/MWCryptHKDF.php b/includes/utils/MWCryptHKDF.php index 3bddd7794a..d0fe6ccca4 100644 --- a/includes/utils/MWCryptHKDF.php +++ b/includes/utils/MWCryptHKDF.php @@ -47,11 +47,11 @@ class MWCryptHKDF { * From http://eprint.iacr.org/2010/264.pdf: * * The scheme HKDF is specifed as: - * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t) + * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t) * where the values K(i) are defined as follows: - * PRK = HMAC(XTS, SKM) - * K(1) = HMAC(PRK, CTXinfo || 0); - * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t; + * PRK = HMAC(XTS, SKM) + * K(1) = HMAC(PRK, CTXinfo || 0); + * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t; * where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits; * the counter i is non-wrapping and of a given fixed size, e.g., a single byte. * Note that the length of the HMAC output is the same as its key length and therefore @@ -67,7 +67,7 @@ class MWCryptHKDF { * @param string $ikm The input keying material * @param string $salt The salt to add to the ikm, to get the prk * @param string $info Optional context (change the output without affecting - * the randomness properties of the output) + * the randomness properties of the output) * @param int $L Number of bytes to return * @return string Cryptographically secure pseudorandom binary string */