Practice Questions. CS161 Computer Security, Fall 2008



Similar documents
Introduction to Cryptography CS 355

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Digital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

CS 758: Cryptography / Network Security

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Public Key Cryptography. c Eli Biham - March 30, Public Key Cryptography

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Computer Security: Principles and Practice

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

SECURITY IN NETWORKS

Introduction to Computer Security

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

Cryptography Lecture 8. Digital signatures, hash functions

1. a. Define the properties of a one-way hash function. (6 marks)

Signature Schemes. CSG 252 Fall Riccardo Pucella

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Cryptography and Network Security

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

CSCE 465 Computer & Network Security

Fundamentals of Computer Security

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

Network Security. HIT Shimrit Tzur-David

Lecture 9: Application of Cryptography

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

Client Server Registration Protocol

Cryptographic Hash Functions Message Authentication Digital Signatures

SECURITY ANALYSIS OF A SINGLE SIGN-ON MECHANISM FOR DISTRIBUTED COMPUTER NETWORKS

Chapter 8 Security. IC322 Fall Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

Message Authentication Codes

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Hash Functions. Integrity checks

Authentication requirement Authentication function MAC Hash function Security of

2. Cryptography 2.4 Digital Signatures

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Chapter 10. Network Security

Discrete logarithms within computer and network security Prof Bill Buchanan, Edinburgh Napier

Table of Contents. Bibliografische Informationen digitalisiert durch

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

CS558. Network Security. Boston University, Computer Science. Midterm Spring 2014.

Chapter 7: Network security

CRYPTOGRAPHY IN NETWORK SECURITY

Lukasz Pater CMMS Administrator and Developer

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

Massachusetts Institute of Technology Handout : Network and Computer Security October 9, 2003 Professor Ronald L. Rivest.

Crittografia e sicurezza delle reti. Digital signatures- DSA

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Public Key Cryptography Overview

Lecture 6 - Cryptography

Common security requirements Basic security tools. Example. Secret-key cryptography Public-key cryptography. Online shopping with Amazon

One-Way Encryption and Message Authentication

Chapter 3. Network Domain Security

The Misuse of RC4 in Microsoft Word and Excel

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Overview of Public-Key Cryptography

Name: 1. CSE331: Introduction to Networks and Security Fall 2003 Dec. 12, /14 2 /16 3 /16 4 /10 5 /14 6 /5 7 /5 8 /20 9 /35.

PGP (Pretty Good Privacy) INTRODUCTION ZHONG ZHAO

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

CS155. Cryptography Overview

EXAM questions for the course TTM Information Security May Part 1

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Implementation and Comparison of Various Digital Signature Algorithms. -Nazia Sarang Boise State University

Authenticated encryption

Public Key Cryptography and RSA. Review: Number Theory Basics

Computer Networks. Network Security and Ethics. Week 14. College of Information Science and Engineering Ritsumeikan University

Midterm. Name: Andrew user id:

Cryptography and Network Security Digital Signature

Digital signatures. Informal properties

Digital Signatures. Prof. Zeph Grunschlag

Secure Shell SSH provides support for secure remote login, secure file transfer, and secure TCP/IP and X11 forwarding. It can automatically encrypt,

Public Key Cryptography of Digital Signatures

Computer Networks - CS132/EECS148 - Spring

lundi 1 octobre 2012 In a set of N elements, by picking at random N elements, we have with high probability a collision two elements are equal

The Mathematics of the RSA Public-Key Cryptosystem

Security and Authentication Primer

CS 161 Computer Security Spring 2010 Paxson/Wagner MT2

THE UNIVERSITY OF TRINIDAD & TOBAGO

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography

Security Sensor Network. Biswajit panja

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Signature Amortization Technique for Authenticating Delay Sensitive Stream

Princeton University Computer Science COS 432: Information Security (Fall 2013)

Digital Signature. Raj Jain. Washington University in St. Louis

CSCI-E46: Applied Network Security. Class 1: Introduction Cryptography Primer 1/26/16 CSCI-E46: APPLIED NETWORK SECURITY, SPRING

Security: Focus of Control. Authentication

Overview Keys. Overview

Computer Science A Cryptography and Data Security. Claude Crépeau

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

SAMPLE EXAM QUESTIONS MODULE EE5552 NETWORK SECURITY AND ENCRYPTION ECE, SCHOOL OF ENGINEERING AND DESIGN BRUNEL UNIVERSITY UXBRIDGE MIDDLESEX, UK

Symmetric Key cryptosystem

Transcription:

Practice Questions CS161 Computer Security, Fall 2008 Name Email address Score % / 100 % Please do not forget to fill up your name, email in the box in the midterm exam you can skip this here. These practice questions are not intended to be comprehensive for preparation or too closely representative of the midterm questions in any way. They are mereley intended to be used for initiating discussions, and help you identify your personal weaknesses that you need to emphasize on during preparation. 1

1. Terms Definitions. Explain the following terms, in no more than 2 sentences. (a) (1 point) Nonce (b) (1 point) (n,t) threshold secret sharing scheme. (c) (1 point) Known-plaintext attack (d) (1 point) Time Of Check to Time Of Use bug. 2

2. True/False with Reason. For each of the statements below, state whether they are true or false. Explain your answer in at most 2 sentences. (a) (2 points) T/F: Suppose Alice generates a RSA public and private key pair, and publishes the public key. Then that s all that is needed for Alice to be able to receive a securely encrypted email from Bob. (b) (2 points) T/F:If a cryptographic hash function is second preimage resistant, it implies that it is also collision resistant. 3

(c) (2 points) Let g be a generator for a prime p. Recall that the computational Diffie-Hellman problem is the task of computing g ab mod p, given g a mod p and g b mod p, where a and b are random exponents between 0 and (p 1). T/F: If the discrete logarithm problem can be efficiently solved then the computational Diffie-Hellman problem can be efficiently solved. (d) (2 points) T/F: If we discover an efficient algorithm to compute the GCD of two extremely large numbers, this will make it possible to break RSA. 4

3. Hash Functions and MAC A Message Authentication code (MAC) consists of two algorithms (S,V). Algorithm S(k,m) uses a secret key k to generate an integrity tag for message m. Alogrithm V(k,m,t) uses a secret key k to validate a given integrity tag t for m. Recall that a cryptographic hash function h is a non-keyed function that outputs a short hash h(m) for an input message m. A hash function is said to be collision resistant if it is difficult to find two distinct messages m 0, m 1 such that h(m 0 ) = h(m 1 ). Let us consider two mechanisms for providing file integrity for a single file F on disk. The file system should be able to detect any unauthorized modification to this file. We say that the system is secure if an attacker cannot modify F without being detected. You can assume that the owner of the file F has a password known to the system, but not to the attacker. Integrity Protection Method : Compute an integrity tag for the file F and store the integrity tag in header of F. Upon file open, the file system checks that the integrity tag is valid. (a) (4 points) Suppose the integrity tag is computed using a collision resistant hash function applied to F. Validation of the integrity tag upon file open is done by rehashing the file and comparing the result to the value in the header of F. Is the system secure? Explain. 5

(b) (4 points) Suppose the integrity tag is computed as the MAC of F using the user s password as the MAC secret key. Is the resulting system secure? Explain. (c) (4 points) Outline changes to the Integrity Protection method, detailing how to store integrity tags and how to compute and validate them using hashes and/or MAC only, such that the resulting system is secure. 6

4. Signatures and Encryption Suppose Alice and Bob are employees of a company foobar. All employees of the company use RSA for encrypting and signing their emails. RSA public keys of all employees are stored in a file on the company s server. The contents of this file are available for public view on foobar s non-ssl enabled key download web site, hosted at http://foobar.com/pubkeys.html. The email client software used internally in the company has an email signing feature. It works as follows. When the user clicks on the Sign and Send button in his email client, the client software appends a special signature tag to the regular email header before sending the email. The signature tag contains the author s name and date signed by the author s RSA private key. The receiver s email client software automatically verifies the signature tag, if present, by first obtaining the RSA public key of the sender from the foobar s key web site. It then verifies that the email sender s name and the date in the regular email header matches the signed name and date in the signature tag. (a) (4 points) Suppose Alice receives a signed, but unencrypted email from Bob saying that he has approved her month long vacation. Explain why the email client gives a completely false sense of security, by outlining two different 1 attacks that allow Mallory to send such an email and make it appear as if it is sent by Bob. You can assume that email header fields are spoofable (i.e Mallory can alter the date and the sender fields in a regular email header to reflect that someone else has sent email). Attack 1: Attack 2: 1 different here means that there are separate fixes for each attack 7

(b) (4 points) Suggest two fixes, one for each attack described in part (a) Fix for attack 1: Fix for attack 2: (c) (3 points) Suppose a curious employee, Eve, is able to break into the server and alter the file containing RSA public keys. How should Eve alter that file so that she can read confidential, encrypted emails sent between Alice and Bob. (d) (3 points) How can Alice and/or Bob detect Eve s intrusion. 8

5. Authentication Protocols Alice and Bob share a secret key K. Suppose that someone suggests the following methods to allow Alice to securely authenticate to Bob. (a) (5 points) Bob generates a random message r, enciphers it using K under a secure block cipher scheme and sends the encrypted message to Alice. Alice decrypts it, adds 1 to it and sends the result encrypted with K under the same block cipher to Bob. Bob decrypts the message and compares it with r. If the difference is 1, then he is sure he is communicating with Alice; or else, as no one else knows the secret K, he is talking to an impersonator. Is this protocol secure? Why or why not. 9

6. Reasoning about Code Consider the following program and postcondition: 1. i = n; 2. product = 1; 3. while (i>k) do 4. product = product * i; 5. i = i-1; 6. end 7. /* Post-Condition : {product = (n!/k!)} */ You may assume all values are integers. The operator! in the above code denotes factorial. (a) (3 points) Determine the loop invariant I, that holds true at the end of each iteration of the loop. I must include relation between variables i, n, product, and k. (b) (3 points) Write the precondition P as a logical expression, that must hold true at the start of the program for the postcondition on line 7 to hold true. (c) (2 points) Argue that the program fragment always terminates, for any input that satisfies P. 10

7. Program Errors This question is intended to give you practice at spotting program errors. Identify as many errors as possible. /* EncryptedLength: Returns the maximum number of bytes that src will be encrypted to (not including any NULL-termination). */ int EncryptedLength(uint8_t *src, uint32_t srclen); /* Encrypt8bit: Encrypts src into dest, using key. Block size is 8 bits. Does not NULL-terminate. Returns the size of the encrypted string on success or -1 on failure. */ int Encrypt8bit (uint8_t *src, char * dest,, uint32_t srclen, uint32_t destsize, char key); /* Encrypt: Encrypts the binary data in data into a NULL-terminated character string returned in s. Returns size of encrypted string on success, 0 on failure. */ int Encrypt (uint8_t *data, char **s, size_t datalen) { Bool succeeded; int size; } *s = (char *) malloc(encryptedlength(data, datalen)); size = Encrypt8bit(data, s, datasize, EncryptedLength (data, datalen), 0xBC); if (size < 0) { free (s); size = 0; goto terminate; } succeeded = size; terminate: return succeeded; 11