symmetric encrypbon cs642 computer security
play

Symmetric encrypBon CS642: Computer Security Professor - PowerPoint PPT Presentation

Symmetric encrypBon CS642: Computer Security Professor Ristenpart h9p://www.cs.wisc.edu/~rist/ rist at cs dot wisc dot edu University of Wisconsin CS 642


  1. Symmetric ¡encrypBon ¡ CS642: ¡ ¡ Computer ¡Security ¡ Professor ¡Ristenpart ¡ h9p://www.cs.wisc.edu/~rist/ ¡ rist ¡at ¡cs ¡dot ¡wisc ¡dot ¡edu ¡ University ¡of ¡Wisconsin ¡CS ¡642 ¡

  2. Symmetric ¡encrypBon ¡ Block ¡ciphers ¡ Modes ¡of ¡operaBon ¡ Hash ¡funcBons ¡ HMAC ¡ AuthenBcated ¡encrypBon ¡ University ¡of ¡Wisconsin ¡CS ¡642 ¡

  3. Cryptography ¡as ¡computaBonal ¡science ¡ Use ¡computaBonal ¡intractability ¡as ¡basis ¡for ¡confidence ¡in ¡systems ¡ 1. ¡Design ¡a ¡cryptographic ¡scheme ¡ 2. ¡Provide ¡proof ¡that ¡no ¡a9acker ¡ Goldwasser, ¡Micali ¡ ¡and ¡Blum ¡circa ¡1980’s ¡ with ¡limited ¡computaBonal ¡resources ¡ can ¡break ¡it ¡ Example: ¡ Security ¡proofs ¡(reducBons) ¡ Formal ¡definiBons ¡ A9acker ¡can ¡not ¡ ¡ A9acker ¡can ¡ ¡ Breaking ¡scheme ¡ Scheme ¡semanBcs ¡ recover ¡credit ¡card ¡ recover ¡credit ¡card ¡ Security ¡ Can ¡factor ¡ Can ¡not ¡factor ¡ Breaking ¡assumpBons ¡ large ¡composite ¡ large ¡composite ¡ As ¡long ¡as ¡assumpBons ¡holds ¡ numbers ¡ numbers ¡ we ¡believe ¡ ¡in ¡security ¡of ¡scheme! ¡ But ¡no ¡one ¡knows ¡how ¡to ¡ Provable ¡security ¡yields ¡ do ¡this. ¡It’s ¡been ¡studied ¡ 1) ¡well-­‑defined ¡assumpBons ¡and ¡security ¡goals ¡ for ¡a ¡very ¡long ¡Bme! ¡ 2) ¡cryptanalysts ¡can ¡focus ¡on ¡assumpBons ¡and ¡models ¡

  4. Typical ¡assumpBons ¡ • Basic ¡atomic ¡primiBves ¡are ¡hard ¡to ¡break: ¡ – Factoring ¡of ¡large ¡composites ¡intractable ¡ – RSA ¡permutaBon ¡hard-­‑to-­‑invert ¡ – Block ¡ciphers ¡(AES, ¡DES) ¡are ¡good ¡pseudorandom ¡ permutaBons ¡(PRPs) ¡ – Hash ¡funcBons ¡are ¡collision ¡resistant ¡ Confidence ¡in ¡atomic ¡primiBves ¡is ¡gained ¡by ¡cryptanalysis, ¡ public ¡design ¡compeBBons ¡

  5. Symmetric ¡encrypBon ¡ key ¡generaBon ¡ R k ¡ Kg ¡ Handled ¡ in ¡TLS ¡key ¡ exchange ¡ K ¡ OpBonal ¡ R ¡ M ¡or ¡ ¡ Enc ¡ C ¡ C ¡ Dec ¡ error ¡ M ¡ C ¡is ¡a ¡ciphertext ¡ Correctness: ¡ ¡D( ¡K ¡, ¡E(K,M,R) ¡) ¡= ¡M ¡ ¡with ¡probability ¡1 ¡over ¡randomness ¡used ¡

  6. In ¡TLS ¡symmetric ¡encrypBon ¡underlies ¡the ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Record ¡Layer ¡ h9p://amazon.com ¡ K ¡ K ¡ R ¡ M ¡or ¡ ¡ C’ ¡ Dec ¡ Enc ¡ C ¡ error ¡ M ¡ What ¡security ¡properBes ¡do ¡we ¡need ¡from ¡symmetric ¡encrypBon? ¡ 1) ¡ConfidenBality: ¡should ¡not ¡learn ¡any ¡informaBon ¡about ¡M ¡ 2) ¡AuthenBcity: ¡ ¡should ¡not ¡be ¡able ¡to ¡forge ¡messages ¡ Ocen ¡referred ¡to ¡as ¡AuthenBcated ¡EncrypBon ¡security ¡ ¡

  7. Block ¡ciphers ¡ key ¡generaBon ¡ Implements ¡ Key ¡is ¡a ¡uniformly ¡ ¡ R ¡ Kg ¡ a ¡family ¡of ¡permutaBons ¡ ¡ selected ¡bit ¡string ¡of ¡ on ¡n ¡bit ¡strings, ¡ length ¡k ¡ one ¡permutaBon ¡for ¡each ¡K ¡ K ¡ M ¡ E ¡ C ¡ C ¡ D ¡ M ¡ E: ¡{0,1} k ¡x ¡{0,1} n ¡-­‑> ¡{0,1} n ¡ Security ¡goal: ¡ ¡ ¡ ¡E(K,M) ¡is ¡indisBnguishable ¡from ¡random ¡n-­‑bit ¡string ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡for ¡anyone ¡without ¡K ¡

  8. Block ¡cipher ¡security ¡ E: ¡{0,1} k ¡x ¡{0,1} n ¡-­‑> ¡{0,1} n ¡ World ¡1 ¡ K ¡ World ¡0 ¡ ??? ¡ Let ¡C ¡be ¡uniformly ¡ ¡ chosen ¡n-­‑bit ¡string ¡ M ¡ E ¡ C ¡ If ¡this ¡holds ¡for ¡all ¡polynomial ¡ Adversary ¡can’t ¡tell ¡between ¡ Bme ¡adversaries, ¡then ¡E ¡is ¡ ¡ C ¡from ¡World ¡1 ¡or ¡World ¡0 ¡ ¡ called ¡a ¡secure ¡ ¡ (K ¡is ¡uniformly ¡chosen ¡and ¡secret) ¡ pseudorandom ¡funcBon ¡(PRF) ¡ Security ¡goal: ¡ ¡ ¡ ¡E(K,M) ¡is ¡indisBnguishable ¡from ¡random ¡n-­‑bit ¡string ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡for ¡anyone ¡without ¡K ¡

  9. Data ¡encrypBon ¡standard ¡(DES) ¡ L0 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡R0 ¡ Originally ¡called ¡Lucifer ¡ -­‑ team ¡at ¡IBM ¡ F K1 ¡ -­‑ input ¡from ¡NSA ¡ -­‑ standardized ¡by ¡NIST ¡ ¡in ¡1976 ¡ + L1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡R1 ¡ n ¡= ¡64 ¡ Number ¡of ¡keys: ¡ k ¡= ¡56 ¡ 72,057,594,037,927,936 ¡ F K2 ¡ Split ¡64-­‑bit ¡input ¡into ¡L0,R0 ¡of ¡32 ¡bits ¡each ¡ Repeat ¡Feistel ¡round ¡16 ¡Bmes ¡ + Each ¡round ¡applies ¡funcBon ¡F ¡using ¡ ¡ L2 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡R2 ¡ separate ¡round ¡key ¡ … ¡ … ¡

  10. Best ¡a9acks ¡against ¡DES ¡ A"ack ¡ A"ack ¡type ¡ Complexity ¡ Year ¡ Biham, ¡Shamir ¡ Chosen ¡plaintexts, ¡ 2 47 ¡plaintext, ¡ 1992 ¡ recovers ¡key ¡ ciphertext ¡pairs ¡ DESCHALL ¡ Unknown ¡ 2 56/4 ¡DES ¡ 1997 ¡ plaintext, ¡ computaBons ¡ recovers ¡key ¡ 41 ¡days ¡ EFF ¡Deepcrack ¡ Unknown ¡ ~4.5 ¡days ¡ 1998 ¡ plaintext, ¡ recovers ¡key ¡ Deepcrack ¡+ ¡ Unknown ¡ 22 ¡hours ¡ 1999 ¡ DESCHALL ¡ plaintext, ¡ recovers ¡key ¡ -­‑ ¡DES ¡is ¡sBll ¡used ¡in ¡some ¡places ¡ -­‑ ¡3DES ¡(use ¡DES ¡3 ¡Bmes ¡in ¡a ¡row ¡with ¡more ¡keys) ¡expands ¡ ¡ ¡ ¡keyspace ¡and ¡sBll ¡used ¡widely ¡in ¡pracBce ¡

  11. Advanced ¡EncrypBon ¡Standard ¡(AES) ¡ Response ¡to ¡1999 ¡a9acks: ¡ -­‑ NIST ¡has ¡design ¡compeBBon ¡for ¡new ¡ ¡ ¡ ¡ ¡ ¡block ¡cipher ¡standard ¡ -­‑ 5 ¡year ¡design ¡compeBBon ¡ -­‑ 15 ¡designs, ¡Rijndael ¡design ¡chosen ¡ ¡ ¡

  12. Advanced ¡EncrypBon ¡Standard ¡(AES) ¡ M ¡ Rijndael ¡(Rijmen ¡and ¡Daemen) ¡ n ¡= ¡128 ¡ Permute ¡ k ¡= ¡128, ¡192, ¡256 ¡ Number ¡of ¡keys ¡for ¡k=128: ¡ S1 ¡ + K1 ¡ 340,282,366,920,938,463,463,374,607,431,768,211,456 ¡ SubsBtuBon-­‑permutaBon ¡design. ¡ ¡ Permute ¡ k=128 ¡has ¡10 ¡rounds ¡of: ¡ 1) ¡Permute: ¡ ¡ S2 ¡ + K2 ¡ ¡ SubBytes ¡(non-­‑linear ¡S-­‑boxes) ¡ ¡ShicRows ¡+ ¡MixCols ¡(inverBble ¡linear ¡transform) ¡ ¡ Permute ¡ 2) ¡XOR ¡in ¡a ¡round ¡key ¡derived ¡from ¡K ¡ … ¡ (Actually ¡last ¡round ¡skips ¡MixCols) ¡

  13. Best ¡a9acks ¡against ¡AES ¡ A"ack ¡ A"ack ¡type ¡ Complexity ¡ Year ¡ Bogdanov, ¡ chosen ¡ ¡2 126.1 ¡ ¡Bme ¡+ ¡ 2011 ¡ Khovratovich, ¡ ciphertext, ¡ some ¡data ¡ Rechberger ¡ recovers ¡key ¡ overheads ¡ -­‑ Brute ¡force ¡requires ¡Bme ¡2 128 ¡ -­‑ Approximately ¡factor ¡4 ¡speedup ¡

  14. Are ¡block ¡ciphers ¡good ¡for ¡ record ¡layers? ¡ M ¡ FuncBonal ¡limitaBons: ¡ ¡-­‑ ¡Only ¡encrypt ¡messages ¡that ¡fit ¡in ¡n ¡bits ¡ E K ¡ C ¡ Security ¡limitaBons: ¡ ¡-­‑ ¡ConfidenBality: ¡M ¡= ¡M’ ¡ ¡=> ¡E(K,M) ¡= ¡E(K,M’) ¡ ¡-­‑ ¡AuthenBcity: ¡any ¡C ¡of ¡length ¡n ¡is ¡valid ¡ciphertext ¡

  15. Block ¡cipher ¡modes ¡of ¡operaBon ¡ How ¡can ¡we ¡build ¡an ¡encrypBon ¡scheme ¡for ¡arbitrary ¡message ¡ spaces ¡out ¡of ¡block ¡cipher? ¡ ¡ Electronic ¡codebook ¡(ECB) ¡mode ¡ Pad ¡message ¡M ¡to ¡M1,M2,M3,... ¡where ¡each ¡block ¡Mi ¡is ¡n ¡bits ¡ Then: ¡ M1 ¡ M2 ¡ M3 ¡ E K ¡ E K ¡ E K ¡ C1 ¡ C2 ¡ C3 ¡

  16. ECB ¡mode ¡is ¡a ¡more ¡complicated ¡ looking ¡subsBtuBon ¡cipher ¡ Recall ¡our ¡credit-­‑card ¡number ¡example. ¡ ECB: ¡subsBtuBon ¡cipher ¡with ¡alphabet ¡n-­‑bit ¡strings ¡instead ¡of ¡digits ¡ Encrypted ¡with ¡ECB ¡ Images ¡courtesy ¡of ¡ ¡ h9p://en.wikipedia.org/wiki/Block_cipher_modes_of_operaBon ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend