Beruflich Dokumente
Kultur Dokumente
Brian E. Brzezicki
Cryptography (665)
2
Basic Idea
3
Cryptography (665)
4
Cryptography (665)
5
Cryptographic Terminology
6
Cryptographic Terminology (671)
7
Cryptographic Terminology (671)
example:
Assume a key can be 4 digits long and consist of 0-9
Key space is all combinations from 0000 – 9999
Key space = 10,000
9
Cryptosystem Definitions (672)
10
Cryptosystem Development Concepts
(674)
Assume the attacker knows your
encryption/decryption algorithm.
Algorithms should be open to review.
The only thing that should be secret in a
cryptosystem is the “key” (Kerckhoffs
Principal)
11
Key Generation and
Management
Key Generation and Management (674)
13
Key Generation and Management
The larger the key space is, the more secure a
cryptosystem is, this is called “Key Complexity”
Keys should be extremely random and use the full
spectrum of the key space
Example:
Assume your key can be 10 digits
Is 0000000001 a good key?
(more)
14
Key Generation and Management
15
Cryptography History
Cryptography History (667)
17
ROT 13
18
ROT 13
Go to http://www.rot13.com to try
Transposition Cipher
20
Scytale (667)
21
Vigenere Cipher (669)
23
Symmetric Encryption
Symmetric Encryption (686)
25
Symmetric Encryption (686)
26
Key Management (687)
5 = (5*4)/2 = 10 keys
10 = (10*9)/2 = 45 keys
100 = (100*99)/2 = 4950 keys
1000 = (1000*999)/2 = 499500 keys
27
Encryption Modes
Encryption Modes – Block (692)
29
Block (692)
Block (692)
31
Block Encryption (692)
32
Block encryption problem
33
Block Encryption Problems (695)
34
Cipher Block Chaining (706)
Replaces IV
IV
35
Counter Mode (709)
36
Counter Mode (709)
37
Stream Encryption
XOR (n/b)
41
Stream Encryption
Plain Text Bit Keystream Bit Output Bit
0 1
1 1
1 0
0 XOR 1 = 1
Cipher text = 0 1
42
Stream Encryption
Plain Text Bit Keystream Bit Output Bit
0 1
1 1
1 XOR 0 = 1
Cipher text = 0 1 1
43
Stream Encryption
Plain Text Bit Keystream Bit Output Bit
0 1
1 XOR 1 = 0
Cipher text = 0 1 1 0
44
Stream Encryption
Plain Text Bit Keystream Bit Output Bit
0 XOR 1 = 1
Cipher text = 0 1 1 0 1
45
Stream Cipher considerations
46
Cipher Feedback Mode (707)
47
One Time Pad (677)
A perfect cryptosystem that works as follows.
1. each party has a book (pad) of symmetric keys, each
key is as at least as long as the message to be
encrypted.
2. A message is encrypted with the first key, then that
key is discarded.
3. The message is decrypted on the other side with the
first key, then that key is also discarded.
4. After each time a message is encrypted/decrypted
the key is destroyed and never used again.
48
One Time Pad considerations
49
One Time Pad (677)
50
Symmetric Algorithms
Symmetric Algorithms – DES (703)
53
AES (711)
Block cipher
Block size 32, 64, 128
Key Size up to 2048 bits
Rounds up to 255, minimum of 12
recommended
55
RC6 (712)
56
RC4 (712)
57
Blowfish (712)
Block cipher
64 bit blocks
Key size 1 - 448 bits
16 rounds of substitution and transposition
Created by Bruce Schneier for anyone to use
freely
"Blowfish is unpatented, and will remain so in all
countries. The algorithm is hereby placed in the
public domain, and can be freely used by anyone."
58
IDEA (711)
59
Symmetric Review
60
Symmetric Pros
Encryption is fast
61
Symmetric Cons (688)
62
Symmetric (688)
63
Asymmetric Encryption
Asymmetric Encryption (688)
Use 2 keys, public key to encrypt a message, private
key can decrypt
!=
65
Asymmetric Encryption (688)
69
Asymmetric Algorithms – RSA (716)
70
Asymmetric Algorithms – DSA
71
El-Gamal (719)
72
Elliptic Curve Cryptosystem (719)
75
Hashing (721)
76
Hash
78
Hashes (721)
79
Hash algorithms – SHA (727)
Secure Hash Algorithm
Designed/Published by NIST
Designed for use in the DSS
Modeled after MD4
SHA-0 (retired)
SHA-1 (SHA-160) – 160 bit digest
512 bit blocks
SHA-256 – 256 bit digest
512 bit blocks
SHA-384 – 384 bit digest
1024 bit blocks
SHA-512 – 512 bit digest
1024 bit blocks
80
MD2 (727)
81
MD4 (727)
82
MD5 (727)
83
Attacks against Hashes (729)
84
Hash overview
85
Hash Overview
86
HMAC (722)
87
HMAC (722)
88
HMAC (722)
89
Validating a Messages
Integrity
CBC-MAC (724)
91
Non-Repudiation (675)
92
Non-Repudiation (675)
93
Digital Signatures
No!!!
94
Digital Signatures (730)
95
Digital Signing (730)
96
Digital Signature
97
Digital Signing (730)
98
Digital Signing
99
Services Cryptosystems Provide
100
Attacks Against Cryptology
Cipher Text Only Attacks (761)
102
Known-Plaintext Attack (761)
103
Chosen-Plaintext Attack (761)
104
Chosen Cipher text Attack (762)
105
Non-Encryption Ciphers
Steganography
107
Stenography
108
Stenography
109
Steganography
110
Steganography (680)
111
Other Non-Encryption Ciphers (679)
112
PKI
Public Key Infrastructure (733)
114
Public Key Infrastructure (733)
115
Using Asymmetric Encryption for Key
Exchange
116
Public Key Infrastructure (733)
But…
117
118
119
Public Key Infrastructure
120
PKI to the rescue!
121
PKI
123
PKI components (729)
124
PKI steps ()
125
PKI steps (739)
126
Lets look at a digital Certificate
together
Firefox – https://www.redhat.com
Click on the yellow lock at the bottom
In the pop-up click on “view certificate”
What version is it?
What’s the “Common Name”
Who is the Issuing Certificate Authority
When does the Certificate Expire
Why would a certificate expire?
(more)
127
Lets look at a digital Certificate
together
128
PKI hierarchy
130
CA concerns
132
Certificate Renewals
133
Certificate Revocation
134
Certificate Revocation
135
Certificate Revocation (736)
136
OCSP (737)
138
Key Recovery
139
Key Escrow
140
PKI concerns
142
PKI concerns
143
Extended Validation Digital
Certificates
144
Email Security
Internet
No Authentication
No Encryption
Forged email
Compromise of confidential information sent over
email
148
Forged Email
149
Forged Email
150
Signing Email
151
Email Encryption
152
Email Security (745)
S/MIME
PEM
MSP
PGP
153
PEM (746)
154
S/MIME
155
S/MIME (745)
157
PGP (747)
Used to use a web of trust model, but now can tie into
an organizations PKI.
Originally used IDEA heavily but can use many
encryption algorithms.
Originally used MD5 hash for integrity newer versions
use SHA series and other hash algorithms.
158
PGP signed message example
159
PGP encrypted and signed
160
Other Email Terms
161
Chapter Review
162
Chapter Review
Q. What is AES meant to replace, what is the algorithm
that was chosen to be AES?