Cryptology
DUH BRX UHDGB?
Slides by Raymond Borges




                           1
Outline
•   Background
•   Ancient Cryptography
•   Frequency Analysis
•   Modern Cryptography
•   Secure Communication
•   Tools of the trade
•   Conclusion

                            2
Background




             3
Background




             4
The Ancient Art of Secret Messages




                                 5
Background

Principles and methods for:
1. Transforming message into unintelligible
2. Transforming message back to original form




                                                6
Background

Principles and methods for:
• Retransforming message back to original form
• Without knowledge of key




                                                 7
Background




             8
Encryption
• Plaintext: This is what you want to encrypt
• Ciphertext: The encrypted output
• Enciphering or encryption: process which
  converts plaintext to ciphertext
• Encryption algorithm: Sequence processing
  steps to transform plaintext into ciphertext
• Secret key: Sets some or all parameters used
  by encryption algorithm
                                                 9
Practice (transposition)
Caesar Cipher
Ciphertext: DUH BRX UHDGB
Solution:
c = E(k, p) = (p + k) mod 26
c = E(3, p) = (p + 3) mod 26 for k=key=3
4 mod 26 = 4 so A=D

p = D(k, c) = (c − k) mod 26
D=4 (4-3) mod 26 = 1

                                           10
Practice (substitution)
Monoalphabetic cipher
• plaintext letters: a b c d e f .....
• substitution letters: t h i j a b .....
Key is sequence of substitution letters
26 ! = 4.03291461 × 1026
Impossible to crack? No….

Polyalphabetic tougher…

                                            11
ETAOIN SHRDLU (Frequency analysis)
• ‘E’ is the most common letter in the English
  language,
• ‘Th’ is the most common bigram
• ‘The’ most common trigram
• Letter frequency English 




                                                 12
Frequency analysis
• Most frequently occurring trigrams ordered by
  decreasing frequency are:




                                              13
Polyalphabetic Ciphers
•   The Vigenère cipher
•   First letter use key 1
•   Second uses key 2
•   Third uses key 3

To Decrypt go backwards



                                    14
Modern Cryptography
Data Encryption Standard (DES) 1976
• 64 bit key (uses 56bits)
• 16 stages
• Block divided into two 32-bit halves
• XOR
• Subkeys made key schedule



                                         15
Modern Cryptography
Feistel function:
1. Expansion- the 32-bit half-block is expanded
   to 48 bits by duplicating half of the bits
2. Key mixing — the result is combined with a
   subkey using an XOR operation.
3. Substitution —block divided into eight 6-bit
   pieces then uses substitution boxes
4. Permutation
                                                  16
Modern Cryptography
Advanced Encryption Standard (AES) 2001
• Substitution-permutation network
• Not Feistel
• Fixed block size 128 bits
• Key size of 128, 192, or 256 bits




                                          17
Modern Cryptography
                   Advanced Encryption Standard (AES)
1. KeyExpansion
2. Initial Round
         1. AddRoundKey
3. Rounds
         1. SubEytes
         2. ShiftRows
         3. MixColumns
         4. AddRoundKey
4.Final Round
         1. SubBytes
         2. ShiftRows
         3. AddRoundKey
                                                        18
Public-key cryptography
RSA- Ron Rivest, Adi Shamir, Leonard Adleman 1978
• Uses factoring problem (large primes)
• Two large primes of similar size > 100 digits

Example:
Public (n = 3233, e = 17)
Private key is (n = 3233, d = 2753)

n=p1*p2,
e=coprime number to (p1-1)(p2-1)
d =modular multiplicative inverse of e          19
Public-key cryptography
     Encryption               Decryption
   c = me (mod n)            m = cd (mod n)

Example:
To encrypt m = 65
c = 6517 (mod 3233) = 2790

To decrypt c = 2790, we calculate
m = 27902753 (mod 3233) = 65
                                              20
Secure Communication
• AES 256 bit key
• 15360-bit RSA keys are equivalent 256-bit
  symmetric keys
• 2^256 = 1.15792089 × 1077 brute-force?

Use RSA then AES for secure communication
HTTPS, SSH, SFTP, SSL and TLS and others

                                              21
Some Tools of the trade
File Encryption
• Axantum
• WinZip

Disk encryption
• TrueCrypt

Network
• Open SSH

                                  22
References
• http://www.axantum.com/axcrypt/Downloads
  .html
• http://dottech.org/freeware-reviews/15996/
• http://technet.microsoft.com/en-
  us/library/cc757819(v=ws.10).aspx




                                           23
Questions?




             24

Cybersecurity cyberlab3

  • 1.
  • 2.
    Outline • Background • Ancient Cryptography • Frequency Analysis • Modern Cryptography • Secure Communication • Tools of the trade • Conclusion 2
  • 3.
  • 4.
  • 5.
    The Ancient Artof Secret Messages 5
  • 6.
    Background Principles and methodsfor: 1. Transforming message into unintelligible 2. Transforming message back to original form 6
  • 7.
    Background Principles and methodsfor: • Retransforming message back to original form • Without knowledge of key 7
  • 8.
  • 9.
    Encryption • Plaintext: Thisis what you want to encrypt • Ciphertext: The encrypted output • Enciphering or encryption: process which converts plaintext to ciphertext • Encryption algorithm: Sequence processing steps to transform plaintext into ciphertext • Secret key: Sets some or all parameters used by encryption algorithm 9
  • 10.
    Practice (transposition) Caesar Cipher Ciphertext:DUH BRX UHDGB Solution: c = E(k, p) = (p + k) mod 26 c = E(3, p) = (p + 3) mod 26 for k=key=3 4 mod 26 = 4 so A=D p = D(k, c) = (c − k) mod 26 D=4 (4-3) mod 26 = 1 10
  • 11.
    Practice (substitution) Monoalphabetic cipher •plaintext letters: a b c d e f ..... • substitution letters: t h i j a b ..... Key is sequence of substitution letters 26 ! = 4.03291461 × 1026 Impossible to crack? No…. Polyalphabetic tougher… 11
  • 12.
    ETAOIN SHRDLU (Frequencyanalysis) • ‘E’ is the most common letter in the English language, • ‘Th’ is the most common bigram • ‘The’ most common trigram • Letter frequency English  12
  • 13.
    Frequency analysis • Mostfrequently occurring trigrams ordered by decreasing frequency are: 13
  • 14.
    Polyalphabetic Ciphers • The Vigenère cipher • First letter use key 1 • Second uses key 2 • Third uses key 3 To Decrypt go backwards 14
  • 15.
    Modern Cryptography Data EncryptionStandard (DES) 1976 • 64 bit key (uses 56bits) • 16 stages • Block divided into two 32-bit halves • XOR • Subkeys made key schedule 15
  • 16.
    Modern Cryptography Feistel function: 1.Expansion- the 32-bit half-block is expanded to 48 bits by duplicating half of the bits 2. Key mixing — the result is combined with a subkey using an XOR operation. 3. Substitution —block divided into eight 6-bit pieces then uses substitution boxes 4. Permutation 16
  • 17.
    Modern Cryptography Advanced EncryptionStandard (AES) 2001 • Substitution-permutation network • Not Feistel • Fixed block size 128 bits • Key size of 128, 192, or 256 bits 17
  • 18.
    Modern Cryptography Advanced Encryption Standard (AES) 1. KeyExpansion 2. Initial Round 1. AddRoundKey 3. Rounds 1. SubEytes 2. ShiftRows 3. MixColumns 4. AddRoundKey 4.Final Round 1. SubBytes 2. ShiftRows 3. AddRoundKey 18
  • 19.
    Public-key cryptography RSA- RonRivest, Adi Shamir, Leonard Adleman 1978 • Uses factoring problem (large primes) • Two large primes of similar size > 100 digits Example: Public (n = 3233, e = 17) Private key is (n = 3233, d = 2753) n=p1*p2, e=coprime number to (p1-1)(p2-1) d =modular multiplicative inverse of e 19
  • 20.
    Public-key cryptography Encryption Decryption c = me (mod n) m = cd (mod n) Example: To encrypt m = 65 c = 6517 (mod 3233) = 2790 To decrypt c = 2790, we calculate m = 27902753 (mod 3233) = 65 20
  • 21.
    Secure Communication • AES256 bit key • 15360-bit RSA keys are equivalent 256-bit symmetric keys • 2^256 = 1.15792089 × 1077 brute-force? Use RSA then AES for secure communication HTTPS, SSH, SFTP, SSL and TLS and others 21
  • 22.
    Some Tools ofthe trade File Encryption • Axantum • WinZip Disk encryption • TrueCrypt Network • Open SSH 22
  • 23.
    References • http://www.axantum.com/axcrypt/Downloads .html • http://dottech.org/freeware-reviews/15996/ • http://technet.microsoft.com/en- us/library/cc757819(v=ws.10).aspx 23
  • 24.

Editor's Notes

  • #11 1. Are you ready
  • #21 M=message c=ciphertext n and e define in keys