![DIGITAL SIGNATURES Introduc](https://data.docslib.org/img/3a60ab92a6e30910dab9bd827208bcff-1.webp)
DAVID ACLAND - DIGITAL SIGNATURES Introduc6on > whoami WHOAMI David Acland @davidacland Introduc6on > whoami Introduc6on > About this talk ABOUT THIS TALK Introduc6on > About this talk > Progress Progress Bar Where are we? Introduc6on > About this talk > What WHAT WE’RE TALKING ABOUT Cryptology Cryptography Cryptanalysis Asymmetric Symmetric Encrypon Digital Signatures Introduc6on > About this talk > Why WHY WE’RE TALKING ABOUT IT DNSSEC Signed Packages Gatekeeper TCC Secure boot SSL DKIM AutoPkg SSH Kernel Extensions Introduc6on > About this talk > Why WHY WE’RE TALKING ABOUT IT Introduc6on > About this talk > Why WHY WE’RE TALKING ABOUT IT Trusted signatures are becoming a requirement Introduc6on > About this talk > Contents CONTENTS ▸ Introduc6on to digital signatures ▸ Underlying technologies ▸ Prac6cal usage Introduc6on > About this talk > Warning THERE’S MATHS IN HERE (sorry) Introduc6on > About this talk > Follow along IT’S INTERACTIVE https://bit.ly/2TR6y9a Introduc6on > Introduc6on to digital signatures INTRODUCTION TO DIGITAL SIGNATURES Introduc6on > Introduc6on to digital signatures WHAT IS A SIGNATURE? Introduc6on > Introduc6on to digital signatures > What’s a signature? WHAT’S A SIGNATURE? Introduc6on > Introduc6on to digital signatures > What’s a signature? WHAT DO THEY GIVE YOU? ▸ Authen6ca6on ▸ Integrity Security Services ▸ Non-repudia6on Introduc6on > Introduc6on to digital signatures > Paper Signatures ARE PAPER SIGNATURES EFFECTIVE? Introduc6on > Introduc6on to digital signatures > Paper Signatures ARE PAPER SIGNATURES EFFECTIVE? ▸ Authen'city - You can’t be sure the sender is who they claim to be ▸ Integrity - You can change the contents aRer it’s been signed ▸ Non-repudia'on - I can just deny I signed it Introduc6on > Introduc6on to digital signatures > Digital Signatures WHAT ABOUT DIGITAL SIGNATURES? Introduc6on > Introduc6on to digital signatures > Digital Signatures DIGITAL SIGNATURES ▸ A private key is used to sign data ▸ It can be used to sign any data ▸ It provides the same security services as paper signatures Introduc6on > Introduc6on to digital signatures > What signing isn’t SIGNING ISN’T ENCRYPTION ▸ We send the plaintext data along with the signature ▸ Signatures aren’t interested in hiding the data UNDERLYING TECHNOLOGIES Underlying Technologies > Contents CONTENTS ▸ Hashing ▸ Asymmetric Cryptography ▸ Signing ▸ Cer6ficates and trust Underlying Technologies > Signing Process BASIC SIGNING PROCESS Private Key 89630aafea14b2d8 ec9f0ca0251485cb Encryption Algorithm Hash function 94add8ec553218 1599b80051a09347 Data Hashed data Public Key Hashed data 1d008bea0a8272da 89630aafea14b2d8 83842aa4d2f3f73e ec9f0ca0251485cb 9acd9c4dd76df908 Decryption Algorithm 94add8ec553218 435a567b55c6534e 1599b80051a09347 Signature Compare 89630aafea14b2d8 ec9f0ca0251485cb Hash function 94add8ec553218 1599b80051a09347 Underlying Technologies > Hashing HASHING Underlying Technologies > Hashing WHAT IS HASHING? Turns a data input into a fixed length, scrambled output 89630aafea14b2d8 ec9f0ca0251485cb9 Hash function 4add8ec5532181 599b80051a09347 Data Hex output Underlying Technologies > Hashing A LITTLE HASHING DEMO Underlying Technologies > Hashing > Why use hashing WHY USE HASHING? Private Key Encryption Algorithm Data Public Key 1d008bea0a8272da 83842aa4d2f3f73e Decryption Algorithm 9acd9c4dd76df908 435a567b55c6534e Signature Compare Underlying Technologies > Hashing > Why use hashing WHY USE HASHING? Original 1GB file: Signed without hashing Signed with hashing Underlying Technologies > Hashing > Algorithms WHAT HASHING ALGORITHMS ARE AVAILABLE? Underlying Technologies > Hashing > Algorithms COMMON HASHING ALGORITHMS ▸ MD5 ▸ SHA-1 ▸ SHA-2 ▸ SHA-3 ▸ RIPEMD-160 ▸ Whirlpool ▸ BLAKE2 ▸ … Underlying Technologies > Hashing > Algorithms WHAT HASHING ALGORITHMS ARE WEBSITES USING? Underlying Technologies > Hashing > Algorithms HASHING Underlying Technologies > Hashing > Algorithms HASHING Underlying Technologies > Hashing > Algorithms HASHING Underlying Technologies > Hashing > SHA256 A QUICK LOOK AT SHA256 Underlying Technologies > Hashing > SHA256 SHA256 Ini6al hash value 0101010101 Data 10011010000000001001101 AND 0001001101 = 0001001000 Underlying Technologies > Hashing > SHA256 SHA256 1. 1001101000 2. 0001001101 3. 0001001000 4. 0110100010 5. 1000000100 6. … 7. … 64. 1001011011 Underlying Technologies > Hashing > SHA256 AVALANCHE EFFECT Single character change hello Hello Hash function Hash function 3362cec4339baf 89630aafea14b Completely different output Underlying Technologies > Hashing > SHA256 SHA256 - LAST FEW STEPS Ini6al hash value 0001001000 AND + XOR Data 0101010101 89630aafea14b2d8ec9f0c Hash result a0251485cb94add8ec5 532181599b80051a09347 Underlying Technologies > Asymmetric Cryptography ASYMMETRIC CRYPTOGRAPHY Underlying Technologies > Asymmetric Cryptography ASYMMETRIC CRYPTOGRAPHY Symmetric (AES, 3DES, etc…) ABCD1234 ABCD1234 Private Public Asymmetric (RSA, DSA, etc…) ABCD1234 EFGH5678 Underlying Technologies > Asymmetric Cryptography > SSL Handshake SSL HANDSHAKE Private Public Public Symmetric Key Symmetric Key Encrypt Decrypt Underlying Technologies > Asymmetric Cryptography > Signing SIGNING Public Verify Sign Public Private Decrypt Encrypt Underlying Technologies > Signing SIGNING Underlying Technologies > Signing SIGNING The sender encrypts a hash of the data using their private key and a signature algorithm Underlying Technologies > Signing SIGNING A LITTLE SIGNING DEMO Underlying Technologies > Signing > Signing Algorithms SIGNING WHAT SIGNATURE ALGORITHMS ARE AVAILABLE? Underlying Technologies > Signing > Signing Algorithms SIGNING ▸ RSA ▸ Schnorr Signature Algorithm ▸ DSA ▸ Rapid Digital Signature ▸ ElGamal Encryp6on System ▸ GMR Algorithm ▸ DSA ▸ Rabin Cryptosystem ▸ ECDSA ▸ EdDSA Algorithm ▸ GOST R 34 10-2012 ▸ Ed25519 Underlying Technologies > Signing > Signing Algorithms SIGNING WHAT SIGNATURE ALGORITHMS ARE PEOPLE USING? Underlying Technologies > Signing > Signing Algorithms SIGNING Underlying Technologies > Signing > Signing Algorithms SIGNING Underlying Technologies > Signing > Signing Algorithms SIGNING Underlying Technologies > Signing > RSA LET’S LOOK AT RSA Underlying Technologies > Signing > RSA RSA ▸ Asymmetric cryptographic algorithm ▸ Clifford Cocks in 1973 ▸ Ron Rivest, Adi Shamir, and Leonard Adleman in 1978 Underlying Technologies > Signing > RSA RSA - STEPS ▸ Key genera6on ▸ Signing ▸ Verifying Underlying Technologies > Signing > RSA > Maths SOME MATHS Underlying Technologies > Signing > RSA > Maths > Prime Numbers PRIME NUMBERS A whole number (integer) greater than 1 that can not be made by mul6plying other whole numbers 2 3 5 7 11 13 17 19 23… Underlying Technologies > Signing > RSA > Maths > Coprime COPRIME / RELATIVELY PRIME Two integers are rela6vely prime if the only posi6ve integer that divides them evenly is 1 e.g. 35 and 18 are rela6vely prime Underlying Technologies > Signing > RSA > Maths > Exponenaon EXPONENTIATION Mul6plying a number by itself n mes, where n is the exponent Base 24 Exponent e.g. 24 = 2 x 2 x 2 x 2 = 16 Underlying Technologies > Signing > RSA > Maths > Factors FACTORS Numbers that, when mul6plied, produce another number 4 x 5 = 20 Factors Underlying Technologies > Signing > RSA > Maths > Factoring FACTORING Given a number “n”, factoring is the process of working out the numbers, or “factors” that can be mul6plied together to make “n” e.g. for “20 = A x B”, find out what A and B are Underlying Technologies > Signing > RSA > Maths > Prime Factorisa6on PRIME FACTORISATION Given a number “n”, find two prime numbers that can be mul6plied together to make “n” e.g. for “15 = A x B”, find out what A and B are Underlying Technologies > Signing > RSA > Maths > PHI Φ (PHI) A count of the posi6ve integers up to a given integer “n” that are rela6vely prime to “n” So if n = 6: Φ(6) = 2 1 2 3 4 5 6 1 and 5 share no factors with 6 Underlying Technologies > Signing > RSA > Maths > MOD MOD 32 mod 5 = 2 5 mod 8 = 5 38,927 mod 8 = 7 Underlying Technologies > Signing > RSA RSA PROCESS Underlying Technologies > Signing > RSA > RSA Process RSA - KEY GENERATION ▸ Pick two prime numbers “p” & “q” ▸ Calculate the public key “n” by mul6plying “p” and “q” ▸ Calculate Φ(n) ▸ Pick a public exponent “e”, that is coprime with Φ(n) ▸ Calculate the private key “d”, which is the inverse of e * (mod Φ(n)) Underlying Technologies > Signing > RSA > An Example AN EXAMPLE… Underlying Technologies > Signing > RSA > An Example RSA - MULTIPLY P & Q p = 17 q = 19 17 * 19 = 323 n = 323 Underlying Technologies > Signing > RSA > An Example RSA - CALCULATE Φ(N) Φ(n) = Φ(p) * Φ(q) p = 17 q = 19 Φ(p) = p-1 Φ(q) = q-1 Φ(p) = 16 Φ(q) = 18 Φ(n) = 16 * 18 = 288 Underlying Technologies > Signing > RSA > An Example RSA - PICK A PUBLIC EXPONENT 11 must be coprime with Φ(n) Underlying Technologies > Signing > RSA > An Example RSA - CALCULATE THE INVERSE OF E * (MOD Φ(N) 11 288 131 Underlying Technologies > Signing > RSA > An Example RSA - FINAL VALUES ▸ n - Public323 (public key, the key) result of p * q ▸ e - Public11 (public exponent, exponent) needed to decrypt the signature ▸ d - Private131 (private key, the key) inverse of e * (mod Φ(n)) Underlying Technologies > Signing > RSA > An Example RSA - SIGNING ▸ Raise the message “m” to the power of the private key “d” ▸ Mod by the public key “n” md mod n Underlying Technologies > Signing > RSA > An Example RSA - SIGNATURE VERIFICATION ▸ Signature “s” raised to the power of the public exponent “e” ▸ Mod by the public key “n” se mod n Underlying Technologies
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages108 Page
-
File Size-