CS338 Computer Security Wednesday, 27 September 2023 + Eve debrief part 1: big integers - Try (65426 ** 119537) in python - Try (65426 ** 119537) % 170171 in python - ??? - Didn't need it, because python is smart, but here's one approach... def mod_exponentiate(a, b, n): ''' returns (a ** b) mod n ''' assert b >= 0 if b == 0: result = 1 elif b == 1: result = a % n elif b % 2 == 0: k = mod_exponentiate(a, b // 2, n) result = (k * k) % n else: k = mod_exponentiate(a, b // 2, n) result = (k * k * a) % n return result + Eve debrief part 2: integers, bytes, hexadecimal + Eve debrief part 3: shared secret - Suppose Alice & Bob have performed a DH exchange and have secret K - Can they use K as an AES key? - Is Alice confident she's talking to Bob? - Is Bob confident he's talking to Alice? - If any of these answers is no, now what? + Questions ==== + Digital signatures - How I can prove I have the secret key S that goes with that public key P - How does that fit with hashes? + Next assignment: the pragmatics of keys - Scenario: you want to SSH to mantis without a password - What does the Alice (your ssh command) to Bob (the ssh server on mantis) conversation need to include? - How does the relevant stuff get stored? + Next: PKI and X.509 certificates