# AES-128 and Apple low latency

**URL:** <https://community.wowza.com/t/aes-128-and-apple-low-latency/55317>\
**Category:** Wowza Streaming Engine\
**Tags:** security, low-latency\
**Created:** [June 3, 2020, 3:11pm UTC](https://community.wowza.com/t/aes-128-and-apple-low-latency/55317 "2020-06-03T15:11:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![James\_Delaney](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@James\_Delaney](https://community.wowza.com/u/James_Delaney)\
**Post date:** [June 3, 2020, 3:11pm UTC](https://community.wowza.com/t/aes-128-and-apple-low-latency/55317/1 "2020-06-03T15:11:50Z")

</div>

Hi

I have created a low latency HLS stream using this guide:

[https://www.wowza.com/docs/deliver-apple-low-latency-hls-live-streams-using-wowza-streaming-engine](https://www.wowza.com/docs/deliver-apple-low-latency-hls-live-streams-using-wowza-streaming-engine)

It is working on a custom IOS app with low latencies of 2/3 seconds. Great!

It plays from the URL:

[https://[hidden]/livelowprotected/demostream.stream/playlist\_sfm4s.m3u8](https://5ec6af714bbbf.streamlock.net/livelowprotected/demostream.stream/playlist_sfm4s.m3u8)

BUT… I now want to encrypt the stream and have tried using this guide:

[https://www.wowza.com/docs/how-to-secure-apple-http-live-streaming-aes-128-external-method](https://www.wowza.com/docs/how-to-secure-apple-http-live-streaming-aes-128-external-method)

I have created my key file:

/keys/demostream.stream.key

And restarted my application

When i connect the IOS app to the stream… the video plays as before… its not encrypted.

And I notice no requests are made to my HTTP server that delivers my key.

I try to follow this guide to test:

[https://www.wowza.com/docs/how-to-test-aes-encryption-for-apple-hls-streams](https://www.wowza.com/docs/how-to-test-aes-encryption-for-apple-hls-streams)

The first playlist ([playlist\_sfm4s.m3u8](https://5ec6af714bbbf.streamlock.net/livelowprotected/demostream.stream/playlist_sfm4s.m3u8)) is like this:

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-STREAM-INF:BANDWIDTH=5542016,CODECS=“avc1.640020”,RESOLUTION=1280x720

chunklist\_w849147949\_vo\_sfm4s.m3u8

Then the chunklist (chunklist\_w849147949\_vo\_sfm4s.m3u8)

is like this:

#EXTM3U

#EXT-X-VERSION:6

#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,PART-HOLD-BACK=0.90000004,CAN-SKIP-UNTIL=6.0

#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-TARGETDURATION:1

#EXT-X-MEDIA-SEQUENCE:804667

#EXT-X-PART-INF:PART-TARGET=0.3

#EXT-X-MAP:URI=“header\_w849147949\_vo\_sfm4s\_m3u8.cmfv”

#EXT-X-PROGRAM-DATE-TIME:2020-06-03T13:50:40.586+00:00

#EXTINF:0.5,

media\_w849147949\_vo\_sfm4s\_804667\_m3u8.cmfv

#EXT-X-PROGRAM-DATE-TIME:2020-06-03T13:50:41.127+00:00

#EXT-X-PART:DURATION=0.3,URI=“media\_w849147949\_vo\_sfm4s\_804668.0\_m3u8.cmfv”,INDEPENDENT=YES

#EXT-X-PART:DURATION=0.2,URI=“media\_w849147949\_vo\_sfm4s\_804668.1\_m3u8.cmfv”

#EXTINF:0.5,

media\_w849147949\_vo\_sfm4s\_804668\_m3u8.cmfv

#EXT-X-PROGRAM-DATE-TIME:2020-06-03T13:50:41.576+00:00

#EXT-X-PART:DURATION=0.3,URI=“media\_w849147949\_vo\_sfm4s\_804669.0\_m3u8.cmfv”,INDEPENDENT=YES

#EXT-X-PART:DURATION=0.2,URI=“media\_w849147949\_vo\_sfm4s\_804669.1\_m3u8.cmfv”

#EXTINF:0.5,

media\_w849147949\_vo\_sfm4s\_804669\_m3u8.cmfv

#EXT-X-PART:DURATION=0.3,URI=“media\_w849147949\_vo\_sfm4s\_804670.0\_m3u8.cmfv”,INDEPENDENT=YES

And when I try to download one of the CMAF files (media\_w849147949\_vo\_sfm4s\_804670.0\_m3u8.cmfv) I get a 500 error

ie in the access logs:

Http2Connection[Socket:/86.40.243.176:49234]: GO\_AWAY Frame received. Error code: 1:PROTOCOL\_ERROR, DebugInfo: Failed ping.]. Time: 1591195953900

**x-ctx:** 2128919283, **x-vhost:** _defaultVHost_, **x-app:** livelowprotected, **x-appinst:** _definst_, **x-duration:** 3547.164, **s-ip:** hidden, **s-port:** 443,\*\*s-uri:\*\*[http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8](http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8), **c-ip:** 86.40.243.176, **c-proto:** http (cupertino), **c-user-agent:** Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36, **c-client-id:** 2128919283, **cs-bytes:** 0, **sc-bytes:** 2316, **x-spos:** 0, **x-sname:** demostream.stream,\*\*x-suri:\*\*[http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8,\*\*x-suri-stem:\*\*http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8,\*\*cs-uri-stem:\*\*http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8](http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8, **x-suri-stem:** http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8, **cs-uri-stem:** http://hidden:443/livelowprotected/demostream.stream/playlist.m3u8)

Can anyone shed any light on this?

Is it possible to encrypt the low latency stream?

Do I have to recompile wowza to start the encryption process or does just putting a keyfile in the keys directory suffice?

Thanks!

James

---

_[View the full topic](https://community.wowza.com/t/aes-128-and-apple-low-latency/55317)._
