Security: An Overview of Cryptographic Techniques

S
e
c
u
r
i
t
y
:
A
n
 
O
v
e
r
v
i
e
w
 
o
f
C
r
y
p
t
o
g
r
a
p
h
i
c
 
T
e
c
h
n
i
q
u
e
s
14-736
With slides from: Debabrata Dash, Nick Feamster,
Gregory Kesden, Vyas Sekar and others
2
C
r
y
p
t
o
g
r
a
p
h
y
,
 
C
r
y
p
t
o
g
r
a
p
h
i
c
 
P
r
o
t
o
c
o
l
s
a
n
d
 
K
e
y
 
D
i
s
t
r
i
b
u
t
i
o
n
Authentication
Mutual Authentication
Private/Symmetric Keys
Public Keys
Key Distribution
3
W
h
a
t
 
d
o
 
w
e
 
n
e
e
d
 
f
o
r
 
a
 
s
e
c
u
r
e
c
o
m
m
u
n
i
c
a
t
i
o
n
 
c
h
a
n
n
e
l
?
Authentication (Who am I talking to?)
Confidentiality (Is my data hidden?)
Integrity (Has my data been modified?)
Availability (Can I reach the destination?)
4
W
h
a
t
 
i
s
 
c
r
y
p
t
o
g
r
a
p
h
y
?
"cryptography is about communication in the
presence of adversaries."
      
- Ron Rivest
cryptography is using math and other crazy
tricks to approximate magic
      
- Unknown TA
5
W
h
a
t
 
i
s
 
c
r
y
p
t
o
g
r
a
p
h
y
?
 
Tools to help us build secure communication
channels that provide:
 
1) Authentication
 
2) Integrity
 
3) Confidentiality
6
C
r
y
p
t
o
g
r
a
p
h
y
 
A
s
 
a
 
T
o
o
l
Using cryptography securely is not simple
Designing cryptographic schemes correctly
is near impossible.
 
Today we want to give you an idea of what
can be done with cryptography.
 
Take a security course if you think you may
use it in the future
7
T
h
e
 
G
r
e
a
t
 
D
i
v
i
d
e
Symmetric
 Crypto
(Private key)
(E.g., AES)
Asymmetric
 Crypto
(Public key)
(E.g., RSA)
 
Shared secret
between parties?
Yes
 
Speed
 of crypto
operations
Slow
No
Fast
8
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
C
o
n
f
i
d
e
n
t
i
a
l
i
t
y
Motivating Example:
 
You and a friend share a key K of L random bits, and
want to secretly share message M also L bits long.
Scheme:
 
You send her the 
xor(M,K)
 and then she 
decrypts
using 
xor(M,K)
 again.
 
1)
Do you get the right message to your friend?
2)
Can an adversary recover the message M?
3)
Can adversary recover the key K?
9
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
C
o
n
f
i
d
e
n
t
i
a
l
i
t
y
One-time Pad (OTP) is secure but usually impactical
Key is as long at the message
Keys cannot be reused (why?)
 
S
t
r
e
a
m
 
C
i
p
h
e
r
s
:
Ex: RC4, A5
 
B
l
o
c
k
 
C
i
p
h
e
r
s
:
Ex: DES, AES,
Blowfish
 
In practice, two types of ciphers
are used that require constant
length keys:
10
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
C
o
n
f
i
d
e
n
t
i
a
l
i
t
y
Stream Ciphers (ex: RC4)
PRNG
Pseudo-Random stream of L bits
Message of Length L bits
X
O
R
=
Encrypted Ciphertext
K 
A-B
Bob uses K
A-B
 as PRNG seed, and XORs encrypted text
to get the message back (just like OTP).
Alic
e:
11
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
C
o
n
f
i
d
e
n
t
i
a
l
i
t
y
Block 4
Block 3
Block 2
Block 1
Round #1
Round #2
Round #n
Block 1
Block Ciphers (ex: AES)
K 
A-B
Alice:
Bob breaks the ciphertext into blocks, feeds it through
decryption engine using K
A-B
 to recover the message.
Block 2
Block 3
Block 4
(fixed block size,
e.g. 128 bits)
12
C
r
y
p
t
o
g
r
a
p
h
i
c
 
H
a
s
h
 
F
u
n
c
t
i
o
n
s
Consistent 
      
 
hash(X) always yields same result
One-way 
      
 
given Y, can
t find X s.t. hash(X) = Y
Collision resistant 
     
 
given hash(W) = Z, can
t find X such that hash(X) = Z 
H
a
s
h
 
F
n
Message of arbitrary length
Fixed Size 
Hash
13
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
I
n
t
e
g
r
i
t
y
Hash Message Authentication Code (HMAC)
H
a
s
h
 
F
n
Message
MAC
Message
 
Alice Transmits Message & MAC
 
Why is this secure?
How do properties of a hash function help us?
MAC
Step #1:
Alice creates
MAC
Step #2
 
Step #3
Bob computes MAC with
message and K
A-B
 to verify.
K 
A-B
14
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
A
u
t
h
e
n
t
i
c
a
t
i
o
n
You already know how to do this!
 
(hint: think about how we showed integrity)
H
a
s
h
 
F
n
I am Bob
A43FF234
Alice receives the hash, computes a hash with K
A-B
 , and she knows the sender
is Bob
w
h
o
o
p
s
!
K 
A-B
15
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
A
u
t
h
e
n
t
i
c
a
t
i
o
n
 
What if Mallory overhears the hash sent by Bob, and
then 
replays
 it later?
ISP A
ISP D
ISP C
ISP B
Hello, I
m
Bob. Here
s
the hash to
prove
 it
A43FF234
16
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
A
u
t
h
e
n
t
i
c
a
t
i
o
n
A 
Nonce
A random bitstring used only once. Alice sends nonce to Bob as a
challenge
.  Bob Replies with 
fresh
 MAC result.
H
a
s
h
 
Nonce
B4FE64
Bob
K 
A-B
Nonce
B4FE64
Alice
Performs same
hash with K
A-B
and compares
results
17
S
y
m
m
e
t
r
i
c
 
K
e
y
:
 
A
u
t
h
e
n
t
i
c
a
t
i
o
n
A 
Nonce
A random bitstring used only once. Alice sends nonce to
Bob as a 
challenge
.  Bob Replies with 
fresh
 MAC
result.
Nonce
Alice
 
?!?!
 
If Alice sends Mallory a nonce,
she cannot compute the
corresponding MAC without K 
A-B
Mallory
18
S
y
m
m
e
t
r
i
c
 
K
e
y
 
C
r
y
p
t
o
 
R
e
v
i
e
w
Confidentiality:  Stream & Block Ciphers
Integrity:  HMAC
Authentication: HMAC and Nonce
Q
u
e
s
t
i
o
n
s
?
?
 
A
r
e
 
w
e
 
d
o
n
e
?
 
 
N
o
t
 
R
e
a
l
l
y
:
1)
N
u
m
b
e
r
 
o
f
 
k
e
y
s
 
s
c
a
l
e
s
 
a
s
 
O
(
n
2
)
2)
H
o
w
 
t
o
 
s
e
c
u
r
e
l
y
 
s
h
a
r
e
 
k
e
y
s
 
i
n
 
t
h
e
 
f
i
r
s
t
 
p
l
a
c
e
?
19
A
s
y
m
m
e
t
r
i
c
 
K
e
y
 
C
r
y
p
t
o
:
Instead of shared keys, each person has a
key pair
Bob
s 
public
 key
 
Bob
s 
private
key
K
B
 
K
B
-1 
The keys are inverses, so:
K
B
-1
 
(
K
B 
(m)
) = m
20
A
s
y
m
m
e
t
r
i
c
 
K
e
y
 
C
r
y
p
t
o
:
It is believed to be computationally unfeasible
to derive K
B
-1
 from K
B
 or to find any way to get
M from K
B
(M) other than using K
B
-1
 .  
=> K
B 
can safely be made public.
 
Note: We will not explain the computation that K
B
(m) entails, but rather
treat these functions as black boxes with the desired properties.
21
A
s
y
m
m
e
t
r
i
c
 
K
e
y
:
 
C
o
n
f
i
d
e
n
t
i
a
l
i
t
y
ciphertext
encryption
algorithm
decryption 
algorithm
Bob
s 
public
key
plaintext
message
K
B
  (m)
 
 
Bob
s 
private
key
m = K
B
-1
 
(
K
B 
(m)
)
K
B
 
K
B
-1 
22
A
s
y
m
m
e
t
r
i
c
 
K
e
y
:
 
S
i
g
n
 
&
 
V
e
r
i
f
y
The message must be from Bob, because it must be
the case that S = K
B
-1
(M), and only Bob has K
B
-1 
!
If we are given a message M, and a value S
such that K
B
(S) = M, what can we conclude?
This gives us two primitives:
Sign (M) = K
B
-1
(M) = Signature S
Verify  (S, M) = test( K
B
(S) == M )
23
A
s
y
m
m
e
t
r
i
c
 
K
e
y
 
R
e
v
i
e
w
:
Confidentiality:
 Encrypt with Public Key of
Receiver
Integrity:
 Sign message with private key of
the sender
Authentication:
 Entity being authenticated
signs a nonce with private key, signature is
then verified with the public key
But, these operations are computationally
expensive*
24
B
i
o
m
e
t
r
i
c
s
Nice in some respects
No need to distribute
Reducible to digital form
Unique in practice
Hard to duplicate?
Used via binary representation
Warm gelatin fingers or slip-on finger-pads molded to prints?
Artificial eyeballs made to match scans?
Pictures? Videos w/blinking?
Change over time?
Injury?
Aging?
  
N
o
t
 
r
e
p
l
a
c
e
a
b
l
e
 
o
r
 
r
e
v
o
c
a
b
l
e
What happens when “stolen?”
Are you “Deleted”?!?!?
(Well, you do have 10 fingers, two retinas, one nose, etc)
25
M
u
l
t
i
-
F
a
c
t
o
r
,
 
H
u
m
a
n
 
F
a
c
t
o
r
s
Best systems use more than one factor
Something you know
Something piece of you
Biometrics + Password/Q&A Challenge, Etc
More natural factors better than fewer unnatural
challenges
More weak factors may be stronger than fewer stronger
factors
Human factors are critical
Too many password restrictions? Too many passwords?
Write them down on Post-Its Notes!
26
S
u
m
m
a
r
y
 
Symmetric (pre-shared key, fast) and asymmetric
(key pairs, slow) primitives provide:
Confidentiality
Integrity
Authentication
Hybrid Encryption
 leverages strengths of both.
Great complexity exists in securely acquiring keys.
Crypto is hard to get right, so use tools from others,
don
t design your own (e.g. TLS).
 
Slide Note
Embed
Share

Delve into the realm of cryptography with a comprehensive overview of techniques and protocols for ensuring secure communication channels. Explore the concepts of authentication, confidentiality, integrity, and availability. Uncover the tools and methodologies used in building cryptographic schemes and the distinction between symmetric and asymmetric cryptography. Understand the importance of cryptographic security in today's digital landscape.

  • Cryptography
  • Security
  • Cryptographic Techniques
  • Authentication
  • Confidentiality

Uploaded on Feb 20, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Security: An Overview of Cryptographic Techniques 14-736 With slides from: Debabrata Dash, Nick Feamster, Gregory Kesden, Vyas Sekar and others

  2. Cryptography, Cryptographic Protocols and Key Distribution Authentication Mutual Authentication Private/Symmetric Keys Public Keys Key Distribution 2

  3. What do we need for a secure communication channel? Authentication (Who am I talking to?) Confidentiality (Is my data hidden?) Integrity (Has my data been modified?) Availability (Can I reach the destination?) 3

  4. What is cryptography? "cryptography is about communication in the presence of adversaries." - Ron Rivest cryptography is using math and other crazy tricks to approximate magic - Unknown TA 4

  5. What is cryptography? Tools to help us build secure communication channels that provide: 1) Authentication 2) Integrity 3) Confidentiality 5

  6. Cryptography As a Tool Using cryptography securely is not simple Designing cryptographic schemes correctly is near impossible. Today we want to give you an idea of what can be done with cryptography. Take a security course if you think you may use it in the future 6

  7. The Great Divide Symmetric Crypto (Private key) (E.g., AES) Asymmetric Crypto (Public key) (E.g., RSA) Shared secret between parties? Yes No Speed of crypto operations Fast Slow 7

  8. Symmetric Key: Confidentiality Motivating Example: You and a friend share a key K of L random bits, and want to secretly share message M also L bits long. Scheme: You send her the xor(M,K) and then she decrypts using xor(M,K) again. 1) Do you get the right message to your friend? 2) Can an adversary recover the message M? 3) Can adversary recover the key K? 8

  9. Symmetric Key: Confidentiality One-time Pad (OTP) is secure but usually impactical Key is as long at the message Keys cannot be reused (why?) In practice, two types of ciphers are used that require constant length keys: Block Ciphers: Stream Ciphers: Ex: DES, AES, Blowfish Ex: RC4, A5 9

  10. Symmetric Key: Confidentiality Stream Ciphers (ex: RC4) Pseudo-Random stream of L bits XOR Alic e: PRNG K A-B Message of Length L bits = Encrypted Ciphertext Bob uses KA-B as PRNG seed, and XORs encrypted text to get the message back (just like OTP). 10

  11. Symmetric Key: Confidentiality Block Ciphers (ex: AES) (fixed block size, e.g. 128 bits) Block 1 Block 2 Block 3 Block 4 Round #1 Round #2 Round #n Alice: K A-B Block 1 Block 2 Block 3 Block 4 Bob breaks the ciphertext into blocks, feeds it through decryption engine using KA-B to recover the message. 11

  12. Cryptographic Hash Functions Consistent hash(X) always yields same result One-way given Y, can t find X s.t. hash(X) = Y Collision resistant given hash(W) = Z, can t find X such that hash(X) = Z Fixed Size Hash Message of arbitrary length Hash Fn 12

  13. Symmetric Key: Integrity Hash Message Authentication Code (HMAC) Step #1: Message Alice creates MAC Hash Fn MAC K A-B Alice Transmits Message & MAC Step #2 Step #3 Bob computes MAC with message and KA-B to verify. MAC Message Why is this secure? How do properties of a hash function help us? 13

  14. Symmetric Key: Authentication You already know how to do this! (hint: think about how we showed integrity) I am Bob Hash Fn A43FF234 K A-B whoops! Alice receives the hash, computes a hash with KA-B , and she knows the sender is Bob 14

  15. Symmetric Key: Authentication What if Mallory overhears the hash sent by Bob, and then replays it later? ISP D ISP B ISP C ISP A Hello, I m Bob. Here s the hash to prove it A43FF234 15

  16. Symmetric Key: Authentication A Nonce A random bitstring used only once. Alice sends nonce to Bob as a challenge . Bob Replies with fresh MAC result. Nonce Bob Alice Nonce Hash B4FE64 K A-B B4FE64 Performs same hash with KA-B and compares results 16

  17. Symmetric Key: Authentication A Nonce A random bitstring used only once. Alice sends nonce to Bob as a challenge . Bob Replies with fresh MAC result. ?!?! Nonce Alice Mallory If Alice sends Mallory a nonce, she cannot compute the corresponding MAC without K A-B 17

  18. Symmetric Key Crypto Review Confidentiality: Stream & Block Ciphers Integrity: HMAC Authentication: HMAC and Nonce Questions?? Are we done? Not Really: 1) Number of keys scales as O(n2) 2) How to securely share keys in the first place? 18

  19. Asymmetric Key Crypto: Instead of shared keys, each person has a key pair KB Bob s public key KB-1 Bob s private key The keys are inverses, so: KB-1(KB (m)) = m 19

  20. Asymmetric Key Crypto: It is believed to be computationally unfeasible to derive KB-1 from KB or to find any way to get M from KB(M) other than using KB-1 . => KB can safely be made public. Note: We will not explain the computation that KB(m) entails, but rather treat these functions as black boxes with the desired properties. 20

  21. Asymmetric Key: Confidentiality Bob s public key KB Bob s private key KB-1 encryption algorithm decryption algorithm plaintext message ciphertext KB (m) m = KB-1(KB (m)) 21

  22. Asymmetric Key: Sign & Verify If we are given a message M, and a value S such that KB(S) = M, what can we conclude? The message must be from Bob, because it must be the case that S = KB-1(M), and only Bob has KB-1 ! This gives us two primitives: Sign (M) = KB-1(M) = Signature S Verify (S, M) = test( KB(S) == M ) 22

  23. Asymmetric Key Review: Confidentiality: Encrypt with Public Key of Receiver Integrity: Sign message with private key of the sender Authentication: Entity being authenticated signs a nonce with private key, signature is then verified with the public key But, these operations are computationally expensive* 23

  24. Biometrics Nice in some respects No need to distribute Reducible to digital form Unique in practice Hard to duplicate? Used via binary representation Warm gelatin fingers or slip-on finger-pads molded to prints? Artificial eyeballs made to match scans? Pictures? Videos w/blinking? Change over time? Injury? Aging? Not replaceable or revocable What happens when stolen? Are you Deleted ?!?!? (Well, you do have 10 fingers, two retinas, one nose, etc) 24

  25. Multi-Factor, Human Factors Best systems use more than one factor Something you know Something piece of you Biometrics + Password/Q&A Challenge, Etc More natural factors better than fewer unnatural challenges More weak factors may be stronger than fewer stronger factors Human factors are critical Too many password restrictions? Too many passwords? Write them down on Post-Its Notes! 25

  26. Summary Symmetric (pre-shared key, fast) and asymmetric (key pairs, slow) primitives provide: Confidentiality Integrity Authentication Hybrid Encryption leverages strengths of both. Great complexity exists in securely acquiring keys. Crypto is hard to get right, so use tools from others, don t design your own (e.g. TLS). 26

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#