Operating System Support for Mobile Devices


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Screen, content size, javascript, plugins such as flash
  • (e.g., an e-mail message)
  • We are getting closer to the goal because of advances in enabling technologies.
  • Service composition: when playing movie, send sound to stereo When laptop is active, turn down the volume of the TV
  • What is semantic distance : quantify user’s intuition about relationship between files
  • Number of special cases, and they use a heuristic for each. I’ll just take a couple
  • 05/09/10 Session #, Speaker Name
  • 05/09/10 Session #, Speaker Name Data modifications: add new record, replace existing record, delete record
  • 05/09/10 Session #, Speaker Name Any type of data: calendar data (iCalendar, vCalendar), address book (vCard), email messages, XML documents, binary data, etc. Data is identified by MIME types.
  • 05/09/10 Session #, Speaker Name Client maintains a change log. Server maintains a change log. When they synchronize, the client and server use the change logs to determine what data has changed. Change log must track: replace, addition, deletion. Each piece of data in the datastore has a unique identifier. Client and server can each use their own private identifiers for internal use. The server is responsible for maintaining “Mapping Table” for mapping
  • 05/09/10 Session #, Speaker Name WBXML: W AP B inary XML compact representation for XML documents http://www.wapforum.org/
  • 05/09/10 Session #, Speaker Name The sync4j client runs on J2SE. The sync4j server runs on J2EE. Open source license: virtually identical to JDOM license (similar to Apache Public License)
  • 05/09/10 Session #, Speaker Name XML data binding tools: Castor http://www.castor.org/ Sun JAXB http://java.sun.com/xml/ Enhydra Zeus http://zeus.enhydra.org/
  • 05/09/10 Session #, Speaker Name
  • 05/09/10 Session #, Speaker Name
  • Operating System Support for Mobile Devices

    1. 1. Security and Cooperation, Wrap up 4/23/2009 Richard Yang
    2. 2. Admin. <ul><li>Projects due May 12 </li></ul><ul><li>We will continue to hold regular office hours until May 12 or you can send email to make appointments </li></ul>
    3. 3. Recap: Adaptive Mobile Applications <ul><li>Client: </li></ul><ul><ul><li>informs service capability/status </li></ul></ul><ul><ul><li>makes best use of available resource/data </li></ul></ul><ul><li>Service: adapts to client capability/status </li></ul><ul><ul><li>audio/image/video/web content adaption </li></ul></ul>client service request result
    4. 4. Example: Adapting Web Content <ul><li>One major goal of the World Wide Web Consortium (W3C) has been device-independent content by decoupling layout from rendering </li></ul><ul><li>What are some arguments that we need to adapt web content for mobile devices? </li></ul>
    5. 5. Web Content Adaption Approaches <ul><li>HTML auto formatting </li></ul><ul><li>Variant selection (e.g., according to HTTP accept or x-wap-profile of UAProf) </li></ul><ul><li>Content negotiation </li></ul><ul><ul><li>RFC 2295: Transparent Content Negotiation in HTTP </li></ul></ul><ul><li>Transcoding </li></ul><ul><ul><li>E.g., pdf to html, html to XHTML-MP/WML </li></ul></ul>
    6. 6. Example: Adapting Web Content <ul><li>WAP defines wireless application environment (WAE) to produce content suitable for wireless devices </li></ul><ul><ul><li>XHTML-MP (mobile profile) in WAP 2.0 </li></ul></ul><ul><ul><li>Wireless Markup Language (WML) in earlier versions of WAP </li></ul></ul>
    7. 7. WAP 2.0 A rchitecture Service discovery Security services Application framework Protocol framework External services EFI Provisioning Navigation Discovery Service Lookup Crypto libraries Authenti-cation Identification PKI Secure transport Secure bearer Session Transfer Transport Bearer Multimedia Messaging (Email) WAE /WTA User Agent (WML, XHTMLMP) Content formats Push IPv4 IPv6 CSD SMS USSD FLEX GPRS MPAK ... ... Datagrams (WDP, UDP) Connections (TCP with wireless profile) Hypermedia transfer (WTP+WSP, HTTP) Strea-ming MMS Push OTA Capability Negotiation Synchronisation Cookies <ul><ul><li>W as: WAP Forum, co-founded by Ericsson, Motorola, Nokia, Unwired Planet now: Open Mobile Alliance (Open Mobile Architecture + WAP Forum + SyncML + …) </li></ul></ul>
    8. 8. WAE Session Transport Datagram Transport layer security
    9. 9. Wireless Markup Language <ul><li>W3C XML-based language </li></ul><ul><li>Tag-based browsing language: </li></ul><ul><ul><li>screen management (text, images) </li></ul></ul><ul><ul><li>data input (text, selection lists, etc.) </li></ul></ul><ul><ul><li>hyperlinks & navigation support </li></ul></ul>
    10. 10. WML High-Level Structure <ul><li>WML pages are called DECKS </li></ul><ul><li>Each deck consists of a set of CARDS, related to each other with links </li></ul><ul><li>When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the WAP server </li></ul>
    11. 11. WML Elements <ul><li>Deck/Card Elements </li></ul><ul><li>wml card template head access meta </li></ul><ul><li>Tasks </li></ul><ul><li>go prev refresh noop </li></ul><ul><li>Event Elements </li></ul><ul><li>do ontimer onpick onevent postfield onenterforward onenterbackward </li></ul><ul><li>Variables </li></ul><ul><li>setvar </li></ul><ul><li>User input </li></ul><ul><li>input select option optgroup fieldset </li></ul><ul><li>Anchors, Images, and Timers </li></ul><ul><li>a anchor img timer </li></ul><ul><li>Text Formatting </li></ul><ul><li>br p table tr td </li></ul>
    12. 12. WML Example <?xml version=&quot;1.0&quot;?> <!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML 1.1//EN&quot; &quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;> <WML> <CARD> <DO TYPE=“ACCEPT”> <GO URL=“#eCard”/> </DO> Welcome! </CARD> <CARD NAME=“eCard”> <DO TYPE=“ACCEPT”> <GO URL=“/submit?N=$(N)&S=$(S)”/> </DO> Enter name: <INPUT KEY=“N”/> Choose speed: <SELECT KEY=“S”> <OPTION VALUE=“0”>Fast</OPTION> <OPTION VALUE=“1”>Slow</OPTION> <SELECT> </CARD> </WML> Header Deck Card2 Card1 Navigation Variable Select Elements
    13. 13. Navigation Path : An Example <WML> <CARD> <DO TYPE=&quot;ACCEPT&quot; LABEL=&quot;Next&quot;> <GO URL=&quot;#card2&quot;/> </DO> Dalhousie<BR/>Directory </CARD> <CARD NAME=&quot;card2&quot;> <DO TYPE=&quot;ACCEPT&quot;> <GO URL=&quot;?send=$type&quot;/> </DO> Services <SELECT KEY =&quot;type&quot;> <OPTION VALUE=&quot;em&quot;>1.Email</OPTION> <OPTION VALUE=&quot;ph&quot;>2.Phone</OPTION> <OPTION VALUE=&quot;fx&quot;>3.Fax</OPTION> </SELECT> </CARD> </WML> Dalhousie Directory _____________ Next Services 1. Email 2. Phone 3. Fax . OK
    14. 14. Third Party Adaptation: WAP Gateways <ul><li>Translate, e.g., </li></ul><ul><ul><li>between text WML and binary WML (WMLC) </li></ul></ul><ul><ul><li>from HTML web sites to WML, WMLC, or XHTML-MP </li></ul></ul><ul><li>Add additional information to each request </li></ul><ul><ul><li>this would be configured by the operator and could include telephone numbers, location, billing information, and handset information </li></ul></ul>
    15. 15. WAP Gateway for Web <ul><li>Provides a link between a mobile network and Internet </li></ul><ul><li>Converts the 'Web' response into a 'WAP' response, e.g., </li></ul><ul><ul><li>HTML -> WML pages, or WML bytecode (WMLC) to r educe the size and number of packets </li></ul></ul>
    16. 16. Example Message Flow WAP HTTP Web Server Content WML Decks with WML-Script WAP Gateway Encoder,Decoder WMLScript Compiler Protocol Adapters Client WML WML-Script WTAI e tc. 1 Request URL Request 2 HTTP Request 3 HTTP Response 4 Response WML Content 5 7
    17. 17. Example: <ul><li>http://en.wikipedia.org/wiki/Wikipedia:WAP_access </li></ul>
    18. 18. Status <ul><li>WAP 2.0 is moving towards XHTML-MP </li></ul><ul><li>XHTML-MP removes many WML features </li></ul><ul><ul><li>http://www.developershome.com/wap/xhtmlmp/xhtml_mp_tutorial.asp?page=wmlFeaturesLost </li></ul></ul><ul><li>Given emergence of newer phones such as iPhone and Android, it is not clear special content encoding is necessary </li></ul>
    19. 19. Summary <ul><li>Adaptation is a key design consideration of mobile application/systems </li></ul><ul><li>It involves efforts of both clients and services </li></ul>
    20. 20. Big Picture Foundational Primitives: Communications, Location, Service Discovery, UI/Media, Power Management , Security Application Development Framework Applications (Adaptation, and support for adaptations)
    21. 21. Security and Cooperation in Wireless and Mobile Networks
    22. 22. Introduction <ul><li>This is a vast and active field, a course by itself </li></ul><ul><li>Many references on wireless security </li></ul><ul><li>A good book on wireless cooperation: </li></ul><ul><ul><li>Thwarting Malicious and Selfish Behavior in the Age of Ubiquitous Computing, by Levente Buttyan and Jean-Pierre Hubaux , Cambridge University Press, 2007. </li></ul></ul><ul><ul><li>available at: http://secowinet.epfl.ch/ </li></ul></ul>
    23. 23. Generic Network Security Attack Models authenticity; incentive-compatibility confidentiality integrity availability
    24. 24. Why is Security Challenging in Wireless/Mobile Networks? <ul><li>No inherent physical protection </li></ul><ul><ul><li>physical connections between devices are replaced by logical associations </li></ul></ul><ul><ul><li>sending and receiving messages do not need physical access to the network infrastructure (cables, hubs, routers, etc.) </li></ul></ul><ul><li>Broadcast communications </li></ul><ul><ul><li>wireless usually means radio, which has a broadcast nature </li></ul></ul><ul><ul><li>transmissions can be overheard by anyone in range </li></ul></ul><ul><ul><li>anyone can generate transmissions, </li></ul></ul><ul><ul><ul><li>which will be received by other devices in range </li></ul></ul></ul><ul><ul><ul><li>which will interfere with other nearby transmissions </li></ul></ul></ul><ul><li>Thus it is easier to implement jamming, eavesdropping, injecting bogus messages, and replaying previously recorded messages </li></ul>
    25. 25. Why is Security Challenging in Mobile Networks? <ul><li>Since mobile devices typically have limited resources (e.g., CPU cycles, battery supply), the designer might want to select simple security mechanisms </li></ul><ul><li>However, this may lead to serious security flaws </li></ul><ul><ul><li>bad example: Wired Equivalent Protection (WEP), the original security protocol for 802.11 </li></ul></ul>
    26. 26. WEP: A Bad Example
    27. 27. 802.11 Message Flow data messages protected by WEP
    28. 28. Wired Equivalent Privacy (WEP) <ul><li>WEP was intended to provide comparable confidentiality to a traditional wired network, thus the name </li></ul><ul><li>WEP implements message confidentiality and integrity </li></ul><ul><li>WEP encryption is used in 802.11 authentication </li></ul>
    29. 29. WEP Security <ul><li>WEP confidentiality </li></ul><ul><ul><li>through encryption using RC4, a stream-based encryption algorithm using a shared key </li></ul></ul><ul><li>WEP integrity </li></ul><ul><ul><li>through message check sum using encrypted cyclic redundancy check (CRC) </li></ul></ul><ul><li>WEP authentication </li></ul><ul><ul><li>through challenge/response </li></ul></ul>
    30. 30. WEP Encryption <ul><li>For each message to be sent: </li></ul><ul><ul><li>RC4 is initialized with the shared secret between station STA and access point (AP) </li></ul></ul><ul><ul><ul><li>WEP allows up to 4 shared keys </li></ul></ul></ul><ul><ul><li>RC4 produces a pseudo-random byte sequence (key stream) from the shared key </li></ul></ul><ul><ul><li>This pseudo-random byte sequence is XORed to the message </li></ul></ul>
    31. 31. WEP Encryption <ul><li>To avoid using the same key stream, WEP encrypts each message with a different key stream </li></ul><ul><ul><li>the RC4 generator is initialized with the shared secret plus a 24-bit IV (initial value) </li></ul></ul><ul><ul><ul><li>shared secret is the same for each message </li></ul></ul></ul><ul><ul><ul><li>24-bit IV for each message </li></ul></ul></ul><ul><ul><ul><li>there is no specification on how to choose the IV; sender picks the IV value </li></ul></ul></ul>
    32. 32. WEP Integrity <ul><li>WEP integrity protection is based on computing ICV (integrity check value) using CRC and appended to the message </li></ul><ul><li>The message and the ICV are encrypted together </li></ul>
    33. 33. WEP IV secret key RC4 message | ICV message | ICV IV IV secret key RC4 message | ICV encode de code KS KS CRC check CRC
    34. 34. Active Attack on WEP: IV Replay Attacks <ul><li>A known plain-text message is sent to an observable wireless LAN client (how?) </li></ul><ul><li>The network attacker will sniff the wireless LAN looking for the predicted cipher-text </li></ul><ul><li>The network attacker will find the known frame, derive the key stream (corresponds to the give IV+K), and reuse the key stream </li></ul>
    35. 35. Active Attack on WEP: Bit-Flipping Attack <ul><li>The attacker sniffs a frame on the wireless LAN </li></ul><ul><li>The attacker captures the frame and flips random bits in the data payload of the frame </li></ul><ul><li>The attacker modifies the ICV (detailed later) </li></ul><ul><li>The attacker transmits the modified frame </li></ul><ul><li>The access point receives the frame and verifies the ICV based on the frame contents </li></ul><ul><li>The AP accepts the modified frame </li></ul><ul><li>The destination receiver de-encapsulates the frame and processes the Layer 3 packet </li></ul><ul><li>Because bits are flipped in the higher layer packet, the Layer 3 checksum fails </li></ul><ul><li>The receiver IP stack generates a predictable ICMP error </li></ul><ul><li>The attacker sniffs the wireless LAN looking for the encrypted error message </li></ul><ul><li>Upon receiving the error message, the attacker derives the key stream as with the IV replay attack </li></ul>
    36. 36. Bit-Flipping Attack
    37. 37. Generating Valid CRC <ul><li>The crucial step of the flipping attack is to allow the frame to pass the ICV check of the AP </li></ul><ul><li>Unfortunately, the CRC algorithm allows generating valid encrypted ICV after bit flipping </li></ul>
    38. 38. Bypassing Encrypted ICV <ul><li>CRC is a linear function wrt to XOR: </li></ul><ul><ul><li>CRC(X  Y) = CRC(X)  CRC(Y) </li></ul></ul><ul><li>Attacker observes (M | CRC(M))  K where K is the key stream output </li></ul><ul><ul><li>for any  M, the attacker can compute CRC(  M) </li></ul></ul><ul><ul><li>hence, the attacker can compute: </li></ul></ul><ul><ul><li> ( [ M | CRC(M ] )  K)  [  M | CRC(  M) ] </li></ul></ul><ul><ul><li>= ( [ M   M) | (CRC(M)  CRC(  M) ] )  K </li></ul></ul><ul><ul><li>= [ M   M) | CRC(M  M) ]  K </li></ul></ul>
    39. 39. WEP Authentication <ul><li>Two authentication modes </li></ul><ul><ul><li>open authentication --- means no authentication ! </li></ul></ul><ul><ul><ul><li>an AP could use SSID authentication and MAC address filtering, e.g., at Yale </li></ul></ul></ul><ul><ul><li>shared key authentication based on WEP </li></ul></ul>
    40. 40. WEP Shared Key Authentication <ul><li>Shared key authentication is based on a challenge-response protocol: </li></ul><ul><ul><li>… </li></ul></ul><ul><ul><li>AP  STA: r </li></ul></ul><ul><ul><li>STA  AP: IV | (r  K) </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><ul><li>where K is a 128 bit RC4 output on IV and the shared secret </li></ul></ul><ul><li>An attacker can compute r  (r  K) = K </li></ul><ul><li>Then it can use K to impersonate STA later: </li></ul><ul><ul><li>… </li></ul></ul><ul><ul><li>AP  attacker: r’ </li></ul></ul><ul><ul><li>attacker  AP: IV | (r’  K) </li></ul></ul><ul><ul><li>… </li></ul></ul>
    41. 41. WEP: Lessons <ul><li>WEP has other problems, e.g., short IV space, weak RC4 keys </li></ul><ul><li>Engineering security protocols is difficult </li></ul><ul><ul><li>one can combine otherwise OK building blocks in a wrong way and obtain an insecure system at the end </li></ul></ul><ul><ul><ul><li>example 1: </li></ul></ul></ul><ul><ul><ul><ul><li>stream ciphers alone are OK </li></ul></ul></ul></ul><ul><ul><ul><ul><li>challenge-response protocols for entity authentication are OK </li></ul></ul></ul></ul><ul><ul><ul><ul><li>but they shouldn’t be combined </li></ul></ul></ul></ul><ul><ul><ul><li>example 2: </li></ul></ul></ul><ul><ul><ul><ul><li>encrypting a message digest to obtain an ICV is a good principle </li></ul></ul></ul></ul><ul><ul><ul><ul><li>but it doesn’t work if the message digest function is linear wrt to the encryption function </li></ul></ul></ul></ul>
    42. 42. Fixing WEP <ul><li>After the collapse of WEP, Wi-Fi Protected Access (WPA) was proposed in 2003 </li></ul><ul><li>Then the full 802.11x standard (also called WPA2) was proposed in 2004 </li></ul><ul><li>But WEP is still in use </li></ul>
    43. 43. Cooperation in Wireless, Mobile Networks
    44. 44. Cooperation in Wireless Networks <ul><li>A special case of “security attack” is by rational nodes </li></ul><ul><ul><li>drop packets, mis-represent information </li></ul></ul><ul><li>Motivation </li></ul><ul><ul><li>wireless networks have limited capacity </li></ul></ul><ul><ul><li>wireless nodes have limited resource—battery power </li></ul></ul><ul><ul><li>unlike the Internet, where commercial relationship is worked out, many mesh network nodes belong to different users and may not have incentive to forward others’ traffic </li></ul></ul><ul><ul><ul><li>similar free-riding problems in P2P applications </li></ul></ul></ul>
    45. 45. Reward-based Routing <ul><li>The network (authority) rewards the nodes so that they will forward traffic from a source to a destination </li></ul><ul><li>Each node has a ( private energy/transmission ) cost of sending one packet to a neighbor </li></ul><ul><li>The objective of the authority is to choose the lowest cost path </li></ul><ul><ul><li>assume cost reflects energy </li></ul></ul><ul><ul><li>thus extending network life time/maximizing capacity—the community benefit </li></ul></ul>
    46. 46. Node Utility <ul><li>Assume each node wants to maximize its utility </li></ul><ul><li>The utility of being on the path P of a source-destination pair: </li></ul><ul><li>where - p i is the amount the network rewards node i - 1 P (i) is 1 if node i is on the path P; otherwise 0 </li></ul><ul><li>- c i is the cost of the link used in P, if a link from i is used </li></ul>
    47. 47. Discussion <ul><li>How about we reward nodes according to their claimed costs? </li></ul>
    48. 48. Payment Using VCG Mechanism <ul><li>VCG stands for Vickrey, Clarke and Groves </li></ul><ul><li>The VCG mechanism </li></ul><ul><ul><li>each node sends the costs of its links to the authority </li></ul></ul><ul><ul><li>the authority computes the lowest cost path from the source S to the destination D </li></ul></ul><ul><ul><li>the payment to node i: where - LCP(S,D) is the lowest cost path from S to D: {S->R1, R1->R2, …, Rk->D} - LCP(S,D){i} is the previous path but does not include the link from i to its next hop, if i is on the path; if i is not on the path, it is just the previous path - LCP(S,D;-i) is the lowest cost path from S to D without using i, i.e. remove node i from the graph and then find path </li></ul></ul>
    49. 49. Example: N1 - assume N1 declares the cost as 2, how much will N1 be rewared according to the VCG mechanism? (1+3)-1 = 3 - assume N1 declares the cost as 1, how much will N1 be rewarded according to the VCG mechanism? - what is the utility of N1? 3 - 2 = 1 (1+3)-1 = 3 - what is the utility of N1? 3 - 2 = 1 - assume N1 declares the cost as 4, how much will N1 be rewared according to the VCG mechanism? Assume the true cost of N1 to D is 2 (1+3)-(1+3) = 0 - what is the utility of N1? 0 - 0 = 0 1 2 1 3 N2 D N1 S
    50. 50. Formal Results <ul><li>Each n ode r eports its l ink c osts t ruthfully </li></ul><ul><li>Thus the network chooses the lowest cost path for each source-destination pair </li></ul>
    51. 51. Analysis on Truthfulness <ul><li>By contradiction </li></ul><ul><li>Assume node i’s true costs for its links are C i but reports W i </li></ul><ul><ul><li>think of W i and C i as vectors of link costs </li></ul></ul><ul><li>The node decides to declare W i instead of C i only if the utility is higher </li></ul><ul><li>The best scenario a node can be in is that it is given the declared costs of all other nodes’ links and then decides its declarations of the costs of its links in order to maximize its utility </li></ul><ul><ul><li>action chosen in this way is called dominant strategy </li></ul></ul>
    52. 52. VCG Proof <ul><li>Assume the lowest cost path computed is </li></ul><ul><ul><li>LCP when the node reports C i , and </li></ul></ul><ul><ul><li>LCP’ when reports W i </li></ul></ul><ul><li>it must be the case that (1 P (i) meant i on path P) </li></ul>Right hand side is LCP we computed; left hand side is one path. Contradiction.
    53. 53. Revisit some slides of first class
    54. 54. Enabling Technologies <ul><li>Development and d eployment of wireless/mobile technology and i nfrastructure </li></ul><ul><ul><li>i n-room, in-building, on-campus, in-the-field, MAN, WAN, GPS </li></ul></ul><ul><li>Miniaturization of c omputing m achinery </li></ul><ul><li>. . . -> PCs -> laptop -> PDAs/smart phones -> embedded computers /sensors </li></ul><ul><li>Improving device capabilities/software development environments, e.g., </li></ul><ul><ul><li>andriod: http://code.google.com/android/ </li></ul></ul><ul><ul><li>iphone: http://developer.apple.com/iphone/ </li></ul></ul><ul><ul><li>windows mobile </li></ul></ul>
    55. 55. At Home WiFi WiFi WiFi cellular bluetooth UWB satellite WiFi 802.11g/n
    56. 56. At Home Source: http://teacher.scholastic.com/activities/science/wireless_interactives.htm
    57. 57. Mobile and W ireless S ervices – Always Best Connected UMTS, DECT 2 Mbit/s UMTS Rel. 6 400 kbit/s LAN 100 Mbit/s, WLAN 54 Mbit/s UMTS Rel. 5 400 kbit/s GSM 115 kbit/s, WLAN 11 Mbit/s GSM 53 kbit/s Bluetooth 500 kbit/s GSM/EDGE 135 kbit/s, WLAN 780 kbit/s LAN, WLAN 780 kbit/s
    58. 58. Habitat Monitoring: Example on Great Duck Island A 15-minute human visit leads to 20% offspring mortality Patch Network Transit Network Basestation Gateway
    59. 59. Why is the Field Challenging?
    60. 60. Challenge 1: Unreliable and Unpredictable Wireless Coverage What Robert Poor (Ember) calls “The good, the bad and the ugly” <ul><li>Wireless links are not reliable: they may vary over time and space </li></ul>Asymmetry vs. Power Reception v. Distance * Cerpa, Busek et. al
    61. 61. Challenge 2: Open Wireless Medium <ul><li>Wireless interference </li></ul><ul><li>Hidden terminals </li></ul><ul><li>Exposed terminal </li></ul>S1 S2 R1 R1 S1 R1 S2 R1 S1 S2 R2
    62. 62. Challenge 2: Open Wireless Medium <ul><li>Wireless interference </li></ul><ul><li>Hidden terminals </li></ul><ul><li>Exposed terminal </li></ul><ul><li>Wireless security </li></ul><ul><ul><li>eavesdropping, denial of service, … </li></ul></ul>S1 S2 R1 R1 S1 R1 R2 R1 S1 S2 R2
    63. 63. Challenge 3: Mobility <ul><li>Mobility causes poor-quality wireless links </li></ul><ul><li>Mobility causes intermittent connection </li></ul><ul><ul><li>under intermittent connected networks, traditional routing, TCP, applications all break </li></ul></ul><ul><li>Mobility changes context, e.g., location </li></ul>
    64. 64. Challenge 4: Portability <ul><li>Limited battery power </li></ul><ul><li>Limited processing, display and storage </li></ul><ul><li>Mobile phones </li></ul><ul><li>voice, data </li></ul><ul><li>simple graphical displays </li></ul><ul><li>GSM/3G </li></ul><ul><li>Laptop </li></ul><ul><li>fully functional </li></ul><ul><li>standard applications </li></ul><ul><li>battery; 802.11 </li></ul>P erformance /Weight/Power Consumption Sensors, embedded controllers <ul><li>PDA phone </li></ul><ul><li>data </li></ul><ul><li>simpler graphical displays </li></ul><ul><li>802.11/3G </li></ul>
    65. 65. Challenge 5: Changing Regulation and Multiple Communication Standards cellular phones satellites wireless LAN cordless phones 1992: GSM 1994: DCS 1800 2001: IMT-2000 1987: CT1+ 1982: Inmarsat-A 1992: Inmarsat-B Inmarsat-M 1998: Iridium 1989: CT 2 1991: DECT 199x: proprietary 1997: IEEE 802.11 1999: 802.11b, Bluetooth 1988: Inmarsat-C analogue digital 1991: D-AMPS 1991: CDMA 1981: NMT 450 1986: NMT 900 1980: CT0 1984: CT1 1983: AMPS 1993: PDC 2000: GPRS 2000: IEEE 802.11a Fourth Generation (Internet based)
    66. 66. Topics not Covered <ul><li>There are several topics that are quite interesting but we do not have time to cover in more detail, e.g., </li></ul><ul><ul><li>Cognitive radio </li></ul></ul><ul><ul><li>Virtualization of wireless networks </li></ul></ul><ul><ul><li>Sync (e.g., SyncML) /replicate management </li></ul></ul><ul><ul><li>Context-aware applications design </li></ul></ul><ul><ul><li>Mobile device management </li></ul></ul><ul><ul><li>Controlled mobility </li></ul></ul>
    67. 67. Summary <ul><li>Driven by t echnology and v ision </li></ul><ul><ul><li>infrastructure (communication/location) </li></ul></ul><ul><ul><li>d evice miniaturization </li></ul></ul><ul><ul><li>mobile computing platforms </li></ul></ul><ul><li>The f ield is m oving f ast and has many opportunities </li></ul>
    68. 68. Backup Slides on Cooperation
    69. 69. Backup Slides on Sync/Replicate Management
    70. 70. Discussion <ul><li>What challenges does the file system face in wireless/mobile environment? </li></ul>
    71. 71. The Problems Caused by Mobility <ul><li>Read miss </li></ul><ul><ul><li>stalls progress (the user has to stop working) </li></ul></ul><ul><li>Synchronization/consistency issues </li></ul><ul><ul><li>may need to synchronize multiple copies of the same file </li></ul></ul><ul><ul><li>if multiple users, may need to solve consistency problems </li></ul></ul><ul><li>Heterogeneous device types </li></ul><ul><ul><li>each device has its own file systems and naming convention, e.g., digital camera, ipod </li></ul></ul>
    72. 72. Approaches <ul><li>Read miss </li></ul><ul><ul><li>explicit user file selection, e.g., MS briefcase </li></ul></ul><ul><ul><li>automatic hoarding, e.g., CODA, SEER </li></ul></ul><ul><li>Synchronization/consistency issues </li></ul><ul><ul><li>keep modification logs and develop merge tools, e.g., Bayou </li></ul></ul><ul><ul><li>efficient file comparisons and merging, e.g., rsync, LBFS </li></ul></ul><ul><li>Heterogeneous device types </li></ul><ul><ul><li>masks the differences , e.g., EnsemBlue </li></ul></ul>
    73. 73. SEER: automatic prediction of related files to avoid user manual configuration of hoarding
    74. 74. SEER: A Predictive Hoarding System <ul><li>View s user activities as composed of projects than individual files </li></ul><ul><li>Predicates files in a project and fetch them together </li></ul><ul><li>Discussion: how do you predicate all of the files a project may use? </li></ul>
    75. 75. Basic Idea of SEER: Semantic Distance <ul><li>Q uantif ies user’s intuition about relationship between files </li></ul><ul><ul><li>smaller  closer in relation </li></ul></ul><ul><li>Infers relationship </li></ul><ul><ul><li>static (d one by an external investigator ), e.g., </li></ul></ul><ul><ul><ul><li>observes directory structure/membership </li></ul></ul></ul><ul><ul><ul><li>observes naming convention </li></ul></ul></ul><ul><ul><ul><li>#include in a program </li></ul></ul></ul><ul><ul><li>dynamic </li></ul></ul><ul><ul><ul><li>w atches user’s behavior </li></ul></ul></ul>
    76. 76. Lifetime Semantic Distance <ul><li>L ooks at file open/close (not file content !!) </li></ul><ul><li>Lifetime semantic distance : </li></ul><ul><ul><li>The lifetime semantic distance between an open of file A and an open of file B is defined as 0 if A has not been closed before B is opened and the number of intervening file opens (including the open of B) otherwise </li></ul></ul><ul><li>End up with multiple lifetime semantic distances between two events of two files </li></ul><ul><ul><li>need s distance between two files, not events </li></ul></ul><ul><ul><li>u se s geometric mean to convert to a single distance </li></ul></ul>Semantic distance - A  B , A  C is 0 - A  D is 3 A B C D Time Sample file access sequence
    77. 77. Basic Idea of SEER: Clustering Algorithm <ul><li>Based on algorithm by Jarvis and Patrick </li></ul><ul><li>Allows overlapping clusters </li></ul><ul><li>Steps </li></ul><ul><ul><li>c alculate s n nearest neighbors for each file </li></ul></ul><ul><ul><li>Phase 1 : i f two points (files here) have at least kn overlapping neighbors, combine their clusters into one </li></ul></ul><ul><ul><li>Phase 2 : i f two points have more than kf but less than kn overlapping neighbors, overlap the clusters i.e . add each to the other cluster </li></ul></ul>Summary of clustering algorithm Relation Action kn ≤ x kf≤ x<kn x<kf Combine clusters Overlapping clusters No action
    78. 78. Example <ul><li>Seven files , A-G </li></ul><ul><ul><li>{A} {B} {C} {D} {E} {F} {G} </li></ul></ul><ul><li>P hase 1 : </li></ul><ul><ul><li>{A, B}  {A, B, C} </li></ul></ul><ul><ul><li>{D, E} {F, G}  {D,E,F, G} </li></ul></ul><ul><li>P hase 2 : </li></ul><ul><li>two pairs {A, C} {C, D} </li></ul><ul><li>{A, C} : same cluster already </li></ul><ul><li>{C, D}  overlap clusters </li></ul><ul><li>Final r esult </li></ul><ul><ul><li>{A, B, C, D} {C,D, E, F,G} </li></ul></ul>Number of s hared neighbors From To A B C D E F G A B C D E F G kn kf kn kf kn kn kn
    79. 79. Using Both Lifetime Semantic Distance and the Input of External Investigator <ul><li>Essentially gives application specific info </li></ul><ul><li>Example </li></ul><ul><ul><li>large directory distance => looser relationship </li></ul></ul><ul><ul><ul><li>s ubtract directory distance from shared neighbor count </li></ul></ul></ul>
    80. 80. Real W orld A nomalies: S pecial C ases <ul><li>Many special cases </li></ul><ul><ul><li>a uthors use a heuristic to solve each </li></ul></ul><ul><li>Shared libraries </li></ul><ul><ul><li>e. g . : library X </li></ul></ul><ul><ul><li>m ight cause unwanted clustering </li></ul></ul><ul><ul><li>H euristic : files which represent more than a certain percentage of all references marked as “frequently-referenced” (1%) </li></ul></ul><ul><ul><ul><li>e liminate from calculation </li></ul></ul></ul>
    81. 81. <ul><li>Critical files (e . g . : startup files) </li></ul><ul><ul><li>r arely accessed but important </li></ul></ul><ul><ul><li>u se heuristic and hoard </li></ul></ul><ul><ul><ul><li>s pecial control file that specifies such files </li></ul></ul></ul><ul><ul><ul><li>d etect by names e. g . .login etc </li></ul></ul></ul><ul><li>Temporary files (e . g . : in /tmp) </li></ul><ul><ul><li>t ransient and don’t depict correct relationship </li></ul></ul><ul><ul><li>m ight displace other important files from n closest </li></ul></ul><ul><ul><li>h euristic: i gnore files in /tmp etc. completely </li></ul></ul><ul><li>Simultaneous access </li></ul><ul><ul><li>e. g . : read mail & compile code </li></ul></ul><ul><ul><li>i ndependent streams are intermixed ! </li></ul></ul><ul><ul><li>m aintain reference-history on a per-process basis </li></ul></ul>More Special Cases …
    82. 82. Scheduling of Multimedia Applications <ul><li>Earliest deadline first (EDF) scheduling </li></ul><ul><ul><li>- a llocate cycle budget per job </li></ul></ul><ul><ul><li>- e xecute job with earliest deadline and positive budget </li></ul></ul><ul><ul><li>- c harge budget by number of cycles consumed </li></ul></ul><ul><ul><li>- p reempt if budget is exhausted </li></ul></ul>
    83. 83. Bayou: automatic conflict update
    84. 84. Bayou: Managing Update Conflicts <ul><li>Basic idea: application specific conflict detection and update </li></ul><ul><li>Two mechanisms for automatic conflict detection and resolution </li></ul><ul><ul><li>dependency check </li></ul></ul><ul><ul><li>merge procedure </li></ul></ul>
    85. 85. Bayou Write Operation: An Example
    86. 86. Mobile file systems: dealing with low bandwidth: LBFS: efficient file comparison and merging
    87. 87. Motivation <ul><li>The CODA system assumes that modifications are kept as logs (CML) </li></ul><ul><ul><li>a user sends the logs to the servers to update </li></ul></ul><ul><li>If the storage of a client is limited, it may not be able to save logs </li></ul><ul><ul><li>then upon reconnection, the cache manager needs to find the difference between the stored file and its local cached copy </li></ul></ul><ul><ul><li>same problem exists for the rsync tool ! </li></ul></ul><ul><li>Question: how to efficiently compare the differences of two remote files (when the network connection is slow)? </li></ul>
    88. 88. LBFS: Low-Bandwidth File System <ul><li>Break Files into chunks and transfer only modified chunks </li></ul><ul><li>Fixed chunk size does not work well </li></ul><ul><ul><li>why? </li></ul></ul>
    89. 89. Flexible Chunk Size <ul><li>Compute hash value of every 48 byte block </li></ul><ul><ul><li>if the hash value equals to a magic value, it is a chunk boundary </li></ul></ul>
    90. 90. What is data synchronization? <ul><li>Data synchronization “is the process of making two sets of data look identical” (source: syncml.org white paper) </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    91. 91. Data Synchronization Session # 1481 - Copyright 2002 Sean C. Sullivan Datastore2 Datastore1 A C B C A B A C B <ul><li>Exchange data modifications </li></ul><ul><li>Resolve conflicts </li></ul>
    92. 92. What is a “data synchronization protocol”? <ul><li>Method of communication for a data synchronization session </li></ul><ul><li>Protocol features: </li></ul><ul><ul><li>naming and identification of records </li></ul></ul><ul><ul><li>common protocol commands </li></ul></ul><ul><ul><li>identification and resolution of synchronization conflicts </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    93. 93. SyncML defined… <ul><li>“ SyncML is a new industry initiative to develop and promote a single, common data synchronization protocol that can be used industry-wide.” (syncml.org) </li></ul><ul><li>“ SyncML is a specification for a common data synchronization framework and XML-based format […] for synchronizing data on networked devices.” (syncml.org) </li></ul><ul><li>“ SyncML is a […] protocol for conveying data synchronization operations.” (syncml.org) </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    94. 94. SyncML sponsors Session # 1481 - Copyright 2002 Sean C. Sullivan
    95. 95. SyncML features <ul><li>Synchronize any type of data </li></ul><ul><li>Multiple protocol bindings </li></ul><ul><ul><li>HTTP, WSP, OBEX </li></ul></ul><ul><li>Security </li></ul><ul><li>Interoperability </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    96. 96. SyncML: clients & servers Session # 1481 - Copyright 2002 Sean C. Sullivan SyncML server client modifications server modifications
    97. 97. SyncML synchronization types <ul><li>Two-way sync </li></ul><ul><li>Slow sync </li></ul><ul><li>One-way sync from client only </li></ul><ul><li>Refresh sync from client only </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    98. 98. SyncML synchronization types (cont.) <ul><li>One-way sync from server only </li></ul><ul><li>Refresh sync from server only </li></ul><ul><li>Server alerted sync </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    99. 99. SyncML terminology <ul><li>Message </li></ul><ul><li>Package </li></ul><ul><li>Command </li></ul><ul><li>Status code </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan <ul><li>Datastore </li></ul><ul><li>Device info </li></ul><ul><li>Meta info </li></ul><ul><li>Capabilities exchange </li></ul>
    100. 100. SyncML and XML <ul><li>Abbreviated naming convention </li></ul><ul><ul><li>Ex: ”protocol version” is <VerProto> </li></ul></ul><ul><li>XML prolog is not required </li></ul><ul><li>WBXML </li></ul><ul><ul><li>WAP B inary XML </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    101. 101. SyncML documents <ul><li><SyncML> DTD </li></ul><ul><li>Meta info DTD </li></ul><ul><li>Device info DTD </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    102. 102. <SyncML> document <ul><li><?xml version=&quot;1.0&quot;?> </li></ul><ul><li><!DOCTYPE … > </li></ul><ul><li><SyncML> </li></ul><ul><li><SyncHdr> </li></ul><ul><li>… </li></ul><ul><li></SyncHdr> </li></ul><ul><li><SyncBody> </li></ul><ul><li>… </li></ul><ul><li></SyncBody> </li></ul><ul><li></SyncML> </li></ul><ul><li>“ A SyncML Message is a well-formed, but not necessarily valid, XML document.” (syncml.org) </li></ul><ul><li>Contains data synchronization commands (operations) </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    103. 103. <SyncHdr> element <ul><li><SyncHdr> </li></ul><ul><li><VerDTD>1.0</VerDTD> </li></ul><ul><li><VerProto>SyncML/1.0</VerProto> </li></ul><ul><li><SessionID>session41</SessionID> </li></ul><ul><li><MsgID>msg80386</MsgID> </li></ul><ul><li>… </li></ul><ul><li></SyncHdr> </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    104. 104. <SyncBody> element <ul><li><SyncBody> </li></ul><ul><li><Add> </li></ul><ul><li><CmdID>cmd80486</CmdID> </li></ul><ul><li>… </li></ul><ul><li><Item>…</Item> </li></ul><ul><li></Add> </li></ul><ul><li></SyncBody> </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    105. 105. SyncML commands <ul><li><Add> </li></ul><ul><li><Alert> </li></ul><ul><li><Atomic> </li></ul><ul><li><Copy> </li></ul><ul><li><Delete> </li></ul><ul><li><Exec> </li></ul><ul><li><Get> </li></ul><ul><li><Map> </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan <ul><li><Put> </li></ul><ul><li><Replace> </li></ul><ul><li><Results> </li></ul><ul><li><Search> </li></ul><ul><li><Sequence> </li></ul><ul><li><Status> </li></ul><ul><li><Sync> </li></ul>
    106. 106. Meta Info document <ul><li>Contains sync session parameters </li></ul><ul><li><MetInf> </li></ul><ul><li><Format>…</Format> </li></ul><ul><li><Type>…</Type> </li></ul><ul><li>… </li></ul><ul><li><MaxMsgSize>586 </li></ul><ul><li></MaxMsgSize> </li></ul><ul><li>… </li></ul><ul><li></MetInf> </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    107. 107. Device Info document <ul><li>Describes device capabilities </li></ul><ul><li>For both client and server </li></ul><ul><li><DevInf> </li></ul><ul><li>… </li></ul><ul><li><SwV>0.99</SwV> </li></ul><ul><li><HwV>3.14</HwV> </li></ul><ul><li>… </li></ul><ul><li><DevTyp>pda</DevTyp> </li></ul><ul><li>… </li></ul><ul><li></DevInf> </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    108. 108. Sync4j project <ul><li>Java implementation of SyncML protocol </li></ul><ul><li>Sync4j client </li></ul><ul><li>Sync4j server </li></ul><ul><li>open source </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    109. 109. Sync4j audience <ul><li>developers who: </li></ul><ul><ul><li>know Java but don’t know SyncML </li></ul></ul><ul><ul><li>know SyncML but may not know Java </li></ul></ul><ul><li>commercial application developers </li></ul><ul><li>open source application developers </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    110. 110. API design ideas <ul><li>SAX API </li></ul><ul><ul><li>standard set of interfaces </li></ul></ul><ul><ul><li>multiple implementations </li></ul></ul><ul><ul><li>usage model: callbacks </li></ul></ul><ul><li>JDOM API </li></ul><ul><ul><li>concrete classes ; single implementation </li></ul></ul><ul><ul><li>root Document object contains Element objects </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    111. 111. API design ideas (cont.) <ul><li>Servlet API </li></ul><ul><ul><li>usage model: developer builds a new servlet by subclassing HTTPServlet </li></ul></ul><ul><li>Auto-generate API classes from DTD using an XML data-binding tool - ? </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    112. 112. Sync4j design goals <ul><li>Hide complexity of the SyncML specification from Java programmers </li></ul><ul><ul><li>XML documents, XML parsing </li></ul></ul><ul><ul><li>multiple transport protocols </li></ul></ul><ul><li>A complete SyncML implementation </li></ul><ul><li>Interoperability </li></ul><ul><ul><li>with existing SyncML clients & servers </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    113. 113. Sync4j design goals (cont.) <ul><li>API should be natural and familiar to Java programmers </li></ul><ul><ul><li>direct object instantiation </li></ul></ul><ul><ul><li>exceptions </li></ul></ul><ul><ul><li>use Collection API / arrays, where appropriate </li></ul></ul><ul><ul><li>event notification via event listeners </li></ul></ul><ul><ul><li>familiar naming conventions </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    114. 114. Sync4j design goals (cont.) <ul><li>API must be familiar to developers who already know the SyncML DTD’s </li></ul><ul><li>API must enforce any restrictions that are defined in the SyncML specification </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    115. 115. Sync4j’s modular design <ul><li>“ core” protocol message library </li></ul><ul><li>transport protocol libraries </li></ul><ul><li>extensible client framework </li></ul><ul><li>extensible server framework </li></ul><ul><li>client application </li></ul><ul><li>server application </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    116. 116. Sync4j implementation <ul><li>Immutable objects </li></ul><ul><li>Exception class for each SyncML “status code” </li></ul><ul><li>Declaration of constants </li></ul><ul><ul><li>public final static variables </li></ul></ul><ul><li>Command object hierarchy </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    117. 117. Sync4j command hierarchy Session # 1481 - Copyright 2002 Sean C. Sullivan AbstractCommand ResponseCommand RequestCommand AddCommand, DeleteCommand, ReplaceCommand, … ResultsCommand, StatusCommand
    118. 118. Sync4j toolset <ul><li>Jakarta Ant </li></ul><ul><li>JDOM </li></ul><ul><li>Apache Xerces-J </li></ul><ul><li>CVS </li></ul><ul><li>log4j </li></ul><ul><li>Sun JDK 1.4.0 </li></ul><ul><li>Sun J2EE SDK </li></ul><ul><li>JUnit </li></ul><ul><li>Apache Tomcat </li></ul><ul><li>Netbeans </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    119. 119. Sync4j packages <ul><li>sync4j.core </li></ul><ul><li>sync4j.transport </li></ul><ul><li>sync4j.framework </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan <ul><li>sync4j.client </li></ul><ul><li>sync4j.server </li></ul><ul><li>sync4j.tests </li></ul>
    120. 120. Sync4j core classes <ul><li>Message </li></ul><ul><li>DeviceInfo </li></ul><ul><li>MetaInfo </li></ul><ul><li>Command classes: </li></ul><ul><ul><li>AddCommand </li></ul></ul><ul><ul><li>DeleteCommand </li></ul></ul><ul><ul><li>ReplaceCommand </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    121. 121. sync4j.core.Message <ul><li>Two ways to construct a Message object: </li></ul><ul><ul><li>from a String of XML </li></ul></ul><ul><ul><li>from more basic sync4j objects </li></ul></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    122. 122. Sync4j Message example 1 <ul><li>String strXML = “<SyncML> … </SyncML>”; </li></ul><ul><li>Message msg; </li></ul><ul><li>try </li></ul><ul><li>{ </li></ul><ul><li>msg = new Message(strXML); </li></ul><ul><li>} </li></ul><ul><li>catch (InvalidMarkupException ex) </li></ul><ul><li>{ </li></ul><ul><li>} </li></ul><ul><li>catch (XMLSyntaxException ex) </li></ul><ul><li>{ </li></ul><ul><li>} </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    123. 123. Sync4j Message example 2 <ul><li>SyncHeader header = new SyncHeader(...); </li></ul><ul><li>SyncBody body = new SyncBody(...); </li></ul><ul><li>Message msg; </li></ul><ul><li>msg = new Message(header, body); </li></ul><ul><li>String strXML = msg.toXML(); </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan
    124. 124. Summary <ul><li>Use SyncML to synchronize data between mobile applications and server applications </li></ul><ul><li>SyncML is a complex and powerful data synchronization protocol </li></ul><ul><li>Sync4j hides the complexity of SyncML from Java programmers </li></ul>Session # 1481 - Copyright 2002 Sean C. Sullivan End
    125. 125. For more information… Session # 1481 - Copyright 2002 Sean C. Sullivan End Please visit http://sync4j.sourceforge.net/
    126. 126. Backup Slides on TELA
    127. 127. TELSA: A Positive Example
    128. 128. Digital Signatures Do Not Work <ul><li>Problem statement: authentication of packets </li></ul><ul><li>The typical approach in the Internet is to attach a digital signature on each packet </li></ul><ul><li>However, signatures are expensive, e.g., RSA 1024 on a 2.1 GHz desktop: </li></ul><ul><ul><li>high signature cost (~5 ms) </li></ul></ul><ul><ul><li>high communication cost (128 bytes/packet) </li></ul></ul><ul><li>More expensive on low-end processors </li></ul>http://www.cryptopp.com/benchmarks.html
    129. 129. TESLA <ul><li>T imed E fficient S tream L oss-tolerant A uthentication </li></ul><ul><li>Uses only symmetric cryptography </li></ul>
    130. 130. Basic Authentication Mechanism <ul><li>F: public one-way function; MAC: message digest function </li></ul>t F( K ) Authentic Commitment P MAC( K ,P) K disclosed 1: Verify K 2: Verify MAC 3: P Authentic!
    131. 131. TELSA Security Condition <ul><li>Sender distributes initial commitment and key disclosure schedule using, say, digital signature </li></ul><ul><li>Security condition (for packet P): on arrival of P, receiver is certain that sender did not yet disclose K </li></ul><ul><li>If security condition not satisfied, drop packet </li></ul>
    132. 132. TESLA: Example K4 K5 K6 K7 t Time 4 Time 5 Time 6 Time 7 K3 Keys disclosed 2 time intervals after use P5 K5 P3 K3 P2 K2 P1 K2 Verify MACs P4 K4 F F Authenticate K3
    133. 133. TESLA Summary <ul><li>Advantages </li></ul><ul><ul><li>low overhead </li></ul></ul><ul><ul><ul><li>communication (~ 20 bytes) </li></ul></ul></ul><ul><ul><ul><li>computation (~ 1 MAC computation per packet) </li></ul></ul></ul><ul><ul><li>tolerate packet loss </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>time synchronization </li></ul></ul><ul><ul><li>delayed authentication </li></ul></ul>
    134. 134. Secure Efficient Ad hoc Distance Vector (SEAD) <ul><li>Uses one-way hash chains to authenticate metric and sequence number for DSDV </li></ul><ul><li>Assumes a limit k-1 on metric (as in other distance vector protocols such as RIP, where k=16) </li></ul><ul><ul><li>metric value infinity can be represented as k </li></ul></ul>
    135. 135. SEAD Metric Authenticators <ul><li>Each node generates a hash chain and distributes the last element (C N+1 ) to allow verification: </li></ul><ul><ul><li>chain values C N-k+1 , …, C N authenticate metrics 0 through k-1 for sequence number 1 </li></ul></ul><ul><ul><li>C N-2k+1 ,…C N-k authenticate metrics 0 through k-1 for sequence number 2 </li></ul></ul><ul><ul><li>C N-ik+1 ,…C N-(i-1)k authenticate metrics 0 through k-1 for sequence number i </li></ul></ul>C 0 C 1 C 3 C 2 C 5 C 4 C 6 C 7 C 9 C 8 C 10 C 12 C 11
    136. 136. SEAD Metric Authenticators <ul><li>Each node generates a hash chain and distributes the last element (C N+1 ) to allow verification: </li></ul><ul><ul><li>Chain values C N-k+1 , …, C N authenticate metrics 0 through k-1 for sequence number 1 </li></ul></ul><ul><ul><li>C N-2k+1 ,…C N-k authenticate metrics 0 through k-1 for sequence number 2 </li></ul></ul><ul><ul><li>C N-ik+1 ,…C N-(i-1)k authenticate metrics 0 through k-1 for sequence number i </li></ul></ul>C 0 C 1 C 3 C 2 C 5 C 4 C 6 C 7 C 9 C 8 C 10 C 12 C 11
    137. 137. SEAD Metric Authenticators <ul><li>Each node generates a hash chain and distributes the last element (C N+1 ) to allow verification: </li></ul><ul><ul><li>Chain values C N-k+1 , …, C N authenticate metrics 0 through k-1 for sequence number 1 </li></ul></ul><ul><ul><li>C N-2k+1 ,…C N-k authenticate metrics 0 through k-1 for sequence number 2 </li></ul></ul><ul><ul><li>C N-ik+1 ,…C N-(i-1)k authenticate metrics 0 through k-1 for sequence number i </li></ul></ul>C 0 C 1 C 3 C 2 C 5 C 4 C 6 C 7 C 9 C 8 C 10 C 12 C 11
    138. 138. <ul><li>Each node generates a hash chain and distributes the last element (C N+1 ) to allow verification: </li></ul><ul><ul><li>Chain values C N-k+1 , …, C N authenticate metrics 0 through k-1 for sequence number 1 </li></ul></ul><ul><ul><li>C N-2k+1 ,…C N-k authenticate metrics 0 through k-1 for sequence number 2 </li></ul></ul><ul><ul><li>C N-ik+1 ,…C N-(i-1)k authenticate metrics 0 through k-1 for sequence number i </li></ul></ul>SEAD Metric Authenticators C 0 C 1 C 3 C 2 C 5 C 4 C 6 C 7 C 9 C 8 C 10 C 12 C 11
    139. 139. SEAD Metric Authenticators <ul><li>Within a sequence number i: </li></ul><ul><li>C N-ik+ 1 represents metric 0 </li></ul><ul><li>C N-ik+ 2 represents metric 1 </li></ul><ul><li>C N-ik+ m+1 represents metric m </li></ul><ul><li>C N-ik+ k represents metric k-1 </li></ul>C 9 C 10 C 11 Metric 0 Metric 1 Metric 2 <ul><li>When a node receives a routing update: </li></ul><ul><li>It first checks the metric authenticator </li></ul><ul><li>If the update is to be accepted: </li></ul><ul><ul><li>It increments the metric by one </li></ul></ul><ul><ul><li>and hashes the authenticator </li></ul></ul><ul><ul><li>then adds the metric and authenticator to routing table </li></ul></ul>