28
Presented by Date Secure Playback using OP-TEE Viswanath Puttagunta [email protected] 02/11/2015 Overview

HKG15-303: Secure Playback using OP-TEE

  • Upload
    linaro

  • View
    434

  • Download
    2

Embed Size (px)

Citation preview

Page 1: HKG15-303: Secure Playback using OP-TEE

Presented by

Date

Secure Playback using OP-TEE

Viswanath Puttagunta [email protected]

02/11/2015

Overview

Page 2: HKG15-303: Secure Playback using OP-TEE

Problem Statement● Want to open browser, login and play secure DRM

videos

● No one in middle or even after rooting target device can access decrypted/decoded content.

● Performance / Zero-copy

Page 3: HKG15-303: Secure Playback using OP-TEE

Session Objectives● Basic building blocks for Secure Playback, their

interaction

● Pointers to related sessions at HKG15

Page 4: HKG15-303: Secure Playback using OP-TEE

Hardware that makes this possible● ARM® TrustZone® Technology ● TrustZone Address Space Controller (TZASC) ● TrustZone Protection Controller (TZPC)

Page 5: HKG15-303: Secure Playback using OP-TEE

Hardware: ARM® TrustZone®

http://www.arm.com/products/processors/technologies/trustzone/index.php

Page 6: HKG15-303: Secure Playback using OP-TEE

Hardware: TrustZone Address Space Controller (TZASC)

Page 7: HKG15-303: Secure Playback using OP-TEE

Hardware: TrustZone Protection Controller (TZPC)

Reference: ARM Security Technology - Building a Secure System using TrustZone Technology

Page 8: HKG15-303: Secure Playback using OP-TEE

ARM® TrustZone® and OPTEE

Reference: http://www.slideshare.net/linaroorg/lcu14-500-arm-trusted-firmware

Page 9: HKG15-303: Secure Playback using OP-TEE

Wha

t mus

t Hap

pen

Page 10: HKG15-303: Secure Playback using OP-TEE

Wha

t mus

t Hap

pen

Page 11: HKG15-303: Secure Playback using OP-TEE

DRM System● A DRM Solution provides capability to license,

securely distribute protect content.

● Eg: Google® Widevine® DRM, Microsoft® PlayReady® DRM

● CDM session APIs wrap a DRM solution.

Page 12: HKG15-303: Secure Playback using OP-TEE

W3C EME● Extends HTMLMediaElement providing APIs to

control playback of protected content.

● Provides API that enables Web Apps to interact with DRM Provider and CDM

● Browser needs to implement EME extensions.

● EME does not enforce which DRM should be used.

Page 13: HKG15-303: Secure Playback using OP-TEE

W3C

EM

E: T

he S

pec

Reference: http://www.w3.org/TR/encrypted-media/

Page 14: HKG15-303: Secure Playback using OP-TEE

W3C

EM

E: H

ow d

oes

it fit

?

Page 15: HKG15-303: Secure Playback using OP-TEE

V4L2 based HW accelerated Decoder● V4L2 provides interface at kernel boundary for Video Codecs (mem-

to-mem devices) o Typical MPEG4 decode use case would involve just few system

calls. ● Queueing/Dequeueing buffer to OUTPUT and CAPTURE queues

using ioctls once the initial formats and buffers are setup (again using open/ioctl/mmap)

● All State Management (play/pause) expected to be handled higher up in user space. Eg: GStreamer / StageFight. Not at V4L2 layer and below.

● Supports buffer queue/dequeue of dmabuf FDs. ● V4L2 Client Driver talks to the HW accelerators. ● Ref: Video4Linux2: Path to a Standardized Video Codec API

Page 16: HKG15-303: Secure Playback using OP-TEE

GStreamer● Pipeline based Media framework (link) ● Allows to create variety of media-handling software components like

o Simple audio/video playback/record o Streaming audio/video playback/record o Audio/Video Editing

● GStreamer provides libraries and plugins for o Various codecs

▪ Pure Software: Eg: FFmpeg, vorbis ▪ Hardware Accelerated Codecs: Eg: *Via V4L2 or equivalent

o Audio/Video Synchronization o Mux / Demux etc

● Ref: http://gstreamer.freedesktop.org/

Page 17: HKG15-303: Secure Playback using OP-TEE

Chromium - Chrome - PPAPI● Chromium is the open-source web browser project from

which Google Chrome draws its source code. ● Native Client is a sandboxing technology for safe

execution of platform-independent untrusted native code in a web browser

● Pepper started at Google as a way to address portability and performance issues with NPAPI, particularly for out of process plugins.

Page 18: HKG15-303: Secure Playback using OP-TEE

GS

tream

er/V

4L2:

How

it fi

ts

Page 19: HKG15-303: Secure Playback using OP-TEE

And

it a

ll co

mes

toge

ther

:)

Page 20: HKG15-303: Secure Playback using OP-TEE

The

Map

Page 21: HKG15-303: Secure Playback using OP-TEE

The

Map

Page 22: HKG15-303: Secure Playback using OP-TEE

The

Map

Page 23: HKG15-303: Secure Playback using OP-TEE

The

Map

HKG15-106

Page 24: HKG15-303: Secure Playback using OP-TEE

The

Map

HKG15-106

Page 25: HKG15-303: Secure Playback using OP-TEE

Related Presentations (TBD: Add links)● HKG15-Security Building blocks, OPTEE..: Victor Chong (2/11

12:10) ● HKG15-106: Replacing CMEM: Gil Pitney (2/9 3PM) ● EME Implementation in Chromium: Linaro Clear Key: Matt Snoby

(2/12 11:15AM) ● HKG15-403: Chromium Blink on Wayland with HW accelerated

video playback: Zoltan, Christophe (2/12 10:10AM) ● HKG15-304Secure Media using DMA-buf: Benjamin Gainard

(**Cancelled**)

Page 26: HKG15-303: Secure Playback using OP-TEE

References● ARM® TrustZone® ● ARM® Security Technology - Building a Secure System using TrustZone

Technology ● ARM Trusted Firmware LCA14 ● http://www.html5rocks.com/en/tutorials/eme/basics ● http://www.w3.org/TR/encrypted-media/ ● http://gstreamer.freedesktop.org/ ● Video4Linux2: Path to a Standardized Video Codec API ● Chromium ● Chromium Native Client (NaCl), PPAPI

Page 27: HKG15-303: Secure Playback using OP-TEE
Page 28: HKG15-303: Secure Playback using OP-TEE

Backup Slides