Public Key Infrastructure – tell me in plain English AND THEN deep technical how PKI works Steve Lamb

Slides:



Advertisements
Similar presentations
Public Key Infrastructure – tell me in plain English AND THEN deep technical how PKI works Steve Lamb
Advertisements

Public Key Infrastructure A Quick Look Inside PKI Technology Investigation Center 3/27/2002.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
NSRC Workshop Some fundamental security concerns... Confidentiality - could someone else read my data? Integrity - has my data been changed? Authentication.
A-to-Z of Public Key Infrastructure (PKI)
SEC390 A-to-Z of Public Key Infrastructure (PKI) Rafal Lukawiecki Strategic Consultant Project.
Objectives Get a non-product-specific perspective onto security in IT Demystify the commonly used terminology – know your RC2 from AES Bring together various.
Mostly borrowed & updated from Steve Lamb in Microsoft Land….
An understanding of PKI and some deployment hints BY Charles Anakweze CIS532 PKI = Public Key Infrastructure.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Chapter 5 Cryptography Protecting principals communication in systems.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
November 1, 2006Sarah Wahl / Graduate Student UCCS1 Public Key Infrastructure By Sarah Wahl.
Cryptographic Technologies
Presented by Xiaoping Yu Cryptography and PKI Cosc 513 Operating System Presentation Presented to Dr. Mort Anvari.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Public Key Infrastructure – Deep Dive PKI session SHOWING you how to embrace PKI Steve Lamb
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Introduction to Public Key Infrastructure (PKI) Office of Information Security The University of Texas at Brownsville & Texas Southmost College.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Cryptography and Network Security Chapter 15 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and PKI for Passive Security Rafal Lukawiecki Strategic Consultant, Project Botticelli Ltd
TrustPort Public Key Infrastructure. Keep It Secure Table of contents  Security of electronic communications  Using asymmetric cryptography.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
Introduction to Public Key Cryptography
Cryptography 101 Frank Hecker
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
By Sean Fisk.  Not a new technology  Inherently insecure  In recent years, increased popularity.
Public Key Cryptography July Topics  Symmetric and Asymmetric Cryptography  Public Key Cryptography  Digital Signatures  Digital Certificates.
1 Cryptography Cryptography is a collection of mathematical techniques to ensure confidentiality of information Cryptography is a collection of mathematical.
DNSSEC Cryptography Review Track 2 Workshop July 3, 2010 American Samoa Hervey Allen.
1 Cryptography Basics. 2 Cryptography Basic terminologies Symmetric key encryption Asymmetric key encryption Public Key Infrastructure Digital Certificates.
©Copyrights 2011 Eom, Hyeonsang All Rights Reserved Distributed Information Processing 20 th Lecture Eom, Hyeonsang ( 엄현상 ) Department of Computer Science.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Encryption in Detail: The Inner Workings Murat Lostar NOSPAM com) Information Security Consultant.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
每时每刻 可信安全 1The DES algorithm is an example of what type of cryptography? A Secret Key B Two-key C Asymmetric Key D Public Key A.
CHAPTER 6 Cryptography. An Overview It is origin from the Greek word kruptos which means hidden. The objective is to hide information so that only the.
Cryptography, Authentication and Digital Signatures
Networks Management and Security Lecture 3.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
ITIS 1210 Introduction to Web-Based Information Systems Chapter 50 Cryptography, Privacy, and Digital Certificates.
Introduction to Public Key Infrastructure January 2004 CSG Meeting Jim Jokl.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS8: File System 8.3. Encrypting File System Security.
Internet-security.ppt-1 ( ) 2000 © Maximilian Riegel Maximilian Riegel Kommunikationsnetz Franken e.V. Internet Security Putting together the.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Symmetric Cryptography, Asymmetric Cryptography, and Digital Signatures.
Public / Private Keys was a big year… DES: Adopted as an encryption standard by the US government. It was an open standard. The NSA calls it “One.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Encryption No. 1  Seattle Pacific University Encryption: Protecting Your Data While in Transit Kevin Bolding Electrical Engineering Seattle Pacific University.
Lecture 2: Introduction to Cryptography
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Security fundamentals Topic 4 Encryption. Agenda Using encryption Cryptography Symmetric encryption Hash functions Public key encryption Applying cryptography.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
BCIS 4630 Fundamentals of IT Security
Security. Security Needs Computers and data are used by the authorized persons Computers and their accessories, data, and information are available to.
CRYPTOGRAPHY Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
Web Applications Security Cryptography 1
Public-key Cryptography
Security through Encryption
Presentation transcript:

Public Key Infrastructure – tell me in plain English AND THEN deep technical how PKI works Steve Lamb IT Pro Security Evangelist Microsoft Ltd

Objectives Demystify commonly used terminology Explain how PKI works Get you playing with PKI in the lab Make some simple recommendations

Agenda Foundational Concept (level 200) PKI and Signatures (level 330) Recommendations (level 310) Reference material Common Algorithms (level 360)

What can PKI enable? Secure – sign and/or encrypt messages Secure browsing – SSL – authentication and encryption Secure code – authenticode Secure wireless – PEAP & EAP-TLS Secure documents – Rights Management Secure networks – segmentation via IPsec Secure files – Encrypted File System(EFS)

Foundational Concepts

Encryption vs. Authentication Encrypted information cannot be automatically trusted You still need authentication Which we can implement using encryption, of course

Assets What we are securing? Data Services (i.e. business etc. applications or their individually accessible parts) This session is not about securing: People (sorry), cables, carpets, typewriters and computers (!?) Some assets are key assets Passwords, private keys etc…

Digital Security as Extension of Physical Security of Key Assets Strong Physical Security of KA Strong Digital Security Good Security Everywhere Weak Physical Security of KA Strong Digital Security Insecure Environment Strong Physical Security of KA Weak Digital Security Insecure Environment

Symmetric Key Cryptography Encryption “The quick brown fox jumps over the lazy dog” “AxCv;5bmEseTfid3) fGsmWe#4^,sdgfMwi %” “The quick brown fox jumps over the lazy dog” Decryption Plain-text input Plain-text output Cipher-text Same key (shared secret)

Symmetric Pros and Cons Strength: Simple and really very fast (order of 1000 to 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

Public Key Cryptography Knowledge of the encryption key doesn’t 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

Public Key Encryption Encryption “The quick brown fox jumps over the lazy dog” “Py75c%bn&*)9|fDe^ mdFg$5knvMd’rkveg Ms” “The quick brown fox jumps over the lazy dog” Decryption Clear-text Input Clear-text Output Cipher-text Different keys Recipient’s public key Recipient’s private key private public

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

Hybrid Encryption (Real World) As above, repeated for other recipients or recovery agents Digital Envelope Other recipient’s or agent’s public key (in certificate) in recovery policy Launch key for nuclear missile“RedHeat”is... Symmetric key encrypted asymmetrically (e.g., RSA) Digital Envelope User’s public key (in certificate) RNG Randomly- Generated symmetric “session” key Symmetric encryption (e.g. DES) *#$fjda^ju539!3t t389E 5e%32\^kd

*#$fjda^ju539!3t 5e%32\^kd Launch key for nuclear missile“RedHeat”is... Launch key for nuclear missile“RedHeat”is... 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 recipient’s private key Digital envelope contains “session” key encrypted using recipient’s public key Recipient’s private key Hybrid Decryption

Breaking It on $10 Million Symme- tric Key ECC Key RSA Key Time to Break MachinesMemory < 5 mins 10000Trivial months 43004GB million years GB E16 years TB From a report by Robert Silverman, RSA Laboratories, 2000

PKI and Signatures

Public Key Distribution Problem We just solved the problem of symmetric key distribution by using public/private keys But… Scott creates a keypair (private/public) and quickly tells the world that the public key he published belongs to Bill People send confidential stuff to Bill Bill does not have the private key to read them… Scott reads Bill’s messages 

Eureka! We need PKI to solve that problem And a few others…

How to Verify a Public Key? Two approaches: 1. Before you use Bill’s public key, call him or meet him and check that you have the right one Fingerprint or hash of the key can be checked on the phone 2. Get someone you already trust to certify that the key really belongs to Bill By checking for a trusted digital signature on the key But there has to be one… And you have to have friends to trust in first place…

Trust Models Web-of-Trust (PGP) Peer-to-peer model Individuals digitally sign each other keys You would implicitly trust keys signed by some of your friends Trusted Authority + Path of Trust (CAs) Everyone trusts the root Certificate Authority (Verisign, Thawte, BT etc.) CA digitally signs keys of anyone having checked their credentials by traditional methods CA may even nominate others to be CAs – and you would trust them automatically, too

Trust Models Issues and Future Web-of-trust is more, erh, trustworthy But it is time-consuming, requires lots of work and general public doesn’t understand it CAs tend to be a little bit like a big brother as we all have to trust them implicitly But it is a simpler model, easier to deploy and manage Combination strategy? Let’s trust a CA that verifies keys by traditional strong methods and peer-to-peer recommendations

Creating a Digital Signature Hash Function (SHA, MD5) Jrf843kjfgf* £$&Hdif*7o HDFHSD(** Py75c%bn&*)9|fDe^b mdFg$5knvMd’rkveg Ms” This is a really long message about Bill’s… Asymmetric Encryption Message or File Digital Signature 128 bits Message Digest Calculate a short message digest from even a long input using a one-way message digest function (hash) Signatory’s private key private

Verifying a Digital Signature Jrf843kjf gf*£$&Hd if*7oUsd FHSD(** Py75c%bn&*) 9|fDe^bDFaq &nmdFg$5kn vMd’rkvegMs” Asymmetric decryption (e.g. RSA) Everyone has access to trusted public key of the signatory Signatory’s public key Digital Signature This is a really long message about Bill’s… Same hash function (e.g. MD5, SHA…) Original Message Py75c%bn&*) 9|fDe^bDFaq &nmdFg$5kn vMd’rkvegMs” ? == ? Are They Same?

Hash (Digest) Functions MD5 and SHA Just a hash value of between 128 bits (MD5) and 512 bits of key (SHA512) Great support in.NET and in CryptoAPI of Windows.NET Fx also supports shorter SHAs (160, 256, and 384 bits) Please don’t use (ever) any function with 64bit (or smaller) result

Message Authentication Codes “MACs” – Typically, combination of a hash function and a symmetric encryption Integrity, authenticity but not non-repudiation Must share the key! HMAC Digest + shared-secret encryption for up to 160 bit results MACTripleDES Encryption using 8, 16 or 24 bytes of TripleDES key on top of a hash 64 bit result (ouch!) All of the above implemented in.NET Fx Many others exist, notably UMAC

Certificates The simplest certificate just contains: Information about the entity that is being certified to own a public key That public key And all of this is Digitally signed by someone trusted (like your friend or a CA)

X.509 Certificate Certificate Authority Digital Signature of All Components Together: Serial Number Issuer X.500 Distinguished Name Validity Period Subject X.500 Distinguished Name Subject Public Key Information Key/Certificate Usage ExtensionsOU=Contoso… The Key or Info About It

Authentication with Certificates 1. Melinda gets Bill’s certificate 2. She verifies its digital signature She can trust that the public key really belongs to Bill But is it Bill standing if front of her, or is that Scott? 3. Melinda challenges Bill to encrypt for her a phrase etc. she just made up (“I really need more shoes”) 4. Bill has, of course, the private key that matches the certificate, so he responds (“*&$^%£$&£fhsdf*&EHFDhd62^&£”) 5. Melinda decrypts this with the public key she has in the certificate (which she trusts) and if it matches the phrase she challenged Bill with then it must really be Bill himself! 5. Melinda decrypts this with the public key she has in the certificate (which she trusts) and if it matches the phrase she challenged Bill with then it must really be Bill himself! By the way, that’s the basic concept of how SSL works

What’s in the Store? Most certificates are “safe” No need to protect them too much, as they are digitally signed and only contain publicly available information Store anywhere, a file or a “dumb” memory-only smartcard Private keys (and certs that include them) that match the public key are extremely vulnerable It is a Key Asset You must protect them well Store in “Protected Storage” on your OS or a “smart” smartcard that will have crypto functionality on board Axalto’s.NET-enabled smart cards for instance

Word About Smartcards Some smartcards are “dumb”, i.e. they are only a memory chip Not recommended for storing a private key used in a challenge test (verifying identity) Anyway, they are still better than leaving keys on a floppy disk or on the hard drive Cryptographically-enabled smartcards are more expensive but they give much more security Private key is secure and used as needed Additional protection (password, biometrics) is possible Hardware implements some algorithms Self-destruct is possible

Certification Hierarchy Most organisations do not use just one root key for signing certificates Dangerous, if that one key is compromised Does not scale to large organisations Difficulty in managing responsibility Certificate Hierarchies Start with CA root cert Create more levels in your organisation (for departments etc.) Validating a cert possibly involves validating a path of trust Cross-certification is also possible This is the heart of “Planning of PKI”

Certificate Validation Essentially, this is just checking the digital signature But You may have to “walk the path” of all subordinate authorities until you reach the root Unless you explicitly trust a subordinate CA I: PB CA S: Rafal I: Xanadu Root S: PB CA I: Xanadu Root S: Xanadu Root Check DS of OCG CA Check DS of Xanadu “In Xanadu We Trust” (installed root CA certificate)

Recommendations Don’t be scared of PKI! Set up a test environment to enable hyou to “play” Minimise the scope of your first implementation Read up on CP & CPS Document the purpose and operating procedures of your PKI

Summary Cryptography is a rich and amazingly mature field We all rely on it, everyday, with our lives Know the basics and make good choices avoiding common pitfalls Plan your PKI early Avoid very new and unknown solutions

References Visit Read sci.crypt (incl. archives) Attend SEC499 for “Encryption in Detail” on Friday at in Room 1 For more detail, read: Cryptography: An Introduction, N. Smart, McGraw-Hill, ISBN Practical Cryptography, N. Ferguson & B. Schneier, Wiley, ISBN Contemporary Cryptography, R. Oppliger, Artech House, ISBN (to be published May 2005, see Applied Cryptography, B. Schneier, John Wiley & Sons, ISBN Handbook of Applied Cryptography, A.J. Menezes, CRC Press, ISBN , (free PDF) PKI, A. Nash et al., RSA Press, ISBN Foundations of Cryptography, O. Goldereich, Cryptography in C and C++, M. Welschenbach, Apress, ISBN X (includes code samples CD)

Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide /newsgroups/en-us/default.aspx /newsgroups/en-us/default.aspx User Groups - Meet and learn with your peers default.mspx default.mspx

Demonstrations Secure – sign and/or encrypt messages Secure browsing – SSL – auth and encryption Secure code – authenticode - sigcheck Secure wireless – PEAP & EAP-TLS Secure documents – Rights Management Secure networks – segmentation via IPsec Secure files – Encrypted File System(EFS)

Copyright 2004 © Project Botticelli Ltd & Microsoft Corp. 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. Thanks to Rafal Lukawiecki for providing some of the content for this presentation deck – his contact details are as follows… Strategic Consultant, Project Botticelli Ltd

Common Algorithms

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 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. Schneier’s replacement for DES, followed by Twofish, one of the NIST competition finalists

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 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

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 Union’s “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…

Careful with Streams! Do NOT use a block cipher in a loop Use a crypto-correct technique for treating streams of data, such as CBC (Cipher Block Chaining) For developers:.NET Framework implements it as ICryptoTransform on a crypto stream with any supported algorithm

RC4 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

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 today’s 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)

Quantum Cryptography Method for generating and passing a secret key or a random stream Not for passing the actual data, but that’s 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: Don’t confuse it with quantum computing, which won’t be with us for at least another 50 years or so, or maybe longer…

MD5, SHA Hash functions – not encryption at all! Goals: Not reversible: can’t obtain the message from its hash Hash much shorter than original Two messages won’t have the same hash MD5 (R. Rivest) 512 bits hashed into 128 Mathematical model still unknown But it resisted major attacks SHA (Secure Hash Algorithm) US standard based on MD5

Diffie-Hellman, “SSL”, Certs Methods for key generation and exchange DH is very 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

Cryptanalysis Brute force Good for guessing passwords, and some 40-bit symmetric keys (in some cases needed only 27 attempts) Frequency analysis For very simple methods only (US mobiles) Linear cryptanalysis For stronger DES-like, needs 243 plain-cipher pairs Differential cryptanalysis Weaker DES-like, needs from 214 pairs Power and timing analysis Fluctuations in response times or power usage by CPU

Strong Systems It is always a mixture! Changes all the time… Symmetric: AES, min. 128 bits for RC2 & RC5, 3DES, IDEA, carefully analysed RC4, 256 bit better Asymmetric: RSA, ElGamal, Diffie-Hellman (for keys) with minimum 1024 bits (go for the maximum, typically 4096, if you can afford it) Hash: Either MD5 or SHA but with at least 128 bit results, 256 better

Weak Systems Anything with 40-bits (including 128 and 56 bit versions with the remainder “fixed”) Most consider DES as fairly weak algorithm CLIPPER A5 (GSM mobile phones outside US) Vigenère (US mobile phones) Dates from 1585! Unverified certs with no trust Weak certs (as in many “class 1” personal certs)