Top Banner
1. Encryption & Security
64

1. Encryption & Security

Mar 14, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1. Encryption & Security

1. Encryption & Security

Page 2: 1. Encryption & Security

Overview

¤  Securityissues

¤  Encryptionandcryptanalysis

¤  Encryptioninthedigitalage¤  Symmetricencryption¤  Asymmetricencryption

¤  Applicationsofencryption

¤  Encryptionisnotsecurity!

2

Page 3: 1. Encryption & Security

Securityissues

3

Page 4: 1. Encryption & Security

Networkingisasecurityissue

¤ Why?

¤  Ifyouwantareallysecuremachine,lockitinanelectromagneticallyshieldedroomanddon’tconnectittoanynetworksorothersourcesofdatabeyondyourcontrol(totallyisolatedisland)

¤ Notmuchfun,isit?

4

Page 5: 1. Encryption & Security

TheProblem¤  TheInternetispublic

¤  Messagessentpassthroughmanymachinesandmedia

¤  Anyoneinterceptingamessagemight¤  readitand/or¤  replaceitwithadifferentmessage

¤  TheInternetisanonymous¤  IPaddressesdon’testablishidentity

¤  Anyonemaysendmessagesunderafalseidentity

5

Page 6: 1. Encryption & Security

TheProblem¤  TheInternetispublic

¤  Messagessentpassthroughmanymachinesandmedia

¤  Anyoneinterceptingamessagemight¤  readitand/or¤  replaceitwithadifferentmessage

¤  TheInternetisanonymous¤  IPaddressesdon’testablishidentity

¤  Anyonemaysendmessagesunderafalseidentity

6

Cryptography offers partial

solutions to all of these problems

Page 7: 1. Encryption & Security

AShadyExample¤  Iwanttomakeapurchaseonlineandclickalinkthattakesmeto

http://www.sketchystore.com/checkout.jsp

¤  WhatIseeinmybrowser:

7

Page 8: 1. Encryption & Security

AShadyExample(cont’d)¤  WhenIpressSUBMIT,mybrowsersendsthis:

POST /purchase.jsp HTTP/1.1

Host: www.sketchystore.com

User-Agent: Mozilla/4.0

Content-Length: 48

Content-Type: application/x-www-form-urlencoded

userid=rbd&creditcard=2837283726495601& exp=01/09

8

Page 9: 1. Encryption & Security

AShadyExample(cont’d)

¤ Ifthisinformationissentunencrypted,whohasaccesstomycreditcardnumber?¤ Otherpeoplewhocanconnecttomywireless

ethernet¤ Otherpeoplephysicallyconnectedtomywired

ethernet¤ …

¤ Packetsarepassedfromroutertorouter.¤ Allthoseroutershaveaccesstomydata.

9

Page 10: 1. Encryption & Security

Acaveatcryptography is not security

10

Page 11: 1. Encryption & Security

11

Page 12: 1. Encryption & Security

Encryptionandcryptanalysisbasic concepts

12

Page 13: 1. Encryption & Security

Encryption

¤ Weencrypt(encode)ourdatasootherscan’tunderstandit(easily)exceptforthepersonwhoissupposedtoreceiveit.

¤ Wecallthedatatoencodeplaintextandtheencodeddatatheciphertext.

¤ Encodinganddecodingareinversefunctionsofeachother

13

Page 14: 1. Encryption & Security

ATTACKATDAWNEncryptionalgorithm

AGSTRMBNDO

ATTACKATDAWN

plaintext

ciphertext

secretkey

secretkey

Decryptionalgorithm

Encryption/decryption

Page 15: 1. Encryption & Security

ATTACKATDAWN AGSTRMBNDO

ATTACKATDAWN

ciphertext

Mathematical,logical,empirical

analysis

secretkey

plaintext

Encryptionalgorithm

Cryptanalysis

Page 16: 1. Encryption & Security

Encryptiontechniquessubstitution and transposition

16

Page 17: 1. Encryption & Security

Twobasicwaysofalteringtexttoencrypt/decrypt

¤  Substituteoneletterforanotherusingsomekindofrule

¤  Scrambletheorderofthelettersusingsomekindofrule

17

Page 18: 1. Encryption & Security

Substitution Ciphers

Page 19: 1. Encryption & Security

SubstitutionCiphers

¤ Simpleencryptionschemeusingasubstitutioncipher:¤ Shifteveryletterforwardby1:A→ B,B→ C,...,Z→A

19

Page 20: 1. Encryption & Security

SubstitutionCiphers

20

Page 21: 1. Encryption & Security

SubstitutionCiphers

¤ Simpleencryptionschemeusingasubstitutioncipher:¤ Shifteveryletterforwardby1:A→ B,B→ C,...,Z→A

¤ Example:MESSAGE→NFTTBHF

21

Page 22: 1. Encryption & Security

SubstitutionCiphers

22

MESSAGE→NFTTBHF

Page 23: 1. Encryption & Security

SubstitutionCiphers

¤ Simpleencryptionschemeusingasubstitutioncipher:¤ Shifteveryletterforwardby1:A→ B,B→ C,...,Z→A

¤ Example:MESSAGE→NFTTBHF

¤ CanyoudecryptTFDSFU?

23

Page 24: 1. Encryption & Security

SubstitutionCiphers

24

TFDSFU

Page 25: 1. Encryption & Security

SubstitutionCiphers

¤ Simpleencryptionschemeusingasubstitutioncipher:¤ Shifteveryletterforwardby1:A→ B,B→ C,...,Z→A

¤ Example:MESSAGE→NFTTBHF

¤ CanyoudecryptTFDSFU?SECRET

25

Page 26: 1. Encryption & Security

CaesarCipher

¤ Shiftforwardnletters;nisthesecretkey

¤ Forexample,shiftforward3letters:A→D,B→E,...,Z→C¤  ThisisaCaesarcipherusingakeyof3(n=3).

¤ MESSAGE→ PHVVDJH

¤ Howcanwecrackthisencryptedmessageifwedon’tknowthekey?DEEDUSEKBTFEIIYRBOTUSETUJXYI

26

Page 27: 1. Encryption & Security

CaesarCipher(cont’d)

¤ Howlongwouldittakeacomputertotryall25shifts?

27

DEEDUSEKBTFEIIYRBOTUSETUJXYI EFFEVTFLCUGFJJZSCPUVTFUVKYZJ FGGFWUGMDVHGKKATDQVWUGVWLZAK GHHGXVHNEWIHLLBUERWXVHWXMABL HIIHYWIOFXJIMMCVFSXYWIXYNBCM IJJIZXJPGYKJNNDWGTYZXJYZOCDN JKKJAYKQHZLKOOEXHUZAYKZAPDEO KLLKBZLRIAMLPPFYIVABZLABQEFP LMMLCAMSJBNMQQGZJWBCAMBCRFGQ MNNMDBNTKCONRRHAKXCDBNCDSGHR NOONECOULDPOSSIBLYDECODETHIS OPPOFDPVMEQPTTJCMZEFDPEFUIJT PQQPGEQWNFRQUUKDNAFGEQFGVJKU

QRRQHFRXOGSRVVLEOBGHFRGHWKLV RSSRIGSYPHTSWWMFPCHIGSHIXLMW STTSJHTZQIUTXXNGQDIJHTIJYMNX TUUTKIUARJVUYYOHREJKIUJKZNOY UVVULJVBSKWVZZPISFKLJVKLAOPZ VWWVMKWCTLXWAAQJTGLMKWLMBPQA WXXWNLXDUMYXBBRKUHMNLXMNCQRB XYYXOMYEVNZYCCSLVINOMYNODRSC YZZYPNZFWOAZDDTMWJOPNZOPESTD ZAAZQOAGXPBAEEUNXKPQOAPQFTUE ABBARPBHYQCBFFVOYLQRPBQRGUVF BCCBSQCIZRDCGGWPZMRSQCRSHVWG CDDCTRDJASEDHHXQANSTRDSTIWXH

Page 28: 1. Encryption & Security

VigenèreCipher

¤  Shiftdifferentamountforeachletter.Useakeyword;eachletterinthekeydetermineshowmanyshiftswedoforthecorrespondingletterinthemessage.

¤  Example:keyword“cmu”:shiftby2,12,20

¤ Message“pittsburgh”

cmucmucmuc

encrypted:runvevwdaj

¤  Tryityourselfathttp://www.simonsingh.net/The_Black_Chamber/v_square.html

28

Page 29: 1. Encryption & Security

ABCDEFGHIJKLMNOPQRSTUVWXYZ A ABCDEFGHIJKLMNOPQRSTUVWXYZ noshift B BCDEFGHIJKLMNOPQRSTUVWXYZA shiftby1 C CDEFGHIJKLMNOPQRSTUVWXYZAB shiftby2 D DEFGHIJKLMNOPQRSTUVWXYZABC shiftby3 E EFGHIJKLMNOPQRSTUVWXYZABCD etc. F FGHIJKLMNOPQRSTUVWXYZABCDE

...

•  Message: ATTACKATDAWN•  Pickasecretkey DECAFDECAFDE •  Encrypted: D

1st letter in the message is shifted by 3, 2nd letter is shifted by 4, …

Page 30: 1. Encryption & Security

ABCDEFGHIJKLMNOPQRSTUVWXYZ A ABCDEFGHIJKLMNOPQRSTUVWXYZ

B BCDEFGHIJKLMNOPQRSTUVWXYZA C CDEFGHIJKLMNOPQRSTUVWXYZAB

D DEFGHIJKLMNOPQRSTUVWXYZABC

E EFGHIJKLMNOPQRSTUVWXYZABCD F FGHIJKLMNOPQRSTUVWXYZABCDE

...

•  Message: ATTACKATDAWN•  Pickasecretkey DECAFDECAFDE •  Encrypted: DX

1st letter in the message is shifted by 3, 2nd letter is shifted by 4, …

Page 31: 1. Encryption & Security

ABCDEFGHIJKLMNOPQRSTUVWXYZ A ABCDEFGHIJKLMNOPQRSTUVWXYZ

B BCDEFGHIJKLMNOPQRSTUVWXYZA C CDEFGHIJKLMNOPQRSTUVWXYZAB

D DEFGHIJKLMNOPQRSTUVWXYZABC

E EFGHIJKLMNOPQRSTUVWXYZABCD F FGHIJKLMNOPQRSTUVWXYZABCDE

...

•  Message: ATTACKATDAWN•  Pickasecretkey DECAFDECAFDE •  Encrypted: DXV

1st letter in the message is shifted by 3, 2nd letter is shifted by 4, …

Page 32: 1. Encryption & Security

ABCDEFGHIJKLMNOPQRSTUVWXYZ A ABCDEFGHIJKLMNOPQRSTUVWXYZ

B BCDEFGHIJKLMNOPQRSTUVWXYZA C CDEFGHIJKLMNOPQRSTUVWXYZAB

D DEFGHIJKLMNOPQRSTUVWXYZABC

E EFGHIJKLMNOPQRSTUVWXYZABCD F FGHIJKLMNOPQRSTUVWXYZABCDE

...

•  Message: ATTACKATDAWN•  Pickasecretkey DECAFDECAFDE •  Encrypted: DXVAHNEVDFZR

1st letter in the message is shifted by 3, 2nd letter is shifted by 4, …

Page 33: 1. Encryption & Security

VernamCipher

¤ VigenèrecipherwasbrokenbyCharlesBabbageinthemid1800sbyexploitingtherepeatedkey¤ Thelengthofthekeydeterminesthecycleinwhichthe

cipherisrepeated.

¤ Vernamcipher:makethekeythesamelengthasthemessage;Babbage’sanalysisdoesn’twork.

33

Page 34: 1. Encryption & Security

One-timePads

¤  Vernamcipheriscommonlyreferredtoasaone-timepad.

¤  Ifrandomkeysareusedone-timepadsareunbreakableintheory.

34

AliceandBobhaveidentical“pads”(sharedkeys)

Page 35: 1. Encryption & Security

Transposition Ciphers

Page 36: 1. Encryption & Security

Transpositionciphers

STSF…EROL...NOUA...DOTN…MPHK…OSEA…RTRN…EOND…

image:http://crypto.interactive-maths.com/simple-transposition-ciphers.html

an ancient Greek method

Page 37: 1. Encryption & Security

Encryptionincomputingfast computation makes encryption usable by all of us

Page 38: 1. Encryption & Security

Encryptionincomputing

¤ One-timepadsimpracticalonthenet(why?)

¤ Basicassumption:theencryption/decryptionalgorithmisknown;onlythekeyissecret(why?)

¤ Verycomplicatedencryptionscanbecomputedfast:•  typically,elaboratecombinationsofsubstitutionand

transposition

Page 39: 1. Encryption & Security

HTTPS

¤ SecurityprotocolfortheWeb,thepeoples’encryption

¤ Purpose:¤  confidentiality(preventeavesdropping)¤  messageintegrityandauthentication(prevent“maninthe

middle”attacksthatcouldalterthemessagesbeingsent)

¤ Techniques:¤  asymmetricencryption(“publickey”encryption)toexchange

secretkey¤  certificateauthoritytoobtainpublickeys¤  symmetricencryptiontoexchangeactualmessages

Page 40: 1. Encryption & Security

Keyspace

¤  Keyspaceisjargonforthenumberofpossiblesecretkeys,foraparticularencryption/decryptionalgorithm

¤  Numberofbitsperkeydeterminessizeofkeyspace•  importantbecausewewanttomakebruteforceattacksinfeasible

¤  Bruteforceattack:runthe(known)decryptionalgorithmrepeatedlywitheverypossiblekeyuntilasensibleplaintextappears

¤  Typicalkeysizes:severalhundredbits

40

Page 41: 1. Encryption & Security

Symmetricvs.asymmetricencryption

¤  Symmetric(shared-keybetweensenderandreceiver)encryption:commonlyusedforlongmessages•  Oftenacomplicatedmixofsubstitutionandtranspositionencipherment•  Reasonablyfasttocompute•  Examples(CaesarCipher)•  Requiresasharedsecretkeyusuallycommunicatedusing(slower)

asymmetricencryption

Page 42: 1. Encryption & Security

Bob Alice

Symmetric(SharedKey)Encryption

42

Ciphertext = Enc(plaintext, key)

Bob uses the shared key to decrypt the ciphertext to recover the plaintext

Plaintext Plaintext = Dec(Ciphertext, key)

Encrypt using key Decrypt using key

Alice uses the shared key to encrypt the plaintext to produce the ciphertext

Ciphertext

Page 43: 1. Encryption & Security

EstablishingSharedKeys

¤  Problem:howcanAliceandBobsecretlyagreeonakey,usingapubliccommunicationsystem?

¤  Solution:asymmetricencryptionbasedonnumbertheory¤  Alicehasonesecret,Bobhasadifferentsecret;workingtogetherthey

establishasharedsecret¤  Examples:Diffie-Hellmankeyexchange,RSApublickeyencryption

43

Page 44: 1. Encryption & Security

Symmetricvs.asymmetricencryption

¤  Symmetric(shared-keybetweensenderandreceiver)encryption:commonlyusedforlongmessages•  Oftenacomplicatedmixofsubstitutionandtranspositionencipherment•  Reasonablyfasttocompute•  Examples(CaesarCipher)•  Requiresasharedsecretkeyusuallycommunicatedusing(slower)

asymmetricencryption

¤  Asymmetricencryption(twokeys):differentkeysareusedtoencryptandtodecrypt•  Publickey:availabletoeveryone,usedtoencrypt•  Privatekey:availableonlytoreceiver,usedtodecrypt•  Anyonewiththepublickeycanencrypt,onlytheprivatekeycanbe

usedtodecrypt!

Page 45: 1. Encryption & Security

Onetypeofasymmetricencryption:RSA

¤ CommonencryptiontechniquefortransmittingsymmetrickeysontheInternet(https,ssl/tls)¤ Namedafteritsinventors:Rivest,Shamirand

Adleman¤ Usedinhttps(youknowwhenyou’reusingitbecause

youseetheURLintheaddressbarbeginswithhttps://)

45

Page 46: 1. Encryption & Security

Bob Alice

AsymmetricPublicKeyEncryption

46

ciphertext = Enc(plaintext, pubA)

Alice’spublickeypubA

plaintext plaintext = Dec(ciphertext, privA

Encrypt using pubA Decrypt using privA

Alice uses herprivate key to decrypt the ciphertext to recover the plaintext

Bob uses Alice’s public key to encrypt the plaintext to produce the ciphertext

ciphertext

Alice’sprivatekeyprivA

Page 47: 1. Encryption & Security

HowRSAworks

¤  First,wemustbeabletorepresentanymessageasasinglenumber(itmayalreadybeanumberasisusualforasymmetrickey)

¤  Forexample:

A T T A C K A T D A W N

012020010311012004012314

47

Page 48: 1. Encryption & Security

PublicandPrivateKeys

48

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

Page 49: 1. Encryption & Security

PublicandPrivateKeys

49

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

Page 50: 1. Encryption & Security

PublicandPrivateKeys

50

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

Page 51: 1. Encryption & Security

PublicandPrivateKeys

51

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

Page 52: 1. Encryption & Security

RSAExample

52

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

•  Bob wants to send Alice the message M=4 •  Bob knows Alice’s Public Key: (3, 33) (e = 3,

n = 33) •  Bob encrypts the message using e and n

•  (M e modulo n → C): •  43 modulo 33 → 31 •  ... Bob sends 31

•  Alice’s Public Key: (3, 33) (e = 3, n = 33) •  Alice’s Private Key: (7, 33) (d = 7, n = 33)

•  Usually these are really huge numbers with many hundreds of digits!

•  Alice receives the encoded message 31 •  Alice decrypts the message using d and

n •  (C d modulo n → M ): •  317 modulo 33 → 4

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Page 53: 1. Encryption & Security

RSAExample

53

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

•  Bob wants to send Alice the message M=4 •  Bob knows Alice’s Public Key: (3, 33) (e = 3,

n = 33) •  Bob encrypts the message using e and n

•  (M e modulo n → C): •  43 modulo 33 → 31 •  ... Bob sends 31

•  Alice’s Public Key: (3, 33) (e = 3, n = 33) •  Alice’s Private Key: (7, 33) (d = 7, n = 33)

•  Usually these are really huge numbers with many hundreds of digits!

•  Alice receives the encoded message 31 •  Alice decrypts the message using d and

n •  (C d modulo n → M ): •  317 modulo 33 → 4

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Page 54: 1. Encryption & Security

RSAExample

54

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

•  Bob wants to send Alice the message M=4 •  Bob knows Alice’s Public Key: (3, 33) (e = 3,

n = 33) •  Bob encrypts the message using e and n

•  (M e modulo n → C): •  43 modulo 33 → 31 •  ... Bob sends 31

•  Alice’s Public Key: (3, 33) (e = 3, n = 33) •  Alice’s Private Key: (7, 33) (d = 7, n = 33)

•  Usually these are really huge numbers with many hundreds of digits!

•  Alice receives the encoded message 31 •  Alice decrypts the message using d and

n •  (C d modulo n → M ): •  317 modulo 33 → 4

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Page 55: 1. Encryption & Security

RSAExample

55

Receiver decrypts using private key •  Alice is the receiver •  Every receiver has a:

•  public key (e, n) •  private key (d, n)

•  Decryption: The receiver decodes the encrypted message C to get the original message M using the private key (which no one else knows).

•  C d modulo n → M (plaintext)

•  Bob wants to send Alice the message M=4 •  Bob knows Alice’s Public Key: (3, 33) (e = 3,

n = 33) •  Bob encrypts the message using e and n

•  (M e modulo n → C): •  43 modulo 33 → 31 •  ... Bob sends 31

•  Alice’s Public Key: (3, 33) (e = 3, n = 33) •  Alice’s Private Key: (7, 33) (d = 7, n = 33)

•  Usually these are really huge numbers with many hundreds of digits!

•  Alice receives the encoded message 31 •  Alice decrypts the message using d and

n •  (C d modulo n → M ): •  317 modulo 33 → 4

Sender encrypts using public key • Bob is sender/transmitter • Every sender has the receiver’s public key:

•  publickey(e,n) • Encryption: The sender encrypts a (numerical) message M into ciphertext C using the receiver’s public key:

•  M e modulo n → C (ciphertext)

Page 56: 1. Encryption & Security

Generatingn,eandd

56

•  pandqare(big)randomprimes.

•  n=p×q•  φ=(p-1)(q-1)•  eissmallandrelativelyprimetoφ

•  d,suchthat:e × dmodφ=1

p=3,q=11

n=3×11=33φ=2×10=20e=3

3 × dmod20=1d=7

Usually the primes are huge numbers--hundreds of digits long.

Page 57: 1. Encryption & Security

CrackingRSA

¤  Everyoneknows(e,n).OnlyAliceknowsd.

¤  Ifweknoweandn,canwefigureoutd?¤  Ifso,wecanreadsecretmessagestoAlice.

¤  Wecandeterminedfromeandn.¤  Factornintopandq.

n=p×qφ=(p-1)(q-1)e×d=1(modφ)

¤  Weknowe(whichispublic),sowecansolveford.

¤  Butonlyifwecanfactorn

57

Every receiver has a: •  public key (e, n) •  private key (d, n)

Every sender has the receiver’s public key: •  publickey(e,n)

Page 58: 1. Encryption & Security

RSAissafe(fornow)

¤  Supposesomeonecanfactormy5-digitnin1ms,

¤  Atthisrate,tofactora10-digitnumberwouldtake2minutes.

¤  …tofactora15-digitnumberwouldtake4months.

¤  …20-digitnumber…30,000years.

¤  …25-digitnumber…3billionyears.

¤  We'resafewithRSA!(atleast,fromfactoringwithdigitalcomputers)

58

Page 59: 1. Encryption & Security

CertificateAuthorities

¤  Howdoweknowwehavetherightpublickeyforsomeone?

¤  CertificateAuthoritiessigndigitalcertificatesindicatingauthenticityofasenderwhotheyhavecheckedoutintherealworld.

¤  Sendersprovidecopiesoftheircertificatesalongwiththeirmessageorsoftware.

¤  Butcanwetrustthecertificateauthorities?(onlysome)

59

Page 60: 1. Encryption & Security

Encryptionisnotsecurity!It’sjustasetoftechniques

60

Page 61: 1. Encryption & Security

How(in)secureistheInternet?

¤ TheNSAhasabudgetof$11B;weknowfromEdwardSnowdenhowsomeofitisused

¤ Corporationsandcriminalsalsospyonus

¤ Whatcangowrong?¤  Insecurepseudo-randomnumbergenerators¤  Untrustworthycertificateauthorities¤  Malware¤  “Socialengineering”attackslikephishing¤  Deliberatelybuilt-ininsecurityincryptoproducts¤  PhysicaltappingofInternetrouters

61

Page 62: 1. Encryption & Security

Securityisanunsolvedproblem

Yourcybersystemscontinuetofunctionandserveyounotduetotheexpertiseofyoursecuritystaffbutsolelyduetothesufferanceofyouropponents.

–formerNSAInformationAssuranceDirectorBrianSnow(quotedbyBruceSchneier,https://www.schneier.com/blog/archives/2013/03/phishing_has_go.html)

62

Page 63: 1. Encryption & Security

Summary

¤  Cryptographyiscoolmathematicsandprotocoldesign

¤  Butcryptographyisnotsecurity,onlyasetoftechniques

¤  Securityisabroaderissueinvolving¤  Othertechnology¤  Socialandlegalfactors

63

“Only amateurs attack machines; professionals target people” –Bruce Schneier

Page 64: 1. Encryption & Security

Two closing thoughts

Use Signal…