Attēlojuma līmenis (Presentation Layer)

Slides:



Advertisements
Similar presentations
Ma.
Advertisements

T.Sharon-A.Frank 1 Multimedia Compression Basics.
JPEG DCT Quantization FDCT of 8x8 blocks.
Data Compression CS 147 Minh Nguyen.
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Click on each of us to hear our sounds.
Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst,
Department of Computer Engineering University of California at Santa Cruz Data Compression (1) Hai Tao.
Computer Science 335 Data Compression.
2007Theo Schouten1 Compression "lossless" : f[x,y]  { g[x,y] = Decompress ( Compress ( f[x,y] ) | “lossy” : quality measures e 2 rms = 1/MN  ( g[x,y]
Lossless Compression in Multimedia Data Representation Hao Jiang Computer Science Department Sept. 20, 2007.
Presentation Layer Network Format Local Format Information Transformation “few standards, but a lot of ideas”
Codes, Ciphers, and Cryptography-RSA Encryption
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Prof. Amr Goneid Department of Computer Science & Engineering
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
CS 111 – Sept. 10 Quiz Data compression –text –images –sounds Commitment: –Please read rest of chapter 1. –Department picnic next Wednesday.
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Section 3: Public Key, Digital Signature
 Last Class  Finish Chapter 6  This Class  Chapter 7.
Data compression. lossless – looking for unicolor areas or repeating patterns –Run length encoding –Dictionary compressions Lossy – reduction of colors.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Digital Steganography Jared Schmidt. In This Presentation… Digital Steganography Common Methods in Images Network Steganography Uses Steganalysis o Detecting.
PHONICS Repeat each sound. Blend the sounds. Read each word.
ma mu mi mo me pe pi pa pu po si sa so.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Data Compression: Huffman Coding in Weiss (p.389)
MA. ME MI MO MU MÁ MÉ MÍ MÓ MŮ LA LE LI.
Chapter 1: Data Storage.
Computer Science: An Overview Eleventh Edition
Compression & Huffman Codes
Public-Key Cryptography and Message Authentication
Video Basics.
CS644 Advanced Topics in Networking
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Algorithms in the Real World
RSA Preliminaries.
Public Key Encryption and Digital Signatures
Algorithms in the Real World
Network Security.
Chapter 7 Network Security
Public-key Cryptography
Factoring large integers
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
Bibliotēka 2.0 Teorija „Teorētiskā bāze maģistra darba izstrādei”
Chap 6: Security and Protection
Jānis Zuters, Ratnieki Latvijas Universitāte Datorikas fakultāte
– instruments komunikācijas prasmju uzlabošanai biznesam
Kopīpašums.
الوحدة الرابعة ضغط البيانات
PVN numura pārbaude Guntis Strazds Rīga, 2004.gada 23.septembris
1.seminārs “Pētījuma stratēģija un problēmas identificēšana”
Ms Access Tabulas 2. daļa Andris Šteins, 2009.
Asymmetric Cryptography
Topic 3: Data Compression.
Public Key Cryptography Diffie-Hellman, Discrete Log, RSA
Atvērtā koda programmatūra
Rivest, Shamir and Adleman
Zinātniski metodiskie Analizatora uzbūves pamati:
Intro to Cryptography Some slides have been taken from:
Network Security.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 8 – Compression Aims: Outline the objectives of compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Attēlojuma līmenis (Presentation Layer) Guntis Bārzdiņš Datortīkli 1

Attēlojuma līmeņa funkcijas Saglabāt parsūtāmās informācijas jēgu, neatkarīgi no izvēlētā pārraides kodējuma Pārraides kodējumu veidi Kodēšanas standarti (ASCII, EBCDIC, ASN.1) Datu saspiešana (compression) Datu šifrēšana (encryption)

Abstract Syntax Notation (ASN.1) ISO 8824 ISO 8825

Datu saspiešana Entropijas kodēšana – manipulē bitu virknes neatkarīgi no to izcelsmes. Parasti “loss-less” saspiešana. Avota kodēšana (source encoding) – izmanto pārraidāmās informācijas īpašības lai saniegtu augstu saspiešanas pakāpi. Parasti “lossy” saspiešana/

Entropijas kodēšana 315555555556700000008 31A5967A078 “Run-length encoding” – atkārtotu simbolu aizstāšana “Huffman coding” –koda garums apgriezti proporcionāls simbola varbūtībai tekstā. (Ziv-Lempel) “Context dependent encoding” – varbūtību tabulas simbolu kombinācijām 315555555556700000008 31A5967A078 A 0.50 C 0.30 G 0.15 T 0.05 1 1 1.00 1 0.50 0.20 CAT 01000011 01000001 01010100 – ASCII 011000 – Huffman THREE OAKS NEAR THE ROAD

Aritmētiskā kodēšana CAT = 0.645 N -  Pi log2 Pi i=1 Entropy per symbol (bits/symbol) Pi, P2, P3,..., PN – probability of symbols “Huffman code” nav optimals, jo lieto veselu bitu skaitu katra simbola kodēšanai CAT = 0.645

Source coding (lossy) Attēli (GIF, JPEG) Skaņa (PCM, G.729, MP3) Video (MPEG-1, MPEG-2, DV, DivX) Pieļaujot “nemanāmu” informācijas kropļošanu (lossy), šīs kodēšanas metodes sasniedz ļoti augstu saspiešanas pakāpi,(1:20 un vairāk)

Color Look Up Table (CLUT) Oriģinālais RGB attēls 24biti/pixel Teorētiski 16 miljoni krasu Atšķirīgo krāsu skaits īstenībā ~ 256 Veido krāsu tabulu (256 * 3 bytes) un lieto 8-bitu indeksu Optional: Haffman coding (GIF) 158x158 pixel 75KB – BMP 2KB - GIF

JPEG Oriģinālais RGB attēls 24biti/pixel Līdzīgi kā krāsu TV, attēlu sadala luminancē Y un 2 hrominancēs I, Q: Y=0.30R+0.59G+0.11B I=0.60R – 0.28G – 0.32B Q=0.21R – 0.52G +0.31B Hrominancēm 2x samazina izšķiršanu 8x8 bitu blokus saspiež ar DCT un kvantizē Rezultātam pielieto Run-length un Huffman encoding 300x200 pixel 175KB – BMP 27KB - JPEG

JPEG Bloku Sagatavošana

Run-length & Huffman encoding JPEG Bloku Apstrāde Run-length & Huffman encoding

Video kodēšana PAL: 720 x 576 pixels, 25 frames/sec = 250Mb/s (uncompressed) MPEG-1 1.2Mb/s (VCD) MPEG-2 4-8Mb/s (DVD, DVB) DV 25Mb/s (miniDV, DVpro) DivX ~0.5Mb/s (Internet)

Network security Datortīkli ir hakeru paradīze (globāla!)

Encryption Model Dk (Ek ( P)) = P

Šifrēšanas problēmas “Naivos” šifrēšanas algoritmus ļoti viegli atšifrēt ar moderno kriptoanalīzi “Gudros” šifrēšanas algoritmus izstrādā lieli kolektīvi un testē publiski Algoritms nevar būt slepens – lieto atslēgas Atslēgas ir regulāri jāmaina – kā droši apmainīties ar jaunām atslēgām?

Šifrēšanas sasniegumi Simetriskās atslēgas (DES) Publiskās atslēgas (Diffie-Helman, RSA – 1976&1978) Droša atslēgu apmaiņa Elektroniskie paraksti Lietotāju autentifikācija Elektroniskie sertifikāti Etc.

DES

RSA Choose two large primes, p and q. p=3, q=11 Reverse encryption (signing): 147 = 105413504 105413504 mod 33 = 20 203 = 8000 8000 mod 33 = 14 RSA Public key: pair (e, n) = (3, 33) Private key: pair (d, n) = (7, 33) Choose two large primes, p and q. p=3, q=11 Compute n=p*q and z=(p-1)*(q-1). n=33, z=20 Choose a number d relatively prime to z. d=7 Find e such that e*d=1 (mod z). e=3 Encryption C=Pe(mod n); Decryption P=Cd(mod n)

Elektroniskie paraksti MD5 – Message Digest (128 bits) – RFC 1321 MD5(P) – easy to compute Given MD5(P) – “impossible” to compute P “impossible” to generate two messages with same digest

Mājas darbs Ar MD5 un RSA algoritmiem nodemonstrēt kā Alise nodod elektroniski parakstītu vēstuli Bobabm un kā Bobs pārbauda šī dokumenta autentiskumu. Vēstules teksts: “LABRIT!”