# Secure Streaming to Iphone using AES-128

**URL:** <https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675>\
**Category:** Wowza Streaming Engine\
**Created:** [December 30, 2010, 12:03pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675 "2010-12-30T12:03:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [December 30, 2010, 12:03pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/1 "2010-12-30T12:03:25Z")

</div>

Hi there … I’m streaming live using AES encryption to Iphone

So far, I’m doing it with a key generated through genkey, and having a key file on /wowza/keys folder

this key is read when Wowza is started, so I tried other methods too

My streams are 24x7, with long sessions … I’m wondering how can I dynamically change the key, for instance, every 4 hours without stopping Wowza nor the stream … in a way I can control, so I change encryption key at same time I publish the new key

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [December 30, 2010, 5:17pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/2 "2010-12-30T17:17:43Z")

</div>

I’m not sure about changing key while streaming. Wowza is encrypting each chunk. You could try it, but it might not work.

Richard

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [December 31, 2010, 1:04pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/3 "2010-12-31T13:04:54Z")

</div>

We really don’t have a precise way to do key rolling. The key is only read when the live stream packetizer is started. So to make the exchange you will need to write some code that forces the live stream repeater to reset. When you exchange keys current sessions that are playing the stream will be interrupted. I do not have precise instructions. In theory you should be able to put the new key in the [install-dir]/keys folder and stop the live stream packetizer. To stop the live stream packetizer you should be able to call:

```auto
MediaStreamMap.removeLiveStreamPacketizer(streamName);

```

It should re-start automatically. Again, we have not tried this and for sure current sessions will be interrupted.

Charlie

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [December 30, 2010, 5:35pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/4 "2010-12-30T17:35:01Z")

</div>

I am not sure if it will work, you will have to test it.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [December 30, 2010, 6:03pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/5 "2010-12-30T18:03:45Z")

</div>

I don’t know.

Richard

---

<div class="post-metadata">

**Author:** ![Gustavo\_Villegas](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Gustavo\_Villegas](https://community.wowza.com/u/Gustavo_Villegas)\
**Post date:** [December 30, 2010, 12:31pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/6 "2010-12-30T12:31:46Z")

</div>

not sure if I follow your message … could you rephrase it somehow?

Thanks

---

<div class="post-metadata">

**Author:** ![Gustavo\_Villegas](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Gustavo\_Villegas](https://community.wowza.com/u/Gustavo_Villegas)\
**Post date:** [December 30, 2010, 12:48pm UTC](https://community.wowza.com/t/secure-streaming-to-iphone-using-aes-128/675/7 "2010-12-30T12:48:21Z")

</div>

it will work as new key info should be inserted on the m3u8 … what I don’t know is how to do it, meaning, how to chage the key on the fly
