Cse102 Lec 09
Cse102 Lec 09
Lecture 9
• Information security:
– Keep information safe
– Control access to authorized people only
• Physical security: lock doors, maintain control of
devices
• Online security:
– Secure assembly language
– Secure operating system
– Secure network
Password attacks
• Guess password, brute force or from knowledge
– Try common passwords (e.g,123456)
– Try personal references (e.g., pet name)
– Try all possible passwords (computationally difficult)
• Steal password file and use password-cracking
software
– Tries words and word combinations, millions of
password possibilities per second
• Social engineering: get person to tell password
Invitation to Computer Science, 6th Edition 7
Passwords
Passwords
• Probably oldest authentication mechanism used in
computer systems
• User enters user ID and password, maybe multiple
attempts in case of error
• Usability problems
• Forgotten passwords might not be recoverable (though
this has been changing recently, see later)
• Entering passwords is inconvenient
• If password is disclosed to unauthorized individual, the
individual can immediately access protected resource
• Unless we use multi-factor authentication
• If password is shared among many people, password
updates become difficult
3-32
Password guessing a:acks (1)
Password guessing attacks
• Brute-force: Try all possible passwords using
exhaustive search
• Can test 350,000 Microsoft Word passwords per
second on a 3-GHz Pentium 4
• For passwords of length 8 consisting only of
letters, there are about 2 · 1011 possibilities
• Takes 600,000 seconds or 166 hours to test them
• Expected wait till success is 83 hours
• Easy to buy more hardware if payo↵ is worth it
• Parallelizing search and running it on Graphics
Processing Unit can achieve a speedup of 25
• Can make attack harder by including digits and
special characters in password
• However,. . . 3-33
Threats and Defenses (continued)
Block cipher
• Block of plaintext encoded into block of ciphertext
• Each character contributes to multiple characters
• Matrix-based block cipher:
– Group characters into blocks n characters long
– Find invertible n by n matrix, M, and its inverse, M’
as keys
– Map characters to letters A->1, B->2, etc.
– Wrap values 26 and above back to zero: 26->0, 27-
>1, etc.
Encrypt block GO
• Convert to vector V = [7 15]
• Matrix multiplication:
V x M = [7*3 + 15*2 7*5 + 15*3]
= [51 80] = [25 2]
• Convert to string: YB
Decrypt block YB
• Convert to vector V2 = [25 2]
• Matrix multiplication:
V2 x M’ = [25*23 + 2*2 5*25 + 23*2]
= [579 171] = [7 15]
• Convert to string: GO
RSA encryption:
Given public key (n, e)
• Convert message to integer P
• Calculate C = Pe modulo n
RSA decryption:
Given private key d
• Calculate Cd modulo n
RSA decryption:
Given private key 29
• Calculate 4629 modulo 91 = 37