Daily iOS
Networking

FairPlay key exchange on HLS

A music and video streaming app plays paid content over HLS and has to add FairPlay Streaming (DRM) for copyright protection. On top of the HLS playback flow, how does the FairPlay key exchange happen, in terms of the roles of the app, the key server, and AVFoundation?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

When AVPlayer hits an encrypted segment, in the AVContentKeySession callback the app builds an SPC with the application certificate, sends it to the key server (KSM), gets a CKC back, and returns it, and AVFoundation decrypts. The content key is never exposed to the app.

Share a question