We need the length field so that calling the function with different
lengths results in different outputs.  Not that anyone should be doing
that, of course.

On 6 July 2017 at 14:06, Kazu Yamamoto <k...@iij.ad.jp> wrote:
>>>        HKDF-Expand-Label(Secret, Label, *Value*, Length) =
>>>             HKDF-Expand(Secret, HkdfLabel, Length)
>>>
>>>        struct {
>>>            uint16 length = *Value.length*;
>>>            opaque label<7..255> = "tls13 " + Label;
>>>            opaque hash_value<0..255> = *Value*;
>>>        } HkdfLabel;
>>
>> Length is the size of the output, so you don't want to assign
>> Value.length to that field in the struct.
>
> Yes. I would remove the "length" field, too.
>
>> Also, you forgot to rename hash_value in the struct.
>
> You are right.
>
> --Kazu
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls

_______________________________________________
TLS mailing list
TLS@ietf.org
https://www.ietf.org/mailman/listinfo/tls

Reply via email to