Transparencies Encryption

Transcription

Transparencies Encryption
Informatics 3
SS 2008
3.1 Encryption / Introduction
Kay Förger
Content:
1. Hardware and Operating Systems
–
No guarantee for computer security
–
Why use encryption?
„Computer interior“ Linux, Windows
●
●
2. Database Systems
Terms and Designs,
Language used by Database Systems SQL (Structured Query Language)
●
–
3. Encryption
Methods
●
Symmetric and Asymmetric Encryption, Digital Signature, ...
●
–
4. Networks
Data Packets and Network Addresses: Ethernet,
TCP/IP (connection oriented /connectionless Protocols)
Network Services (Protocols: DNS, HTTP, SMTP, POP, Security: Firewall)
Accidental view / disclosure of confidential data
System administrators must no have access to all information
stored on a computer
Make attacks more difficult
asymmetric (public, private Key)
symmetric, Problem: secure exchange of the key
Software
●
●
Network communication: z.B. ssh, scp
E-Mail: e.g. PGP
Inf3 1
3.1 Encryption / Introduction
●
Literature:
–
Einführung in die Kryptographie Network Associates
International (NAI) : http://www.nai.com, ebenfalls unter:
http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
●
Example
–
SS 2008
–
Alice wants to instruct her bank to send money to somebody.
She wants to use the Internet for transmission of the message.
–
Aspects
●
●
–
3.2 Encryption / Example
Script von Prof. Völler Fachbereich E+I der HAW:
http://users.informatik.haw-hamburg.de/~voeller/crypto.zip
●
Confidentiality (de: Vertraulichkeit) (only the bank can read Alice's message)
Authenticity (the bank must be sure that the message was really send from Alice)
Integrity (The content of the message is unchanged, e.g. the amount of money)
–
Das Handbuch der freien Software GnuPG
http://www.gnupg.org/gph/de/manual.pdf
–
Alice
–
Integrity is self-acting obtained if
● Confidentiality
● Authenticity are guaranteed
Some times confidentiality is not desired
Example: public notice but authenticity (travel warning
really originated from the government) and Integrity (is
really for Irak) are necessary
financial
transaction
3.3 Encryption / Methods
SS 2008
SS 2008
3.3 Encryption / Methods
3.3.1 Symmetric Encryption continued
3.3.1 Symmetric Encryption
●
In our example:
Alice
encryption
plain text
financial
transaction
decryption
encrypted text
plain text
picture taken from NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
encryption
SS 2008
3.3.1 Symmetric Encryption continued
●
Properties of symmetric encryption
–
–
3.3.2 Symmetric Encryption Examples
–
Rearranged Alphabet:
–
Sender and receiver have the same key which is used for
encryption and decryption
The encrypted text cannot be read without the key
●
i.e. only at great expense (not being worth the attempt)
–
The encryption procedure is a matter of common
knowledge (Kerckhoffs Maxim, niederl. Philologe, book: La cryptographie militaire)
–
secret/confidential is only the key
SS 2008
3.3 Encryption / Methods
–
–
Shift characters (Caesar): easy to crack (analyse relative frequencies of letters)
...
Machine for encryption
–
German
Dt. Wehrmacht: Enigma
Realtive frequencies
3.3 Encryption / Methods
decryption
pictures: Script Prof. Dr. Völler
English
SS 2008
3.3 Encryption / Methods
3.3.3 Symmetric Encryption Algorithms
●
●
3.3.4 Symmetric Encryption Problem
DES (Data Encryption Standard)
–
1977 developed by IBM in collaboration with NSA
–
Key length 56 bit (+ 8 parity bits = 64 bits)
–
Does the algorithm contain any “backdoor”?
●
–
1991 Shamir: method to reduce analysis by a factor of 512
(known 1977 but unpublished)
●
●
3.3.5 Asymmetric Encryption, Principle
Solution: asymmetric Encryption (next transparency)
2nd possibility to apply asymmetric encryption
Private key
Private key
Public key
encryption
decryption
encrypted text
SS 2008
3.3 Encryption / Methods
3.3.5 Asymmetric Encryption, Principle
1st possibility to apply asymmetric encryption
encryption
Decryption
Encryption
SS 2008
3.3 Encryption / Methods
plain text
Transmission of the
bkey on secure way
Überweisung
Key length: 128 Bits
Triple IDEA: Improvement of security by useing two keys
T: plain text, C: encrypted (ciphered) text,
E(K, T): encryption function, D(K, C). decryption function
C = E(K1, D(K2, E(K1,T)))
T = D(K1, E(K2, D(K1,T)))
Public key
The key exchange (transmission) is not secure
if the Internet is used
Alice
IDEA (developed to substitute DES)
●
SS 2008
3.3 Encryption / Methods
plain text
Picture taken from NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
plain text
decryption
encrypted text
plain text
Picture taken from NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
3.3 Encryption / Methods
SS 2008
3.3.6 Hybrid Method
3.3.6 Hybrid Method continued
–
Problem: asymmetric encryption takes 1000 times more
computation time (compared with symmetic encryption)
–
Solution: hybrid method
●
●
●
Generation of a random symmetric session key
Transmission of the session key by asymmetric encryption
Use session key for symmetric encryption of data
The plain text is
encrypted with a
random generated
so called session key
–
SS 2008
–
Essentially dependent on the state of hardware technology,
because thte private key can be calculated in priciple form
the public key, but the run time would be very long
Comparison of key lengths
●
Symmetric 80 bit key is equivalent to 1024 Bit asymmetric key
●
Symmetric 128 bit key is equivalent to 3000 Bit asymmetric key
Methods for asymmetric encryption
●
RSA (1977, Authors: Rivest, Shamir, Adlemann)
–
–
–
●
Choose large prim numbers p,q, and e,d with
(e*d)%((p-1)*(q-1)) = 1
public key: (e, p*q), private key: (d, p*q)
Encryption of a number t (0 <= t < p*q): c = te %(p*q),
Decryption t = cd %(p*q)
ElGamal (1985 Taher ElGamal )
Usage of private key of recipient
to encrypted session key
Session key to
encrypted plain text
Original
plain text
Pcitures taken from NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
3.3.7 Security of Asymmetric Encryption
–
encrypted
session key
encrypted
plain text
Pictures taken from NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
–
Decryption using the hybrid medthod
encrypted
message
Session key is encrypted with
public key of recipient
Encrypted plain text +
encrypted session key
3.3 Encryption / Methods
SS 2008
3.3 Encryption / Methods
3.4 Verschlüsselung / Unterschriften
SS 05
3.4.1 Digitale Unterschrift, grundlegende Idee
–
Unterschreiben: Originaltext + mit privaten Schlüssel
verschlüsselten Text übertragen
–
Verifizieren: verschlüsselten Teil mit öffentlichem Schlüssel
entschlüsseln, bei Übereinstimmung: Unterschrift OK
(Authentizität)
Absender
Absender
3.4 Verschlüsselung / Unterschriften
SS 05
3.4 Verschlüsselung / Unterschriften
3.4.2 Anwendbares Verfahren
–
●
●
3.4.2 Anwendbares Verfahren
Nachteile der grundlegenden Idee
●
SS 05
●
große Datenmengen sind zu übertragen (2 x Nachricht)
großer Berechnungsaufwand
Lösung: Hash-Funktion
berechnet aus einem Text beliebiger Länge: Ausgabe
mit fester Länge, geringfügige Änderungen am Ausgangstext verändern Ergebnis völlig, z.B.
MD5 [RFC1321]: Message digest (engl. Nachrichten Zusammenfassung) Version 5,
128 Bit Länge (Autor: Rivest),
SHA1 [RFC3174]: US Secure Hash Algorithm 1, 160 Bit Länge)
Lösung: Hash-Funktion
berechnet aus einem Text beliebiger Länge: Ausgabe
mit fester Länge, geringfügige Änderungen am Ausgangstext verändern Ergebnis völlig, z.B.
MD5 [RFC1321]: Message digest (engl. Nachrichten Zusammenfassung) Version 5,
128 Bit Länge (Autor: Rivest),
SHA1 [RFC3174]: US Secure Hash Algorithm 1, 160 Bit Länge)
3.4 Verschlüsselung / Unterschriften
3.5 Verschlüsselung / Zertifikate
SS 05
3.4.2 Anwendbares Verfahren (Fortsetzung)
SS 05
3.5.1 Grundlegende Idee
–
Problem: Angriffe durch gezielte Verfälschung eines
öffentlichen Schlüssels (Man in the middle attack)
–
Lösung: Zertifikate = unterschriebene Schlüssel zur Prüfung
der Authentizität eines öffentlichen Schlüssels
●
Inhalt:
–
–
–
●
zur Automatisierung des Ablaufes benötigt man:
–
–
Quelle der Bilder NAI: http://www.rzbd.haw-hamburg.de/ftp/files/kryptografie.pdf
öffentlicher Schlüssel
Zertifikatsdaten zur Identität des Benutzers
eine oder mehrere digitale Unterschriften einer vertrauenswürdigen
Einrichtung
Liste von vertrauenswürdigen Einrichtungen + deren öffentliche Schlüssel
Certificate Server (Schlüssel/ Zertifikatserver)
●
Abrufen von Schlüsseln / Zertifikaten
● Bereitstellen von Schlüsseln/Zertifikaten
IE:
Extras ->
Internetoptionen...
<Inhalte>
>Zertifikate ...<
3.5 Verschlüsselung / Zertifikate
3.5.2 Zertifikate z.B. im Browser (IE)
SS 05
3.5 Verschlüsselung / Zertifikate
SS 05
3.5.2 Zertifikate
–
Zertifiaktstypen: X.509, PGP, ...
–
Weitere Möglichkeit zur Prüfung der Gültigkeit:
Fingerabdruck (=Hash des Zertifikates)
MD5 Fingerprint=22:55:A4:CF:F3:3D:5E:73:74:E1:5F:73:B3:5A:9F:8B
Ein solcher Fingerabdruck kann beispielsweise auf einer
Visitenkarte stehen, die persönlich (oder per Post) einem
Kommunikationspartner übergeben wird.
–
Def. PKI: Darunter versteht man alle Einrichtungen, Werkzeuge
und Verfahren, die erforderlich sind, um Verschlüsselung in einem
konkreten Anwendungsfall fachgerecht einzusetzen.
●
●
Zertifizierungsinstanz (entspricht Behörde, die Ausweise
ausstellt)
(Trustcenter)
...
CSA 149