cryptography and pki for passive security rafal lukawiecki strategic consultant, project botticelli...

Download Cryptography and PKI for Passive Security Rafal Lukawiecki Strategic Consultant, Project Botticelli Ltd

Post on 23-Dec-2015




0 download

Embed Size (px)


  • Slide 1
  • Cryptography and PKI for Passive Security Rafal Lukawiecki Strategic Consultant, Project Botticelli Ltd Copyright 2005 Microsoft Corp & Project Botticelli Ltd. E&OE. For informational purposes only. No warranties of any kind are made and you have to verify all information before relying on it. You can re-use this presentation as long as you read, agree, and follow the guidelines described in the Comments field in File/Properties.
  • Slide 2
  • 2Objectives Overview the basis of passive security mechanisms that primarily protect the data layer: cryptography Discuss all currently used algorithms from an IT Professionals perspective Make some simple recommendations Warn against typical misconceptions and weak algorithms
  • Slide 3
  • 3 Session Agenda Foundational Concept Common Algorithms PKI and Signatures Recommendations
  • Slide 4
  • 4 Foundational Concepts
  • Slide 5
  • 5 Defense in Depth Policies, Procedures, & Awareness Physical Security Perimeter Internal Network Host Application Data
  • Slide 6
  • 6 What is Really Secure? Look for systems From well-know parties With published (not secret!) algorithms That generate a lot of interest That have been hacked for a few years That have been analysed mathematically Absolutely do not improve algorithms yourself Unless this is your speciality
  • Slide 7
  • 7 Dont Take Crypto For Granted Classic failures: DVD content encryption GSMWiFi Good example of mis-use of crypto with WEP Followed by a round of fixes, such as Mirosoft 802.1x Finally followed by a more reasonable solution, WPA
  • Slide 8
  • 8 Symmetric Key Cryptography Encryption The quick brown fox jumps over the lazy dog AxCv;5bmEseTfid3) fGsmWe#4^,sdgfMwi r3:dkJeTsY8R\s@!q3 % The quick brown fox jumps over the lazy dog Decryption Plain-text input Plain-text output Cipher-text Same key (shared secret)
  • Slide 9
  • 9 Symmetric Pros and Cons Strength: Simple and really very fast (order of 1000 to 10000 faster than asymmetric mechanisms) Super-fast (and somewhat more secure) if done in hardware (DES, Rijndael) Weakness: Must agree the key beforehand Securely pass the key to the other party
  • Slide 10
  • 10 Public Key Cryptography Knowledge of the encryption key doesnt give you knowledge of the decryption key Receiver of information generates a pair of keys Publish the public key in a directory Then anyone can send him messages that only she can read
  • Slide 11
  • 11 Public Key Encryption Encryption The quick brown fox jumps over the lazy dog Py75c%bn&*)9|fDe^ bDFaq#xzjFr@g5=&n mdFg$5knvMdrkveg Ms The quick brown fox jumps over the lazy dog Decryption Clear-text Input Clear-text Output Cipher-text Different keys Recipients public key Recipients private key private public
  • Slide 12
  • 12 Public Key Pros and Cons Weakness: Extremely slow Susceptible to known ciphertext attack Problem of trusting public key (see later on PKI) Strength Solves problem of passing the key Allows establishment of trust context between parties
  • Slide 13
  • 13 Hybrid Encryption (Real World) As above, repeated for other recipients or recovery agents Digital Envelope Other recipients or agents public key (in certificate) in recovery policy Launch key for nuclear missileRedHeatis... Symmetric key encrypted asymmetrically (e.g., RSA) Digital Envelope Users public key (in certificate) RNG Randomly- Generated symmetric session key Symmetric encryption (e.g. DES) *#$fjda^ju539!3t t389E *&\@ 5e%32\^kd
  • Slide 14
  • 14*#$fjda^ju539!3t 5e%32\^kd Launch key for nuclear missileRedHeatis... Launch key for nuclear missileRedHeatis... Symmetric decryption (e.g. DES) Digital Envelope Asymmetric decryption of session key (e.g. RSA) Symmetric session key Session key must be decrypted using the recipients private key Digital envelope contains session key encrypted using recipients public key Recipients private key Hybrid Decryption
  • Slide 15
  • 15 Common Algorithms
  • Slide 16
  • 16 DES, IDEA, RC2, RC5, Twofish Symmetric DES (Data Encryption Standard) is still the most popular Keys very short: 56 bits Brute-force attack took 3.5 hours on a machine costing US$1m in 1993. Today it is done real-time Triple DES (3DES) more secure, but better options about Just say no, unless value of data is minimal IDEA (International Data Encryption Standard) Deceptively similar to DES, and not from NSA 128 bit keys RC2 & RC5 (by R. Rivest) RC2 is older and RC5 newer (1994) - similar to DES and IDEA Blowfish, Twofish B. Schneiers replacement for DES, followed by Twofish, one of the NIST competition finalists
  • Slide 17
  • 17 Rijndael (AES) Standard replacement for DES for US government, and, probably for all of us as a result Winner of the AES (Advanced Encryption Standard) competition run by NIST (National Institute of Standards and Technology in US) in 1997-2000 Comes from Europe (Belgium) by Joan Daemen and Vincent Rijmen. X-files stories less likely (unlike DES). Symmetric block-cipher (128, 192 or 256 bits) with variable keys (128, 192 or 256 bits, too) Fast and a lot of good properties, such as good immunity from timing and power (electric) analysis Construction, again, deceptively similar to DES (S- boxes, XORs etc.) but really different
  • Slide 18
  • 18 CAST and GOST CAST Canadians Carlisle Adams & Stafford Tavares 64 bit key and 64 bit of data Chose your S-boxes Seems resistant to differential & linear cryptanalysis and only way to break is brute force (but key is a bit short!) GOST Soviet Unions version of DES but with a clearer design and many more repetitions of the process 256 bit key but really 610 bits of secret, so pretty much tank quality Backdoor? Who knows
  • Slide 19
  • 19 Use Cryptosystems Indeed: never use just an algorithm, but an entire cryptosystem For example: If you use DES etc. in a simple loop to encrypt a stream of data you literally lose all security Instead: use a technique designed for adapting an algorithm to a streams of data, such as CBC (Cipher Block Chaining) In turn, this means you have to select and transmit an Initialization Vector (IV) how? Use a well-known cryptosystem for it Microsoft never implement just an algorithm always a complete cryptosystem, e.g. RSA-OAEP etc.
  • Slide 20
  • 20 Dangerous Implementations Cryptographic applications from not-well-known sources Just downloaded libraries used by your in- house developers Insist on using built-in systems where possible: Microsoft OS: CAPI, CAPICOM, MS CSP etc. Smartcards: built-in well-known CSPs Elsewhere: FIPS-compliant implementations
  • Slide 21
  • 21RC4 Symmetric Fast, streaming encryption R. Rivest in 1994 Originally secret, but published on sci.crypt Related to one-time pad, theoretically most secure But! It relies on a really good random number generator And that is the problem Nowadays, we tend to use block ciphers in modes of operation that work for streams
  • Slide 22
  • 22 RSA, DSA, ElGamal, ECC Asymmetric Very slow and computationally expensive need a computer Very secure Rivest, Shamir, Adleman 1978 Popular and well researched Strength in todays inefficiency to factorise into prime numbers Some worries about key generation process in some implementations DSA (Digital Signature Algorithm) NSA/NIST thing Only for digital signing, not for encryption Variant of Schnorr and ElGamal sig algorithm ElGamal Relies on complexity of discrete logarithms ECC (Elliptic Curve Cryptography) Really hard maths and topology Improves RSA (and others)
  • Slide 23
  • 23 Quantum Cryptography Method for generating and passing a secret key or a random stream Not for passing the actual data, but thats irrelevant Polarisation of light (photons) can be detected only in a way that destroys the direction (basis) So if someone other than you observes it, you receive nothing useful and you know you were bugged Perfectly doable over up-to-120km dedicated long fibre-optic link Seems pretty perfect, if a bit tedious and slow Practical implementations still use AES/DES etc. for actual encryption Magiq QPN: Dont confuse it with quantum computing, which wont be with us for at least another 50 years or so, or maybe longer
  • Slide 24
  • 24 MD5, SHA Hash functions part of the digital signature Goals: Not reversible: cant obtain the message from its hash Hash much shorter than original message Two messages wont have the same hash MD5 (R. Rivest) 512 bits hashed into 128 Mathematical model still unknown Recently (July 2004) broken, do not use on its own SHA (Secure Hash Algorithm) US standard based on MD5 SHA-0 broken (July 2004), SHA-1 probably too weak (partly broken), use SHA-256 at least
  • Slide 25
  • 25 Diffie-Hellman, SSL, Certs Methods for key generation and exchange DH is clever since you always generate a new key-pair for each asymmetric session STS, MTI, and certs make it even safer Certs (certificates) are the most common way to exchange public keys Foundation of Public Key Infrastructure (PKI) SSL uses a protocol to exchange keys safely See later
  • Slide 26
  • 26Cryptanalysis Brute force Good for guessing passwords, and some 40-bit symmetric keys (in some ca


View more >