Multimediadatensicherheit am Beispiel DVB Medientechnologie IL

Andreas Unterweger

Vertiefung Medieninformatik Studiengang ITS FH Salzburg

Sommersemester 2015

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 1 / 20 Ubersicht¨ Multimediadatensicherheit

Ziele Schutz von Multimediadaten (z.B. Kopierschutz) Ruckverfolgbarkeit¨ (z.B. Traitor Tracing) Methoden (Auswahl) Verschlusselung¨ Wasserzeichen Steganographie Fingerprinting Schwerpunkt Kopierschutz Unberechtigte Kopien verhindern (oder zumindest erschweren) Datenkopien im Regelfall unbrauchbar (nicht abspielbar) Beispiel: Content Scramble System (CSS) fur¨

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 2 / 20 Verschlusselung:¨ Taxonomie I

Dom¨ane Vor der Kompression (engl. pre-compression) W¨ahrend der Kompression (engl. in-compression) Nach der Kompression (engl. post-compression)

Formatkonformit¨at Kompatibel (Dekodierung durch regul¨aren Decoder m¨oglich) Inkompatibel (Dekodierung durch regul¨aren Decoder nicht m¨oglich) L¨angenerhaltung L¨angenerhaltend (L¨ange bleibt nach Verschlusselung¨ gleich) Nicht l¨angenerhaltend (L¨ange ¨andert sich nach Verschlusselung)¨

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 3 / 20 Verschlusselung:¨ Taxonomie II

Umfang Vollst¨andig (alles wird verschlusselt)¨ Selektiv (teilweise Verschlusselung)¨ Region of Interest (nur bestimmte Bildbereiche werden verschlusselt)¨

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 4 / 20 Verschlusselung¨ vor der Kompression

Beispiele AES-Verschlusselung¨ von Pixelbl¨ocken Permutation von Pixeln innerhalb einer Region Vorteile Kompressionsunabh¨angig Schnell (da keine Dekodierung erforderlich) Nachteile Robustheit gegen Kompression erforderlich (alternativ Kommunikation mit Encoder, um verschlusseltene¨ Regionen verlustfrei zu komprimieren) Reduktion der Kompressionseffizienz

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 5 / 20 Verschlusselung¨ w¨ahrend der Kompression

Beispiele Verschlusselung¨ der AC-Koeffizienten-Vorzeichen Verschlusselung¨ von MV-Komponenten-Vorzeichen Vorteile Einfach implementierbar (volle Kontrolle uber¨ Encoder) Einfluss auf Kompressionseffizienz Nachteile Modifikation des Encoders notwendig Verz¨ogerung des Kodiervorganges

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 6 / 20 Verschlusselung¨ nach der Kompression

Beispiele JPEG: Anderung¨ der Reihenfolge von Huffman-Codew¨ortern H.264: Anderung¨ der Reihenfolge von Codew¨ortern (ohne Details) Vorteile Keine Modifikationen im Bildbereich notwendig Schnelle Verarbeitung auf Bitstrombasis m¨oglich Nachteile Formatspezifisch (Teilweise) Dekodierung eventuell notwendig

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 7 / 20 Drift I

Bereiche, die unverschlusselt¨ bleiben sollen, werden ver¨andert Beispiel: Ein Block in H.264-kodiertem Frame ver¨andert

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 8 / 20 Drift II

Ortlicher¨ vs. zeitlicher Drift Beispiel von vorhin mit Folgeframes (Framenummern 2, 3, 5 und 10)

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 9 / 20 Drift III

Ursachen Datendekorrelation (durch Transformation) innerhalb eines Blockes Intrapr¨adiktion innerhalb von Einzelbildern Interpr¨adiktion uber¨ mehrere Bilder hinweg Dom¨anenspezifit¨at Vor der Kompression: Kein Problem W¨ahrend der Kompression: Kontrollierbar Nach der Kompression: Großes Problem Umfangsspezifit¨at Vollst¨andig: Kein Problem Selektiv: Kein Problem (sogar Vorteil) Region of Interest: Großes Problem

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 10 / 20 Beispiel DVB-Verschlusselung:¨ Ubersicht¨ I

Digital Video Broadcasting (DVB) Verschiedene Varianten fur¨ verschiedene Ubertragungswege¨ Bekannte Varianten: DVB-S(2(X)), DVB-C(2), DVB-T(2) Basis: MPEG-TS (mit Spezialanforderungen) DVB-Verschlusselung¨ Verschlusselung¨ des TS- oder PES-Paket-Payloads (wahlweise) Schlussel¨ teilweise geheim → ben¨otigt oder Aquivalent¨ Verschiedene Algorithmen spezifiziert Teile der Algorithmen geheim (inkl. herstellerspezifische Details) Verschlusselungseigenschaften¨ Nach Kompression (Bitstrom wird verschlusselt)¨ Nicht formatkonform (Multimediadaten verschlusselt¨ nicht dekodierbar) L¨angenerhaltend (vereinfacht)

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 11 / 20 Beispiel DVB-Verschlusselung:¨ Ubersicht¨ II

Quelle: Massel, M.: . http://broadcastengineering.com/mag/conditional-access (abgerufen am 4.3.2014), 2014.

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 12 / 20 Beispiel DVB-Verschlusselung:¨ Details I

Entschlusselung¨ Eigene Descrambler-Komponente entschlusselt¨ Daten Control Words (CW) steuern Entschlusselung¨ DVB-Standards definieren Entschlusselung¨ via CW Abwechselnde Schlussel¨ (gerade/ungerade (even/odd)) → Datenpakete mussen¨ even/odd-Markierung enthalten Unverschlusselte¨ Pakete werden nicht entschlusselt¨ Entitlement Control Messages (ECM) Enthalten (verschlusselte)¨ programmspezifische Schlussel¨ Werden von Smart Card verarbeitet → liefert CW → Ermittlung von CW aus ECM-Inhalt geheim PMT enth¨alt Information zu ECM-PIDs (unverschlusselt¨ )

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 13 / 20 Beispiel DVB-Verschlusselung:¨ Details II

Entitlement Management Messages (EMM) Definieren Zugriffsrechte fur¨ Benutzer(-gruppe) Enthalten Service-Schlussel¨ (z.B. fur¨ -Service) → Schalten Smart Card frei → erlauben Entschlusselung¨ → Nachtr¨aglicher Rechteentzug m¨oglich Conditional Access Table (CAT) Enth¨alt EMM-PIDs fur¨ Krypto-Services (z.B. fur¨ Conax) Fixe PID 1 Unverschlusselt¨ Verschlusselungsalgorithmus¨ CW sind je 64 Bit lang Bekannter Teil ist zumeist AES mit 128 Bit Schlussell¨ ¨ange AES wird im Cipher-Block-Chaining(CBC)-Modus verwendet

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 14 / 20 Beispiel DVB-Verschlusselung:¨ Details III

CBC-Modus Gleicher Klartext fuhrt¨ zu unterschiedlichem Schlusseltext¨ Schlusseltext¨ von Block h¨angt von Vorg¨angern ab Initialisierungsvektor (IV) fur¨ ersten Block ben¨otigt

Quelle: http://en.wikipedia.org/wiki/File:CBC_encryption.svg

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 15 / 20 10 ETSI TS 103 127 V1.1.1 (2013-05)

6.2.1 TS level scrambling

The basic unit of scrambling (or descrambling) is an MPEG-2 transport stream packet (TS). Each packet is scrambled independently from all others, allowing random access. A packet consists of a header and optional adaptation field that are left in the clear followed by a payload that is processed as described below.

AES-128, as defined in NIST FIPS 197 [1], is used to encrypt blocks of 16 bytes of the data payload of a given TS packet. The payload, in general, is not an integer multiple of 16 bytes. Only a part that is made up of a multiple of 16 bytes, is encrypted by the scrambling process. If there is a remaining part (up to 15 bytes), it stays in the clear. If the payload is less than 16 bytes, it is left in the clear.

An integer number of 16 byte contiguous blocks of the payload is encrypted using a Cipher Block Chaining (CBC) technique as described in NIST SP800-38A [2]. The Initialization Vector (IV) is a constant.

When the payload size is not a multiple of 16, the remaining10 part of the payload that staysETSI inTS the 103 clear 127 is V1.1.1 located (2013 at the-05) end of the TS packet as shown in figure 1.

6.2.1TS TS level scrambling Adaptation* Clear TS* header Encrypted TS Payload The basic unit ofField scrambling (clear) (or descrambling) is an MPEG-2 transport stream packet (TS). Each packet isPayload scrambled independently(clear) from all others, allowing random access. A packet consists of a header and optional adaptation field that are left in the clear followed by a payload that is processed as described below. *Not always present AES-128, as defined in NIST FIPS 197Figure [1], is1: used TS Scrambledto encrypt blocks Packet of 16 Overview bytes of the data payload of a given TS packet. The payload, in general, is not an integer multiple of 16 bytes. Only a part that is made up of a multiple of 16 bytes, is encrypted by the scrambling process. If there is a remaining part (up to 15 bytes), it stays in the clear. If the payload6.2.2 is less PESthan 16 level bytes, it scrambling is left in the clear.

AnThe integer PES level number scrambling of 16 byte method contiguous requires blocks that theof thePES payload packet isheader encrypted is not using scrambled a Cip her(as Blockrequired Chaining in (CBC) techniqueISO/IEC 13818-1as described [i.1]) in and NIST TS SP800-38Apackets containing [2]. The parts Initialization of a scrambled Vector PES (IV) packet is a constant. do not contain an Adaptation Field Beispiel(with the exception DVB-Verschl of the TS packet containingusselung:¨ the end of the PES Details packet). The IV header of a scrambled PES packet is Whenrequired the not payload to span size multiple is not aTS multiple packets. of The16, theTS remainingpacket carrying part of the the start payload of a scrambled that stays inPES the packet clear isis locatedfilled by at t hethe endPES of header the TS and packet the first as shown part of in the figure PES 1. packet payload. In this way, the first part of the PES packet payload is scrambled exactly as a TS packet with a similar size payload. The remaining part of the PES packet payload is split in super-blocksTS of 184 bytes. Each superblock is scrambled exactly as a TS packet payload of 184 bytes. The end of the Adaptation* Clear TS* PESheader packet payload is aligned with the end of the TSEncrypted packet (as required TS Payload in ISO/IEC 13818-1 [i.1]) by inserting at the beginning an AdaptationField (clear) Field of suitable size. If the length of the PES packet is not a multiple of 184 bytes,Payload the last part(clear) of the PES packet payload (from 1 to 183 bytes) is scrambled exactly as a TS packet with a similar size payload. A schematic*Not always diagram present describing the mapping of scrambled PES packets into TS packets is given in figure 2. Figure 1: TS Scrambled Packet Overview TS TS packet Clear* carrying the header PES header (clear) Encrypted PES Data PES data 6.2.2PES header PES(clear) level scrambling

The PES level scrambling method requires that the PES packet header is not scrambled (as required in ISO/IEC 13818-1 [i.1]) and TS packets containing parts of a scrambled PES packet do not contain an Adaptation Field (with the exceptionTS of the TS packet containing the end of the PES packet). The header of a scrambled PES packet is Intermediate Clear required not to headerspan multiple TS packets. The TS packetEncrypted carrying PES the startData of a scrambled PES packet is filled by the TS packet PES data PES header and(clear) the first part of the PES packet payload. In this way, the first part of the PES packet payload is scrambled exactly as a TS packet with a similar size payload. The remaining part of the PES packet payload is split in super-blocks of 184 bytes. Each superblock is scrambled exactly as a TS packet payload of 184 bytes. The end of the PES packet payload is aligned with the end of the TS packet (as required in ISO/IEC 13818-1 [i.1]) by inserting at the beginningTS packet an AdaptationTS Field of suitable size. If the length of the PES packet is not a multiple of 184 bytes, the last carrying the Adaptation* Clear* part of the PESheader packet payload (from 1 to 183 bytes) is scrambledEncrypted exactly PESas a TSData packet with a similar size payload. A end of PES Field (clear) PES data schematicpacket diagram(clear) describing the mapping of scrambled PES packets into TS packets is given in figure 2.

*Not always present TS TSQuelle: packet ETSI: Digital Video BroadcastingFigure (DVB);2: PES Content Scrambled Scrambling Packet Algorithms Overview for DVB-IPTV Services usingClear* MPEG2 carrying the header PES header (clear) Encrypted PES Data Transport Streams (ETSI TS 103 127 V1.1.1), 2013. Auch verfugbar¨ PES data PES headerunter:http://www.etsi.org/deliver/etsi_ts/103100_103199/103127/01.01.01_60/ts_103127v010101p.pdf(clear)

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 16 / 20 TS Intermediate Clear header Encrypted PES Data TS packet PES data (clear) ETSI

TS packet TS carrying the Adaptation* Clear* header Encrypted PES Data end of PES Field (clear) PES data packet (clear)

*Not always present Figure 2: PES Scrambled Packet Overview

ETSI Beispiel DVB-Verschlusselung:¨ TS-Beispiel

Quelle: http://kcchao.wikidot.com/program-service-information

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 17 / 20 Beispiel DVB-Verschlusselung:¨ Gesamtuberblick¨ I

Gesamtsystem inkl. Verschlusselung¨ auf Senderseite:

Quelle: ThinkQuest: Conditional Access TV. http://library.thinkquest.org/07aug/01676/relevance_entertainment_conditionalaccesstv.html (abgerufen am 4.3.2014), 2007.

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 18 / 20 Beispiel DVB-Verschlusselung:¨ Gesamtuberblick¨ II

Quelle: Duran, J. E.: Ohne Titel. http://www.une.edu.ve/~jduran/Dvb.htm (abgerufen am 5.3.2014), 1996.

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 19 / 20 Danke fur¨ die Aufmerksamkeit!

Fragen?

Andreas Unterweger (FH Salzburg) Multimediadatensicherheit am Beispiel DVB Sommersemester 2015 20 / 20