An understanding of PKI and some deployment hints BY Charles Anakweze CIS532 PKI = Public Key Infrastructure
2 Objectives Explain the basics of Cryptography and PKI Introduce commonly used terminology Identify aspects of PKI that require careful planning during deployment
3 Agenda Quick Summary on Cryptography Fundamentals of PKI PKI Deployment
4 Agenda Quick Summary on Cryptography Fundamentals of PKI PKI Deployment
5 What Does Cryptography Solve? Confidentiality Ensure that nobody can get knowledge of what you transfer even if listening the whole conversation Integrity Ensure that message has not been modified during the transmission Authenticity You can verify that you are talking to the entity you think you are talking to Identity You can verify who is the specific individual behind that entity Non-repudiation The individual behind that asset cannot deny being associated with it
6 Traditional paper-based solutions Confidentiality Integrity Authenticity Non-repudiation Availability Envelopes Signatures, Watermarks, Barcodes Notaries, strong ID, physical presence Signatures, receipts, confirmations Alternate routes, sites, etc.
7 Electronic Solutions Confidentiality Authenticity Integrity Non-Repudiation Availability Data Encryption Digital Signatures, Certificates, Digital Ids Hash Algorithms, Message Digests, Digital Signatures Digital Signatures, Audit Logs Redundant Systems, Automatic Failover
8 Symmetric Encryption An unders to PKI and some deploy hints AxCvGsmWe#4^, sdgfMwir3:dkJeTs An unders to PKI and some deploy hints Clear-text input Clear-text output Cipher-text Same key (shared secret) EncryptionDecryption DE S
9 Asymmetric Encryption An unders to PKI and some deploy hints Py75c%bn&*)9|f nmdFgegMs An unders to PKI and some deploy hints Clear-text Input Clear-text Output Cipher-text Different keys Encryption Decryption RSA RSA
10 Example: Confidentiality Different keys Recipient’s public key Recipient’s private key private public Encryption Decryption An unders to PKI and some deploy hints Py75c%bn&*)9|f nmdFgegMs An unders to PKI and some deploy hints Clear-text Input Clear-text Output Cipher-text
11 Example: Authenticity Different keys Sender’s public key Sender’s private key private public Encryption Decryption An unders to PKI and some deploy hints Py75c%bn&*)9|f nmdFgegMs An unders to PKI and some deploy hints Clear-text Input Clear-text Output Cipher-text
12 Agenda Quick Summary on Cryptography Fundamentals of PKI PKI Deployment
13 PKI PKI is a group of solutions for key distribution problems and other issues: Key generation Certificate generation, revocation, validation Managing trust
14 Is PKI relevant? Who uses this stuff? Web’s HTTP and other protocols (SSL) VPN (PPTP, IPSec, L2TP…) (S/MIME, PGP, Exchange KMS) Files (PGP, W2K EFS, and many others) Web Services (WS-Security) Bad ID Smartcards (Certificates and private key store) Good ID Smartcards (Certificates and Challenge/Response) Executables (.NET Assemblies, Drivers, Authenticode) Copyright protection (DRM) …
15 Creating a Digital Signature 3kJfgf*£$& Py75c%bn This is the document created by Chizoba Message or File Digital Signature Message Digest Calculate a short message digest from even a long input using a one-way message digest function (hash) Signatory's private key priv GenerateHash SHA, MD5 AsymmetricEncryption RSA This is the document created by Chizoba 3kJfgf*£$& Signed Document (Typically 128 bits)
16 Verifying a Digital Signature RSA This is the document created by Chizoba 3kJfgf*£$& Signed Document Py75c%bn Message Digest GenerateHash Chizoba's public key (from certificate) AsymmetricDecryption pub Digital Signature Py75c%bn ? Compare ?
17 The simplest certificate just contains: A public key Information about the entity that is being certified to own that public key … and the whole is Digitally signed by someone trusted (like your friend or a CA) 2wsR46%frd EWWrswe(* ^$G*^%#%# %DvtrsdFDf d3%.6,7 What is a Certificate ? pub 3kJfgf*£$&4 6*gd7dT Certificate This public key belongs to Chizoba Digital Signature Can be a person, a computer, a device, a file, some code, anything …
18 X.509 Certificate Who is the owner, CN=Chizoba,O=CERN,C=CH The public key or info about it Who is signing, O=CERN,C=CH Serial Number X.500 Subject Extensions X.500 issuer Expiration date Public Key CA Digital Signature Certificate Info See later why expiration date is important Additional arbitrary information … of the issuer, of course
19 Authentication with Certificates Owning a Certificate of Chizoba does not mean that you are Chizoba Owning a Certificate does not imply you are authenticated How would you verify that the person who comes to you pretending to be Chizoba and showing you a certificate of Chizoba is really Chizoba ? You have to challenge him ! Only the real Chizoba has the private key that goes in pair with the public key in the certificate.
20 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 Check DS of Foobar “In Foobar We Trust” (installed root CA certificate) Public key Certificate This public key belongs to Chizoba CERN Digital Signature Issued by: CERN Public key Certificate This public key belongs to CERN Foobar Digital Signature Issued by: Foobar Public key Certificate This public key belongs to Foobar Foobar Digital Signature Issued by: Foobar Check DS of CERN
21 Certificate Revocation (Private) keys get compromised, as a fact of life You or your CA issue a certificate revocation certificate Must be signed by the CA, of course And you do everything you can to let the world know that you issued it This is not easy Certificate Revocation Lists (CRL) are used They require that the process of cert validation actively checks the CRL and keep it up-to-date It is a non scalable process Many people disable this function This explains why Every certificate has an expiration date short expiration policies are important
22 Storing Certificates and Keys Certificates need to be stored so that interested users can obtain them This is not an issue. Certificates are “public” Keys need to be stored for data recovery purposes This weakens the system, but is a necessity This is a function of most certificate servers offer Those servers are also responsible for issuing, revoking, signing etc. of certs But this requires the certificate server to generate the key pairs
23 Example (wrong) Priv pub Certification Server User generates a key pair Certificate is sent to the user Public key is submitted to CA for certification pub DS Cert pub DS Cert
24 Example (Good) Priv pub Certification Server CA generates a key pair Private Key and Certificate are sent to the user pub DS Cert pub DS Cert User request a certificate to CA CA generates certificate Priv This model allows key recovery
25 Agenda Quick Summary on Cryptography Fundamentals of PKI PKI Deployment
26 Current Strength Recommendations Your infrastructure should be ready to strengthen these at any time MinimumRecommended Symmetric Key 96 bits (avoid DES as it can do only 56, instead use AES-Rijndael or RC5) 256 bits (Rijndael, RC5 128bits, not DES) Asymmetric Key 1024 (RSA)4096 (RSA) ECC Key 192 bits256 bits Hash: SHA/MD5 128 bits (not 64 bits)256 bits or more Cert Classes Class 2Class 3 at least
27 Reference: A large fraction of the information in this presentation comes from Microsoft Tech’ed conference More details can be found in the following: PKI, A. Nash et al., RSA Press, ISBN Applied Cryptography, B. Schneier, John Wiley & Sons, ISBN Foundations of Cryptography, O. Goldereich, Handbook of Applied Cryptography, A.J. Menezes, CRC Press, ISBN Cryptography in C and C++, M. Welschenbach, Apress, ISBN X (includes code samples CD) Business Data Communications, William Stallings
28 Questions?
29 Review Questions and allow two communicating parties to disguise information they send to each other. Ans: Encryption and decryption Ensures that nobody can get knowledge of what you transfer even if listening the whole conversation. Ans:Confidentiality Ensures that message has not been modified during the transmission. Ans:Integrity Ensures that y ou can verify that you are talking to the entity you think you are talking to. Ans: Authenticity Ensures that you can verify who is the specific individual behind that entity. Ans: Identity Ensures that the individual behind that asset cannot deny being associated with it Ans: Non-repudiation
30 Thanks