Wowza Community

HLS key rotation is wrong

Hi,

I used the onHTTPCupertinoEncryptionKeyVODChunk to encypt the HLS Vod, when I add the key rotation feature:

encInfo.setEncMethod(CupertinoEncInfo.METHOD_AES_128);

if( ( chunkId ) >= 4 ) {

encInfo.setEncUrl(“http://mycompanykeyserver.com/authenticate.aspx”);

encInfo.setEncKeyBytes( “0123456789ABCDEF”.getBytes() );

}

else {

encInfo.setEncUrl(“http://mycompanykeyserver.com/authenticat1e.aspx”);

encInfo.setEncKeyBytes( “1123456789ABCDEF”.getBytes() );

}

encInfo.setEncIVBytes(BufferUtils.decodeHexString(“FEDCBA9876543210FEDCBA9876543210”));

#EXT-X-KEY:METHOD=AES-128,URI=“http://mycompanykeyserver.com/authenticat1e.aspx”,IV=0xfedcba9876543210fedcba9876543210

#EXTINF:11.25,

media_0.ts

#EXTINF:11.25,

media_1.ts

#EXTINF:11.25,

media_2.ts

#EXT-X-KEY:METHOD=AES-128,URI=“http://mycompanykeyserver.com/authenticate.aspx”,IV=0xfedcba9876543210fedcba9876543210

#EXTINF:11.25,

media_3.ts

#EXTINF:10.208,

media_4.ts

I can’t decrypt the media_3.ts using the key 0123456789ABCDEF, but I can decrypt the media_3.ts using the key 1123456789ABCDEF correctly.

Is there something wrong with me?

I am using wowza 3.6.3 official version

There is apparently a typo in the name of the page. You have authenticate.aspx, then authenticat1e.aspx

Richard

#EXT-X-KEY:METHOD=AES-128,URI=“http://mycompanykeyserver.com/authenticate.aspx”,IV=0xfedcba9876543210fedcba9876 543210

#EXTINF:11.25,

media_3.ts

According to the m3u8 file, The media_3.ts would use the 0123456789ABCDEF to decrypt, but I can’t decrypt this file using 0123456789ABCDEF(“http://mycompanykeyserver.com/authenticate.aspx”), but it’s right when using 1123456789ABCDEF(http://mycompanykeyserver.com/authenticat1e.aspx)