CS338 Computer Security Wednesday, 30 October 2024 + Test corrections back - nice job! - a few comments - 2(e) What computational fact makes RSA secure? good: "factoring is slow" better: start with public key (n,e), it's hard to get d - 4(c) What is a port, and what is its purpose good: "identifies a service on a computer/server" not good: "usually is a well-known number, only sometimes is a random number" better, part 1: "a port identifies a process on a computer that is either waiting for connection requests or involved in a connection" better, part 2: there are "well-known" ports associated with common services cat /etc/services less /etc/services better, part 3: when a client makes a TCP connection, the client gets a port, and it is randomly assigned - 5(a) What does a cryptographic hash function do? [look it up on wikipedia] right: H(D) is the same every time for a given D wrong kinda: the data D can't be found given H(D) right kinda: it is computationally very hard to find D from H(D) wrong: the hash value H(D) is unique to D because: - the domain of a hash function H is infinite (i.e., you can feed any number of bytes into H) - the size of H(D) is a fixed number of bytes (e.g., SHA-256 digest is always 256 bits / 32 bytes long) - i.e., the range H is finite, so - some/maybe all H(D)'s could come from an infinite number of potential Ds - 9(c,d) - validating a certificate - Alice connects to Somebody (she hopes it's Bob) - Somebody sends her a certificate that says: "bob.com" || P_B || Sig_CA - Alice "validates" or "verifies" the certificate - checks the expiration date - checks that the identity "bob.com" is who Alice wants to talk to - ... - Is the Sig_CA legit for the combo "bob.com" || P_B? E(P_CA, Sig_CA) ==? H("bob.com" || P_B) If yes, then CA says "the real bob.com goes with this P_B" "the real bob.com has S_B" - The certificate is public, so Mal/Eve could have sent Bob's cert to Alice - Is Somebody Bob? alternatively: Is Somebody in control of S_B Send a random challenge X, force Somebody to sign it. Sig good? Yay, we will accept that Somebody is Bob + Homework questions - ?? - WTH is going on with that bash command? + Project ideas? + SQL injection - RDBMS, like postgresql - SQL - bad web programming - ...