View Single Post
  #53  
Old 06-12-2014, 07:45 PM
enrud enrud is offline
Member
 
Join Date: Jun 2014
Posts: 33
enrud is on a distinguished road
Default

Re: I downloaded Netflix videos in HD, I can play off line,need a little help W/.key


Code:
  $key = file_get_contents($argv[3]); 
  if ($key === false) 
      die("Failed to open key file."); 
  $iv = $key; 
  LogDebug("Key: " . hexlify($key)); 
  LogDebug("IV : " . hexlify($iv));
The IV isn't the same as the key.

According the HLS spec, if the IV isn't specified in the #EXT-X-KEY, which it isn't, then the IV is the sequence number. The #EXT-X-MEDIA-SEQUENCE tag specifies the starting sequence number for the playlist, in this case, 0. Each url in the playlist is a sequence. So the first url in this case is sequence #0, the second is sequence #1, etc.

The IV for each url is then encoded as a 128 bit big endian representation of the sequence number for that url.

So the first URL (sequence #0) the IV is \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00

For the second URL (sequence #1) the IV is \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x01

and so forth.

I believe that's the reason why you can't decrypt.
Reply With Quote