180 likes | 283 Views
Internet Security 1 (IntSec1). 3 Symmetric Key Cryptography. Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications (ITA). Secure Network Protocols. Confidentiality. Data Integrity. Authentication. Non-Repudiation. Digital Signatures. Encryption. MACs MICs.
E N D
Internet Security 1 (IntSec1) 3 Symmetric Key Cryptography Prof. Dr. Andreas SteffenInstitute for Internet Technologies and Applications (ITA)
Secure Network Protocols Confidentiality DataIntegrity Authentication Non-Repudiation Digital Signatures Encryption MACsMICs ChallengeResponse SmartCards IVs Symmetric KeyCryptography MessageDigests Nonces Secret Keys Public KeyCryptography BlockCiphers StreamCiphers HashFunctions PseudoRandom RandomSources EllipticCurves DHRSA Cryptographical Building Blocks
Encryption EK(P) = C Decryption DK(C) = P P C P plaintext ciphertext plaintext open channel keyK keyK distribution of secret-key over secure channel Shannon‘s Model of a Secrecy SystemSymmetric or Secret Key Cryptosystems • Same key used for encryption and decryption • Key must be kept absolutely secret • Same key can be used for several messages, but should be changed periodically secure key distribution problem!
Internet Security 1 (IntSec1) 3.1 Block Ciphers
n bits n bits n bits plaintext blocks Block Cipher Key k bits ciphertext blocks n bits n bits Symmetric Key CryptosystemsBlock Ciphers Common Block Sizes:n = 64, 128, 256 bits Common Key Sizes:k =40, 56,64, 80, 128, 168, 192, 256 bits
Deep Crack – 56 bit DES-Key cracked in 22 hours 24 boards with 64 chips each 90 billion keys per second designed by Paul Kocher financed by John Gilmore • 72,057,594,037,927,936 possible keys (256) • Total cost < 250'000 $US in 1998 • Project sponsored by the Electronic Frontier Foundation (EFF) • Proof that the NSA was able to crack DES from the very beginning
Security of Symmetric Keys follows Moore's Law • Assumed effort: 40 million dollardays = 40M x 1 day = 100k x 400 days • Moore’s Law: 2 bits every 3 years • 56 bits in 1982 • 64 bits in 1994 • 72 bits in 2006 • 76 bits in 2012 • 80 bits in 2018 • 88 bits in 2030 • 96 bits in 2042 • 104 bits in 2054 • 112 bits in 2066 • 120 bits in 2078 • 128 bits in 2090 www.keylength.com Source: ArjenK. Lenstra, “Key Lengths", in Handbook of Information Security, June 2004
Sender Receiver P1 E C1 C1 D P1 P2 E C2 C2 D P2 P3 E C3 C3 D P3 Block Cipher Modes IElectronic Code Book Mode (ECB)
IV IV Sender Receiver P1 E C1 C1 D P1 P2 E C2 C2 D P2 P3 E C3 C3 D P3 Block Cipher Modes IICipher Block Chaining Mode (CBC)
Name of Algorithm Block Size Key Size DES (Data Encryption Standard, IBM)1 64 56 3DES (Triple DES) 64 168 Some Popular Block Ciphers IDEA (Lai / Massey, ETH Zürich) 64 128 Blowfish (Bruce Schneier) 64 128 ... 448 AES (Advanced Encryption Standard) 2 128 128 ... 256 Camellia (Mitsubishi/NTT, Japan) 128 128 ... 256 1U.S. FIPS PUB 46-3, withdrawn in 2005 2U.S. FIPS PUB 197, published in 2001
P C DES EK1 DES DK2 DES EK3 64 bits 64 bits Key K1 Key K2 Key K3 56 bits 56 bits 56 bits 168 bits Triple–DES (3DES) • Cipher-Block-Chaining based encryption: DES-EDE3-CBC • True cryptographic strength of 3DES key is 2x56 bits = 112 bits
Advanced Encryption Standard (AES) • Evaluation of an Advanced Encryption Standard • The National Institute of Standards and Technology (NIST) starteda publiccontestfor AES in 1997 andin October 2000 selectedRijndaelinventedbyVincent RijmenandJoan DaemenfromK.U. Leuven in Belgium. • On Nov. 26 2001, AES was officiallypublishedasthe U.S. Federal Information Processing Standard FIPS PUBS 197. • Requirementsfor AES • AES shallbepubliclydefined. • AES shallbe a symmetric block cipher. • AES shallbeimplementable in bothhardwareandsoftware. • AES shallhave a block sizeof n = 128 bits • AES shallhave flexible keysizesof k = 128, 192, and 256 bits.
s0,0 out0 in0 s0,1 in4 out4 s0,2 in8 out8 in12 out12 s0,3 s1,0 out1 in1 in5 out5 s1,1 s1,2 out9 in9 s1,3 in13 out13 s2,0 out2 in2 in6 out6 s2,1 s2,2 in10 out10 out14 s2,3 in14 in3 out3 s3,0 in7 s3,1 out7 in11 s3,2 out11 out15 in15 s3,3 b7 b6 b5 b4 b3 b2 b1 b0 AES Algorithm 16 input bytes state array 16 output bytes • In eachroundthestatearrayisprocessedusingthefunctionsSubBytes(), ShiftRows(), MixColumns(), andAddRoundKey() • AES-128 (10 rounds), AES-192 (12 rounds), AES-256 (14 rounds) b7x7 + b6x6+ b5x5 + b4x4 + b3x3 + b2x2 + b1x+b0
Internet Security 1 (IntSec1) 3.2 Stream Ciphers
Key Pseudo-Random Sequence Generator Plaintext Bitstream Ciphertext Bitstream Plaintext Stream 1 1 1 1 1 1 1 1 0 0 0 0 0 0 … Pseudo-Random Stream 1 0 0 1 1 0 1 0 1 1 0 1 0 0 … Ciphertext Stream 0 1 1 0 0 1 0 1 1 1 0 1 0 0 … Symmetric Key CryptosystemsStream Ciphers
Key Load Key 0 1 0 1 1 R0 R1 R2 Rn-2 Rn-1 Stream CiphersLinear Feedback Shift Registers (LFSRs) • Maximum possible sequence length is 2n - 1 with n registers • LFSRs are often used as building blocks for stream ciphers • GSM A5 is a cipher with 3 LFSRs of lengths 19, 22, and 23
IV IV Sender Receiver P1 E S1 C1 C1 S1 E P2 P1 E S2 C2 C2 S2 E P3 P2 E S3 C2 C3 S3 E P3 Block Cipher Modes IIIOutput Feedback Mode (OFB)
P1 Sender Receiver IV IV E S1 S1 E C1 C1 P2 IV+1 IV+1 P1 E S2 S2 E C2 C2 P3 IV+2 IV+2 P2 E S3 S3 E C2 C3 P3 Block Cipher Modes IVCounter Mode (CTR)