Documents Found!
As seen in
Less Work, Better Grades
Join
Course Hero
Access
best resources
Ace
your classes
Ace your courses with Course Hero!
|
|
|
Study Smarter, Score Higher
Here are the top 5 related documents
...CS 251, Fall 2007 Voicu Popescu Assignment 7 Due Monday October 22, 11:59PM
Hash Tables
1. Implement a C+ hash table class HashTable in files HashTable.cc and HashTable.h a. The items stored are integers which serve both as keys and as elements. b. ...
...CS 251 Fall 2007 Voicu Popescu Assignment 5 Due Monday October 1, 11:59PM
Binary trees
1. Implement a C+ binary tree class BinaryTree that models arithmetic expressions. An internal node stores an operator represented with a character (i.e. +, -, *,...
...CS 251, Fall 2007 Voicu Popescu Assignment 8 Due Monday October 29, 11:59PM
AVL Tree
1. Implement a C+ AVL Tree class AVLTree in files AVLTree.cpp and AVLTree.h a. The items stored are positive integers which serve both as keys and as elements. b. T...
...Merge Sort
7 29 4 2 4 7 9 72 2 7 77 22 94 4 9 99 44
Sets
1
Outline and Reading
Divide-and-conquer paradigm (10.1.1) Merge-sort (10.1)
Algorithm Merging two sorted sequences Merge-sort tree Execution example Analysis
Generic merging and set ope...
Document Content (unformatted)
Course Hero has millions of student submitted documents similar to the one
below including study guides, homework solutions, papers, exam answer keys and textbook solutions.
and Heaps Priority Queues 2 5 9 7 6 Heaps and Priority Queues 1 Priority Queue ADT ( 7.1) A priority queue stores a collection of items An item is a pair (key, element) Main methods of the Priority Queue ADT insertItem(k, o) inserts an item with key k and element o removeMin() removes the item with the smallest key Additional methods minKey(k, o) returns, but does not remove, the smallest key of an item minElement() returns, but does not remove, the element of an item with smallest key size(), isEmpty() Applications: Standby flyers Auctions Stock market Heaps and Priority Queues 2 Total Order Relation Keys in a priority queue can be arbitrary objects on which an order is defined Two distinct items in a priority queue can have the same key Mathematical concept of total order relation Reflexive property: x x Antisymmetric property: x y y x x=y Transitive property: x y y z x z Heaps and Priority Queues 3 Comparator ADT ( 7.1.4) A comparator encapsulates the action of comparing two objects according to a given total order relation A generic priority queue uses a comparator as a template argument, to define the comparison function (<,=,>) The comparator is external to the keys being compared. Thus, the same objects can be sorted in different ways by using different comparators. When the priority queue needs to compare two keys, it uses its comparator Heaps and Priority Queues 4 Using Comparators in C++ A comparator class overloads the () operator with a comparison function. Example: Compare two points in the plane lexicographically. class LexCompare { public: To use the comparator, define an object of this type, and invoke it using its () operator: Example of usage: Point p(2.3, 4.5); Point q(1.7, 7.3); LexCompare lexCompare; if (lexCompare(p, q) < 0) cout << p less than q ; else if (lexCompare(p, q) == 0) cout << p equals q ; else if (lexCompare(p, q) > 0) cout << p greater than q ; }; int operator()(Point a, Point b) { if (a.x < b.x) return 1 else if (a.x > b.x) return +1 else if (a.y < b.y) return 1 else if (a.y > b.y) return +1 else return 0; } Heaps and Priority Queues 5 Sorting with a Priority Queue ( 7.1.2) We can use a priority queue to sort a set of comparable elements Insert the elements one by one with a series of insertItem(e, e) operations Remove the elements in sorted order with a series of removeMin() operations The running time of this sorting method depends on the priority queue implementation Algorithm PQ-Sort(S, C) Input sequence S, comparator C for the elements of S Output sequence S sorted in increasing order according to C P priority queue with comparator C while !S.isEmpty () e S.remove (S. first ()) P.insertItem(e, e) while !P.isEmpty() e P.minElement() P.removeMin() S.insertLast(e) 6 Heaps and Priority Queues Sequence-based Priority Queue Implementation with an unsorted list 4 5 2 3 1 Implementation with a sorted list 1 2 3 4 5 Performance: insertItem takes O(1) time since we can insert the item at the beginning or end of the sequence removeMin, minKey and minElement take O(n) time since we have to traverse the entire sequence to find the smallest key Performance: insertItem takes O(n) time since we have to find the place where to insert the item removeMin, minKey and minElement take O(1) time since the smallest key is at the beginning of the sequence Heaps and Priority Queues 7 Selection-Sort Selection-sort is the variation of PQ-sort where the priority queue is implemented with an unsorted sequence 4 5 2 3 1 Running time of Selection-sort: Inserting the elements into the priority queue with n insertItem operations takes O(n) time Removing the elements in sorted order from the priority queue with n removeMin operations takes time proportional to 1 + 2 + + n Selection-sort runs in O(n2) time Heaps and Priority Queues 8 Insertion-Sort Insertion-sort is the variation of PQ-sort where the priority queue is implemented with a sorted sequence 1 2 3 4 5 Running time of Insertion-sort: Inserting the elements into the priority queue with n insertItem operations takes time proportional to 1 + 2 + + n Removing the elements in sorted order from the priority queue with a series of n removeMin operations takes O(n) time Insertion-sort runs in O(n2) time Heaps and Priority Queues 9 What is a heap? ( 7.3.1) A heap is a binary tree storing keys at its internal nodes and satisfying the following properties: Heap-Order: for every internal node v other than the root, key(v) key(parent(v)) Complete Binary Tree: let h be the height of the heap for i = 0, , h 1, there are 2i nodes of depth i at depth h 1, the internal nodes are to the left of the external nodes Heaps and Priority Queues The last node of a heap is the rightmost internal node of depth h 1 2 5 9 7 6 last node 10 Height of a Heap Theorem: A heap storing n keys has height O(log n) Proof: (we apply the complete binary tree property) Let h be the height of a heap storing n keys Since there are 2i keys at depth i = 0, h , 2 and at least one key at depth h 1, we have n 1 + 2 + 4 + + 2h 2 + 1 Thus, n 2h 1 , i.e., h log n + 1 depth keys 0 1 1 h 2 h 1 2 2h 2 1 Heaps and Priority Queues 11 Heaps and Priority Queues We We We For can use a heap to implement a priority queue store a (key, element) item at each internal node keep track of the position of the last node simplicity, we show only the keys in the pictures (2, Sue) (5, Pat) (9, Jeff) (7, Anna) (6, Mark) Heaps and Priority Queues 12 Insertion into a Heap ( 7.3.2) Method insertItem of the priority queue ADT corresponds to the insertion of a key k to the heap The insertion algorithm consists of three steps Find the insertion node z (the new last node) Store k at z and expand z into an internal node Restore the heap-order property (discussed next) 2 5 9 7 z 6 insertion node 2 5 9 7 6 z 1 Heaps and Priority Queues 13 Upheap After the insertion of a new key k, the heap-order property may be violated Algorithm upheap restores the heap-order property by swapping k along an upward path from the insertion node Upheap terminates when the key k reaches the root or a node whose parent has a key smaller than or equal to k Since a heap has height O(log n), upheap runs in O(log n) time 2 5 9 7 1 5 9 7 1 2 z 6 z 6 Heaps and Priority Queues 14 Removal from a Heap ( 7.3.2) Method removeMin of the priority queue ADT corresponds to the removal of the root key from the heap The removal algorithm consists of three steps Replace the root key with the key of the last node w Compress w and its children into a leaf Restore the heap-order property (discussed next) 2 5 9 7 6 w last node 7 5 9 w 6 Heaps and Priority Queues 15 Downheap After replacing the root key with the key k of the last node, the heap-order property may be violated Algorithm downheap restores the heap-order property by swapping key k along a downward path from the root The swapping is done with the sibling with the smallest key Upheap terminates when key k reaches a leaf or a node whose children have keys greater than or equal to k Since a heap has height O(log n), downheap runs in O(log n) time 7 5 9 5 6 9 7 w w 6 Heaps and Priority Queues 16 Updating the Last Node The insertion node can be found by traversing a path of O(log n) nodes Go up until a left child or the root is reached If a left child is reached, go to the right child Go down left until a leaf is reached Similar algorithm for updating the last node after a removal Heaps and Priority Queues 17 Heap-Sort ( 7.3.4) Consider a priority queue with n items implemented by means of a heap the space used is O(n) methods insertItem and removeMin take O(log n) time methods size, isEmpty, minKey, and minElement take time O(1) time Using a heap-based priority queue, we can sort a sequence of n elements in O(n log n) time The resulting algorithm is called heap-sort Heap-sort is much faster than quadratic sorting algorithms, such as insertion-sort and selection-sort 18 Heaps and Priority Queues Merging Two Heaps We are given two heaps and a key k We create a new heap with the root node storing k and with the two heaps as subtrees We perform downheap to restore the heaporder property 3 8 5 4 2 6 7 3 8 5 4 2 6 2 3 8 5 7 4 6 19 Heaps and Priority Queues Bottom-up Heap Construction ( 7.3.5) We can construct a heap storing n given keys in using a bottom-up construction with log n phases In phase i, pairs of heaps with 2i 1 keys are merged into heaps with 2i+1 1 keys 2i 1 2i 1 2i+1 1 Heaps and Priority Queues 20 Example 16 15 4 12 6 7 23 20 25 16 15 4 5 12 6 11 7 23 27 20 Heaps and Priority Queues 21 Example (contd.) 25 16 15 4 5 12 6 11 9 23 27 20 15 16 25 5 4 12 11 6 9 27 23 20 Heaps and Priority Queues 22 Example (contd.) 7 15 16 25 5 4 12 11 6 9 27 8 23 20 4 15 16 25 7 5 12 11 8 9 6 23 27 20 Heaps and Priority Queues 23 Example (end) 10 4 15 16 25 7 5 12 11 8 9 27 6 23 20 4 5 15 16 25 10 7 12 11 8 9 27 6 23 20 Heaps and Priority Queues 24 Analysis We visualize the worst-case time of a downheap with a proxy path that goes first right and then repeatedly goes left until the bottom of the heap (this path may differ from the actual downheap path) Since each node is traversed by at most two proxy paths, the total number of nodes of the proxy paths is O(n) Thus, bottom-up heap construction runs in O(n) time Bottom-up heap construction is faster than n successive insertions and speeds up the first phase of heap-sort Heaps and Priority Queues 25 Vector-based Heap Implementation ( 7.3.3) We can represent a heap with n keys by means of a vector of length n + 1 For the node at rank i the left child is at rank 2i the right child is at rank 2i + 1 9 2 5 7 6 Links between nodes are not explicitly stored The leaves are not represented The cell of at rank 0 is not used Operation insertItem corresponds to inserting at rank n + 1 Operation removeMin corresponds to removing at rank n Yields in-place heap-sort 2 0 1 5 2 6 3 9 4 7 5 Heaps and Priority Queues 26
Find millions of documents here - Study Guides, Homework Solutions, Papers, Exam Answer Keys and more.
Course Hero has millions of course related materials that will enable you to learn better,
faster and get an A in all your courses.
Below is a small sample set of documents:
Below is a small sample set of documents:
Purdue >> CS >> 251 (Spring, 2008)
CS 251, Fall 2007 Voicu Popescu Assignment 10 Due Monday December 3rd, 11:59PM Graphs & more 1. Implement an undirected graph data structure using adjacency lists, as a C+ class UGraph in UGraph.cpp. A skeleton of UGraph.cpp is provided. The class sh...
Purdue >> CS >> 251s (Spring, 2008)
CS 251, Fall 2007 Voicu Popescu Assignment 10 Due Monday December 3rd, 11:59PM Graphs & more 1. Implement an undirected graph data structure using adjacency lists, as a C+ class UGraph in UGraph.cpp. A skeleton of UGraph.cpp is provided. The class sh...
Purdue >> C S >> 251 (Spring, 2008)
CS 251, Fall 2007 Voicu Popescu Assignment 10 Due Monday December 3rd, 11:59PM Graphs & more 1. Implement an undirected graph data structure using adjacency lists, as a C+ class UGraph in UGraph.cpp. A skeleton of UGraph.cpp is provided. The class sh...
Purdue >> C S >> 251s (Spring, 2008)
CS 251, Fall 2007 Voicu Popescu Assignment 10 Due Monday December 3rd, 11:59PM Graphs & more 1. Implement an undirected graph data structure using adjacency lists, as a C+ class UGraph in UGraph.cpp. A skeleton of UGraph.cpp is provided. The class sh...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 37: SSL. CS355 Lecture 27/ Fall 2008 1 OSI/ISO Model Application Presentation Session Transport Network Data Link Physical Layer CS355 Lecture 27/ Fall 2008 Application Presentation Session Transport Network Data Lin...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 37: SSL. CS355 Lecture 27/ Fall 2008 1 OSI/ISO Model Application Presentation Session Transport Network Data Link Physical Layer CS355 Lecture 27/ Fall 2008 Application Presentation Session Transport Network Data Lin...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 31: X509. PGP. Authentication protocols. Key establishment. CS355 Lecture 23/ Fall 2008 1 Public Keys and Trust Public Key:PA Secret key: SA Public Key:PB Secret key: SB How are public keys stored How to obtain th...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 31: X509. PGP. Authentication protocols. Key establishment. CS355 Lecture 23/ Fall 2008 1 Public Keys and Trust Public Key:PA Secret key: SA Public Key:PB Secret key: SB How are public keys stored How to obtain th...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 3: Cryptanalysis of Vigenere cipher. CS355 Lecture 3/ Fall 2008 1 Hw1 due Thursday Sept. 11 in class 1:30 PM Prj 1 due by email to the TA, Sept. 12, midnight, 11:59PM CS355 Lecture 3/ Fall 2008 2 The Vigenre C...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 3: Cryptanalysis of Vigenere cipher. CS355 Lecture 3/ Fall 2008 1 Hw1 due Thursday Sept. 11 in class 1:30 PM Prj 1 due by email to the TA, Sept. 12, midnight, 11:59PM CS355 Lecture 3/ Fall 2008 2 The Vigenre C...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 24: Kerberos CS355 Lecture 24/ Fall 2008 What is Kerberos? Kerberos is a network authentication protocol Provides authentication for clientserver applications, and data integrity and confidentiality Relies entir...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 24: Kerberos CS355 Lecture 24/ Fall 2008 What is Kerberos? Kerberos is a network authentication protocol Provides authentication for clientserver applications, and data integrity and confidentiality Relies entir...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 15: Public-Key Cryptography.RSA. Attacks against RSA. CS355 Lecture 15/ Fall 2008 1 Public Key Cryptography Overview Proposed in Diffie and Hellman (1976) New Directions in Cryptography public-key encryption sch...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 15: Public-Key Cryptography.RSA. Attacks against RSA. CS355 Lecture 15/ Fall 2008 1 Public Key Cryptography Overview Proposed in Diffie and Hellman (1976) New Directions in Cryptography public-key encryption sch...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 9, 10: Basic Number Theory CS355 Lecture 9/ Fall 2008 1 RSA Public Key Crypto System Key generation: Select 2 large prime numbers of about the same size, p and q Compute n = pq, and (n) = (q-1)(p-1) Select a random in...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 9, 10: Basic Number Theory CS355 Lecture 9/ Fall 2008 1 RSA Public Key Crypto System Key generation: Select 2 large prime numbers of about the same size, p and q Compute n = pq, and (n) = (q-1)(p-1) Select a random in...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Lecture 4: Enigma. CS355 Lecture 4/ Fall 2008 1 How to move from pencil and paper to more automatic ways of encrypting and decrypting? Albertis Disk Enigma CS355 Lecture 4/ Fall 2008 2 Alberti Disk Picture courtesy o...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Lecture 4: Enigma. CS355 Lecture 4/ Fall 2008 1 How to move from pencil and paper to more automatic ways of encrypting and decrypting? Albertis Disk Enigma CS355 Lecture 4/ Fall 2008 2 Alberti Disk Picture courtesy o...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 23 Attacks on RSA CS 355 Fall 2005 / Lecture 23 1 Lecture Outline Quadratic Residues Modulo a composite number Attacks on RSA CS 355 Fall 2005 / Lecture 23 2 Notation clarification Zn* = { 0<...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 23 Attacks on RSA CS 355 Fall 2005 / Lecture 23 1 Lecture Outline Quadratic Residues Modulo a composite number Attacks on RSA CS 355 Fall 2005 / Lecture 23 2 Notation clarification Zn* = { 0<...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 2 Classical Cryptography: Shift Cipher and Substitution Cipher CS 355 Fall 2005/Lecture 2 1 Announcements Join class mailing list CS355_Fall2005@cs.purdue.edu To join the list sent an email to mailer@c...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 2 Classical Cryptography: Shift Cipher and Substitution Cipher CS 355 Fall 2005/Lecture 2 1 Announcements Join class mailing list CS355_Fall2005@cs.purdue.edu To join the list sent an email to mailer@c...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #3 Due date & time: 10:30am on October 7, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. The Late Policy and Additional Instructions for HW1 still a...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #3 Due date & time: 10:30am on October 7, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. The Late Policy and Additional Instructions for HW1 still a...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 10 Linear Feedback Shift Register CS 355 Fall 2005 / Lecture 10 1 Linear Feedback Shift Register (LFSR) Example: 1 0 0 0 Starting with 1000, the output stream is 1000 1001 1010 1111 000 Repeat e...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 10 Linear Feedback Shift Register CS 355 Fall 2005 / Lecture 10 1 Linear Feedback Shift Register (LFSR) Example: 1 0 0 0 Starting with 1000, the output stream is 1000 1001 1010 1111 000 Repeat e...
Purdue >> CS >> 355 (Fall, 2008)
Cryptography and Computer Security CS255 Basic number theory fact sheet Part II: Arithmetic modulo composites Basic stu 1. We are dealing with integers N on the order of 300 digits long, (1024 bits). Unless otherwise stated, we assume N is the prod...
Purdue >> C S >> 355 (Fall, 2008)
Cryptography and Computer Security CS255 Basic number theory fact sheet Part II: Arithmetic modulo composites Basic stu 1. We are dealing with integers N on the order of 300 digits long, (1024 bits). Unless otherwise stated, we assume N is the prod...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 18 Security of Symmetric Encryption Schemes CS 355 Fall 2005 / Lecture 18 1 Lecture Outline Ideal Block Cipher Pseudorandom Permutation (PRP) Semantic security (a.k.a. Indistinguishability Security)...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 18 Security of Symmetric Encryption Schemes CS 355 Fall 2005 / Lecture 18 1 Lecture Outline Ideal Block Cipher Pseudorandom Permutation (PRP) Semantic security (a.k.a. Indistinguishability Security)...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 5 The Enigma Machine CS 355 Fall 2005/Lecture 3 1 Lecture Outline Rotor machines The Enigma machine Breaking the Enigma machine CS 355 Fall 2005/Lecture 5 2 Rotor Machines Basic idea: if the ke...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 5 The Enigma Machine CS 355 Fall 2005/Lecture 3 1 Lecture Outline Rotor machines The Enigma machine Breaking the Enigma machine CS 355 Fall 2005/Lecture 5 2 Rotor Machines Basic idea: if the ke...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 21 Group & Testing Prime Numbers CS 355 Fall 2005 / Lecture 21 1 Lecture Outline Group Quadratic Residues Primality Test CS 355 Fall 2005 / Lecture 21 2 Groups Definition: A group (G, *) is a se...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 21 Group & Testing Prime Numbers CS 355 Fall 2005 / Lecture 21 1 Lecture Outline Group Quadratic Residues Primality Test CS 355 Fall 2005 / Lecture 21 2 Groups Definition: A group (G, *) is a se...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 36 Secure Multiparty Computation and Commitment Schemes CS 355 Fall 2005 / Lecture 35 1 Secure Function Evaluation Also known as Secure Multiparty Computation 2-party SFE: Alice has x, Bob has y, and th...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 36 Secure Multiparty Computation and Commitment Schemes CS 355 Fall 2005 / Lecture 35 1 Secure Function Evaluation Also known as Secure Multiparty Computation 2-party SFE: Alice has x, Bob has y, and th...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 32 Zero Knowledge Proof Protocols CS 355 Fall 2005 / Lecture 32 1 Lecture Outline Properties of ZK proof of knowledge Schnorr protocol Noninteractive ZK CS 355 Fall 2005 / Lecture 32 2 Propertie...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 32 Zero Knowledge Proof Protocols CS 355 Fall 2005 / Lecture 32 1 Lecture Outline Properties of ZK proof of knowledge Schnorr protocol Noninteractive ZK CS 355 Fall 2005 / Lecture 32 2 Propertie...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 12 The RC4 Stream Cipher CS 355 Fall 2005 / Lecture 12 1 Review One Time Pad (OTP) has perfect secrecy requires key as long as plaintext Stream cipher approximates OTP by using PRNG A PRNG expands...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 12 The RC4 Stream Cipher CS 355 Fall 2005 / Lecture 12 1 Review One Time Pad (OTP) has perfect secrecy requires key as long as plaintext Stream cipher approximates OTP by using PRNG A PRNG expands...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 25 Mental Poker And Semantic Security CS 355 Fall 2005 / Lecture 25 1 Lecture Outline Review of number theory The Mental Poker Protocol Semantic security Semantic insecurity of RSA CS 355 Fall 20...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 25 Mental Poker And Semantic Security CS 355 Fall 2005 / Lecture 25 1 Lecture Outline Review of number theory The Mental Poker Protocol Semantic security Semantic insecurity of RSA CS 355 Fall 20...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 7 Mini Review & Enigma Machine CS 355 Fall 2005 / Lecture 7 1 Answers to Quiz 1 problems What is the Caesar Cipher? Shift cipher with shift 3 Types of classical ciphers: Transposition ciphers, e.g...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 7 Mini Review & Enigma Machine CS 355 Fall 2005 / Lecture 7 1 Answers to Quiz 1 problems What is the Caesar Cipher? Shift cipher with shift 3 Types of classical ciphers: Transposition ciphers, e.g...
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #1 Due date & time: 10:30am on September 9, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. Late Policy: You have three extra days in total for all y...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #1 Due date & time: 10:30am on September 9, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. Late Policy: You have three extra days in total for all y...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 28 Message Authentication Code CS 355 Fall 2005 / Lecture 28 1 Lecture Outline Message Authentication Code (MAC) Security properties of MAC CS 355 Fall 2005 / Lecture 28 2 Data Integrity and Sour...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 28 Message Authentication Code CS 355 Fall 2005 / Lecture 28 1 Lecture Outline Message Authentication Code (MAC) Security properties of MAC CS 355 Fall 2005 / Lecture 28 2 Data Integrity and Sour...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 29 HMAC and CBC-MAC CS 355 Fall 2005 / Lecture 29 1 Lecture Outline HMAC CBC-MAC Combining data integrity with encryption CS 355 Fall 2005 / Lecture 29 2 HMAC Goals Use available hash functions...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 29 HMAC and CBC-MAC CS 355 Fall 2005 / Lecture 29 1 Lecture Outline HMAC CBC-MAC Combining data integrity with encryption CS 355 Fall 2005 / Lecture 29 2 HMAC Goals Use available hash functions...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 35 Additional Slides on Key Establishment Protocols CS 355 Fall 2005 / Lecture 35 1 Notions of Authentication Entity authentication: identity of a party, and aliveness at a given instant Data origin aut...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 35 Additional Slides on Key Establishment Protocols CS 355 Fall 2005 / Lecture 35 1 Notions of Authentication Entity authentication: identity of a party, and aliveness at a given instant Data origin aut...
Purdue >> CS >> 355 (Fall, 2008)
Cryptography and Computer Security CS255 Very basic number theory fact sheet Part I: Arithmetic modulo primes Basic stu 1. We are dealing with primes p on the order of 300 digits long, (1024 bits). 2. For a prime p let Zp = {0, 1, 2, . . . , p 1}....
Purdue >> C S >> 355 (Fall, 2008)
Cryptography and Computer Security CS255 Very basic number theory fact sheet Part I: Arithmetic modulo primes Basic stu 1. We are dealing with primes p on the order of 300 digits long, (1024 bits). 2. For a prime p let Zp = {0, 1, 2, . . . , p 1}....
Purdue >> CS >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #5 Due date & time: 10:30am on November 30, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. This is the last homework for this course. There are 150 ...
Purdue >> C S >> 355 (Fall, 2008)
CS355: Cryptography Fall 2005 Homework #5 Due date & time: 10:30am on November 30, 2005. Hand in at the beginning of class (preferred), or email to the TA (wangq@purdue.edu) by the due time. This is the last homework for this course. There are 150 ...
Purdue >> CS >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 30 Digital Signatures CS 355 Fall 2005 / Lecture 30 1 Announcements Wednesdays lecture cancelled Friday will be guest lecture by Prof. Cristina NitaRotaru on Identification Schemes This topic will b...
Purdue >> C S >> 355 (Fall, 2008)
Introduction to Cryptography CS 355 Lecture 30 Digital Signatures CS 355 Fall 2005 / Lecture 30 1 Announcements Wednesdays lecture cancelled Friday will be guest lecture by Prof. Cristina NitaRotaru on Identification Schemes This topic will b...
Purdue >> CS >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 27 Secure Web Site Design (Most Slides taken from Prof. Dan Boneh CS 155 Slides at Stanford) Cross site request forgery Cross site request forgery (abbrev. CSRF or XSRF) Also known as one click attack or session r...
Purdue >> C S >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 27 Secure Web Site Design (Most Slides taken from Prof. Dan Boneh CS 155 Slides at Stanford) Cross site request forgery Cross site request forgery (abbrev. CSRF or XSRF) Also known as one click attack or session r...
Purdue >> CS >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 26 Web Application Security (Most Slides taken from Prof. Dan Boneh CS 155 Slides at Stanford) Announcements The last quiz will be given on Thursday November 29 Project due on November 30 Course evaluation will b...
Purdue >> C S >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 26 Web Application Security (Most Slides taken from Prof. Dan Boneh CS 155 Slides at Stanford) Announcements The last quiz will be given on Thursday November 29 Project due on November 30 Course evaluation will b...
Purdue >> CS >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 1 Overview of the Course CS426 Fall 2007/Lecture1 1 See the Course Homepage http:/www.cs.purdue.edu/homes/ninghui/courses/ 426_Fall07/index.html CS426 Fall 2007/Lecture 1 2 Why Computer Security? Computers are ...
Purdue >> C S >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 1 Overview of the Course CS426 Fall 2007/Lecture1 1 See the Course Homepage http:/www.cs.purdue.edu/homes/ninghui/courses/ 426_Fall07/index.html CS426 Fall 2007/Lecture 1 2 Why Computer Security? Computers are ...
Purdue >> CS >> 426 (Spring, 2008)
CS426: Computer Security Fall 2006 Homework #1 Due date & time: 1:30pm on September 6, 2007. Hand in at the beginning of class (preferred), or email to the TA (zmao@purdue.edu) by the due time. Late Policy: Late homeworks will not be accepted. Addi...
Purdue >> C S >> 426 (Spring, 2008)
CS426: Computer Security Fall 2006 Homework #1 Due date & time: 1:30pm on September 6, 2007. Hand in at the beginning of class (preferred), or email to the TA (zmao@purdue.edu) by the due time. Late Policy: Late homeworks will not be accepted. Addi...
Purdue >> CS >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 24 Review of Cryptography Review of Cryptography: Symmetric Encryption Classical ciphers are broken under ciphertext-only attacks One-time pad has perfect secrecy, but is difficult to use in practice Stream ciphe...
Purdue >> C S >> 426 (Spring, 2008)
Computer Security CS 426 Lecture 24 Review of Cryptography Review of Cryptography: Symmetric Encryption Classical ciphers are broken under ciphertext-only attacks One-time pad has perfect secrecy, but is difficult to use in practice Stream ciphe...
Purdue >> CS >> 426 (Spring, 2008)
Dynamic Virtual Credit Card Numbers Ian Molloy, Jiangtao Li, and Ninghui Li Financial Cryptography and Data Security Feb. 2007 Credit Card Numbers Get Stolen Mitigating Stolen Credit Card Numbers Card Verification Code Not mandatory Trust the M...
Purdue >> C S >> 426 (Spring, 2008)
Dynamic Virtual Credit Card Numbers Ian Molloy, Jiangtao Li, and Ninghui Li Financial Cryptography and Data Security Feb. 2007 Credit Card Numbers Get Stolen Mitigating Stolen Credit Card Numbers Card Verification Code Not mandatory Trust the M...
What are you waiting for?