74cc4c2352daa9925cd42328a80292bc.ppt
- Количество слайдов: 27
על מפתחות ופרוטוקולים 1 8102/51/3
על מפתחות §פרמטרים לבחירה ©אורך המפתח ¨תלוי באלגוריתם ההצפנה ©זמן החיים של המפתח ¨נמדד בזמן או בכמות תעבורה מוצפנת §שיקולים בבחירת אורך המפתח ©סוג המידע המוצפן ¨מידע שעובר על קו תקשורת לעומת מידע מאוחסן בקובץ ¨זמן החיים של המסמך המוצפן • תכנית התקפה על יעד למחר • מסמך משפטי שתקף עשר שנים 2 3 Prof. Ehud Gudes Security Ch 8102/51/3
על מפתחות §שיקולים בבחירת זמן חיים של מפתח ©משך הזמן שבו המפתח נמצא בשימוש ¨ברור שצריך להיות קטן משמעותית מה- work factor ©כמות המידע שמוצפן בעזרת אותו מפתח ¨ברור שצריך להיות קטן משמעותית ממספר בלוקי הקלט האפשריים ©הנזק שיגרם במידה ומפתח ייחשף 3 3 Prof. Ehud Gudes Security Ch 8102/51/3
ניהול מפתחות §יצור בטוח של מפתחות ©מפתחות חייבים להיות אקראיים )ולא אקראיים-לכאורה( ©רצוי לייצר מפתח פרטי )מתוך זוג מפתחות( באמצעי פיסי מאובטח. רצוי שהמפתח הפרטי לעולם לא יעזוב את האמצעי הפיסי. ©המפתח הציבורי חייב להיות מלווה ב- Certificate §הפצה של מפתחות §אחסון בטוח של מפתחות 4 3 Prof. Ehud Gudes Security Ch 8102/51/3
ניהול מפתחות )המשך( §עדכון מפתחות ©במערכות מפתח ציבורי, יש לאמת את המפתח הציבורי ©במערכות סימטריות, דרוש פרוטוקול הסכמה על מפתחות §במידת הצורך, מפתחות צריכים להיות מגובים § - Revocation שלילת מפתחות ©במערכות מפתח ציבורי, ליוצר המפתח בד”כ אין שליטה על מספר העותקים המופצים של המפתח הציבורי. דרוש ליצר “רשימה שחורה” של מפתחות. © Certificate Revocation List – CRL 5 3 Prof. Ehud Gudes Security Ch 8102/51/3
הסכמה על מפתחות §אלגוריתם מפתח ציבורי §לכל אחד מהצדדים מפתח ציבורי ומפתח פרטי §כל אחד מהצדדים יוצר סוד משותף, על ידי שימוש במפתח הפרטי שלו, ובמפתח הציבורי של הצד השני § Diffie-Hellman 6 3 Prof. Ehud Gudes Security Ch 8102/51/3
Diffie-Hellman §אלגוריתם להסכמה על מפתחות §טכנולוגית מפתח ציבורי §יהי p מספר ראשוני §יהי g יוצר של *) , GF(p החבורה הכפלית של ) GF(p §אליס ובוב המשתתפים באלגוריתם §מסתמכים על הקושי לחשב לוגריתם דיסקרטי 7 3 Prof. Ehud Gudes Security Ch 8102/51/3
DH Protocol (agree on secret symmetric key( בוב אליס y, gy(mod p) x, gx(mod p) 1) gy(mod p) gx(mod p) 2) (gy)x=gyx(mod p) 3/15/2018 (gx)y=gxy(mod p)3) Prof. Ehud Gudes Security Ch 3 8
Diffie. Hellman Algorithm
Diffie-Hellman Example §have ©prime number q = 353 ©primitive root = 3 §A and B each compute their public keys ©A computes YA = 397 mod 353 = 40 ©B computes YB = 3233 mod 353 = 248 §then exchange and compute secret key: ©for A: K = (YB)XA mod 353 = 24897 mod 353 = 160 ©for B: K = (YA)XB mod 353 = 40233 mod 353 = 160 §attacker must solve: © 3 a mod 353 = 40 which is hard ©desired answer is 97, then compute key as B does
§פרוטוקול Diffie-Hellman חשוף להתקפת “האיש שבאמצע” )מחליף גם את אליס וגם את בוב ( §פתרון : ©שימוש ב- Certificates עבור מפתחות DH ©חתימה על המפתח הציבורי באמצעות אלגוריתם חתימה דיגיטלית ) RSA או (DSA 11 3 Prof. Ehud Gudes Security Ch 8102/51/3
- Authentication אימות זהוי § Authentication הוא תהליך שבאמצעותו ניתן לוודא לגבי מידע מסוים ©את 21 זהות השולח )או יוצר המידע( מקוריות המידע - Authenticity שלימות המידע - Integrity הזמן שבו נשלח המידע 3 Prof. Ehud Gudes Security Ch 8102/51/3
סוגי Authentication § Authentication של אדם או קבוצה )עסק( § Authentication של מכונה )מחשב, ( URL , IP § Authentication של הודעה – שימוש ב - MAC ראינו כבר §בפרק זה נדבר על אמות זהוי באמצעות פרוטוקולים קריפטוגרפיים. אמצעים אחרים בפרק הבא. 31 3 Prof. Ehud Gudes Security Ch 8102/51/3
Protocols for Authentication and Key Distribution 1. The goal of the protocol is usually the mutual authentication of the two parties and the exchange of a new symmetric key 2. The particular algorithm is usually not important 3/15/2018 Prof. Ehud Gudes Security Ch 4 14
Protocols for Key Distribution 1. Symmetric, only Two Parties. 1. Secure channel or Diffie-Helman 2. Symmetric, using third party – Key Distribution Center – KDC (Needham protocol next) P likes to communicate with R KP and KR are symmetric keys with KDC P sends to KDC (P, R, ID) KDC to P: E((ID, R, KPR, E((KPR, P), KR)), K P) P sends to R Disadvantage: every new session 4 needs KDC, replay. 3/15/2018 Prof. Ehud Gudes Security Ch 15
Needham Protocol (symmetric) Problem - replay step 3 3/15/2018 Prof. Ehud Gudes Security Ch 3 16
Denning’s Protocol 1. 2. 3. 4. 5. A KDC: KDC A: A B: B A: A B: IDA IDB Eka[KS IDB T EKb[KS IDA T]] Ekb[KS IDA T] Eks[N 1] - Challenge Eks[f(N 1)] - Response B can check the difference between his clock and the timestamp in step 3 Problem – synchronizing clocks 3/15/2018 Prof. Ehud Gudes Security Ch 3 17
Protocol Newman 1. A B: 2. B KDC: 3. KDC A: 4. A B: IDA Na IDB Nb Ekb[IDA Na Tb] Eka[IDB Na Ks Tb] EKb[IDA KS Tb] Nb Ekb[IDA Ks Tb] Eks[Nb] All protocols until now used symmetric keys 3/15/2018 Prof. Ehud Gudes Security Ch 3 18
Protocols For Key Distribution 3. Asymmetric, without third party P to R: ER (DP(K) R to P: E(n, K) P to R E(n+1, K) disadvantage: need to know public keys! Solution – send your key? No! man in the middle problem! 3/15/2018 Prof. Ehud Gudes Security Ch 3 19
Protocols For Key Distribution 4. Using third party to get public keys. KDC to P: EP(DC(R public key)) KDC to R: ER(DC(P public key)) continue as before! How both P and R know that Dc is the signature of KDC? Answer: Certificates! 3/15/2018 Prof. Ehud Gudes Security Ch 4 20
Protocol Woo-Lam 1. A -> KDC: IDA IDB 2. KDC-> A: EKRauth [IDB KUb] 3. A -> B: KDC חתום ע"י B קיבל מפתח ציבורי של A EKUb [Na || IDa ] B- שולח אתגר ל A 4. B-> KDC: IDB IDA EKUauth[NA] 5. KDC-> B: EKRauth[IDA Kua] EKUb[EKRauth[Na Ks IDB]] מוצפן במפתח שלו A את המפתח הסימטרי ואת האתגר של KDC - מקבל מ B 6. B -> A: EKUa[EKRauth[Na Ks IDB] Nb] וכן שולח אתגר שלו A את האתגר של A - שולח חזרה ל B 7. A -> B: Eks[Nb] את האתגר שלו מוצפן במפתח הסימטרי B - שולח ל A היא עכשוית KDC - ו B שהתקשורת בין A - שים לב שצעדים 6, 5, 4, 3 מבטיחים ל . B - שלח ל A - ואוטנטית ושהוחזר האתגר ש 3/15/2018 Prof. Ehud Gudes Security Ch 3 21
Other Protocols 1. 2. 3. 4. Mental poker Electronic voting Oblivious transfer Secret sharing 3/15/2018 Prof. Ehud Gudes Security Ch 3 22
Mental Poker 3/15/2018 Prof. Ehud Gudes Security Ch 3 23
Mental Poker – Key Distribution Suppose Bill wants to update its public key Without the KDC knowing the pair (Kb, Kb-1) KDC will send a stream of encrypted pairs. Bill will select a pair encrypt it with old key and send to KDC will decrypt it and send back to Bill who will decrypt it 3/15/2018 Prof. Ehud Gudes Security Ch 3 24
Electronic Voting 3/15/2018 Prof. Ehud Gudes Security Ch 3 25
Oblivious Transfer 3/15/2018 Prof. Ehud Gudes Security Ch 3 26
Zero Knowledge proofs Zero knowledge example Fiat-Shamir proof of identity A trusted center chooses n=pq, and publishes n but keeps p and q secret. 2. Each prover A chooses a secret s with gcd(s, n)=1, and publishes v=s 2 mod n. 3. A proves knowledge of s to B by repeating: (a) A chooses random r and sends r 2 mod n to B. (b) B chooses random e in {0, 1}, and sends it to A. (c) A responds with a=rse mod n. (d) B checks if a 2 = ve r 2 mod n. 1. if A follows the protocol and knows s, then B's check will always work 2. if A does not know s, then they can only answer the question with probability 1/2. 3/15/2018 Prof. Ehud Gudes Security Ch 4 27