Crypto and PKI
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Crypto and PKI

on

  • 1,004 views

 

Statistics

Views

Total Views
1,004
Views on SlideShare
1,004
Embed Views
0

Actions

Likes
0
Downloads
49
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Crypto and PKI Presentation Transcript

  • 1. Introducing cryptography and PKI David Galichetmercredi 23 novembre 2011
  • 2. Cryptography challengesmercredi 23 novembre 2011
  • 3. Authentication • Application authentication • Single Sign On • One Time Password • Remember me • ...mercredi 23 novembre 2011
  • 4. Integrity • Data are not corrupted • Data are not intentionally alteredmercredi 23 novembre 2011
  • 5. Privacy • Protect data transfer • Protect stored datamercredi 23 novembre 2011
  • 6. Identity • Authentication (user and server side) • Signature (document, application packages ...) • Non repudiation • Trusted Timestamps • Anonymity (electronic vote, alternative currency ...) • ...mercredi 23 novembre 2011
  • 7. Cryptography basis • Hash functions • Symmetric ciphering • Asymmetric cipheringmercredi 23 novembre 2011
  • 8. Hash algorithms • Generate a constant size fingerprint whatever data in entry • It’s hard to find the message from the given hash (First Preimage Resistance) • It’s hard to modify a message without hash being changed (Second Preimage Resistance) • It’s hard to find two different messages with the same hash (Resistance to Collisions) • Very fast calculationmercredi 23 novembre 2011
  • 9. Cryptographic Hash algorithms • Generate a constant size fingerprint whatever data in entry infeasible • It’s hard to find the message from the given hash (First Preimage Resistance) infeasible • It’s hard to modify a message without hash being changed (Second Preimage Resistance) infeasible • It’s hard to find two different messages with the same hash (Resistance to Collisions) • Very fast calculationmercredi 23 novembre 2011
  • 10. Hash functions Integrity checking : hash() File 415a15b606eff4d4ba97ef64ecd2e598mercredi 23 novembre 2011
  • 11. Hash functions Integrity checking : Fingerprint or checksum hash() File 415a15b606eff4d4ba97ef64ecd2e598mercredi 23 novembre 2011
  • 12. Hash functions Integrity checking : Fingerprint or checksum hash() File 415a15b606eff4d4ba97ef64ecd2e598 Very low probability of collision ! Hard to change file without changing hash ! Fast algorithm !mercredi 23 novembre 2011
  • 13. Hash functions Password encryption : hash() password 415a15b606eff4d4ba97ef64ecd2e598mercredi 23 novembre 2011
  • 14. Hash functions Password encryption : hash() password 415a15b606eff4d4ba97ef64ecd2e598 Hard to calculate password from the hash !mercredi 23 novembre 2011
  • 15. Hash functions Remember me tokens : username + expiration date + hash(password) hash() 415a15b606eff4d4ba97ef64ecd2e598 Remember me token = hash(...) + username + expiration datemercredi 23 novembre 2011
  • 16. Password hashing leaks • Brute force • Dictionary • Rainbow tablemercredi 23 novembre 2011
  • 17. Password hashing leaks • Brute force • Dictionary • Rainbow tablemercredi 23 novembre 2011
  • 18. Salted hash functions Salted hash password : hash() salt + password hash(salt+password)mercredi 23 novembre 2011
  • 19. Salted hash functions Salted hash password : hash() salt + password hash(salt+password) secret and / or user dependentmercredi 23 novembre 2011
  • 20. Salted hash functions Salted hash password : hash() salt + password hash(salt+password) secret and / or user dependent Prevents from dictionary and rainbow table attacks !mercredi 23 novembre 2011
  • 21. Hash function algorithms • Message Digest 5 • 128 bits fingerprint size • Secured Hash Algorithm • many version (SHA1, SHA256 ...) • 160 to 512 bits fingerprint sizemercredi 23 novembre 2011
  • 22. Hash function algorithms • Message Digest 5 @deprecated • 128 bits fingerprint size • Secured Hash Algorithm • many version (SHA1, SHA256 ...) • 160 to 512 bits fingerprint sizemercredi 23 novembre 2011
  • 23. Symmetric algorithms • Shared secret key algorithm • Same key used to cipher and decipher • Fast algorithmmercredi 23 novembre 2011
  • 24. Popular symmetric algorithms • Advanced Encryption Standard • Blowfish • Digital Encryption Standard and 3DESmercredi 23 novembre 2011
  • 25. Popular symmetric algorithms • Advanced Encryption Standard • Blowfish • Digital Encryption Standard and 3DES @deprecatedmercredi 23 novembre 2011
  • 26. Private message exchangemercredi 23 novembre 2011
  • 27. Private message exchange Shared secret keymercredi 23 novembre 2011
  • 28. Private message exchange Shared secret key Ciphering with Ksmercredi 23 novembre 2011
  • 29. Private message exchange Shared secret key Ciphering Deciphering with Ks with Ksmercredi 23 novembre 2011
  • 30. Secret key exchange problemmercredi 23 novembre 2011
  • 31. Secret key exchange problem High number of secret keys to manage !mercredi 23 novembre 2011
  • 32. Secret key exchange problem High number of secret keys to manage ! How to share the secret key ?mercredi 23 novembre 2011
  • 33. Asymmetric algorithm • Key pair based algorithm • Shared public key • Protected private key • Key size :1024 to 4096 bits • Slow algorithm • Max encryption size = key sizemercredi 23 novembre 2011
  • 34. Popular asymmetric algorithm • Rivest, Shamir and Adelman (signing and encryption) • Digital Signature Algorithm (signature only) • Elliptic Curves Cryptographymercredi 23 novembre 2011
  • 35. Asymmetric ciphering analogymercredi 23 novembre 2011
  • 36. Asymmetric ciphering analogy Public key Private keymercredi 23 novembre 2011
  • 37. Asymmetric ciphering analogy Public key Private keymercredi 23 novembre 2011
  • 38. Asymmetric ciphering analogy Public key Private keymercredi 23 novembre 2011
  • 39. Asymmetric ciphering analogy Public key Private keymercredi 23 novembre 2011
  • 40. Asymmetric cipheringmercredi 23 novembre 2011
  • 41. Asymmetric ciphering Ciphering with Bob Public Keymercredi 23 novembre 2011
  • 42. Asymmetric ciphering Deciphering Ciphering with Bob Private Key with Bob Public Keymercredi 23 novembre 2011
  • 43. Digital signaturemercredi 23 novembre 2011
  • 44. Digital signature dsa(hash(ˮHello.ˮ),PrK.alice Alice sign with Only hash of the her private key message is signedmercredi 23 novembre 2011
  • 45. Digital signaturemercredi 23 novembre 2011
  • 46. Digital signature Unchanged hash means unaltered message compare hash("hello.") with : dsa("er2f@!e..", PuK.alice) Bob checks signature with Alice public keymercredi 23 novembre 2011
  • 47. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 48. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 49. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 50. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 51. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 52. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 53. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 54. Diffie-Hellmankey exchange algorithmmercredi 23 novembre 2011
  • 55. Public key sharingmercredi 23 novembre 2011
  • 56. Public key managementmercredi 23 novembre 2011
  • 57. Public Key Infrastructure ! • Public key certificate • Certificate managementmercredi 23 novembre 2011
  • 58. Public key certificates • Binds public key with Identity • Can be used to : • authenticate a user • cipher data (email, communications ...) • prove identity (SSL) • signing a document • signing a certificate (CA certificate) • ...mercredi 23 novembre 2011
  • 59. Public key certificate anatomy(TLS certificate)mercredi 23 novembre 2011
  • 60. Public key certificate anatomy - Issuermercredi 23 novembre 2011
  • 61. Public key certificate anatomy - Issuer Issuer Distinguished Namemercredi 23 novembre 2011
  • 62. Public key certificate anatomy - Issuer Issuer Distinguished Name Issuer ≠ Subject : • Not a CA certificate • Not a self signed certificatemercredi 23 novembre 2011
  • 63. Public key certificate anatomy - Subjectmercredi 23 novembre 2011
  • 64. Public key certificate anatomy - Subject Certificate validitymercredi 23 novembre 2011
  • 65. Public key certificate anatomy - Subject Subject Distinguished Name Certificate validitymercredi 23 novembre 2011
  • 66. Public key certificate anatomy - Subject Subject Distinguished Name Certificate validity Certified URLmercredi 23 novembre 2011
  • 67. Public key certificate anatomy - Subject Subject Distinguished Name Certificate validity Certified URL Public keymercredi 23 novembre 2011
  • 68. Public key certificate anatomy - Extensionsmercredi 23 novembre 2011
  • 69. Public key certificate anatomy - Extensions Not a CA certificatemercredi 23 novembre 2011
  • 70. Public key certificate anatomy - Extensions Not a CA certificate Revocation Listmercredi 23 novembre 2011
  • 71. Public key certificate anatomy - Extensions Not a CA certificate Revocation List Certificate usage (TLS)mercredi 23 novembre 2011
  • 72. Public key certificate anatomy - Extensions Not a CA certificate Revocation List Certificate usage (TLS) Issuer CA certificate locationmercredi 23 novembre 2011
  • 73. Public key certificate anatomy - Certificate signaturemercredi 23 novembre 2011
  • 74. Public key certificate anatomy - Certificate signature The certificate SHA1 fingerprint is signed with Issuer private keymercredi 23 novembre 2011
  • 75. Certificate fingerprint signature • Self signed or signed by CA • Prevents certificate corruption • CA signing proves identity if the CA is trustedmercredi 23 novembre 2011
  • 76. Certification chain of trust (certification path)mercredi 23 novembre 2011
  • 77. Certificate managementmercredi 23 novembre 2011
  • 78. Certificate managementmercredi 23 novembre 2011
  • 79. Certificate managementmercredi 23 novembre 2011
  • 80. Certificate managementmercredi 23 novembre 2011
  • 81. Certificate managementmercredi 23 novembre 2011
  • 82. Certificate management CR is signed with CA private keymercredi 23 novembre 2011
  • 83. Certificate management CR is signed with CA private keymercredi 23 novembre 2011
  • 84. Certificate management CR is signed with CA private keymercredi 23 novembre 2011
  • 85. Certificate management CR is signed with CA private keymercredi 23 novembre 2011
  • 86. Certificate management CR is signed with Manage CRL or OCSP CA private keymercredi 23 novembre 2011
  • 87. Certificate management CR is signed with Manage CRL or OCSP CA private keymercredi 23 novembre 2011
  • 88. Certificate management CR is signed with Manage CRL or OCSP CA private key Check Bob certificate with CA certificatemercredi 23 novembre 2011
  • 89. Certificate management CR is signed with Manage CRL or OCSP CA private key Check Bob certificate with CA certificatemercredi 23 novembre 2011
  • 90. Certificate management CR is signed with Manage CRL or OCSP CA private key Check Bob certificate validity Check Bob certificate with CA certificatemercredi 23 novembre 2011
  • 91. Private key storage • Password protected PKCS12 file • Cryptographic token : • password protected • key pair generation (not possible to take the private key out) • process asymmetric algorithms (RSA, DSA, Diffie-Hellman ...)mercredi 23 novembre 2011
  • 92. Private key storage • Password protected PKCS12 file • Cryptographic token : • password protected • key pair generation (not possible to take the private key out) • process asymmetric algorithms (RSA, DSA, Diffie-Hellman ...) Two Factors Authentication : protect with something you know and something you havemercredi 23 novembre 2011
  • 93. Certificate revocation • Two protocols : • Certificate Revocation List • Online Certificate Status Protocol • CRL provides a full certificates revocation list • OCSP is request/response protocolmercredi 23 novembre 2011
  • 94. One Time Password • Token and password (PIN) based authentication system • Token uses a clock and a secret algorithm to generate a OTP • OTP server use the same algorithm to validate the OTPmercredi 23 novembre 2011
  • 95. Conclusion • What’s going on if you loose your ciphering private key (or PKCS12 password) ? • Are the Registration Authority validation process safe ?mercredi 23 novembre 2011