Docsity

CSE543 Computer Security Lecture 2: Introduction to Cryptography, Study notes of Computer Science

Partial preview of the text

Download CSE543 Computer Security Lecture 2: Introduction to Cryptography and more Study notes Computer Science in PDF only on Docsity!

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger

CSE 543 - Computer

Security

Lecture 2 - Introduction September 7, 2006 URL: http://www.cse.psu.edu/~tjaeger/cse543-f06/ 1

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

A historical moment …

  • Mary Queen of Scots is being held

by Queen Elizabeth …

  • … and accused of treason.
  • All communication with co-

conspirators encrypted.

  • Walsingham needs to prove

complicity.

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Cryptography

  • Cryptography (cryptographer)
    • Creating ciphers
  • Cryptanalysis (cryptanalyst)
    • Break ciphers
  • The history of cryptography is an arms race between cryptographers and cryptanalysts

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Encryption algorithm

  • Algorithm used to make content unreadable by all but

the intended receivers

E(plaintext,key) = ciphertext D(ciphertext,key) = plaintext

  • Algorithm is public, key is private
  • Block vs. Stream Ciphers
    • Block: input is fixed blocks of same length
    • Stream: stream of input

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Example: Caesar Cipher

  • Substitution cipher
  • Every character is replaced with the character three

slots to the right

  • Q: What is the key?

S E C U R I T Y A N D P R I V A C Y

V H F X U L W B D Q G S U L Y D F B

A B C D E F G H I J K L M N O P Q R S T V W X Y Z
D E F G H I J K L M N O P Q R S T V W X Y Z A B C
U
U

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Cyptanalyze this ….

“cfh orng aq”

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Shared key cryptography

  • Traditional use of cryptography
  • Symmetric keys, where A single key (k) is used is

used for E and D

D ( E ( p, k ), k ) = p

  • All (intended) receivers have access to key
  • Note: Management of keys determines who has

access to encrypted data

  • E.g., password encrypted email
  • Also known as symmetric key cryptography

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

Key size and algorithm strength

  • Key size is an oft-cited measure of the strength of an

algorithm, but is strength strongly correlated (or

perfectly correlated with key length)?

  • Say we have two algorithms, A and B with key sizes of 128 and 160 bits (the common measure)
  • Is A less secure than B?
  • What if A=B (for variable key-length algorithms)?

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Page

The one-time pad (OTP)

  • Assume you have a secret bit string s of length n

known only to two parties, Alice and Bob

  • Alice sends a message m of length of n to bob
  • Alice uses the following encryption function to generate ciphertext c forall i=1 to n : ci = mi si
  • E.g., XOR the data with the secret bit string
  • An adversary Mallory cannot retrieve any part of the data
  • Simple version of the proof of security:
  • Assume for simplicity that value of each bit in m is equally likely, then you have no information to work with.

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Reading papers …

What is the purpose of reading papers?

How do you read papers?

14

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Understanding what you read (cont.)

  • What scientific devices are the authors using to communicate their point?
  • Methodology - this is how they evaluate their solution.
  • Theoretical papers typically validate a model using mathematical arguments (e.g., proofs)
  • Experimental papers evaluate results based on test apparatus (e.g., measurements, data mining, synthetic workload simulation, trace- based simulation).
  • Some papers have no evaluation at all, but argue the merits of the solution in prose (e.g., paper design papers) 16

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Understanding what you read (cont.)

  • What do the authors claim?
  • Results - statement of new scientific discovery.
  • Typically some abbreviated form of the results will be present in the abstract, introduction, and/or conclusions.
  • Note that just because a result was accepted into a conference or journal does necessarily not mean that it is true. Always be circumspect.
  • What should you remember about this paper?
  • Take away - what general lesson or fact should you take away from the paper.
  • Note that really good papers will have take-aways that are more general than the paper topic. 17

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger A Sample Summary

  • Contribution : Ken Thompson shows how hard it is to trust the security of software in this paper. He describes an approach whereby he can embed a Trojan horse in a compiler that can insert malicious code on a trigger (e.g., recognizing a login program).
  • Related Work : This approach is an example of a Trojan horse program. A Trojan horse is a program that serves a legitimate purpose on the surface, but includes malicious code that will be executed with it. Examples include the Sony/BMG rootkit: the program provided music legitimately, but also installed spyware.
  • Methodology : The approach works by generating a malicious binary that is used to compile compilers. Since the compiler code looks OK and the malice is in the binary compiler compiler, it is difficult to detect.
  • Results:^ The resulting system identifies construction of login programs and miscompiles the command to accept a particular password known to the attacker.
  • Take Away:^ Thompson states the “obvious” moral that “you cannot trust code that you did not totally create yourself.” We all depend on code, but constructing a basis for trusting it is very hard, even today. 19

CSE543 Computer (and Network) Security - Fall 2006 - Professor Jaeger Reading a paper

Everyone has a different way of reading a paper.

Here are some guidelines I use:

  • Always have a copy to mark-up. Your margin notes will serve as invaluable sign-posts when you come back to the paper (e.g., “here is the experimental setup” or “main result described here”)
  • After reading, write a summary of the paper containing answers to the questions in the preceding slides. If you can’t answer (at least at a high level) these questions without referring to the paper, it may be worth scanning again.

Over the semester, try different strategies for

reading papers (e.g., Honeyman approach) and see

which one is the most effective for you.

20