CS162 Section Lecture 11. Project 4 Implement a distributed key-value store that uses – Two-Phase Commit for atomic operations, – Replication for performance.

Slides:



Advertisements
Similar presentations
CS162 Section Lecture 9. KeyValue Server Project 3 KVClient (Library) Client Side Program KVClient (Library) Client Side Program KVClient (Library) Client.
Advertisements

1 CS 854 – Hot Topics in Computer and Communications Security Fall 2006 Introduction to Cryptography and Security.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
Computer Science Lecture 17, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
1 Encryption What is EncryptionWhat is Encryption Types of EncryptionTypes of Encryption.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Security 2 Distributed Systems Lecture# 15. Overview Cryptography Symmetric Assymeteric Digital Signature Secure Digest Functions Authentication.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
ASYMMETRIC CIPHERS.
Public Key Model 8. Cryptography part 2.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Security. Cryptography Why Cryptography Symmetric Encryption – Key exchange Public-Key Cryptography – Key exchange – Certification.
Lecture 12 Electronic Business (MGT-485). Recap – Lecture 11 E-Commerce Security Environment Security Threats in E-commerce Technology Solutions.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
CIS 1310 – HTML & CSS 12 E-Commerce Overview. CIS 1310 – HTML & CSS Learning Outcomes  Define E-commerce  Identify Benefits & Risks of E-Commerce 
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
CS162 Section Lecture 10 Slides based from Lecture and
Distributed Transactions March 15, Transactions What is a Distributed Transaction?  A transaction that involves more than one server  Network.
© 2006 Cisco Systems, Inc. All rights reserved. Network Security 2 Module 3: VPN and Encryption Technology.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Cryptography  Why Cryptography  Symmetric Encryption  Key exchange  Public-Key Cryptography  Key exchange  Certification.
CHAPTER 6 Cryptography. An Overview It is origin from the Greek word kruptos which means hidden. The objective is to hide information so that only the.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
569 Semantic Web. Dr. J. Lu University of windsor, Project Presentation Encrypted Web service application Encrypted Web Application Presented by:
Cryptography, Authentication and Digital Signatures
Public-Key Cryptography CS110 Fall Conventional Encryption.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
IPsec IPsec (IP security) Security for transmission over IP networks –The Internet –Internal corporate IP networks –IP packets sent over public switched.
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
1 Normal executable Infected executable Sequence of program instructions Entry Original program Entry Jump Replication and payload Viruses.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
Cryptography Readings Encryption, Decryption, & Digital Certificates.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
Secure Messenger Protocol using AES (Rijndael) Sang won, Lee
CS 162 Section 10 Two-phase commit Fault-tolerant computing.
Invitation to Computer Science 5 th Edition Chapter 8 Information Security.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Network Security Celia Li Computer Science and Engineering York University.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
Encryption Encryption: Transforms Message so that Interceptor Cannot Read it –Plaintext (original message) Not necessarily text; Can be graphics, etc.
Secure Instant Messenger in Android Name: Shamik Roy Chowdhury.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
@Yuan Xue CS 285 Network Security Public-Key Cryptography Yuan Xue Fall 2012.
12 E-Commerce Overview.
The Secure Sockets Layer (SSL) Protocol
Introduction to Cryptography
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

CS162 Section Lecture 11

Project 4 Implement a distributed key-value store that uses – Two-Phase Commit for atomic operations, – Replication for performance and fault-tolerance, – Encryption for security

Distributed Key-Value Store Coordinator Client 1 Client 2 Client 3 Client 4 Client 5

Consistent Hashing SlaveServer 128-bit ID using java.util.GUID – Slave count known in advance – Nodes will come back if fails (no permanent failure) Hash Keys to 128-bit numbers

KVClient (Library) Client-side Program KVClient (Library) Client-side Program KVClient (Library) Client-side Program Socket Server KVClientHandler KVMessage Coordinator Server GET PUT DEL TPCMessag e KVInterface KVCache (LRU Cache) Available Threads Job Queue Thread Pool Update TPCMaster (Library) KVMessage

TPCMessag e Key-Value Server KeyValue Server Socket Server TPCClientHandler KVInterface KVCache (LRU Cache) KVInterface KVStore Available Threads Job Queue Thread Pool TPCLog

Key ServerKVCache KVStore 1. Get WriteLock 2. Update Value 3. Get Exclusive Lock on AccessList 4. Release WriteLock 5. Update AccessList 6. Release lock on AccessList PUT (K,V) 2. Release WriteLock 1. Got ReadLock Update Value GET (K) 1. Get ReadLock Client 2 Client 1 Success 1. Get ReadLock 2. Get Value 3. Get Exclusive Lock on AccessList 4. Release ReadLock 5. Update AccessList 6. Release lock on AccessList 2. Release ReadLock K, V Get ReadLock blocked

CoordinatorKVCache 1. Get WriteLock PUT (K,V) GET (K) Client 2 Client 1 SlaveServer 1 SlaveServer 2 PREPARE RESPONSE (READY/ABORT) DECISION (COMMIT/ABORT) ACK Phase 3 2PC Get ReadLock blocked

CoordinatorKVCacheClient 2 Client 1 SlaveServer 1 SlaveServer 2 1. Got WriteLock 2. Update Value 3. Get Exclusive Lock on AccessList 4. Release WriteLock 5. Update AccessList 6. Release lock on AccessList 2. Release WriteLock 1. Get ReadLock Success Get ReadLock blocked 1. Got ReadLock 2. Get Value 3. Get Exclusive Lock on AccessList 4. Release ReadLock 5. Update AccessList 6. Release lock on AccessList 2. Release ReadLock K, V

Recovery from Site Log Entries Ready Commit REDO Abort Ignore Don’t Know Consult Master

What is MTBF? What is MTTR?

Fault Models Failures are independent * So, single fault tolerance is a big win Hardware fails fast (blue-screen, panic, …) Software fails-fast (or stops responding/hangs) Software often repaired by reboot: –Heisenbugs – Works On Retry –(Bohrbugs – Faults Again On Retry) Operations tasks: major source of outage –Utility operations – UPS/generator maintenance –Software upgrades, configuration changes

Fault Tolerance Techniques Fail fast modules: work or stop Spare modules: yield instant repair time Process/Server pairs: Mask HW and SW faults Transactions: yields ACID semantics (simple fault model)

Fault-tolerance in MapReduce What if – A task crashes – A node crashes Worker node Master node – A task is going slow

Key Security Properties Authentication Data integrity Confidentiality Non-repudiation

Lxvnkbgz Vhffngbvtmbhg pbma Vkrimhzktiar Vhffngbvtmbhg bg ikxlxgvx hy twoxkltkbxl Maxkx bl t dxr, ihllxllbhg hy pabva teehpl wxvhwbgz, unm pbmahnm pabva wxvhwbgz bl bgyxtlbuex – Manl, dxr fnlm ux dxim lxvkxm tgw ghm znxlltuex

Securing Communication with Cryptography Communication in presence of adversaries There is a key, possession of which allows decoding, but without which decoding is infeasible – Thus, key must be kept secret and not guessable

Using Symmetric Keys Same key for encryption and decryption Internet Encrypt with secret key Decrypt with secret key Plaintext (m) m Ciphertext Transferring keys over the network is problematic

Public Key / Asymmetric Encryption Sender uses receiver’s public key – Advertised to everyone Receiver uses complementary private key – Must be kept secret Internet Encrypt with public key Decrypt with private key Plaintext Ciphertext

Properties of RSA Requires generating large, random prime numbers – Algorithms exist for quickly finding these (probabilistic!) Requires exponentiation of very large numbers – Again, fairly fast algorithms exist Overall, much slower than symmetric key crypto – One general strategy: use public key crypto to exchange a (short) symmetric session key Use that key then with AES or such How difficult is recovering d, the private key? – Equivalent to finding prime factors of a large number Many have tried - believed to be very hard (= brute force only) (Though quantum computers can do so in polynomial time!)