Successfully reported this slideshow.
Upcoming SlideShare
×

# Cybersecurity cyberlab3

457 views

Published on

Brief intro to cryptography

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### Cybersecurity cyberlab3

1. 1. CryptologyDUH BRX UHDGB?Slides by Raymond Borges 1
2. 2. Outline• Background• Ancient Cryptography• Frequency Analysis• Modern Cryptography• Secure Communication• Tools of the trade• Conclusion 2
3. 3. Background 3
4. 4. Background 4
5. 5. The Ancient Art of Secret Messages 5
6. 6. BackgroundPrinciples and methods for:1. Transforming message into unintelligible2. Transforming message back to original form 6
7. 7. BackgroundPrinciples and methods for:• Retransforming message back to original form• Without knowledge of key 7
8. 8. Background 8
9. 9. 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
10. 10. Practice (transposition)Caesar CipherCiphertext: DUH BRX UHDGBSolution:c = E(k, p) = (p + k) mod 26c = E(3, p) = (p + 3) mod 26 for k=key=34 mod 26 = 4 so A=Dp = D(k, c) = (c − k) mod 26D=4 (4-3) mod 26 = 1 10
11. 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 letters26 ! = 4.03291461 × 1026Impossible to crack? No….Polyalphabetic tougher… 11
12. 12. 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
13. 13. Frequency analysis• Most frequently occurring trigrams ordered by decreasing frequency are: 13
14. 14. Polyalphabetic Ciphers• The Vigenère cipher• First letter use key 1• Second uses key 2• Third uses key 3To Decrypt go backwards 14
15. 15. Modern CryptographyData Encryption Standard (DES) 1976• 64 bit key (uses 56bits)• 16 stages• Block divided into two 32-bit halves• XOR• Subkeys made key schedule 15
16. 16. Modern CryptographyFeistel function:1. Expansion- the 32-bit half-block is expanded to 48 bits by duplicating half of the bits2. 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 boxes4. Permutation 16
17. 17. Modern CryptographyAdvanced Encryption Standard (AES) 2001• Substitution-permutation network• Not Feistel• Fixed block size 128 bits• Key size of 128, 192, or 256 bits 17
18. 18. Modern Cryptography Advanced Encryption Standard (AES)1. KeyExpansion2. Initial Round 1. AddRoundKey3. Rounds 1. SubEytes 2. ShiftRows 3. MixColumns 4. AddRoundKey4.Final Round 1. SubBytes 2. ShiftRows 3. AddRoundKey 18
19. 19. Public-key cryptographyRSA- Ron Rivest, Adi Shamir, Leonard Adleman 1978• Uses factoring problem (large primes)• Two large primes of similar size > 100 digitsExample: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. 20. Public-key cryptography Encryption Decryption c = me (mod n) m = cd (mod n)Example:To encrypt m = 65c = 6517 (mod 3233) = 2790To decrypt c = 2790, we calculatem = 27902753 (mod 3233) = 65 20
21. 21. 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 communicationHTTPS, SSH, SFTP, SSL and TLS and others 21
22. 22. Some Tools of the tradeFile Encryption• Axantum• WinZipDisk encryption• TrueCryptNetwork• Open SSH 22