112
© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. #WWDC15 Content Protection for HTTP Live Streaming Roger Pantos HTTP Live Streaming Engineer Media Session 502

Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

#WWDC15

Content Protection for HTTP Live Streaming

Roger Pantos HTTP Live Streaming Engineer

Media

Session 502

Page 2: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming

Page 3: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Page 4: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & video

Page 5: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & videoAlready delivering keys in the premium content industry

Page 6: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & videoAlready delivering keys in the premium content industryBuilt into iOS, Apple TV, and OS X

Page 7: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & videoAlready delivering keys in the premium content industryBuilt into iOS, Apple TV, and OS XPower-efficient on mobile devices

Page 8: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & videoAlready delivering keys in the premium content industryBuilt into iOS, Apple TV, and OS XPower-efficient on mobile devicesIntegrated with AirPlay

Page 9: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Overview of FairPlay Streaming (FPS)

Industrial-strength protection for your HTTP Live Streaming audio & videoAlready delivering keys in the premium content industryBuilt into iOS, Apple TV, and OS XPower-efficient on mobile devicesIntegrated with AirPlayOffered under the Apple Developer Program License Agreement

Page 10: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Scope of FairPlay Streaming—What It Is

FairPlay Streaming is:

Page 11: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Scope of FairPlay Streaming—What It Is

FairPlay Streaming is:• A secure key delivery mechanism

- Content Key is protected on the network and on the client during playback

Page 12: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Scope of FairPlay Streaming—What It Is

FairPlay Streaming is:• A secure key delivery mechanism

- Content Key is protected on the network and on the client during playback• Key delivery is transport agnostic

- Easy to integrate with existing key server infrastructure

Page 13: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Scope of FairPlay Streaming—What It Is

FairPlay Streaming is:• A secure key delivery mechanism

- Content Key is protected on the network and on the client during playback• Key delivery is transport agnostic

- Easy to integrate with existing key server infrastructure• Requires protected HDMI for external output

Page 14: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Scope of FairPlay Streaming—What It Isn’t

FairPlay Streaming does NOT:• Provide DRM rights expression or policy enforcement, or • Provide user authentication or per-device authorization

These can be implemented separately and combined with FPS

Page 15: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

How to Use FairPlay Streaming

Page 16: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Do You Need to Do?

Page 17: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Do You Need to Do?

Integrate a FairPlay Streaming Key Security Module (KSM) into your key server

Page 18: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Do You Need to Do?

Integrate a FairPlay Streaming Key Security Module (KSM) into your key serverAdd code to your app to relay key requests and responses

Page 19: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Do You Need to Do?

Integrate a FairPlay Streaming Key Security Module (KSM) into your key serverAdd code to your app to relay key requests and responsesFor each HLS asset that you wish to protect:• Generate and store a Content Key (CK) in your back-end database• Encrypt the asset using AES Sample encryption • Put a reference to the CK into your HLS playlist

Page 20: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Gianpaolo FasoliFairPlay Streaming Engineer

Page 21: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Page 22: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentials

Page 23: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flows

Page 24: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flowsWhat we provide, what you have to build

Page 25: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flowsWhat we provide, what you have to buildIntegrating FPS into your Key Server

Page 26: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flowsWhat we provide, what you have to buildIntegrating FPS into your Key ServerTesting your Key Security Module

Page 27: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flowsWhat we provide, what you have to buildIntegrating FPS into your Key ServerTesting your Key Security ModuleIntegrating FPS into your app

Page 28: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Designing a FairPlay Streaming System

Purpose and importance of your credentialsBuilding blocks and data flowsWhat we provide, what you have to buildIntegrating FPS into your Key ServerTesting your Key Security ModuleIntegrating FPS into your appEncrypting and testing your content

Page 29: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming Credentials

KSM Credentials differentiate you from other FPS deployments

Page 30: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming Credentials

KSM Credentials differentiate you from other FPS deployments• Playing content on a customer device requires production credentials

Page 31: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming Credentials

KSM Credentials differentiate you from other FPS deployments• Playing content on a customer device requires production credentials• You must protect your production credentials

Page 32: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

ExistingProvidedYour Implementation

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

Page 33: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

Your app asks AVFoundation to play your protected HLS asset1

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

1

ExistingProvidedYour Implementation

Page 34: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

AVFoundation will download your m3u8 playlist containing the KEY tag2

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

1

ExistingProvidedYour Implementation

Page 35: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

AVFoundation will call your app delegate to request the key3

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

1 3

ExistingProvidedYour Implementation

Page 36: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

Your app delegate calls AVFoundation to create an FPS Server Playback Context request4

1 32 4

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

ExistingProvidedYour Implementation

Page 37: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

Your app delegate sends the FPS SPC to your key server5

5 5

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

1 3 4

ExistingProvidedYour Implementation

Page 38: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

1 3 4

Key server unwraps the SPC with your FPS KSM and performs CK lookup6

5 5

2

6 Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

ExistingProvidedYour Implementation

Page 39: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

1 3 4

After lookup, your FPS KSM wraps the content key into a Content Key Context response7

5 5

7 7

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

6

ExistingProvidedYour Implementation

Page 40: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

81 3 4

Your app delegate provides the CKC to AVFoundation8

5 5

7 7

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

6

ExistingProvidedYour Implementation

Page 41: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming—Request Flow

81 3 4

Now the device can decrypt and play the content9

5 5

7 7

2

Internet

AVFoundation

Your App

AVFoundation Delegate

Your Key Server

FPS KSM

Your Key Database

6

ExistingProvidedYour Implementation

9

Page 42: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

Page 43: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegate

Page 44: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK

Page 45: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK• Protocol specification

Page 46: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK• Protocol specification• Server reference implementation

Page 47: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK• Protocol specification• Server reference implementation• Server test vectors and validation tools

Page 48: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK• Protocol specification• Server reference implementation• Server test vectors and validation tools• Example content

Page 49: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

What Is Provided

AVFoundation, including API for AVAssetResourceLoader delegateFairPlay Streaming SDK• Protocol specification• Server reference implementation• Server test vectors and validation tools• Example content• Client example code

Page 50: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Key Server

Your Key Server must:• • Lookup CK by the asset identifier• Produce CKC response

Decrypt and validate SPC request

Page 51: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Key Server

Your Key Server must:• • Lookup CK by the asset identifier• Produce CKC response

Decrypt and validate SPC requestKSM:

Page 52: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Key Server

Your Key Server must:• • Lookup CK by the asset identifier• Produce CKC response

Decrypt and validate SPC requestKSM:

KSM:

Page 53: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Key Server

Your Key Server must:• • Lookup CK by the asset identifier• Produce CKC response

Decrypt and validate SPC requestKSM:

KSM:

Implement KSM logic from scratch using protocol specification, or

Page 54: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Key Server

Your Key Server must:• • Lookup CK by the asset identifier• Produce CKC response

Decrypt and validate SPC requestKSM:

KSM:

Implement KSM logic from scratch using protocol specification, orCustomize the C reference implementation in the SDK (language, integration)

Page 55: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Page 56: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Supplied test vectors should be used to validate correctness of responses produced

Page 57: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Supplied test vectors should be used to validate correctness of responses produced• Your KSM implementation will consume test SPC request and produce response

Page 58: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Supplied test vectors should be used to validate correctness of responses produced• Your KSM implementation will consume test SPC request and produce response• Supplied tool will validate your produced CKC response

Page 59: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Supplied test vectors should be used to validate correctness of responses produced• Your KSM implementation will consume test SPC request and produce response• Supplied tool will validate your produced CKC response

Test vectors are based on non-functional development credentials

Page 60: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Testing Your Key Security Module

Supplied test vectors should be used to validate correctness of responses produced• Your KSM implementation will consume test SPC request and produce response• Supplied tool will validate your produced CKC response

Test vectors are based on non-functional development credentialsEnd-to-end playback test on device requires production credentials!

Page 61: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your App

Register an AVAssetResourceLoader delegate with AVAsset

Page 62: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your App

Register an AVAssetResourceLoader delegate with AVAsset

AVAssetResourceLoader delegate must:

Page 63: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your App

Register an AVAssetResourceLoader delegate with AVAsset

AVAssetResourceLoader delegate must:

• Generate the SPC- handle shouldWaitForLoadingOfRequestedResource: for key requests- call -[AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp: contentIdentifier: options: error: ] to produce SPC

Page 64: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your App

Register an AVAssetResourceLoader delegate with AVAsset

AVAssetResourceLoader delegate must:

• Generate the SPC- handle shouldWaitForLoadingOfRequestedResource: for key requests- call -[AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp: contentIdentifier: options: error: ] to produce SPC

• Send SPC request to your Key Server

Page 65: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your App

Register an AVAssetResourceLoader delegate with AVAsset

AVAssetResourceLoader delegate must:

• Generate the SPC- handle shouldWaitForLoadingOfRequestedResource: for key requests- call -[AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp: contentIdentifier: options: error: ] to produce SPC

• Send SPC request to your Key Server• Provide CKC response (or error) to AVAssetResourceLoadingRequest

Page 66: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Page 67: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption

Page 68: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES

Page 69: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES• KEYFORMAT=“com.apple.streamingkeydelivery”

Page 70: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES• KEYFORMAT=“com.apple.streamingkeydelivery”

Many 3rd-party encoders support HLS sample encryption

Page 71: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES• KEYFORMAT=“com.apple.streamingkeydelivery”

Many 3rd-party encoders support HLS sample encryption To check your encryption workflow

Page 72: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES• KEYFORMAT=“com.apple.streamingkeydelivery”

Many 3rd-party encoders support HLS sample encryption To check your encryption workflow• SDK contains an example of sample-encrypted content for comparison

Page 73: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Encrypting and Testing Your Content

Encrypt your content with HLS Sample Encryption • METHOD=SAMPLE-AES• KEYFORMAT=“com.apple.streamingkeydelivery”

Many 3rd-party encoders support HLS sample encryption To check your encryption workflow• SDK contains an example of sample-encrypted content for comparison• HLS mediafilesegmenter can produce encrypted content for comparison

Page 74: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

Page 75: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

Page 76: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TV

Page 77: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TVNo additional code needs to be written!

Page 78: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TVNo additional code needs to be written!SPC request is generated by FPS on Apple TV and CKC response is for Apple TV

Page 79: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TVNo additional code needs to be written!SPC request is generated by FPS on Apple TV and CKC response is for Apple TV• Your app on the sending device relays messages between Apple TV and your key server

Page 80: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TVNo additional code needs to be written!SPC request is generated by FPS on Apple TV and CKC response is for Apple TV• Your app on the sending device relays messages between Apple TV and your key server

Provides the same level of security as local playback

Page 81: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming with AirPlay

AirPlay Video will transfer streaming operation to Apple TVNo additional code needs to be written!SPC request is generated by FPS on Apple TV and CKC response is for Apple TV• Your app on the sending device relays messages between Apple TV and your key server

Provides the same level of security as local playbackFPS content is disabled by AirPlay Mirroring, not rendered in screenshots or recordings

Page 82: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

Page 83: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

Page 84: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

FairPlay Streaming accessed through HTML5 Encrypted Media Extensions

Page 85: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

FairPlay Streaming accessed through HTML5 Encrypted Media ExtensionsKey delivery code must be written in JavaScript

Page 86: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

FairPlay Streaming accessed through HTML5 Encrypted Media ExtensionsKey delivery code must be written in JavaScript• Example provided with FPS SDK

Page 87: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

FairPlay Streaming accessed through HTML5 Encrypted Media ExtensionsKey delivery code must be written in JavaScript• Example provided with FPS SDK

Same KSM can support both iOS clients and Safari on OS X

Page 88: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming in Safari on OS X

FairPlay Streaming accessed through HTML5 Encrypted Media ExtensionsKey delivery code must be written in JavaScript• Example provided with FPS SDK

Same KSM can support both iOS clients and Safari on OS XSupports AirPlay

Page 89: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Page 90: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)

Page 91: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Page 92: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“

Page 93: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“ Create keySession on “video/mp4” to relay messages with the keySystem

Page 94: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“ Create keySession on “video/mp4” to relay messages with the keySystem Add Event handler for ‘webkitkeymessage’ to keySession:

Page 95: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“ Create keySession on “video/mp4” to relay messages with the keySystem Add Event handler for ‘webkitkeymessage’ to keySession: Send SPC request to your Key Server

Page 96: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Integrating FPS Into Your Web Page

Set m3u8 URL as src attribute of HTML <video> tag (as usual)Add EventListener for ‘webkitneedkey‘ to video element:

Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“ Create keySession on “video/mp4” to relay messages with the keySystem Add Event handler for ‘webkitkeymessage’ to keySession: Send SPC request to your Key Server Provide CKC response to keySession.update()

Page 97: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

Your Key Database

Safari

Your Site

Your JSInternetYour Key

Server

FPS KSM

EMEExistingProvidedYour Implementation

Page 98: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

Your Key Database

Safari

Your Site

Your JSInternetYour Key

Server

FPS KSM

EME

1

ExistingProvidedYour Implementation

User hits Play1

Page 99: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

Your Key Database

Safari

Your Site

Your JSInternet

2

Your Key Server

FPS KSM

EME

1

ExistingProvidedYour Implementation

Your Event Listener receives ‘webkitneedkey’ message2

Page 100: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

Your Key Database

Safari

Your SiteInternet

2

Your Key Server

FPS KSM

EME

1

ExistingProvidedYour Implementation

Your JS

3

Your Event Listener creates keySession and waits for ‘webkitkeymessage’ Event3

Page 101: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

Your Key Database

Safari

Your SiteInternet

2

Your Key Server

FPS KSM

1

ExistingProvidedYour Implementation

3

Your JS

4

EME

Your ‘webkitkeymessage’ Event Handler receives message containing SPC4

Page 102: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

55Your Key Database

Safari

Your SiteInternet

2

Your Key Server

FPS KSM

1

ExistingProvidedYour Implementation

3

Your JS

4

EME

Your Event Handler sends SPC to your Key Server5

Page 103: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Safari Request Flow

55Your Key Database

Safari

Your Site

2

1

ExistingProvidedYour Implementation

3

Your JS6

4 6

Internet6

Your Key Server

FPS KSM

EME

You update keySession upon receipt of CKC response6

Page 104: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

FairPlay Streaming Integration Troubleshooting

Page 105: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Troubleshooting

Content or Key?

Content Doesn’t Play

Page 106: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Troubleshooting

KEYFORMAT=“identity”

Content or Key?

Content Doesn’t Play

Page 107: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Troubleshooting

Content

• Sample level encryption• PAT/PMT, audio setup info• Use supported codecs• CK rotation on HLS segments

Content or Key?

Content Doesn’t Play

Page 108: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Troubleshooting

Content

• Sample level encryption• PAT/PMT, audio setup info• Use supported codecs• CK rotation on HLS segments

Key Delivery

• SPC generation failure• Transport• CK lookup• CKC processing failure

Content or Key?

Content Doesn’t Play

Page 109: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Summary of FairPlay Streaming

FairPlay Streaming provides industrial-strength content protection for HLSBuilt into on iOS, Apple TV and Safari on OS XDeeply integrated into the OSDesigned for power-efficient playbackSupports platform features such as AirPlay, external output protection, and HTML5

Page 110: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

More Information

Documentation and VideosFairPlay Streaminghttp://developer.apple.com/streaming/fps/

Technical SupportApple Developer Forumshttp://developer.apple.com/forums

Developer Technical Supporthttp://developer.apple.com/support/technical

Page 111: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry

Labs

HTTP Live Streaming Lab Graphics, Games and Media Lab B Tuesday 11:00AM

AirPlay Lab Graphics, Games and Media Lab B Tuesday 3:30PM

AVKit and AV Foundation Lab Graphics, Games and Media Lab A Wednesday 1:30PM

AVKit and AV Foundation Lab Graphics, Games and Media Lab B Thursday 11:00AM

HTTP Live Streaming Lab Graphics, Games and Media Lab C Thursday 11:00AM

Page 112: Content Protection for HTTP Live Streaming€¦ · Industrial-strength protection for your HTTP Live Streaming audio & video Already delivering keys in the premium content industry