Minor changes to comments in hkdf.c
diff --git a/library/hkdf.c b/library/hkdf.c
index d2e55e8..41d7d87 100644
--- a/library/hkdf.c
+++ b/library/hkdf.c
@@ -114,6 +114,10 @@
n++;
}
+ /*
+ * Per RFC 5869 Section 2.3, okm_len must not exceed
+ * 255 times the hash length
+ */
if( n > 255 )
{
return( MBEDTLS_ERR_HKDF_BAD_INPUT_DATA );
@@ -126,7 +130,10 @@
goto exit;
}
- /* RFC 5869 Section 2.3. */
+ /*
+ * Compute T = T(1) | T(2) | T(3) | ... | T(N)
+ * Where T(N) is defined in RFC 5869 Section 2.3
+ */
for( i = 1; i <= n; i++ )
{
size_t num_to_copy;
@@ -150,7 +157,7 @@
goto exit;
}
- /* The constant concatenated to the end of each t(n) is a single octet.
+ /* The constant concatenated to the end of each T(n) is a single octet.
* */
ret = mbedtls_md_hmac_update( &ctx, &c, 1 );
if( ret != 0 )