Introduction to Cryptography Principles & Techniques

crypto n.w
1 / 25
Embed
Share

Explore the fundamental concepts of cryptography, including classical ciphers, substitution techniques, Caesar's cipher decryption, cryptanalysis methods, and more. Learn how cryptographic keys and permutations play a crucial role in securing information and communication. Dive into the world of encryption and decryption principles to enhance your understanding of information security practices.

  • Cryptography
  • Encryption
  • Information Security
  • Cryptanalysis
  • Ciphers

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Crypto Slides Original Source: 1. M. Stamp, Information Security: Principles and Practice, John Wiley Cryptography 1

  2. Outline Crypto o Classical Crypto o Crypto Requirements o Crypto Taxonomy Cryptography 2

  3. 1. Simple Substitution Plaintext: fourscoreandsevenyearsago Key: Plaintext a b c d e f g h i j k l m n o p q r s t u v w x y z Ciphertext D E F G H I J K L M N O P Q R S T U VWX Y Z A B C Ciphertext: IRXUVFRUHDQGVHYHQBHDUVDJR Shift by 3 is Caesar s cipher Cryptography 3

  4. Ceasars Cipher Decryption Suppose we know a Ceasar s cipher is being used: a b c d e f g h i j k l m n o p q r s t u v w x y z Plaintext Ciphertext D E F G H I J K L M N O P Q R S T U V WX Y Z A B C Given ciphertext: VSRQJHEREVTXDUHSDQWV Plaintext: spongebobsquarepants Cryptography 4

  5. 1. Simple Substitution (modified) Shift by n for some n {0,1,2, ,25} Then key is n Example: key n = 7 Plaintext a b c d e f g h i j k l m n o p q r s t u v w x y z Ciphertext H I J K L M N O P Q R S T U V WX Y Z A B C D E F G Cryptography 5

  6. Cryptanalysis I: Try Them All A simple substitution (shift by n) is used o But the key is unknown Given ciphertext: CSYEVIXIVQMREXIH How to find the key? Only 26 possible keys try them all! Exhaustive key search Solution: key is n = 4 Cryptography 6

  7. Least-Simple Simple Substitution In general, simple substitution key can be any permutation of letters o Not necessarily a shift of the alphabet For example Plaintext a b c d e f g h i j k l m n o p q r s t u v w x y z J I C A X S E Y V D K WB Q T Z R H F M P N U L G O Ciphertext Then 26! > 288 possible keys! Cryptography 7

  8. Cryptanalysis II: Be Clever We know that a simple substitution is used But not necessarily a shift by n Find the key given the ciphertext: PBFPVYFBQXZTYFPBFEQJHDXXQVAPTPQJKTOYQWIPBVWLXTOXBTF XQWAXBVCXQWAXFQJVWLEQNTOZQGGQLFXQWAKVWLXQWA EBIPBFXFQVXGTVJVWLBTPQWAEBFPBFHCVLXBQUFEVWLXGDPEQ VPQGVPPBFTIXPFHXZHVFAGFOTHFEFBQUFTDHZBQPOTHXTYFTO DXQHFTDPTOGHFQPBQWAQJJTODXQHFOQPWTBDHHIXQVAPBF ZQHCFWPFHPBFIPBQWKFABVYYDZBOTHPBQPQJTQOTOGHFQAP BFEQJHDXXQVAVXEBQPEFZBVFOJIWFFACFCCFHQWAUVWFLQH GFXVAFXQHFUFHILTTAVWAFFAWTEVOITDHFHFQAITIXPFHXAF QHEFZQWGFLVWPTOFFA Cryptography 8

  9. Cryptanalysis II Cannot try all 288 simple substitution keys Can we be more clever? English letter frequency counts 0.14 0.12 0.10 0.08 0.06 0.04 0.02 0.00 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Cryptography 9

  10. Cryptanalysis II Ciphertext: PBFPVYFBQXZTYFPBFEQJHDXXQVAPTPQJKTOYQWIPBVWLXTOXBTFXQWA XBVCXQWAXFQJVWLEQNTOZQGGQLFXQWAKVWLXQWAEBIPBFXFQVX GTVJVWLBTPQWAEBFPBFHCVLXBQUFEVWLXGDPEQVPQGVPPBFTIXPFHXZ HVFAGFOTHFEFBQUFTDHZBQPOTHXTYFTODXQHFTDPTOGHFQPBQWAQ JJTODXQHFOQPWTBDHHIXQVAPBFZQHCFWPFHPBFIPBQWKFABVYYDZB OTHPBQPQJTQOTOGHFQAPBFEQJHDXXQVAVXEBQPEFZBVFOJIWFFACF CCFHQWAUVWFLQHGFXVAFXQHFUFHILTTAVWAFFAWTEVOITDHFHFQ AITIXPFHXAFQHEFZQWGFLVWPTOFFA Analyze this message using statistics below Ciphertext frequency counts: A B C D E F G H I 21 26 6 10 12 51 10 25 10 9 J K L M N O P Q R S T U V W X Y 3 10 0 1 15 28 42 0 Z 8 0 27 4 24 22 28 6 Cryptography 10

  11. Cryptanalysis: Terminology Cryptosystem/cipher is secure if best known attack is to try all keys o Exhaustive key search, that is Cryptosystem/cipher is insecure if any shortcut attack is known But then insecure cipher might be harder to break than a secure cipher! o What the ? Cryptography 11

  12. 2. Double Transposition Plaintext: attackxatxdawn Permute rows and columns Ciphertext: xtawxnattxadakc Key is matrix size and permutations: (3,5,1,4,2) and (1,3,2) Cryptography 12

  13. 3. One-Time Pad: Encryption e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Encryption: Plaintext Key = Ciphertext h e i l h i t l e r Plaintext: 001 000 010 100 001 010 111 100 000 101 Key: 111 101 110 101 111 100 000 101 110 000 Ciphertext: 110 101 100 001 110 110 111 001 110 101 s r l h s s t h s r Cryptography 13

  14. 3. One-Time Pad: Decryption e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Decryption: Ciphertext Key = Plaintext s r l h s s t h s r Ciphertext: 110 101 100 001 110 110 111 001 110 101 Key: 111 101 110 101 111 100 000 101 110 000 Plaintext: 001 000 010 100 001 010 111 100 000 101 h e i l h i t l e r Cryptography 14

  15. 3. One-Time Pad Double agent claims sender used following key s r l h s s t h s r Ciphertext: key : Plaintext : 110 101 100 001 110 110 111 001 110 101 101 111 000 101 111 100 000 101 110 000 011 010 100 100 001 010 111 100 000 101 k i l l h i t l e r e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Cryptography 15

  16. 3. One-Time Pad Or sender is captured and claims the key is s r l h s s t h s r Ciphertext: key : Plaintext : 110 101 100 001 110 110 111 001 110 101 111 101 000 011 101 110 001 011 101 101 001 000 100 010 011 000 110 010 011 000 h e l i k e s i k e e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111 Cryptography 16

  17. 3. One-Time Pad Summary Provablysecure o Ciphertext provides no info about plaintext o All plaintexts are equally likely but, only when used correctly o Pad must be random, used only once o Pad is known only to sender and receiver Note: pad (key) is same size as message So, why not distribute msg instead of pad? Cryptography 17

  18. 4. Codebook Cipher Literally, a book filled with codewords Zimmerman Telegram encrypted via codebook Februar 13605 fest 13732 finanzielle 13850 folgender 13918 Frieden 17142 Friedenschluss 17149 : : Modern block ciphers are codebooks! More about this later Cryptography 18

  19. 4. Codebook Cipher: Additive Codebooks also (usually) use additive Additive book of random numbers o Encrypt message with codebook o Then choose position in additive book o Add additives to get ciphertext o Send ciphertext and additive position (MI) o Recipient subtracts additives before decrypting Why use an additive sequence? Cryptography 19

  20. Claude Shannon The founder of Information Theory 1949 paper: Comm. Thy. of Secrecy Systems Fundamental concepts o Confusion obscure relationship between plaintext and ciphertext o Diffusion spread plaintext statistics through the ciphertext Proved one-time pad is secure One-time pad is confusion-only, while double transposition is diffusion-only Cryptography 20

  21. Outline Crypto o Classical Crypto o Crypto Requirements o Crypto Taxonomy Cryptography 21

  22. Crypto Requirements Most importantly: 1. Key should be long enough to make exhaustive key search infeasible 2. No shortcut attack 3. No reuse of the key Cryptography 22

  23. Outline Crypto o Classical Crypto o Crypto Requirements o Crypto Taxonomy Cryptography 23

  24. Crypto Taxonomy Symmetric Key o Same key for encryption and decryption o Two types Stream ciphers Block ciphers Public Key (or asymmetric crypto) o Two keys, one for encryption (public), and one for decryption (private) o And digital signatures nothing comparable in symmetric key crypto Crypto Hash algorithms (not covered here!) o Can be viewed as one way crypto Cryptography 24

  25. Cryptanalysis Taxonomy From perspective of info available to Trudy o Ciphertext only o Known plaintext o Chosen plaintext Lunchtime attack Protocols might encrypt chosen data o Adaptively chosen plaintext o Related key o Forward search (public key crypto) o And others Cryptography 25

More Related Content