0
$\begingroup$

I'm trying to understand this:

[AES_128] REQUIRES the same 16-octet Initialization Vector (IV) to be supplied when encrypting and decrypting. Varying this IV increases
the strength of the cipher.

An IV attribute on an EXT-X-KEY tag with a KEYFORMAT of "identity" specifies an Initialization Vector that can be used when decrypting
Media Segments encrypted with that Key file. IV values for AES-128
are 128-bit numbers.

An EXT-X-KEY tag with a KEYFORMAT of "identity" that does not have an IV attribute indicates that the Media Sequence Number is to be used as the IV when decrypting a Media Segment, by putting its big-endian binary representation into a 16-octet (128-bit) buffer and padding (on the left) with zeros.

From here

My question is:
The iv shuld be like this (for 10 at dec.):
000000000000000A ?
or at binary?

Thank you!

$\endgroup$
  • $\begingroup$ 16 bytes (or octets, which is slightly more precise) can be represented by 32 hexadecimal digits, not 16 of course; one hex digit per nibble. $\endgroup$ – Maarten Bodewes Nov 27 '17 at 1:01
2
$\begingroup$

The iv shuld be like this (for 10 at dec.):
000000000000000A ?
or at binary?

The HTTP headers have to be encoded as text. So I'd assume you should provide 000000000000000A (as far I know you may not send unencoded binary values in the http header)

Reading the draft something stroke my eye:

entire resource MUST be encrypted using AES-128 CBC with PKCS7 padding

using CBC mode means the IV should be unpredictable as far I know

An EXT-X-KEY tag with a KEYFORMAT of "identity" that does not have an IV attribute indicates that the Media Sequence Number is to be used

That breaks the previous requirements for unpredictable IV and the cipher becomes easily malleable. Maybe the authors rely on SSL to mitigate this issue.

$\endgroup$
  • $\begingroup$ Are you sure? I'm tring to find the IV for decription .ts files.... $\endgroup$ – Yoar Nov 24 '17 at 10:22

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.