Network Security Sevices: Confidentiality
Network Security Sevices: Confidentiality
Network Security Sevices: Confidentiality
1
Friends and enemies: Alice, Bob, Trudy
well-known in network security world
Bob, Alice want to communicate “securely”
Trudy (intruder) may intercept, delete, add messages
Alice Bob
data, control
channel
messages
Trudy
2
Who might Bob, Alice be?
web browser/server for electronic
transactions (e.g., on-line purchases)
on-line banking client/server
DNS servers
3
There are bad guys (and girls) out there!
Q: what can a “bad guy” do?
A: a lot!
Eavesdrop(spy): intercept messages
actively insert messages into connection
Impersonation(imitation): can fake (spoof)
source address in packet (or any field in
packet)
hijacking: “take over” ongoing connection by
removing sender or receiver, inserting himself
in place
denial of service: prevent service from being
used by others (e.g., by overloading resources)
4
Cryptography
cryptography: a set of mathematical
functions with a set of nice properties. A
common mechanism for enforcing policies.
encrypt clear text into cipher text, and
vice versa.
properties of good encryption techniques
encryption scheme depends not on secrecy of
algorithm but on parameter of algorithm (i.e.,
encryption key)
extremely difficult for an intruder to
determine the encryption key
5
Cryptography algorithms
7
Symmetric key cryptography
substitution cipher: substituting one thing for another
monoalphabetic cipher: substitute one letter for another
plaintext: abcdefghijklmnopqrstuvwxyz
ciphertext: mnbvcxzasdfghjklpoiuytrewq
8
Symmetric key cryptography
KA-B KA-B
9
Symmetric key crypto: DES
DES: Data Encryption Standard
US encryption standard [NIST 1993]
56-bit symmetric key, 64-bit plaintext input
How secure is DES?
DES challenge: 56-bit-key-encrypted phrase
(“Strong cryptography makes the world a safer
place”) decrypted (brute force) in 4 months
no known “backdoor” decryption approach
making DES more secure:
use three keys sequentially (3-DES) on each datum
use cipher-block chaining
10
Symmetric key
crypto: DES
DES operation
initial permutation
16 identical “rounds” of
function application,
each using different
48 bits of key
final permutation
11
AES: Advanced Encryption Standard
12
Public key cryptography
13
Public key cryptography
+ Bob’s public
K
B key
- Bob’s private
K
B key
14
Public key encryption algorithms
Requirements:
+ . .
1 need K B( ) and K - ( ) such that
B
- +
K (K (m)) = m
B B
+
2 given public key KB , it should be
impossible to compute private
-
key K B
17
RSA example:
Bob chooses p=5, q=7. Then n=35, z=24.
e=5 (so e, z relatively prime).
d=29 (so ed-1 exactly divisible by z.
18
Digital signatures
19
Message digests large
H: Hash
message
Computationally expensive m
Function
to public-key-encrypt
long messages
H(m)
Goal: fixed-length, easy-
to-compute digital
Hash function properties:
“fingerprint”
many-to-1
apply hash function(A
produces fixed-size msg
hash function is any
algorithm that maps digest (fingerprint)
data of variable length given message digest x,
to data of a fixed computationally
length) H to m, get infeasible to find m such
fixed size message that x = H(m)
digest, H(m). 20
Digital Signature = Signed Message
Digest
equal
?
21
Example Systems
1.Pretty good privacy (PGP)
Pretty Good Privacy (PGP)
Pretty Good Privacy (PGP) is a widely used approach to
providing security for electronic mail.
It provides authentication, confidentiality, data integrity,
and non repudiation.
Originally devised by Phil Zimmerman
PGP’s confidentiality and receiver authentication depend on
the receiver of an email message having a public key that is
known to the sender.
To provide sender authentication and non repudiation, the
sender must have a public key that is known by the receiver.
PGP supports RSA.
A PGP signed message:
23
Example: PGP (Pretty Good Privacy)
6. verify the
1. signed with the 5. decrypted with signature using
sender’s private key the session key the sender’s
public key
2. encrypted with the
session key
24
Pretty Good Privacy (PGP)
Transmission is secure.
Transmission can be compressed.
History of SSH?
Powerful Tool.
provide security to TCP/IP applications
including e-mail, sales and customer
contact databases, and in-house
applications.
allows data from normally unsecured
TCP/IP applications to be secured.
Port Forwarding
SSH version 2 consist of the following
protocols
1.Transport layer protocol SSH-TRANS
2.Authentication protocol SSH-AUTH
3.Connection protocol SSH-CONN
35
1.SSH-TRANS
SSH-TRANS provides an encrypted
channel for communication. It runs on top
of a TCP connection.
Client and server establish secure channel
by first having the client authenticate the
server using RSA.
o Server informs the client of its public key
at the time of connection
o Client warns the user when it tries to
connect to the server for the first time,
since it does not know the server
36
3. Once authenticated, the client and server
establish a session key that they will use to
encrypt any data sent over the channel.
o Client remembers the server's public key
o For future connection, the client compares
server's response with the saved key.
4. SSH-TRANS includes a negotiation of the
encryption algorithm the two sides are
going to use. For example, AES is commonly
selected. SSH-TRANS include a message
integrity check of all data exchanged over
the channel. 37
2.SSH-AUTH
1. Server is authenticated during setup of SSH-TRANS channel
by default
2. User can authenticate using any of the three mechanism
1) Login with username and password. Password is sent in
encrypted form
2) Public key encryption by asking the user to store user's
public key on the server
3) Host based authentication requires the client to be
authenticated when it connects to server for the first time.
Further connection from a trusted host is believed to be
from the same user.
3. In UNIX,
o /.ssh/known_hosts records the keys for all the hosts the
user has logged into
o /.ssh/authorized_keys contains the public keys needed to
authenticate the user when he or she logs into this machine
o /.ssh/identity contains the private keys for authenticating
38
user on remote machine
3.SSH-CONN
39