SlideShare a Scribd company logo
Presented by
Date
Encrypted Media
Extensions
&
Platform Content Decryption Modules,
A quick start primerMatt Snoby
Cisco Technical Leader
Linaro Home Group
February 2015
Who is this guy?
Matt Snoby
Cisco Technical Leader
Linaro assignee
15 years of STB experience
Conditional Access
Nagravision, PowerKey,
Digital Rights Management
Intertrust, Verimatrix, VideoGuard, PlayReady
Media,
Apple HLS, Gstreamer plugins and pipelines
matt.snoby@linaro.org
snobym@cisco.com
https://www.linkedin.com/in/mattsnoby
Introduction
●  What is EME
●  What is a CDM
●  Why use the Chromium browser
●  CDM & DRM
●  PC CDM’s on embedded targets
●  Linaro Clear Key CDM
●  How to start development on your own CDM
●  Creating test encrypted content
●  Undocumented “features”
●  What’s Next for Linaro Clear Key CDM?
EME Terminology
●  EME - Encrypted Media Extensions
●  DRM – Digital Rights Management
●  Key Systems
●  CDM – Content Decryption Module
What is a CDM?
●  Provides the functionality on the target
hardware to implement a key system.
●  Key Systems can be (but are not limited to) a
commercial DRM system or even a clear key
What is a CDM continued?
●  Developed and customized for the platform.
●  Does not have to be delivered with the
browser.
●  Runs out of the browser process space.
Why Chromium
●  Leader in EME development
●  Support
●  Open Source
How is a CDM different than traditional DRMs?
CDM Traditional DRM
Authorization / pairing Done through the user
agent (app)
Factory or proprietary out of
band methods
Data Communication All traffic goes through the
user agent (https)
typically out of band direct
from the DRM process to a
secure server
API’s Session based API’s proprietary
Pairing reset user can delete and reset
pairing data ( like resetting a
cookie)
user typically can not do
this.
CrossCompiled PC CDM’s
●  Why not use existing CDM’s for PC’s?
o  Embedded CPU power
o  No SOC accelerated decrypt
§  HW Block Decrypt
o  No SOC Buffer protection after decrypt
§  TrustZone
Linaro Clear Key CDM
●  Why implement a Clear Key CDM
●  Future development work
How to Start Development?
•  Pull tip of chromium
•  http://dev.chromium.org/developers/how-tos/get-the-code
•  Now build chrome
•  “ninja –C out/Debug chrome
•  Next build the external clear key
•  Remember to link in the cdmadapter code to your
CDM code
•  “ninja –C out/Debug clearkeycdmadapter
How to Start Development cont
•  Javascript / HTML 5 app is located at:
media/test/data/*
Specifically eme_player.html and all the files
under eme_player_js directory,
•  cp this whole directory to your webserver
•  cp media/test/data/* /var/www/chrome
Testing
Start up chrome:
	
  
out/Debug/chrome	
  	
  -­‐-­‐enable-­‐logging=stderr	
  -­‐-­‐v=1	
  -­‐-­‐register-­‐pepper-­‐plugins="out/Debug/
libclearkeycdmadapter.so#ClearKey	
  CDM#ClearKey	
  CDM0.1.0.0#0.1.0.0;application/x-­‐
ppapi-­‐clearkey-­‐cdm"	
  	
  http://localhost/chrome/eme_player.html	
  
1.) URL of encrypted video
2.)Select External Clearkey
3.)Use the Prefixed EME API’s
4.) Play
Creating Content
Convert an MP4 file to a webm file
ffmpeg	
  –v	
  infile.mp4	
  –vcodec	
  libvpx	
  –acodec	
  libvorbis	
  –aq	
  5	
  –ac	
  2	
  –qmax	
  1	
  
output.webm	
  
Creating Content – now encryption
Webm_crypt is the prgm to encrypt video
stream:
https://code.google.com/p/webm/
Now encrypt the video
./webm_crypt	
  -­‐i	
  /home/snoby/out_3.webm	
  	
  -­‐o	
  /home/snoby/out_enc_3.webm	
  base_secret.key	
  
	
  
base_secret.key is a binary 16byte file that holds the key you are
encrypting with
Undocumented “features”
•  There is Decrypt method and DecryptandDecodeFrame
method.
•  In the videoDecoderInitialize call return “kSessionError” to set
CDM into Decrypt only mode.
•  When linking your CDM you MUST link in the cdmadapter
code in the gypi files.
What’s next?
●  Member board implementation
o  Hardware Block decryptor
o  Secure buffers with TrustZone
o  Send buffers to Gstreamer for decode
Questions?
HKG15-407: EME implementation in Chromium: Linaro Clear Key

More Related Content

PPTX
Securing Application Deployments in CI/CD Environments (Updated slides: http:...
PDF
MobSecCon 2015 - Burning Marshmallows
PDF
[CONFidence 2016] Glenn ten Cate - OWASP-SKF Making the web secure by design,...
PPTX
Kali net hunter
PDF
A Scalable Client Authentication & Authorization Service for Container-Based ...
PDF
Security Issues in Android Custom ROM
PDF
WebKit Security Updates (GUADEC 2016)
PDF
[CONFidence 2016] Sławomir Kosowski - Introduction to iOS Application Securit...
Securing Application Deployments in CI/CD Environments (Updated slides: http:...
MobSecCon 2015 - Burning Marshmallows
[CONFidence 2016] Glenn ten Cate - OWASP-SKF Making the web secure by design,...
Kali net hunter
A Scalable Client Authentication & Authorization Service for Container-Based ...
Security Issues in Android Custom ROM
WebKit Security Updates (GUADEC 2016)
[CONFidence 2016] Sławomir Kosowski - Introduction to iOS Application Securit...

Viewers also liked (15)

PDF
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
PDF
BKK16-209 Chromium with V4L2 playback - is it ready today?
PDF
Development of hardware-based Elements for GStreamer 1.0: A case study (GStre...
PDF
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
PDF
Gstreamer Basics
PDF
Chromium OS Introduction
PDF
WebKit and GStreamer
PDF
Tizen Overview and Architecture - Seokjae Jeong (Samsung) - Korea Linux Forum...
PDF
RDK ports on 96Boards
PDF
Gstreamer: an Overview
PDF
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
PDF
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...
PDF
Android Chromium Rendering Pipeline
PDF
Mobile Browser Internal (Blink Rendering Engine)
PPTX
Chromium ppt
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
BKK16-209 Chromium with V4L2 playback - is it ready today?
Development of hardware-based Elements for GStreamer 1.0: A case study (GStre...
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
Gstreamer Basics
Chromium OS Introduction
WebKit and GStreamer
Tizen Overview and Architecture - Seokjae Jeong (Samsung) - Korea Linux Forum...
RDK ports on 96Boards
Gstreamer: an Overview
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...
Android Chromium Rendering Pipeline
Mobile Browser Internal (Blink Rendering Engine)
Chromium ppt
Ad

Similar to HKG15-407: EME implementation in Chromium: Linaro Clear Key (20)

PDF
HKG18-203 - Overview of Linaro DRM
PDF
DEF CON 27 - workshop - RICHARD GOLD - mind the gap
PDF
Enterprise-Grade DevOps Solutions for a Start Up Budget
DOC
Srikanth_PILLI_CV_latest
PPT
RSA SF Conference talk-2009-ht2-401 sallam
PPTX
DRM Workflows: How to Provide Protected Content to Desktop, Mobile, TVs, & St...
PPTX
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
PPTX
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
PDF
[2020 git lab commit] continuous infrastructure
PDF
Pursuing evasive custom command & control - GuideM
PDF
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
PDF
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
PDF
Agile Secure Development
PDF
Pentester++
PDF
DevSecOps: What Why and How : Blackhat 2019
PPTX
Protractor: The Hacker way (NG-MY 2019)
PDF
Deep dive nella supply chain della nostra infrastruttura cloud
PPTX
Security research over Windows #defcon china
PDF
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
PDF
BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1
HKG18-203 - Overview of Linaro DRM
DEF CON 27 - workshop - RICHARD GOLD - mind the gap
Enterprise-Grade DevOps Solutions for a Start Up Budget
Srikanth_PILLI_CV_latest
RSA SF Conference talk-2009-ht2-401 sallam
DRM Workflows: How to Provide Protected Content to Desktop, Mobile, TVs, & St...
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
[2020 git lab commit] continuous infrastructure
Pursuing evasive custom command & control - GuideM
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
Agile Secure Development
Pentester++
DevSecOps: What Why and How : Blackhat 2019
Protractor: The Hacker way (NG-MY 2019)
Deep dive nella supply chain della nostra infrastruttura cloud
Security research over Windows #defcon china
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1
Ad

More from Linaro (20)

PDF
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
PDF
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
PDF
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
PDF
Bud17 113: distribution ci using qemu and open qa
PDF
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
PDF
HPC network stack on ARM - Linaro HPC Workshop 2018
PDF
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
PDF
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
PDF
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
PDF
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
PDF
HKG18-100K1 - George Grey: Opening Keynote
PDF
HKG18-318 - OpenAMP Workshop
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
PDF
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
PDF
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
PDF
HKG18-TR08 - Upstreaming SVE in QEMU
PDF
HKG18-113- Secure Data Path work with i.MX8M
PPTX
HKG18-120 - Devicetree Schema Documentation and Validation
PPTX
HKG18-223 - Trusted FirmwareM: Trusted boot
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Bud17 113: distribution ci using qemu and open qa
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-100K1 - George Grey: Opening Keynote
HKG18-318 - OpenAMP Workshop
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-113- Secure Data Path work with i.MX8M
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-223 - Trusted FirmwareM: Trusted boot

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Introduction to Artificial Intelligence
PDF
medical staffing services at VALiNTRY
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
L1 - Introduction to python Backend.pptx
PPTX
history of c programming in notes for students .pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Digital Strategies for Manufacturing Companies
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Cost to Outsource Software Development in 2025
PPTX
Transform Your Business with a Software ERP System
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
assetexplorer- product-overview - presentation
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Digital Systems & Binary Numbers (comprehensive )
wealthsignaloriginal-com-DS-text-... (1).pdf
Introduction to Artificial Intelligence
medical staffing services at VALiNTRY
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
L1 - Introduction to python Backend.pptx
history of c programming in notes for students .pptx
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Reimagine Home Health with the Power of Agentic AI​
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Digital Strategies for Manufacturing Companies
Navsoft: AI-Powered Business Solutions & Custom Software Development
Cost to Outsource Software Development in 2025
Transform Your Business with a Software ERP System
Upgrade and Innovation Strategies for SAP ERP Customers
assetexplorer- product-overview - presentation

HKG15-407: EME implementation in Chromium: Linaro Clear Key

  • 1. Presented by Date Encrypted Media Extensions & Platform Content Decryption Modules, A quick start primerMatt Snoby Cisco Technical Leader Linaro Home Group February 2015
  • 2. Who is this guy? Matt Snoby Cisco Technical Leader Linaro assignee 15 years of STB experience Conditional Access Nagravision, PowerKey, Digital Rights Management Intertrust, Verimatrix, VideoGuard, PlayReady Media, Apple HLS, Gstreamer plugins and pipelines matt.snoby@linaro.org snobym@cisco.com https://www.linkedin.com/in/mattsnoby
  • 3. Introduction ●  What is EME ●  What is a CDM ●  Why use the Chromium browser ●  CDM & DRM ●  PC CDM’s on embedded targets ●  Linaro Clear Key CDM ●  How to start development on your own CDM ●  Creating test encrypted content ●  Undocumented “features” ●  What’s Next for Linaro Clear Key CDM?
  • 4. EME Terminology ●  EME - Encrypted Media Extensions ●  DRM – Digital Rights Management ●  Key Systems ●  CDM – Content Decryption Module
  • 5. What is a CDM? ●  Provides the functionality on the target hardware to implement a key system. ●  Key Systems can be (but are not limited to) a commercial DRM system or even a clear key
  • 6. What is a CDM continued? ●  Developed and customized for the platform. ●  Does not have to be delivered with the browser. ●  Runs out of the browser process space.
  • 7. Why Chromium ●  Leader in EME development ●  Support ●  Open Source
  • 8. How is a CDM different than traditional DRMs? CDM Traditional DRM Authorization / pairing Done through the user agent (app) Factory or proprietary out of band methods Data Communication All traffic goes through the user agent (https) typically out of band direct from the DRM process to a secure server API’s Session based API’s proprietary Pairing reset user can delete and reset pairing data ( like resetting a cookie) user typically can not do this.
  • 9. CrossCompiled PC CDM’s ●  Why not use existing CDM’s for PC’s? o  Embedded CPU power o  No SOC accelerated decrypt §  HW Block Decrypt o  No SOC Buffer protection after decrypt §  TrustZone
  • 10. Linaro Clear Key CDM ●  Why implement a Clear Key CDM ●  Future development work
  • 11. How to Start Development? •  Pull tip of chromium •  http://dev.chromium.org/developers/how-tos/get-the-code •  Now build chrome •  “ninja –C out/Debug chrome •  Next build the external clear key •  Remember to link in the cdmadapter code to your CDM code •  “ninja –C out/Debug clearkeycdmadapter
  • 12. How to Start Development cont •  Javascript / HTML 5 app is located at: media/test/data/* Specifically eme_player.html and all the files under eme_player_js directory, •  cp this whole directory to your webserver •  cp media/test/data/* /var/www/chrome
  • 13. Testing Start up chrome:   out/Debug/chrome    -­‐-­‐enable-­‐logging=stderr  -­‐-­‐v=1  -­‐-­‐register-­‐pepper-­‐plugins="out/Debug/ libclearkeycdmadapter.so#ClearKey  CDM#ClearKey  CDM0.1.0.0#0.1.0.0;application/x-­‐ ppapi-­‐clearkey-­‐cdm"    http://localhost/chrome/eme_player.html  
  • 14. 1.) URL of encrypted video 2.)Select External Clearkey 3.)Use the Prefixed EME API’s 4.) Play
  • 15. Creating Content Convert an MP4 file to a webm file ffmpeg  –v  infile.mp4  –vcodec  libvpx  –acodec  libvorbis  –aq  5  –ac  2  –qmax  1   output.webm  
  • 16. Creating Content – now encryption Webm_crypt is the prgm to encrypt video stream: https://code.google.com/p/webm/ Now encrypt the video ./webm_crypt  -­‐i  /home/snoby/out_3.webm    -­‐o  /home/snoby/out_enc_3.webm  base_secret.key     base_secret.key is a binary 16byte file that holds the key you are encrypting with
  • 17. Undocumented “features” •  There is Decrypt method and DecryptandDecodeFrame method. •  In the videoDecoderInitialize call return “kSessionError” to set CDM into Decrypt only mode. •  When linking your CDM you MUST link in the cdmadapter code in the gypi files.
  • 18. What’s next? ●  Member board implementation o  Hardware Block decryptor o  Secure buffers with TrustZone o  Send buffers to Gstreamer for decode