On 01/20/2016 12:47 PM, Hodges, Jeff wrote:
> On 1/13/16, 12:53 PM, "Benjamin Kaduk" <bka...@akamai.com> wrote:
>> On 01/13/2016 02:44 PM, Jong-Shian Wu wrote:
>>> I have a question about the even-vs-odd restrictions on the length of
>>> a valid variable-length vector defined in TLS specification after
>>> reading the section 4.3 of RFC 5246 [1] which states that:
>>> "The length of an encoded vector must be an even multiple of the length
>>> of a single element (for example, a 17-byte vector of uint16 would be
>>> illegal)."
>>>
>> It means "whole-number" as opposed to fractional, i.e., there should not
>> be unused "junk bytes" at the end.
> In case it's helpful, here's a suggested re-write of that quoted sentence
> above..
>
>   The length of an encoded variable-length vector must be an
>   exact multiple of the length of a single element. For example,
>   an encoded 17-byte vector of uint16 would be illegal, and an
>   encoded variable-length vector of four 32 byte elements,
>   having a ceiling of 2^16-1, will be 130 bytes long overall
>   (2 byte length field followed by 128 bytes of data).

Wouldn't the ceiling more properly be 2^16-4 in that case?

-Ben

> ..assuming I'm correctly understanding variable-length vectors :)
>
> HTH,
>
> =JeffH
>
>
>
>
>

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

Reply via email to