Z Cryptogrphic Algorithms
Z Cryptogrphic Algorithms
Outline
1. Cryptology: concepts and algorithms
symmetric algorithms for confidentiality symmetric algorithms for data authentication public-key cryptology
2. Cryptology: protocols
identification/entity authentication
key establishment
Outline (2)
4. Networking protocols
email, web, IPsec, SSL/TLS
Definitions
data
Confidentiality Integrity Availability
confidentiality authentication
Clear text
CRYP TOB OX
%^C& @&^(
%^C& @&^(
CRYP TOB OX
Clear text
the opponent and her power the Vernam scheme DES and triple-DES AES RC4
Cryptanalysis example:
TIPGK UJQHL VKRIM WLSJN XDTKO YNULP ZOVMQ APWNR BQXOS CRYPT DSZQU ETARV FUBSW RERCP SFSDQ TGTER UHUFS VOVGT WKWHU XKXIV YLYJW ZMXKX ANALY BOBMZ CPCNA DQDOB JZJZJ KAKAK LBLBL MCMCM NDNDN OEOEO PFPFP QGQGQ RHRHR SISIS TJTJT UKUKU VLVLV WLE XMF YNG ZOH API BQJ CRK DSL ETM FUN GVO HWP IXQ GVCTX HWDUY IXEVZ JYFWA KZGXB LAHYC MBIZD NCJAE ODKBF PELCG QFMDH RGNEI SHOFJ EREPC FSFQD GTGRE HUHSF IVITG JWJUH KXKVI LYLWJ MZMXK NANYL OBOZM PCPAN QDQBO WMWMW XNXNX YOYOY ZPZPZ AQAQA BRBRB CSCSC DTDTD EUEUE FVFVF GWGWG HXHXH IYIYI JYR KZS LAT MBU NCV ODW PEX QFY RGZ SHA TIB UJC VKD
8
Plaintext?
k = 17
Transpositions
TRANS ORI S
POSIT
IONS
NOTIT
OSANP
9
Security
there are n! different substitutions on an alphabet with n letters there are n! different transpositions of n letters n=26: n!=403291461126605635584000000 = 4 . 1026 keys trying all possibilities at 1 nanosecond per key requires.... 4.1026 /(109 . 105 . 4 102) = 1010 years
keys per second seconds per day days per year
10
Letter distributions
12 10 8 6 4 2 0 A B C D E F G H
I Y Z
11
Eve will try to find shortcut attacks (faster than brute force)
history shows that designers are too optimistic about the security of their cryptosystems
12
Scope trigger Current waveform acquisition Server store the files and run the Treatment software Main PC run the Acquisition software command emission
GCR R
on IO
Card extention
Card reader
Protection box
15
16
17
Clear text
CRYP TOB OX
%^C& @&^(
%^C& @&^(
Clear text
18
19
20
The answer
Plaintext [=14 January 1961 11.00 h] DOFGD VISWA WVISW JOSEP TERTI OWMIS SIONW BOMBO IRWTE LEXWC EWSUJ ETWAM GEWXX WJULE SWXXW BISEC SECVX XWRWV WMWPR INTEX RIMOW RIENW ENVOY EWRUS XWPOU VEZWR EGLER WXXWS OWREP RENDR EWDUR GENCE WBRAZ ZAWWC
23
RIP
OK
hw/sw implementation
standardization industrial products $$$ take out of service
24
10010
11001
11001
10010
01011
01011
25
Vernam scheme
0+1=1 1+0=1 0+0=0 1+1=0
IV
next state function
output function
looks random
output function
P
28
21
22
29
brute force: 2128 steps [Lu+05] 24 known bits of 224 frames, 238 computations, 233 memory
31
...
033 92 162
i j
33
RC4: weaknesses
often used with 40-bit key
US export restrictions until Q4/2000
best known general shortcut attack: 2300 weak keys and key setup (shuffle theory) some statistical deviations
e.g., 2nd output byte is biased solution: drop first 256 bytes of output
Block cipher
large table: list n-bit ciphertext for each nbit plaintext
if n is large: very secure (codebook) but for an n-bit block: 2n values impractical if n 32
alternative n = 64 or 128
simplify the implementation repeat many simple operations
35
P2
block cipher
P3
block cipher
C1
memoryless
C2
C3
larger data units: 64128 bits repeat simple operation (round) many times
36
39
Clear text
DES
DES-1
DES
%^C& @&^(
3
41
3-key 3DES
AES -128
19 76
19 88
20 00
20 12
20 24
20 36
20 48
20 60
42
A machine that cracks a DES key in 1 second would take 149 trillion years to crack a 128-bit key
43
AES: Rijndael
S S S S S S S S S S S S S S S S round Key Schedule round round
MixColumns MixColumns MixColumns MixColumns S S S S S S S S S S S S S S S S
. . . . .
round
AES Status
FIPS 197 published on November 6, 2001, effective May 26, 2002 mandatory for sensitive US govt. information fast adoption in the market (thousands of products)
Jan. 09 > 976 AES product certifications by NIST standardization: ISO, IETF, IEEE 802.11,
slower adoption in financial sector mid 2003: AES-128 also for classified information and AES-192/-256 for secret and top secret information! Intel will provide AES instruction from 2009
45
46
CBC-MAC HMAC
7E6FD7198A198FB3C
48
MAC algorithms
Clear text
MAC
Clear text
Clear text
VER IFY
Clear text
49
MAC algorithms
Banking: CBC-MAC based on triple-DES Internet: HMAC and CBC-MAC based on AES
AES
C1
security level: 264
AES
C2
AES
C3
AES
select leftmost 64 bits
52
1A3FD4128A198FB3CA345932
53
? h
h(x)
? h
?
h
? h
h
h(x)
= h(x)
2n
=
2n/2
2n
55
60 M$ for 1 year
MD5
56
Public-key cryptology
the problem public-key encryption digital signatures an example: RSA advantages of public-key cryptology
57
Clear text
CRYP TOB OX
%^C& @&^(
%^C& @&^(
CRYP TOB OX
Clear text
Public key
Private key
59
Clear text
SIGN
Clear text
Clear text
VER IFY
Clear text
Private key
Public key
60
x
y
After: Alice and Bob share a short term key k Eve cannot compute k : in several mathematical structures it is hard to derive x from x (this is known as the discrete logarithm problem)
61
RSA (78)
Choose 2 large prime numbers p and q modulus n = p.q compute (n) = lcm(p-1,q-1) choose e relatively prime w.r.t. (n) compute d = e-1 mod (n) The security of RSA is
based on the fact that it is easy to generate two large primes, but that it is hard to factor their product
public key = (e,n) private key = d of (p,q) encryption: c = me mod n decryption: m = cd mod n
Factorisation records
1 digit ~3.3 bits
200 180 160 140 120 100 80 60 40 20 0 64 68 72 76 80 84 88 92 96 100 104 2000
63
15=5x3
grad students in sunny California...
64
66
Java
SunJCA/JCE BouncyCastle (BC) CryptixCrypto FlexiProvider GNU Crypto IAIK RSA JSafe
BouncyCastle (BC#)
Reading material
B. Preneel, Modern cryptology: an introduction.
This text corresponds more or less to the second half of these slides It covers in more detail how block ciphers are used in practice, and explains how DES works. It does not cover identification, key management and application to network security.
68
A.J. Menezes, P.C. van Oorschot, S.A. Vanstone, Handbook of Applied Cryptography, CRC Press, 1997. The bible of modern cryptography. Thorough and
complete reference work not suited as a first text book. Freely available at http://www.cacr.math.uwaterloo.ca/hac
N. Smart, Cryptography, An Introduction: 3rd Ed., 2008. Solid and up to date but on the mathematical side.
Freely available at http://www.cs.bris.ac.uk/~nigel/Crypto_Book/
Widely popular and very accessible make sure you get the errata.
Nagand Doraswamy, Dan Harkins, IPsec - The New Security Standard for the Internet, Intranets, and Virtual Private Networks, Prentice Hall, 1999. A well
written overview of the IPsec protocol (but now outdated).
W. Diffie, S. Landau, Privacy on the line. The politics of wiretapping and encryption, MIT Press, 2007. The best book so far on the intricate politics of the
field.
70
71