Study and Design of a Security Architecture for Wireless Personal … · Dave SINGELEE December...

244
KATHOLIEKE UNIVERSITEIT LEUVEN FACULTEIT INGENIEURSWETENSCHAPPEN DEPARTEMENT ELEKTROTECHNIEK–ESAT Kasteelpark Arenberg 10, 3001 Leuven-Heverlee Study and Design of a Security Architecture for Wireless Personal Area Networks Promotor: Prof. Dr. Ir. Bart Preneel Proefschrift voorgedragen tot het behalen van het doctoraat in de ingenieurswetenschappen door Dave SINGELEE December 2008

Transcript of Study and Design of a Security Architecture for Wireless Personal … · Dave SINGELEE December...

  • KATHOLIEKE UNIVERSITEIT LEUVEN

    FACULTEIT INGENIEURSWETENSCHAPPEN

    DEPARTEMENT ELEKTROTECHNIEK–ESAT

    Kasteelpark Arenberg 10, 3001 Leuven-Heverlee

    Study and Design of a Security Architecture for Wireless

    Personal Area Networks

    Promotor:

    Prof. Dr. Ir. Bart Preneel

    Proefschrift voorgedragen tot

    het behalen van het doctoraat

    in de ingenieurswetenschappen

    door

    Dave SINGELEE

    December 2008

  • KATHOLIEKE UNIVERSITEIT LEUVEN

    FACULTEIT INGENIEURSWETENSCHAPPEN

    DEPARTEMENT ELEKTROTECHNIEK–ESAT

    Kasteelpark Arenberg 10, 3001 Leuven-Heverlee

    Study and Design of a Security Architecture for Wireless

    Personal Area Networks

    Examencommissie:

    Prof. Georges Van der Perre, voorzitter

    Prof. Bart Preneel, promotor

    Prof. Chris Mitchell (RHUL)

    Prof. Frank Piessens

    Prof. Joos Vandewalle

    Prof. Ingrid Verbauwhede

    Prof. Patrick Wambacq

    Proefschrift voorgedragen tot

    het behalen van het doctoraat

    in de ingenieurswetenschappen

    door

    Dave SINGELEE

    U.D.C. 681.3*D46 December 2008

  • c© Katholieke Universiteit Leuven – Faculteit IngenieurswetenschappenArenbergkasteel, B-3001 Heverlee (Belgium)

    Alle rechten voorbehouden. Niets uit deze uitgave mag vermenigvuldigd en/ofopenbaar gemaakt worden door middel van druk, fotocopie, microfilm, elektron-isch of op welke andere wijze ook zonder voorafgaande schriftelijke toestemmingvan de uitgever.

    All rights reserved. No part of the publication may be reproduced in any formby print, photoprint, microfilm or any other means without written permissionfrom the publisher.

    D/2008/7515/125

    ISBN 978-94-6018-017-0

  • Acknowledgements

    It is a pleasure for me to thank all the people who have helped me to realize thisPh.D. thesis.

    First, I want to thank Prof. Bart Preneel for giving me the opportunity tostart a Ph.D. at COSIC and for being the promotor of my thesis. I stronglyappreciate his support, guidance and advice during the years of my Ph.D. Bartis also especially thanked for carefully reading earlier drafts of this thesis andproviding helpful comments and suggestions to improve this doctoral thesis.

    I am very grateful to Prof. Chris Mitchell, Prof. Frank Piessens, Prof. JoosVandewalle, Prof. Ingrid Verbauwhede and Prof. Patrick Wambacq for agreeingto serve as jury members, and to Prof. Georges Van der Perre for chairing thejury.

    A big thanks goes to all my past and current COSIC colleagues for theirfriendliness and help. In particular, I would like to thank my former COSICfellow Stefaan Seys for his friendship and our interesting joint work on wirelessnetwork security. Special thanks goes to Joris Claessens for being the supervisorof my master’s thesis and giving me helpful advice at the start of my Ph.D. Ithank, among others, Stefaan Seys, Robert Maier, Dries Schellekens, Zhiguo Wanand Joris Claessens for their collaboration during several research and industrialprojects. I would also like to thank my past and current colleagues Stefaan Seys,Robert Maier, Thomas Herlea, Wouter Castryck, Li Weng, Josep Balasch andRoel Peeters for the enjoyable time we spent in office 02.23.

    Péla Nöe deserves a big thank for her support, the help with my paperworkand all other practical matters. I also thank Péla for her enthusiasm, and formaking my time here in COSIC very enjoyable. I would like to thank ElviraWouters for her patience and for doing the necessary background paperwork.

    I also want to acknowledge the K.U.Leuven, the Flemish institute IBBT andthe Institute for the Promotion of Innovation by Science and Technology in Flan-ders (IWT) for funding my research work.

    A word of thanks goes to my good friends for their support and to move mythoughts away from work when needed.

    Last but of course not least, I want to thank my parents and family for their

    iii

  • support and encouragement. Very special thanks goes to my girlfriend Hellen forher love, motivation and enthusiasm, and with whom I hope to have a long andhappy future.

    Dave SingeléeLeuven, December 2008

    iv

  • Abstract

    Communication between mobile devices allows them to work together and aug-ments their functionality. This idea resulted in the concept of a Wireless PersonalArea Network (WPAN). Supporting security and privacy are essential beforethese networks can become an everyday reality. Without the necessary coun-termeasures, wireless communications are easy to intercept and modify, and theactivities of users can be traced. Moreover, the specific properties of WPANspresent interesting challenges when designing security and privacy solutions inthis environment. In this doctoral thesis, we present several solutions for a num-ber of important security and privacy problems in WPANs.

    The thesis starts with an overview of the most common techniques to con-struct an out-of-band channel, a building block used in pairing protocols, andthe essential part to securely bootstrap key establishment protocols in a WPAN.This doctoral thesis presents two efficient pairing protocols, and discusses theirmain (security) properties.

    Distance bounding protocols enable a verifying party to determine an upperbound on the distance between itself and a prover, who claims to be within a cer-tain range. This thesis discusses the cryptographic and physical design principlesthat have to be taken into account to design a secure distance bounding protocol,and presents some interesting applications of distance bounding protocols.

    As distance bounding protocols are conducted over noisy wireless ad hocchannels, they should be designed to cope well with substantial bit error ratesduring the rapid single bit exchanges. This thesis presents the noise resilientMAD protocol and compares its performance to the Hancke–Kuhn protocol forboth moderately low and relatively high bit error rates. The results of thisanalysis help to choose the appropriate design parameters.

    Finally, the thesis deals with location privacy in WPANs. Several communica-tion scenarios for WPAN are presented and for each of these scenarios, practicaltechniques that make use of temporary pseudonyms are proposed. To analyzeand evaluate these solutions and other techniques that have been proposed inthe literature, this doctoral thesis presents a formal model of location privacy forWPAN.

    v

  • vi

  • Samenvatting

    Draadloze communicatie tussen mobiele toestellen maakt het mogelijk om dezeapparaten te laten samenwerken en hun functionaliteit te verhogen. Dit idee heeftgeresulteerd tot het concept van een draadloos Personal Area netwerk (WPAN ).Vooraleer dergelijke netwerken op grote schaal ingezet kunnen worden, zal menechter de nodige maatregelen moeten voorzien om de beveiliging en privacy vande gebruikers te kunnen garanderen. Zonder extra maatregelen is het immerseenvoudig om draadloze communicatie te onderscheppen en aan te passen, en omde activiteiten van gebruikers te traceren. Het ontwerp van dergelijke beveili-gingsmaatregelen wordt echter bemoeilijkt door de specifieke eigenschappen vandraadloze Personal Area netwerken. Dit resulteert ook in een boeiend en uitda-gend onderzoeksdomein. Deze doctoraatsthesis richt zich vooral op het oplossenvan een aantal belangrijke beveiligings- en privacy problemen in draadloze Per-sonal Area netwerken.

    De thesis begint met een overzicht van de voornaamste technieken om eenextra veilig kanaal te creëren, een bouwblok die vooral gebruikt wordt in pairingprotocols. Het is een essentieel onderdeel om sleutelovereenkomst protocols in eenWPAN op een veilige manier te initializeren. Deze doctoraatsthesis stelt tweeefficiënte pairing protocols voor, en bespreekt hun voornaamste (beveiligings)eigenschappen.

    Afstandsgebonden protocols (distance bounding protocols) zorgen ervoor dateen entiteit een bovengrens kan bepalen op de afstand tussen zichzelf en eenandere entiteit, die beweert zich binnen een bepaald bereik te bevinden. Dezethesis bespreekt de cryptografische en fysische ontwerp principes die nodig zijnom een veilig distance bounding protocol te ontwerpen. Vervolgens worden enkeleinteressante toepassingen van dergelijke protocols besproken.

    Aangezien distance bounding protocols over een ad hoc kanaal met ruis uit-gevoerd worden, moeten ze op een zodanige manier ontworpen worden dat zebestand zijn tegen bitfouten die plaatsvinden gedurende snelle bituitwisselingen.Deze thesis stelt het ruisbestendige MAD protocol voor, en vergelijkt zijn perfor-mantie met dit van het Hancke–Kuhn protocol, en dit zowel in het geval van eenrelatieve lage als dat van een relatief hoge bitfoutkans. De resultaten van deze

    vii

  • analyse dragen bij tot de keuze van de optimale ontwerpparameters voor beideruisbestendige distance bounding protocols.

    Tenslotte handelt deze thesis ook over locatie privacy in draadloze PersonalArea netwerken. Verschillende communicatie scenarios worden voorgesteld, envoor ieder van deze scenarios worden praktische oplossingen besproken die ge-bruik maken van tijdelijke pseudoniemen. Om deze en andere oplossingen diein de literatuur voorgesteld zijn te analyseren en te evalueren, wordt er in dezedoctoraatsthesis een formeel model voor locatie privacy opgesteld.

    viii

  • Studie en Ontwerp van een

    Beveiligingsarchitectuur

    voor Draadloze Personal

    Area Netwerken

    Nederlandse samenvatting

    Hoofdstuk 1: Inleiding

    De miniaturisatie van computersystemen verloopt tegen een zeer hoog tempo.Deze systemen, ontstaan in het midden van de vorige eeuw, zijn geëvolueerd vandure computers die een volledig lokaal opvullen tot zeer goedkope, compacte,draagbare toestellen. Typische voorbeelden zijn digitale camera’s, mobiele tele-foons, GPS-ontvangers, PDA’s, draagbare computers, . . . In plaats van ieder vandeze toestellen apart te gebruiken, kan men ze draadloos laten communiceren ensamenwerken om de functionaliteit te verhogen. Op een dergelijke manier kaneen toestel zijn diensten aanbieden aan de andere apparaten in het netwerk. Ditresulteert tot het concept van een draadloos Personal Area netwerk (WPAN).Een WPAN is een kleinschalig, heterogeen, draadloos ad hoc netwerk dat ver-schillende draadloze toestellen met elkaar verbindt. Het bereik is typisch beperkttot enkele meters, en het netwerk is vaak gecentreerd rond één gebruiker die dedraadloze toestellen bedient. De meest gebruikte communicatietechnologieën zijnBluetooth en ZigBee.

    Draadloze Personal Area netwerken zijn initieel ontwikkeld om de hoeveel-heid draden (nodig om toestellen met elkaar te verbinden) tot een minimum te

    ix

  • beperken. Er zijn echter een heel aantal andere toepassingen. Een WPAN wordttegenwoordig reeds vaak gebruikt om een mobiele telefoon met een computer tesynchroniseren, of om handenvrij te telefoneren. Men kan deze technologie ookgebruiken om toestellen in een auto draadloos met elkaar te verbinden (bv. eennetwerk tussen de GPS-ontvanger, de mobiele telefoon, een DVD speler en ver-scheidene schermen in de auto). Draadloze Personal Area netwerken maken ookhun intrede in de medische sector. Een interessant voorbeeld is de creatie van eendraadloos netwerk tussen de mobiele telefoon van een gebruiker en zijn hoorim-plantaat. Een dergelijke verbinding via kabels realiseren zou niet gebruiksvrien-delijk zijn. Bovenstaand overzicht is echter niet exhaustief, er zijn nog vele anderetoepassingen van WPAN.

    Omdat het relatief eenvoudig is om draadloze communicatie ongedetecteerdte onderscheppen, speelt de beveiliging van deze netwerken een cruciale rol inde ontwikkeling ervan. De beveiliging van draadloze Personal Area netwerken isechter niet vanzelfsprekend omwille van verschillende redenen. Ten eerste zijn dedraagbare toestellen in een WPAN vaak beperkt in rekencapaciteit, geheugen enenergievoorraad. Dit heeft tot gevolg dat de beveiligingsmechanismen zo efficiëntmogelijk moeten zijn en dat de communicatiekost tot een minimum beperkt moetworden. Doordat mobiele toestellen batterijgevoed zijn, zijn mobiele toestellenzeer onderhevig aan aanvallen die het netwerk (gedeeltelijk) onbeschikbaar maken(de zogenaamde Denial of Service attacks). Een tweede probleem is dat draadlozePersonal Area netwerken meestal autonoom werken, en dat er bijgevolg geenberoep kan gedaan worden op vaste knopen in het netwerk (bv. key servers ofcertification authorities) om sleutels te verdelen of af te spreken. Hierdoor zijnde meeste traditionele beveiligingsmechanismen (voor het afspreken van sleutels)niet van toepassing in een WPAN. Ten slotte wordt de beveiliging ook bemoeilijktdoor de dynamisch variërende netwerk topologie. Men kan er niet op rekenen dateen bepaald toestel op een specifiek moment beschikbaar zal zijn in het netwerk.Het apparaat kan immers uitgeschakeld zijn (om energie te besparen), of buitenhet bereik van het draadloze netwerk zijn. Naast beveiliging is privacy van degebruiker ook van belang. Door gebruik te maken van draadloze communicatielaat de gebruiker immers automatisch sporen na van zijn activiteiten. Zonder denodige beveiligingsmechanismen kan men een gebruiker traceren via de mobieletoestellen die hij in zijn bezit heeft. Draadloze Personal Area netwerken zorgendus voor nieuwe uitdagingen inzake beveiliging en privacy.

    Deze thesis levert een bijdrage tot mogelijke oplossingen voor een deel vandeze uitdagingen. Hoofdstuk 1 behandelt de typische kenmerken van een WPANen de gevolgen voor het ontwerp van een beveiligingsarchitectuur. Hoofdstuk 2geeft een overzicht van de voornaamste technieken om een bijkomend veilig kanaalte creëren, een bouwblok die vooral gebruikt wordt in pairing protocols. In eentweede deel van dit hoofdstuk stellen we twee efficiënte pairing protocols voor,en bespreken we hun voornaamste (beveiligings-) eigenschappen. In hoofdstuk 3

    x

  • introduceren we het concept van afstandsgebonden protocols (distance boundingprotocols). Deze protocols zorgen ervoor dat een entiteit een bovengrens kanbepalen op de afstand tussen zichzelf en een andere entiteit, die beweert zichbinnen een bepaald bereik te bevinden. Nadat de voornaamste ontwerpprincipesbesproken zijn, geven we in het tweede deel van dit hoofdstuk een overzicht vande belangrijkste toepassingen van dergelijke protocols. Hoofdstuk 4 bestudeertruisbestendige afstandsgebonden protocols (distance bounding protocols). Westellen het ruisbestendige MAD protocol voor. Vervolgens vergelijken we zijnperformantie (op basis van het vereiste aantal rondes en de robuustheid tegenruis) met dit van het Hancke–Kuhn protocol, dit zowel in het geval van eenrelatieve lage als dat van een relatief hoge bitfoutkans. Hoofdstuk 5 handeltover locatie-privacy in draadloze Personal Area netwerken. Als oplossing voordit probleem stellen we een aantal praktische beveiligingsmechanismen voor diegebruik maken van tijdelijke pseudoniemen. Om deze en andere oplossingendie in de literatuur voorgesteld zijn te analyseren en te evalueren, stellen wein het tweede deel van dit hoofdstuk een formeel model voor locatie-privacy op.Hoofdstuk 6 sluit de thesis af en formuleert nieuwe uitdagingen voor de toekomst.

    Hoofdstuk 2: Geavanceerde Pairing Protocols

    Om netwerken en computersystemen te beveiligen, kan men symmetrische cryp-tografie toepassen. Dergelijke cryptografische primitieven maken gebruik vaneen geheime sleutel die gekend is door twee partijen: de zender van de bood-schap, en de gewenste ontvanger. Om de veiligheid van het netwerk en comput-ersysteem te garanderen, moet deze geheime sleutel op een veilige en correctemanier uitgewisseld worden. Dit is echter een zeer uitdagend probleem in draad-loze Personal Area netwerken, aangezien men geen beroep kan doen op vasteknopen in het netwerk. Een van de mogelijke oplossingen is het gebruik van pai-ring protocols om sleutelovereenkomst protocols te initialiseren. In dit hoofdstukgeven we een overzicht van de voornaamste technieken om een bijkomend veiligkanaal te creëren, een essentiële bouwblok in pairing protocols. Vervolgens stellenwe twee geavanceerde pairing protocols voor en bespreken we hun voornaamste(beveiligings-) eigenschappen. Het eerste pairing protocol vereist gebruikersinter-actie, het tweede protocol maakt gebruik van de beperkte afstand tussen de tweemobiele toestellen die een sessiesleutel willen afspreken.

    Bijkomende veilige kanalen

    Wanneer twee mobiele toestellen een symmetrische sleutel willen afspreken doorhet uitvoeren van een pairing protocol, kunnen ze gebruik maken van een bij-komend veilig kanaal. Dit kanaal heeft een lage bandbreedte en is beschikbaarvoor beide mobiele toestellen. Bepaalde informatie wordt dan via het veilige bij-

    xi

  • komend kanaal verstuurd, de rest van de informatie via het onveilige draadlozekanaal (met hogere bandbreedte). Hoepman [82] heeft twee belangrijke eigen-schappen van een bijkomend veilig kanaal gedefinieerd; het kan authentiek en/ofprivaat zijn:

    Authentiek bijkomend kanaal: Een bijkomend kanaal is authentiek enkel enalleen als beide partijen de garantie hebben dat alle berichten die ze via ditkanaal ontvangen, door de andere partij verstuurd zijn en dat het berichtniet gewijzigd is. De confidentialiteit van de informatie is niet gewaarborgd.

    Privaat bijkomend kanaal: Een bijkomend kanaal is privaat enkel en alleenals beide partijen de garantie hebben dat alle berichten die ze via dit kanaalversturen, enkel door de andere partij ontcijferd kunnen worden. De in-tegriteit en oorsprong van de informatie is niet gewaarborgd.

    Het gebruik van een bijkomend veilig kanaal is reeds uitvoerig bestudeerd.Indien het kanaal privaat is, dan kan men een EKE (encrypted key exchange)protocol uitvoeren met de geheime informatie die via het bijkomend kanaal ver-stuurd is. Indien het bijkomend veilig kanaal authentiek is, dan kan men hetDiffie-Hellman protocol uitvoeren, en het bijkomend kanaal gebruiken om depublieke sleutels te authentiseren. In beide gevallen is het resultaat een initiëlegeheime sessiesleutel.

    Een meer uitdagend probleem is echter om het bijkomend veilig kanaal te rea-lizeren op een goedkope, gebruiksvriendelijke, efficiënte en veilige manier. Enkelevoorbeelden van interessante technieken, bestudeerd in de literatuur, zijn:

    • Via gebruikersinteractie (input en/of output van gebruiker)

    • Elektrisch of fysisch contact tussen beide toestellen

    • Beveiliging op de draadloze fysische laag

    • Beide toestellen uitrusten met een accelerometer

    • Visueel bijkomend kanaal (camera en/of display)

    • Auditief bijkomend kanaal (luidspreker en/of microfoon)

    • Afstand tussen beide toestellen

    Locatie-privaat pairing protocol gebaseerd op gebruikersin-

    teractie

    De meerderheid van de toestellen in een draadloos Personal Area netwerk hebbeneen invoerinterface (bv. toetsenbord) en/of een display. Dergelijke toestellen kun-nen het pairing protocol dat in dit deel voorgesteld wordt uitvoeren. Het protocol

    xii

  • combineert het Diffie-Hellman protocol met een aantal andere technieken. Om depublieke sleutels te authentizeren wordt het MANA I protocol toegepast. Hierbijmoet de gebruiker een aantal hexadecimale waarden, die berekend worden op ba-sis van de publieke Diffie-Hellman sleutels, op beide mobiele toestellen ingeven.Tegelijkertijd met de geheime sessiesleutel wordt er ook een tijdelijk pseudoniemafgesproken. Dit wordt gebruikt om de privacy van de gebruiker te garanderen.De technieken die in hoofdstuk 5 bestudeerd worden, kunnen gebruikt wordenom het pseudoniem te hernieuwen in elke communicatieronde.

    Sleutelovereenkomst via afstandsgebonden protocols

    Dit pairing protocol maakt expliciet gebruik van de afstand tussen twee mobieletoestellen om een geheime sessiesleutel af te spreken. Iedere gebruiker definieerteerst voor elk van zijn toestellen een privaat gebied. Dit gebeurt op een zodanigewijze dat de gebruiker visueel kan verifiëren dat alle vertrouwde toestellen zichbinnen dit privaat gebied bevinden, en alle andere (onbetrouwbare) toestellenzich buiten dit privaat gebied bevinden. De gebruiker geeft dan de informatieover dit gebied (met name de afmetingen) in op het toestel. De afmetingen vaneen privaat gebied zijn niet statisch. In een druk bevolkte omgeving zal de straalveel kleiner zijn dan in een rustige, ruime omgeving.

    Om het pairing protocol succesvol te beëindigen moeten beide toestellen zichbinnen elkaars privaat gebied bevinden. De geheime sessiesleutel wordt uitgewis-seld via het Diffie-Hellman protocol. Om de publieke sleutels te authentiserenwordt er gebruik gemaakt van afstandsgebonden protocols (distance boundingprotocols). Op deze manier weten beide toestellen dat een specifieke publiekesleutel afkomstig is van een toestel dat zich binnen een bepaalde afstand bevindt.Aangezien er enkele vertrouwde toestellen aanwezig zijn in het privaat gebied vanhet toestel, moet de publieke sleutel dus afkomstig zijn van het toestel waarmeemen een sessiesleutel wil afspreken.

    Hoofdstuk 3: Veilige Afstandsgebonden Protocols

    In dit hoofdstuk bespreken we het concept van afstandsgebonden protocols (dis-tance bounding protocols). Dergelijke protocols zorgen ervoor dat een entiteit eenbovengrens kan bepalen op de afstand tussen zichzelf en een andere entiteit, diebeweert zich binnen een bepaald bereik te bevinden. We behandelen de voor-naamste ontwerpprincipes van afstandsgebonden protocols, en bestuderen enkeletoepassingsmogelijkheden in draadloze Personal Area netwerken.

    xiii

  • Werkingsmechanisme

    Afstandsgebonden protocols (distance bounding protocols) combineren fysischeen cryptografische eigenschappen en maken het op die manier mogelijk voor eenentiteit om te controleren of een andere entiteit zich binnen een bepaald bereikbevindt. Zowel de afstand tot, als de identiteit van de andere partij, wordengecontroleerd in het afstandsgebonden protocol. Om de afstand tussen beidetoestellen te schatten, wordt de tijd gemeten waarop een signaal zich van hetene toestel naar het andere verplaatst (de zogenaamde time of flight). Deze tijdgeeft dan een indicatie over de afstand tussen beide partijen. De time of flightmeten is de enige techniek die veilig gemaakt kan worden. Alle mechanismen diegebruik maken van de signaalsterkte of de hoek waaronder een signaal ontvangenwordt, zijn niet bestand tegen bepaalde (fysische) aanvallen.

    Een afstandsgebonden protocol (distance bounding protocol) bestaat typischuit een aantal rondes. In elke ronde wordt er een vraag-antwoord (challenge-response) protocol uitgevoerd. Tijdens deze snelle bituitwisselingen wordt detijd tussen het zenden van een vraag (de challenge) en het ontvangen van hetantwoord (de response) opgemeten. De maximale responstijd wordt dan ver-menigvuldigd met de voortplantingssnelheid van het draadloze medium om eenschatting van de afstand tussen beide partijen te bekomen. Meestal wordt de in-formatie verzonden via radiogolven. In dat geval is de voortplantingssnelheid desnelheid van het licht. Dit heeft tot gevolg dat de tijd om een antwoord te bereke-nen zeer kort moet zijn, en dat de ontvanger van het antwoord de responstijdmet een zeer hoge nauwkeurigheid moet kunnen meten. Indien men de garantieheeft dat er geen aanvaller fysisch aanwezig kan zijn tussen beide partijen, danmag men de informatie ook verzenden via ultrasone golven. In dat geval zijn devereisten voor het berekenen van een antwoord en het meten van de responstijdminder strikt.

    Ontwerpprincipes

    Om een veilig afstandsgebonden protocol (distance bounding protocol) te ontwer-pen, moet men een aantal principes in rekening brengen. Deze kunnen opgesplitstworden in cryptografische en fysische principes. Beide principes worden uitvoerigbesproken in dit hoofdstuk. Er zijn een aantal protocols in de literatuur versche-nen die tegen één of meerdere van deze regels zondigen, en bijgevolg onderhevigzijn aan bepaalde aanvallen. Eén van de fysische ontwerpprincipes is dat eenafstandsgebonden protocol bestand moet zijn tegen bitfouten, aangezien het uit-gevoerd wordt in een ruizige omgeving. De gevolgen van deze observatie voor deveiligheid van afstandsgebonden protocols worden besproken in hoofdstuk 4.

    xiv

  • Toepassingen

    Veilige afstandsgebonden protocols (distance bounding protocols) zijn specifiekontworpen om bepaalde aanvallen (en dan vooral de zogenaamde man-in-the-middle attacks) te vermijden. Maar er zijn nog andere interessante toepassingen.

    Afstandsgebonden authenticatie

    In conventionele computernetwerken gebeurt authenticatie meestal op basis vaniets wat je weet, wat je hebt of wat je bent. Je kan echter ook informatie overde locatie of de afstand tot een bepaalde plaats mee in rekening brengen bijhet toekennen van bepaalde privileges (bv. om een deur te openen moet je je erdichtbij bevinden). Dit is zeker handig in draadloze Personal Area netwerken,waar het bereik van het netwerk per definitie zeer beperkt is. Door het toepassenvan afstandsgebonden protocols (distance bounding protocols) kan je deze vormvan authenticatie garanderen.

    Protocol voor sleutelovereenkomst

    Je kan een sleutelovereenkomst protocol op verschillende manieren initialiseren.Een interessante methode is gebruik te maken van een pairing protocol dat deafstand tussen de twee entiteiten die een sleutel willen afspreken, mee in rekeningbrengt. Dit pairing protocol is reeds besproken in hoofdstuk 2.

    Bepalen van de locatie op een veilige manier

    Afstandsgebonden protocols (distance bounding protocols) maken het mogelijkom een bovengrens te bepalen op de afstand tussen twee entiteiten. Dit principekan nu ook uitgebreid worden. Om op een veilige manier de locatie van eentoestel te bepalen in een 2-dimensionaal vlak (men kan de resultaten ook ver-algemenen tot 3 dimensies), moet men een afstandsgebonden protocol uitvoe-ren met ten minste drie samenwerkende, niet-collineaire verifiërende entiteiten(verifiers). Deze drie entiteiten zijn gesynchroniseerd en delen dezelfde geheimesleutels. Door hun metingen te combineren, kunnen ze de locatie van een toestelberekenen. Om valse locatie-claims te vermijden, moeten er wel enkele specifiekebeveiligingsmechanismen toegepast worden, zoals o.a. broadcast mode. De detailsworden uitvoerig in dit hoofdstuk besproken.

    Hoofdstuk 4: Afstandsgebonden Protocols in

    Ruizige Omgevingen

    Aangezien afstandsgebonden protocols (distance bounding protocols) over een adhoc kanaal met ruis uitgevoerd worden, moeten ze op een zodanige manier ont-

    xv

  • worpen worden dat ze bestand zijn tegen bitfouten die plaatsvinden gedurendesnelle bituitwisselingen. In dit hoofdstuk stellen we het ruisbestendige MADprotocol voor, en vergelijken zijn performantie (op basis van het vereiste aantalrondes en de robuustheid tegen ruis) met dit van het Hancke–Kuhn protocol, ditzowel in het geval van een relatieve lage als dat van een relatief hoge bitfoutkans.

    Ruisbestendige MAD protocol

    Het ruisbestendige MAD protocol is een aangepaste versie van het MAD proto-col, dat ontworpen werd door Čapkun et al. Het heeft de interessante eigenschapdat een aanvaller in elke ronde slechts een kans van 1/2 heeft om een goed ant-woord (response) te sturen. Het zorgt ook automatisch voor wederzijdse authen-ticatie, wat een belangrijk voordeel is (sommige andere protocols moeten tweekeer achter elkaar uitgevoerd worden om deze eigenschap te bekomen, wat uite-raard minder efficiënt is). Door een (n, k)-foutverbeterende code te integrerenin het afstandsgebonden protocol kan men een bepaald aantal fouten (aangeduidmet de parameter x ) corrigeren. Om de veiligheid van het protocol te garanderen,moeten beide partijen de responstijd echter kunnen opmeten met een voldoendehoge precisie, en mag het niet mogelijk zijn om de (n, k)-foutverbeterende codein een verwaarloosbaar korte tijd te berekenen.

    Vergelijking tussen ruisbestendig MAD en Hancke–Kuhn

    protocol

    Performantie bij relatief lage bitfoutkans

    We vergelijken eerst de performantie van beide ruisbestendige afstandsgebondenprotocols (distance bounding protocols) in het geval dat de bitfoutkans relatieflaag is (in de orde van 0.01 en lager). Een eerste vaststelling is dat de bitfoutkanswel degelijk een invloed heeft op de kans op succesvolle aanvallen. Hoe meerbitfouten er toegelaten zijn ten gevolge van ruis, in hoe meer rondes een aanvallereen fout antwoord kan doorsturen. Hij kan dan achteraf beweren dat hij een juistantwoord had doorgestuurd, maar dat er een bitfout is opgetreden. Men kan dusconcluderen dat ruis voordelig is voor een aanvaller. Een hogere bitfoutkans isechter nadelig voor een eerlijke entiteit die zijn afstand tot een andere plaats (ofentiteit) wil bewijzen, aangezien er meer kans is dat een juist antwoord toch foutwordt ontvangen (en dat bijgevolg de ronde zal falen).

    Als we beide protocols vergelijken bij een zelfde bitfoutkans, dan merken weop dat het ruisbestendige MAD protocol slechts de helft van het aantal snellebituitwisselingen nodig heeft, in vergelijking met het Hancke–Kuhn protocol, omde kans op succesvolle aanvallen onder een bepaalde drempel te houden. Als webeide protocols vergelijken in het geval dat er wederzijdse authenticatie vereistis (wat meestal het geval is), dan heeft het ruisbestendige MAD protocols zelfs

    xvi

  • slechts een vierde van het aantal snelle rondes nodig. Er moeten echter iets meerbits uitgewisseld worden via het trage draadloze kanaal in vergelijking met hetHancke–Kuhn protocol. Om beide ruisbestendige protocols volledig met elkaar tevergelijken moet men bijgevolg de kost van zowel het trage als het snelle draadlozekanaal in rekening brengen.

    Performantie bij relatief hoge bitfoutkans

    Hoe hoger de bitfoutkans, hoe moeilijker het wordt om de parameters van eenruisbestendig afstandsgebonden protocol (distance bounding protocol) te bepalen,rekening houdend met het maximaal aantal toegelaten foutief afgekeurde enfoutief goedgekeurde authenticatie claims (false negatives en false positives).Vanaf een bepaalde bitfoutkans wordt het zelfs onmogelijk om aan beide voor-waarden simultaan te voldoen. In dit hoofdstuk berekenen we voor beide ruis-bestendige afstandsgebonden protocols de bitfoutkans waarbij dit fenomeen zichvoordoet. Over het algemeen ligt deze limiet hoger bij het ruisbestendige MADprotocol dan bij het Hancke–Kuhn protocol.

    Als we beide protocols vergelijken bij een zelfde bitfoutkans, dan merkenwe op dat het ruisbestendige MAD protocol slechts de helft van het aantal snellebituitwisselingen nodig heeft, in vergelijking met het Hancke–Kuhn protocol. Ditis in overeenstemming met het scenario waarbij de bitfoutkans relatief laag is.Wanneer de bitfoutkans echter een bepaalde drempel overschrijdt (typisch in deorde van 0.1), stijgt het aantal vereiste snelle rondes bijzonder snel, en wordt hetduidelijk voordeliger om het Hancke–Kuhn protocol te gebruiken.

    Hoofdstuk 5: Locatie-Privacy in WPAN

    Dit laatste hoofdstuk handelt over locatie-privacy in draadloze Personal Areanetwerken. Ieder draagbaar toestel heeft een uniek en vast hardware-adres. Doorde draadloze communicatie tussen de mobiele toestellen in het netwerk af te luis-teren, kan een aanvaller dit hardware-adres bekomen. Dit heeft grote gevolgen.Het laat de aanvaller immers toe om de gebruiker van deze mobiele toestellente traceren. Telkens er een bepaald hardware-adres verschijnt, weet de aanvallerdat een specifiek mobiel toestel aanwezig is. Als hij bovendien ook weet wie degebruiker van dat toestel is (bv. door dit ooit visueel waargenomen te hebben),dan kan hij op die manier de gebruiker traceren. Dit is een zeer ernstig beveilig-ingsprobleem.

    Dit locatie-privacy probleem kan opgelost worden door tijdelijke identiteiten(pseudoniemen) te gebruiken tijdens de draadloze communicatie. Dit moet echterop een zodanige manier gebeuren dat een aanvaller niet in staat is om te de-tecteren dat verschillende pseudoniemen tot eenzelfde toestel behoren. Anderskan hij immers nog steeds de gebruiker blijven traceren.

    xvii

  • In dit hoofdstuk bespreken we vier communicatiescenario’s, en stellen we voorieder van deze scenario’s een praktische oplossing voor die gebruik maakt vantijdelijke pseudoniemen. In een tweede deel van dit hoofdstuk stellen we eenformeel model voor locatie-privacy in WPAN voor. Dit theoretisch raamwerkbevat een formele definitie van de verschillende vormen van locatie-privacy, eneen theoretisch model van de aanvalsmogelijkheden van een actieve aanvaller. Ditmodel passen we dan toe op een aantal protocols die in de literatuur voorgesteldzijn. Dit laat toe om verscheidene problemen te identificeren en op te lossen.

    Probleembeschrijving

    Het gebruik van vaste hardware-adressen in mobiele communicatie laat een aan-valler toe om mobiele toestellen, en dus ook de gebruiker van deze apparaten,te traceren. Dit probleem kan verholpen worden door tijdelijke pseudoniemen tegebruiken. Men moet minstens volgende twee doelstellingen realiseren om hetlocatie-privacy probleem op te lossen:

    Ontraceerbaarheid: Het moet computationeel zeer moeilijk zijn voor een aan-valler om te achterhalen welk specifiek toestel aan het communiceren is(bv. wat het vaste hardware-adres van dit toestel is).

    Ontkoppelbaarheid: Het moet computationeel zeer moeilijk zijn voor een aan-valler om verschillende pseudoniemen, die tot eenzelfde toestel behoren, metelkaar in verband te brengen.

    Verder veronderstellen we dat er een actieve aanvaller aanwezig is tijdens demobiele communicatie. Deze aanvaller heeft een eindige hoeveelheid rekenkrachten geheugen, maar kan alle berichten in het netwerk onderscheppen en eventueelinformatie wijzigen, toevoegen of verwijderen.

    Vier communicatie scenario’s voor WPAN

    Rekening houdend met bovenstaande beperkingen en veronderstellingen besprekenwe in dit hoofdstuk vier communicatie scenario’s voor WPAN, en stellen we voorelk van deze scenario’s een praktische oplossing voor die gebruik maakt van tij-delijke pseudoniemen. Zonder in detail te gaan, geven we nu een overzicht vandeze vier scenario’s en de voorgestelde beveiligingsmechanismen:

    • Scenario 1: de mobiele toestellen delen een geheime symmetrischesleutel. In dit scenario kunnen we een ketting van tijdelijke pseudoniemenopstellen. Deze ketting start van een gekende publieke waarde (eventueelvariabel in tijd), en de geheime sleutel wordt gebruikt om de volgendewaarde in de ketting te berekenen.

    xviii

  • • Scenario 2: toestel kent adres van de ontvanger. Het adres van deontvanger wordt samen met een variabele willekeurige waarde (een nonce)als input gebruikt van een cryptografische hashfunctie (met specifieke cryp-tografische eigenschappen). De output van deze functie is het tijdelijkpseudoniem.

    • Scenario 3: er is een bijkomend veilig kanaal aanwezig. Metdit bijkomend veilig kanaal kan men een geheime sessiesleutel afspreken.Deze symmetrische sleutel kan dan gebruikt worden op een ketting vanpseudoniemen te genereren, net zoals in scenario 1.

    • Scenario 4: de mobiele toestellen delen geen geheime informatie.Indien beide toestellen geen geheime informatie delen, kunnen ze best hunberichten naar alle toestellen in het netwerk sturen, zonder enige vorm vanidentificatie. In sommige gevallen kan men ook de oplossing van scenario 2gebruiken, maar in dat geval kan locatie-privacy niet volledig gegarandeerdworden.

    Formeel locatie-privacy model

    Om onze oplossingen, en andere technieken die in de literatuur voorgesteld zijn,te evalueren, stellen we een formeel model voor locatie-privacy op. De aan-valler modelleren we als een entiteit met een eindige hoeveelheid rekenkrachtdie beperkte toegang heeft tot bepaalde orakels. We definiëren drie vormen vanlocatie-privacy waaraan een protocol kan voldoen: “standaard” locatie-privacy(location privacy), locatie-privacy van een communicerende groep toestellen (com-municating constellation location privacy), en voorwaartse privacy (forward lo-cation privacy). Voor ieder van deze definities beschrijven we een aanvalsspel(attack game). Het doel van ieder spel is om een onderscheid te kunnen makentussen een specifieke knoop uit het netwerk (de target node) en een willekeurigeknoop. Indien een aanvaller hierin slaagt met een significant grotere kans dan1/2, dan wint hij het spel en voldoet het protocol niet aan de specifieke definitievan locatie-privacy.

    In dit hoofdstuk analyseren we de oplossing voorgesteld door Gehrmann etal. (Bluetooth anonimity mode). We evalueren ook formeel drie protocols diegebruik maken van tijdelijke pseudoniemen: het SP-1 protocol (onze oplossingvoor communicatie scenario 1), het SP-2 protocol (onze oplossing voor commu-nicatie scenario 2) en het protocol van Wong en Stajano. De resultaten wordenin onderstaande tabel samengevat. In deze tabel worden de volgende symbolengebruikt:

    • V: voldoet aan definitie.• X: voldoet niet aan definitie, maar er is een oplossing voor het probleem

    beschikbaar.

    xix

  • • XX: voldoet niet aan definitie, en geen oplossing beschikbaar.

    Tabel 1. Formele evaluatie van het SP-1, SP-2 en Wong–Stajano protocol

    protocol loc. private constellation loc. private forward loc. privateSP-1 X X XSP-2 V V XX

    Wong-Stajano V V X

    xx

  • List of Acronyms

    ACL Access Control ListACO Authenticated Ciphering OffsetAES Advanced Encryption StandardCA Certification AuthorityCAC Channel Access CodeCOF Ciphering Offset NumberDAC Device Access CodeDoS Denial-of-ServiceDSR Dynamic Source RoutingECC Elliptic Curve CryptographyEDR Enhanced Data RateErCC Error Correcting CodeFSM Finite State MachineGCM Galois Counter ModeGPS Global Positioning SystemGSM Global System for Mobile CommunicationsIP Internet ProtocolIV Initial ValueMAC Message Authentication CodeMANA Manual AuthenticationMIC Message Integrity CodeNFC Near Field CommunicationNiMH Nickel-Metal HydrideNWK network

    xxi

  • OOB Out-of-BandPAN Personal Area NetworkPGP Pretty Good PrivacyPIN Personal Identification NumberPKI Public Key InfrastructurePRF Pseudo-Random FunctionRFID Radio Frequency IdentificationRSA Rivest-Shamir-AdlemanSKKE Symmetric-Key Authenticated Key Agreement (protocol)SN Sensor NetworkSSL Secure Sockets LayerSTS Station-to-Station (protocol)TLS Transport Layer SecurityUWB Ultra-WidebandWAP Wireless Application ProtocolWBAN Wireless Body Area NetworkWLAN Wireless Local Area Networkw.l.o.g. without loss of generalityWPAN Wireless Personal Area NetworkWTLS Wireless Transport Layer SecurityXOR Exclusive OR

    xxii

  • List of Notation

    addrA the hardware address of device AA the hardware address (identity) of device A−→ data sent via a wireless ad hoc channel (e.g., Bluetooth)99K data sent via an out-of-band channela← b the value b is assigned to variable aa|b concatenation of the bits a and ba ‖ b concatenation of the bitstrings a and b(a, b) concatenation of the bitstrings a and bx ∈R {0, 1} random bit xX ∈R {0, 1}n random bitstring X of length n(n,k) ECC (n,k) error correcting codeNi the i-th bit of string NNA,i the i-th bit of string NAmin[f(x)] the minimum of function f(x)max [f(x)] the maximum of function f(x)gcd(a, b) the greatest common divisor of a and b⌊x⌋ the largest integer less than or equal to xā the bit-complement of bit aa⊕ b exclusive OR (XOR) of a and baP the point multiplication of integer a and

    the point P on an elliptic curveE an elliptic curve over a finite field

    xxiii

  • 〈Z∗p, ·〉 the multiplicative group of integers modulo p(with p a large prime)

    〈Zp,+〉 the group of integers modulo p(with p a large prime)

    Pr(X) the probability of event Xpoly(k) any polynomial function of kA[x] an attacker that is allowed to ask x queries

    to a particular oracleh(D) a cryptographic hash function computed on

    the data string D. Such a function should bepreimage, second preimage and collision-resistant

    hi(m), hj(m) two pairwise independent cryptographic hash functionsPRF k(D) a pseudo-random function computed

    on the bitstring D using the key kMAC k(D) a message authentication code computed on

    the bitstring D using the key kCVk(m) check-value function computed on the message

    m using the key kEk(m) symmetric encryption of the message m

    using the key kEKA(m) asymmetric encryption of the message m

    using the public key KA of entity ASign(m) a (symmetric or asymmetric) signature

    computed on the bitstring mcommit(m) secure commitment computed on the bitstring m

    xxiv

  • List of Tables

    4.1 Influence of the number of allowed errors x on the false acceptanceratio for n = 37 and Pb = 0.01 . . . . . . . . . . . . . . . . . . . . . 113

    4.2 Comparison of the false rejection ratio for n = 37 and Pb = 0.01 . . 1144.3 Comparison of the false acceptance ratio for n = 63 and Pb = 0.02 115

    xxv

  • xxvi

  • List of Figures

    1.1 Mutual entity authentication protocol of Bluetooth . . . . . . . . . 81.2 ZigBee key hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    2.1 Mobile personal devices share a secure out-of-band channel . . . . 312.2 Pairing protocol for bidirectional private out-of-band channel . . . 322.3 Pairing protocol for bidirectional authentic out-of-band channel . . 332.4 MANA I protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.5 MANA II protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.6 MANA III protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.7 MANA IV protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.8 Location private pairing protocol based on user interaction . . . . 482.9 The concept of a user’s (device’s) private space . . . . . . . . . . . 552.10 Efficient key establishment protocol using distance bounding pro-

    tocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

    3.1 The concept of proximity based authentication. . . . . . . . . . . . 613.2 Distance fraud attack . . . . . . . . . . . . . . . . . . . . . . . . . 633.3 Mafia fraud attack . . . . . . . . . . . . . . . . . . . . . . . . . . . 643.4 Terrorist fraud attack . . . . . . . . . . . . . . . . . . . . . . . . . 653.5 Wormhole attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673.6 Distance bounding protocol of Čapkun and Hubaux . . . . . . . . 683.7 Guessing attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693.8 Distance bounding protocol of Brands and Chaum . . . . . . . . . 743.9 Distance bounding protocol of Waters and Felten . . . . . . . . . . 773.10 Modified distance bounding protocol of Waters and Felten . . . . . 803.11 Distance bounding protocol of Bussard . . . . . . . . . . . . . . . . 813.12 Zero knowledge proof of knowledge in Bussard’s distance bounding

    protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833.13 Secure location verification: the ideal scenario . . . . . . . . . . . . 883.14 Effect of the processing delay in secure location verification . . . . 883.15 Attacker delays responses to cheat on his location . . . . . . . . . . 893.16 Secure location verification: broadcast mode . . . . . . . . . . . . . 90

    xxvii

  • 3.17 Geometrical properties of broadcast mode . . . . . . . . . . . . . . 923.18 Transformation of the coordinate system . . . . . . . . . . . . . . . 933.19 Intersection points defining the area where prover is located . . . . 943.20 Broadcast mode: prover is outside the triangle {V1, V2, V3} . . . . 953.21 Broadcast mode: prover collinear with verifiers V1 and V3 . . . . . 953.22 Hyperbola attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

    4.1 Distance bounding protocol of Hancke and Kuhn . . . . . . . . . . 1034.2 Noise resilient MAD protocol . . . . . . . . . . . . . . . . . . . . . 1064.3 Man-in-the-middle attack on the noise resilient MAD protocol . . . 1094.4 Relation between the false acceptance ratio PFA and the number

    n of rounds for x = 5 and Pb = 0.005 . . . . . . . . . . . . . . . . . 1164.5 Influence of z1 and k on Plim,MAD (NR MAD) for n = 500 . . . . 1204.6 Influence of z1 on Plim,H (Hancke–Kuhn) and Plim,MAD (NR MAD)

    for PFA ≤ 50% and n = 500 . . . . . . . . . . . . . . . . . . . . . . 1224.7 Influence of z1 on Plim,MAD (NR MAD) for large values of k (k >

    10) and n = 500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1224.8 Influence of PFA on Plim,H (Hancke–Kuhn) and Plim,MAD (NR

    MAD) for PFR ≤ 2−7 and n = 500 . . . . . . . . . . . . . . . . . . 1234.9 Minimal required number n of rounds for the Hancke-Kuhn and

    NR MAD protocol when PFR ≤ 2−23 and PFA ≤ 2−23 . . . . . . . 1254.10 Minimal required number n of rounds for the Hancke-Kuhn and

    NR MAD protocol when PFR ≤ 2−10 and PFA ≤ 2−23 . . . . . . . 1264.11 Minimal required number n of rounds for the Hancke-Kuhn and

    NR MAD protocol when PFR ≤ 2−23 and PFA ≤ 2−10 . . . . . . . 1274.12 Minimal required number n of rounds for the Hancke-Kuhn and

    NR MAD protocol when PFR ≤ 2−10 and PFA ≤ 2−10 . . . . . . . 1284.13 Three regions of the bit error rate . . . . . . . . . . . . . . . . . . 129

    5.1 Four WPAN communication scenarios . . . . . . . . . . . . . . . . 1395.2 Communicating constellation in the WPAN . . . . . . . . . . . . . 1515.3 Improved SP-1 protocol . . . . . . . . . . . . . . . . . . . . . . . . 1615.4 Wong and Stajano’s location privacy protocol . . . . . . . . . . . . 163

    B.1 General overview of the IM3 health care architecture. . . . . . . . 197B.2 Communication in CICADA for a sample network of 5 nodes . . . 199B.3 FSM of a sensor in a WBAN. . . . . . . . . . . . . . . . . . . . . . 200B.4 Secure JOIN-REQUEST originating from sensor A. . . . . . . . . . 201B.5 Secure key transport to all the sensors in the WBAN. . . . . . . . 203

    xxviii

  • Contents

    1 Introduction 11.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    1.2.1 Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.2.2 ZigBee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.3 This Thesis and Related Work . . . . . . . . . . . . . . . . . . . . 181.4 Outline and Main Contributions . . . . . . . . . . . . . . . . . . . 26

    2 Enhanced Pairing Protocols 292.1 Constructing Out-of-Band Channels . . . . . . . . . . . . . . . . . 30

    2.1.1 Defining an extra channel . . . . . . . . . . . . . . . . . . . 302.1.2 Establishing session keys using out-of-band channels . . . . 312.1.3 Overview of existing technologies . . . . . . . . . . . . . . . 33

    2.2 Location Private Pairing Protocol Based on User Interaction . . . 462.2.1 Our enhanced pairing protocol . . . . . . . . . . . . . . . . 472.2.2 Evaluation of the pairing protocol . . . . . . . . . . . . . . 50

    2.3 Key Establishment Using Distance Bounding Protocols . . . . . . . 542.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    3 Secure Distance Bounding Protocols 593.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    3.1.1 Time of flight distance bounding protocols . . . . . . . . . . 613.1.2 Attack scenarios . . . . . . . . . . . . . . . . . . . . . . . . 633.1.3 Cryptographic design principles . . . . . . . . . . . . . . . . 653.1.4 “Physical” design principles . . . . . . . . . . . . . . . . . . 663.1.5 Practical use case . . . . . . . . . . . . . . . . . . . . . . . . 71

    3.2 Existing Distance Bounding Proposals . . . . . . . . . . . . . . . . 733.2.1 Brands’ and Chaum’s protocol . . . . . . . . . . . . . . . . 733.2.2 Waters’ and Felten’s protocol . . . . . . . . . . . . . . . . . 763.2.3 Bussard’s protocol . . . . . . . . . . . . . . . . . . . . . . . 79

    3.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    xxix

  • 3.3.1 Proximity based authentication . . . . . . . . . . . . . . . . 843.3.2 Key establishment . . . . . . . . . . . . . . . . . . . . . . . 863.3.3 Secure location verification . . . . . . . . . . . . . . . . . . 86

    3.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

    4 Employing Distance Bounding Protocols in Noisy Environments1014.1 Noise Resilient Distance Bounding Protocols . . . . . . . . . . . . 102

    4.1.1 The RFID protocol of Hancke and Kuhn . . . . . . . . . . . 1034.1.2 Noise resilient mutual authentication with distance bounding104

    4.2 Statistical Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.3 Performance Analysis at Low Bit Error Rates . . . . . . . . . . . . 112

    4.3.1 Influence of bit errors on the false acceptance ratio . . . . . 1124.3.2 Comparison of the false rejection ratio . . . . . . . . . . . . 1134.3.3 Comparison of the false acceptance ratio . . . . . . . . . . . 1154.3.4 Required number of fast communication rounds . . . . . . . 115

    4.4 Constraints Due to High Bit Error Rates . . . . . . . . . . . . . . . 1174.4.1 Upper limit on the bit error rate . . . . . . . . . . . . . . . 1174.4.2 Reducing the number of rounds . . . . . . . . . . . . . . . . 124

    4.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    5 Location Privacy in Wireless Personal Area Networks 1335.1 Location Privacy Problem . . . . . . . . . . . . . . . . . . . . . . . 134

    5.1.1 Tracking mobile users . . . . . . . . . . . . . . . . . . . . . 1345.1.2 Attack strategies . . . . . . . . . . . . . . . . . . . . . . . . 1355.1.3 Problem statement and design goals . . . . . . . . . . . . . 136

    5.2 Location Privacy–Enhancing Techniques . . . . . . . . . . . . . . . 1385.2.1 Overview of WPAN communication scenarios . . . . . . . . 1385.2.2 Temporary pseudonym schemes . . . . . . . . . . . . . . . . 1405.2.3 Practical observations . . . . . . . . . . . . . . . . . . . . . 148

    5.3 Theoretical Location Privacy Model . . . . . . . . . . . . . . . . . 1495.3.1 Overview of the different entities . . . . . . . . . . . . . . . 1495.3.2 Identification protocol . . . . . . . . . . . . . . . . . . . . . 1505.3.3 Adversarial model . . . . . . . . . . . . . . . . . . . . . . . 1515.3.4 Attack games . . . . . . . . . . . . . . . . . . . . . . . . . . 1525.3.5 Forward security . . . . . . . . . . . . . . . . . . . . . . . . 154

    5.4 Analysis and Evaluation of Several Location Privacy–EnhancingSchemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1555.4.1 Necessity of random responses . . . . . . . . . . . . . . . . 1565.4.2 Bluetooth anonymity mode . . . . . . . . . . . . . . . . . . 1575.4.3 Our location privacy–enhancing scheme . . . . . . . . . . . 1585.4.4 Wong and Stajano’s location privacy protocol . . . . . . . . 163

    5.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

    xxx

  • 6 Conclusions and Future Research 1676.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1676.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

    A Secure Location Verification: Computing the Prover’s Location191

    B How to Secure an Interactive Medical Monitoring Environment195B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195B.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

    B.2.1 General overview . . . . . . . . . . . . . . . . . . . . . . . . 196B.2.2 Security assumptions . . . . . . . . . . . . . . . . . . . . . . 197

    B.3 Protocol design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198B.3.1 CICADA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198B.3.2 CICADA-S . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

    B.4 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204B.4.1 Performance evaluation . . . . . . . . . . . . . . . . . . . . 204B.4.2 Security properties . . . . . . . . . . . . . . . . . . . . . . . 205

    B.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

    xxxi

  • xxxii

  • Chapter 1

    Introduction

    1.1 Motivation

    Digital communication systems are evolving very rapidly. Since their introductionin the 1940s, computers have evolved from very expensive, room-filling machines,only available to a few large organizations, to affordable, light and portable de-vices. Typical examples of such mobile devices are digital cameras, mobile cellphones, GPS receivers, wireless headsets, laptops, . . . As more and more of thesemobile devices became available on the market, it became apparent that enablingthese devices to communicate over wireless links would allow them to work to-gether and augment their functionality. This idea resulted in the concept of aWireless Personal Area Network (WPAN). A WPAN is a small, heterogeneous,wireless ad hoc network which connects several personal mobile devices. Therange of a WPAN is typically a few meters, and is often centered around a singleuser (or a very small number of users) operating the mobile devices. PersonalArea Networks (PAN) are standardized in the IEEE 802.15 working group [90].

    There are several communication technologies available to create a WirelessPersonal Area Network, with Bluetooth [25] and to a lesser degree ZigBee [218]the most popular ones. By 2009, more than 66 percent of the 900 million mobilephone handsets sold that year will include Bluetooth technology [23]. WirelessPersonal Area Networks have several interesting applications. Such networkswere originally created to be a cable-replacement technology that allows for alimited number of devices to communicate with each other via a wireless link.There is however a larger range of applications. The most well known and com-monly used one is to connect a mobile phone to a wireless headset (to phonehands-free) or to a laptop (to synchronize data). Another popular application isto connect a wireless mouse and keyboard to a computer. A WPAN can also becreated in a car: the mobile phone and/or PDA of the user, a GPS receiver, one

    1

  • 2 CHAPTER 1. INTRODUCTION

    or more displays installed in the car, a DVD player and other electronic devicescan form a wireless network and communicate to each other. At this moment,such networks only exist in luxury cars, but it can be expected that the demandwill increase and that it will also appear in cheaper vehicles. Nintendo [150]and Sony [198] have gaming consoles with wireless joysticks, which hence forma small WPAN. Wireless Personal Area Networks are also appearing in medi-cal, health and wellness environments. ABI Research forecasts that by 2012 themarket for PAN sensors in this area (sports, exercise, health and well-being) willrepresent nearly 140 million units [1]. Another interesting medical application inthis area is to connect a cochlear implant via Bluetooth to the mobile phone ofa user. This could enable people with hearing problems to make mobile phonecalls. Wireless Personal Area Networks can also be interesting when devices needan Internet connection. These mobile devices can then form a network with amobile phone (or another device such as a PDA), which is then used as a gatewayto the Internet.

    A Wireless Personal Area Network is very different from a conventional com-puter network. Its most important characteristics are:

    Battery fed: The nodes in a Wireless Personal Area Network are typically mo-bile devices. They are often not connected to the power supply, and have toget their energy from a battery. To avoid that the energy level is exhaustedin a very short period of time, the intensive use of expensive operations(from an energy point of view) has to be minimized. Mobile devices withvery limited resources go into sleep mode from the moment they do nothave to send or receive data. Always being online would consume toomuch energy.

    Self-organized and decentralized: A Wireless Personal Area Network is aspecial type of a wireless ad hoc network [204]. Such an ad hoc networkestablishes itself the moment two or more devices enter each others’ commu-nication range. This happens without the use of any fixed infrastructure,but relies solely on the devices that create the instantaneous connection.

    Dynamic network topology: The nodes in a Wireless Personal Area Networkare often mobile. Such devices can move from one place to another. Evenmore, they can go offline to preserve energy or because they are not operatedby the user at that moment of time. Because of these reasons, the networktopology is dynamic. The number of devices in the network can changein place and time. The lifetime of a Wireless Personal Area Network istypically very short. Connections are established on the spot. From themoment the data transfer has finished, the devices disconnect again.

    Heterogeneity: The devices that can make up the Wireless Personal Area Net-work can have very different capabilities. This can range from a laptop

  • 1.1. MOTIVATION 3

    (having large energy and computation resources) to a digital watch (beingbattery fed and having very limited computational power).

    Limited range: The range of a Wireless Personal Area Network is determinedby the antenna and wireless radio built in the mobile device. Typically,the range is a few meters. The communication in a WPAN is thereforemost of the time single hop. A device communicates directly to the in-tended destination, which is in the sending range. It is however possible toextend the range of a WPAN, and send data to devices outside the send-ing range. Wireless Personal Area Networks can be grouped in clustersto form a larger network (e.g., this is called scatter-nets in the Bluetoothstandard [25]). In this case, the data is forwarded from hop-to-hop (somulti-hop communication).

    Wireless: A Personal Area Network (PAN) is in all practical cases wireless,since wiring limits the mobility of the devices in the network. The datais transmitted via the wireless radio. Since wireless communication doesnot stop at the destination, a passive eavesdropper located within receivingrange can receive all transmitted data.

    Small number of devices: Since a Wireless Personal Area Network is centeredaround a single or a small number of users, the number of devices in thenetwork is very low. E.g., Bluetooth devices can form pico-nets, whichconsist of at most 8 devices. Often, the number of devices will be evensmaller (two or three devices that need to exchange some data).

    User operated: Most devices in the Wireless Personal Area Network will beoperated by a user (e.g., a PDA, mobile phone, laptop, . . . ). This doesnot have to be the same user for all devices. The total number of usersis however quite small, due to the small scale of the network. Otherwise,it would make more sense to define the network as a Wireless Local AreaNetwork (WLAN) [89, 212, 214].

    Low bit rate: Mobile devices in a Wireless Personal Area Network often onlyneed to send small amounts of data to each other (e.g., an entry of thephone book or some voice communication). In order to have a low energyconsumption, the bit rate used in the network should be low. E.g., Blue-tooth foresees a maximum bit rate of 3 Mbit/s, using Enhanced Data Rate(EDR) [25].

    It is clear that providing security for Wireless Personal Area Networks isessential as wireless links are easy to eavesdrop undetected. One needs a se-curity architecture that guarantees the confidentiality and integrity of messagestraveling in the network, (mutual) data and entity authentication, location pri-vacy, availability,. . . Due to the specific properties of wireless ad hoc networks

  • 4 CHAPTER 1. INTRODUCTION

    and Wireless Personal Area Networks in particular, as discussed above, it is notstraightforward to provide these security services.

    The fact that these networks run on battery operated devices with limitedprocessing power means that the security solutions should be as efficient as possi-ble and avoid intensive use of expensive cryptographic operations such as publickey encryption or digital signatures. Otherwise, the energy consumption ofthe security techniques that are applied would be too high. Let us illustrate thisby a practical example. A battery that is often used in mobile phones, is a Nickel-Metal Hydride battery (NiMH ). Such a battery has on average an energy densityof 360 J/cm3 [29, 205]. Experiments of Potlapally et al. [166] have demonstratedthat computing an RSA signature [170], using a 1024-bit key, consumes 546 mJon an Intel SA-1110 StrongARM processor (a 32-bit RISC processor) clockedat 206 MHz. A mobile device containing such a processor and having a NiMHbattery of 1 cm3 can hence only compute around 600 RSA signatures before thebattery is exhausted, which is a low number. Computing a 163-bit signatureusing elliptic curve cryptography (ECC ) [139, 142], which has about the samesecurity level, costs a factor 3 less than the RSA signature [166]. If we comparethese results with symmetric cryptographic primitives, we immediately see a verylarge gap. Employing the Advanced Encryption Standard (AES) algorithm [45,pp.31–52] to compute the encryption of an 128-bit block [44] (using a 128-bitkey) on the same processor only costs 19.36 µJ [166], which is significantly lessthan the RSA or ECC signature. This example illustrates that one has to takethe efficiency of cryptographic operations into account when designing securitysolutions for WPANs. Traditional security mechanisms were not designed withthis property in mind.

    Another important issue in the energy consumption of a mobile device is thecommunication cost. Cryptographic algorithms used in a Wireless Personal AreaNetwork should limit the number of messages that need to be exchanged. Ahigh number of messages could substantially increase the communication cost,which is an important part of the total cost. Communication cost can influencethe choice of which particular cryptographic operation to employ (see the resultspublished by Seys [176]).

    Because of the limited amount of energy, mobile devices in a WPAN aresusceptible to a particular Denial-of-Service attack [201]. An adversary canperform a sleep deprivation attack [33], in which he tries to exhaust the batteryof a mobile device such that it would go to sleep and become unavailable.

    Wireless Personal Area Networks normally operate autonomously withoutaccess to online key servers or certification authorities. Only a limitednumber of mobile devices will be part of the wireless ad hoc network. This meansthat conventional means of key establishment are not always applicable to thesenetworks. From the moment the network is created and online, one cannot usethe services of online central servers to facilitate security services such as signing

  • 1.1. MOTIVATION 5

    public key certificates or distributing updated session keys.To make things even more difficult, some networks allow multi-hop routing

    and node mobility. This means that nodes do not have a clear idea of the con-tinuously changing network topology. One cannot rely on the presence ofa particular, dedicated mobile device during the establishment of a session keybetween nodes in the WPAN. On distinct moments in time, the network topol-ogy can have changed. The neighborhood of a node changes continuously, andnew trust relationships have to be established every time a new node joins thenetwork.

    These specific properties present interesting challenges when designing se-curity and privacy solutions in these environments. Cryptographic techniquesproposed for conventional computer networks cannot be applied in Wireless Per-sonal Area Networks.

    Another type of wireless ad hoc networks are Sensor Networks (SN). Suchnetworks typically consist of a high number small sensors, each equipped with thenecessary computing power and communication capabilities. They are deployedin some area of interest and form spontaneously and dynamically a wireless adhoc network to collect and forward the necessary sensing data [19, 107, 167, 203,206]. Security solutions proposed for sensor networks are often not optimal tobe deployed in Wireless Personal Area Networks. The reason is that the formerhave some other characteristics, which heavily influence the design of the securityarchitecture. The most important characteristics of sensor networks that aredifferent from those of a WPAN, are:

    Unattended: A very crucial difference between a WPAN and a SN is that inthe former, the devices are under control (and surveillance) by the useroperating them, while in a sensor network, the sensors are distributed insome area and are left unattended. They may be physically impossible toreach once they have been deployed.

    Not user operated: A sensor works autonomously, without any user interac-tion. It measures the sensing data, performs the necessary computationsand processing, and forwards the data to other sensors in the network. Mostdevices in a WPAN require user-interaction, and do not work autonomouslyduring their entire lifetime.

    Multi-hop: Due to the large scale of a sensor network and the limited commu-nication range of the sensor, data packets are forwarded in a hop-by-hopfashion. In a WPAN, most communication is single hop, directly fromsource to destination without passing intermediate nodes.

    Limited power supply: A WPAN is heterogeneous and often contains deviceswhich have a stronger power supply (e.g., a laptop). Some could even beconnected to the power mains in a building. In a sensor network, (almost)all nodes are battery fed and have limited power supply.

  • 6 CHAPTER 1. INTRODUCTION

    Limited processing power: A WPAN is heterogeneous and often contains de-vices which are equipped with strong and fast processors (e.g., a laptop).In a sensor network, (almost) all nodes have very limited processing power.

    1.2 Case Studies

    It is interesting to go more into detail, and study two widely spread technologiesthat can be used to create a Wireless Personal Area Network (WPAN): Blue-tooth and ZigBee. We will briefly investigate how Bluetooth and ZigBee havetried to solve the security issues discussed above and implemented their securityarchitecture. Next, we will give an overview of their most important securityweaknesses. More details can be found in [179]. Since Bluetooth is currently byfar the most popular technology to create Wireless Personal Area Networks, wehave mainly focussed on this technology when designing new security techniquesin this doctoral thesis.

    1.2.1 Bluetooth

    In February 1998, the Bluetooth Special Interest Group (SIG) [23] was foundedby major players in the telecommunications and network industries: Ericsson,IBM, Intel, Nokia and Toshiba. In the next 6 years, several other companiesjoined the SIG and now there are already more than 3000 members. The majortask of this organization was the creation of the Bluetooth specification which de-scribes how mobile phones, computers, PDAs, headsets and other mobile devicescan communicate over a wireless link with each other. In 2000, the Bluetoothstandard was included in IEEE 802.15 [90], the Wireless Personal Area Network(WPAN) Working Group. The specifications have been updated several times,the latest version is v2.1, which was published in 2007 [25].

    The Bluetooth wireless technology [75] realizes a low-cost short-range wire-less voice- and data-connection through radio propagation. The primary use ofBluetooth is cable replacement, most suited for small networks with relativelyhigh load of communication over short distances. With a normal antenna, themaximal range is about 10 m. The Bluetooth wireless technology uses the 2.4GHz band, which is unlicensed, and can be used by many other types of devicessuch as cordless phones, microwave ovens, WiFi [212] and baby monitors. Toavoid interference, Bluetooth employs spread spectrum and frequency hopping.

    Every time a Bluetooth wireless link is formed, it is within the context of apiconet. A piconet consists of maximally 8 devices that occupy the same physicalchannel. In each piconet, there is exactly one master, the other devices are calledslaves. The theoretical maximum bandwidth is 3 Mbit/s. The real bandwidth islower because of error correction. One of the main differences between Bluetooth

  • 1.2. CASE STUDIES 7

    and some other wireless technologies is the ability to connect different types ofdevices (e.g., a mobile phone with a PDA).

    It is possible to configure the “visibility” of a Bluetooth device. When a de-vice is in non-discoverable mode, it does not respond to inquiries of other devices.When the device is in limited discoverable mode, it is discoverable only for a lim-ited period of time, during temporary conditions or for a specific event. Andfinally, when it is in general discoverable mode, it is discoverable (visible) con-tinuously. Each device is characterized by a factory-established 48-bit identifier,unique for every device: the Bluetooth hardware address.

    Bluetooth security architecture

    The key agreement protocol [116] is a crucial part of the security architectureof Bluetooth [190]. Suppose that two Bluetooth devices, called A and B, wantto communicate securely (we will assume that A initiates the communication).Initially these devices do not share a secret. They will perform a key agreementprotocol to generate a link key and an encryption key. The latter is fed tothe stream cipher E0. The key agreement protocol of Bluetooth consists of thefollowing phases [185]:

    Generation of the unit key: When a Bluetooth device is turned on for thefirst time, it calculates a unit key. This is a key that is unique for every deviceand that is almost never changed. It is stored in non-volatile memory. The unitkey is only used if one of the devices does not have enough memory to storesession keys. The unit key is derived from a random number and the Bluetoothhardware address of the device.

    Generation of the initialization key: At the start of a communication ses-sion, the Bluetooth devices do not yet share a session key, and will have toestablish one. This is achieved in different steps. First, an initialization key isgenerated. This temporary key is a function of a random number IN RAND(generated by A and sent to B in clear), a shared PIN and the length L of thisPIN. The PIN should be entered in both devices by a user or it can be fed froma higher layer into the pairing procedure. The length of the PIN can be chosenbetween 8 and 128 bits. Typically, it consists of 4 decimal digits. If one of thedevices does not have an input interface, a fixed PIN can be used (often, thedefault value is 0000). Note that a low-entropy shared secret (the PIN) is usedto generate the initialization key.

    Mutual entity authentication: Each time a new shared key is generated (aninitialization key or a link key), both devices perform a mutual authenticationprotocol. The authentication scheme is based on a challenge-response protocol.

  • 8 CHAPTER 1. INTRODUCTION

    AU_RAND

    SRES

    BA ADDRBE1

    SRES ACO

    Klink

    AU_RAND

    ADDRBE1

    SRES ACO

    Klink

    AU_RAND

    AU_RAND

    SRES

    BA ADDRBE1

    SRES ACO

    Klink

    AU_RAND

    ADDRBE1

    SRES ACO

    Klink

    AU_RAND

    Figure 1.1: Mutual entity authentication protocol of Bluetooth

    This protocol is performed twice. First, B authenticates itself to A, as shown inFig. 1.1. If this authentication is successful, the roles are switched (B becomesthe verifier and A the prover). The authentication goes as follows. A generatesa random number (the challenge) AU RAND and sends this to B. Both devicesnow compute a response SRES = E1(ADDRB ,Klink,AU RAND). AlgorithmE1 is based on the SAFER+ block cipher, with some small modifications [68].This function encrypts the plaintext, which is the concatenation of the challengeAU RAND and the Bluetooth hardware address ADDRB of device B, using theshared key Klink (which is the initialization key or the link key). B sends itsresponse to A. If this response corresponds to the value that A has calculated,then the authentication is successful. Another output of the algorithm E1 is thevalue ACO (Authenticated Ciphering Offset), which is used for the generation ofthe encryption key (see later in this section).

    Generation of the link key: Both devices now share an initialization key.This key will be used to agree on a new, semi-permanent key (called the linkkey). The link key will be stored on both devices for future communication.Depending on the memory constraints of both devices, the link key can be theunit key of the memory-constrained device or a combination key derived fromthe input of both devices.

    If the unit key of device A is the link key, it is transmitted encrypted from Ato B. This encryption is done by XOR’ing the unit key of A with the initializationkey.

    If the link key is a combination key, then both devices first generate a ran-dom number LK RAND. These random numbers are encrypted with the ini-tialization key and sent to the other device. Now they both compute LK KA =E21(LK RANDA,ADDRA) and LK KB = E21(LK RANDB ,ADDRB). The com-bination key KAB is the XOR of LK KA and LK KB . Algorithm E21 is basedon the SAFER+ block cipher, with some small modifications [68]. This functionencrypts the Bluetooth hardware address with a key that is derived from the

  • 1.2. CASE STUDIES 9

    random number LK RANDA (or LK RANDB). After the generation of thelink key, the (old) initialization key is definitively discarded and a mutual au-thentication is started using the exchanged link key that is shared between bothdevices.

    Generation of the encryption key and the key stream: After a successfulgeneration of the link key and execution of the mutual authentication protocol,the encryption key can be generated. Device A generates a random numberEN RANDA and sends this to B in clear. Both devices generate the encryp-tion key KC = E3(EN RANDA,Klink,COF). The COF value (Ciphering OffsetNumber) is the ACO value which was generated during the mutual authentica-tion protocol. However, if the encryption key is used for broadcast, then theCOF is the concatenation of the Bluetooth hardware address of the sender anditself (so COF = (ADDR||ADDR)). This COF value is concatenated with thevalue EN RAND and encrypted using the algorithm E3 with the shared link keyKlink. The result is the encryption key KC . It has a length of 128 bits, but itslength can be reduced to a truncated encryption key K ′C if necessary.

    Finally, the encryption key KC (or the truncated key K′C) is fed to the en-

    cryption scheme E0 together with the Bluetooth hardware address and the clockof the master. These values are used to initialize the four LFSRs and the inter-nal states of the stream cipher E0. With the key stream generator, 200 streamcipher bits are generated, of which the last 128 are fed back into the key streamgenerator as the initial values of the four LFSRs. The internal states are kept.From that moment on, the key stream Kcipher can be generated. The masterclock is used during the initialization in order to make the key stream harder toguess.

    Security weaknesses

    There are several security weaknesses in the Bluetooth standard [103, 190]. Themost important ones are:

    Unit Key: The unit key is employed if one of the Bluetooth devices doesnot have enough memory to store session keys. This key is stored in non-volatilememory and is almost never changed. It is sent encrypted (with the initializationkey) to the other device. This procedure results in an impersonation attack. If Ahas sent its unit key to device B, then B knows the key of A and can impersonateitself as A to a device C. Because of this attack, it is strongly recommended toavoid the use of unit keys.

    Location privacy: When two or more Bluetooth devices are communicating,the transmitted packets always contain the Bluetooth hardware address of the

  • 10 CHAPTER 1. INTRODUCTION

    sender and the destination (or an identifier which is directly related to these ad-dresses). When an attacker eavesdrops on the transmitted data, he knows theBluetooth addresses of these devices. The attacker does not have to be physicallyclose to the communicating devices, he can use a device with a stronger antenna(e.g., it is very easy to construct an antenna which can intercept Bluetooth com-munication from more than one mile away [39, 49]) or just place a small trackingdevice near the two Bluetooth devices. This way, the attacker can keep track ofthe place and time these devices were communicating, which is a violation of theprivacy of the user.

    Security depends on security of PIN: The initialization key is a functionof a random number, a shared PIN and the length L of the PIN. The randomnumber is sent in clear and hence known by an attacker who is eavesdroppingduring the initialization phase. This means that only the PIN is unknown to theattacker. If an attacker obtains the PIN, he knows the initialization key. Worseyet, since all the other keys are derived from the initialization key, they will alsobe known by the attacker. Hence the security of the keys used in Bluetoothdepends on the security of the PIN. If this value is too short or weak (e.g.,0000), it is very easy for an attacker to guess the PIN. Unfortunately, it is verycumbersome for a user to remember and enter long (and random) numbers.

    Note that it is possible to verify a guess of the PIN. The reason is that themutual authentication protocol is executed after the generation of the initializa-tion key. If an attacker observes this protocol, he obtains a challenge and thecorresponding response. The attacker calculates for every guess of the PIN thecorresponding response and when this is equal to the observed response, the guessof the PIN was correct. The shorter the PIN, the faster this brute force attackcan be carried out. Shaked and Wool showed that this attack can be optimizedby employing an algebraic representation of SAFER+, the cryptographic prim-itive used in the mutual authentication protocol [180]. This can be done sincethe operations used in the Armenian shuffles and Pseudo Hadamard Transfor-mations, the basic building blocks of the SAFER+ algorithm, are linear. As aresult, almost the entire SAFER+ round can be implemented as a multiplicationwith a square matrix of size 16. This matrix has an interesting structure andonly contains coefficients which are powers of 2. This results in an efficient andfast implementation. The authors state that a PIN of 4 digits can be cracked inless than 0.06 seconds on a standard PC. This is a critical security problem.

    Denial-of-Service attacks: Mobile networks are always vulnerable to Denial-of-Service (DoS ) attacks. They consist of mobile devices and these devices areoften battery powered. Bluetooth is no exception.

    However, there are also some more advanced DoS attacks, caused by imple-mentation decisions. A nice example is the black list which is used during the

  • 1.2. CASE STUDIES 11

    mutual authentication protocol. To avoid that a device would start the authenti-cation protocol over and over again (and eventually guess the correct PIN), eachdevice has a black list of the Bluetooth addresses of the devices which failed toauthenticate themselves correctly. These devices cannot start an authenticationprocedure during some period. Each consecutive time the authentication proce-dure fails, this period is increased exponentially (until a pre-determined upper-limit is reached). Candolin discovered that this mechanism can be exploited inseveral DoS attacks [33]. An attacker can try to authenticate itself to device A,but change every time his Bluetooth hardware address. All these authenticationattempts will fail and the black list of A will become quite large. This can resultin a buffer overflow attack . An even more elaborate attack exploiting the blacklist mechanism is the following. Suppose device B wants to authenticate itself toA. After A has sent a challenge to B, the attacker sends a wrong response to Ausing the Bluetooth hardware address of B. The authentication will fail, B willbe put on the black list of A and the (correct) response of B will be ignored by A.The attacker keeps repeating this attack and B will never be able to authenticateitself successfully to A.

    Encryption algorithm E0: Bluetooth uses the stream cipher E0 for data en-cryption. This stream cipher has several security flaws [3, 41, 63, 70, 79, 131].The attacks with the lowest complexity are the algebraic attacks [41]. Fortu-nately, these attacks do not work in Bluetooth because they need a long keystream during the initialization and E0 in Bluetooth only uses small packets (thepayload ranges from zero to a maximum of 2745 bits [25]). There are howeversome attacks which can be implemented on the E0 algorithm in Bluetooth. Vau-denay found a practical known-plaintext attack [131]. The attack is based on arecently detected flaw in the resynchronization of E0, as well as the investigationof conditional correlations in the finite state machine (FSM) governing the keystream output of E0. It finds the original encryption key for two-level E0 usingthe first 24 bits of 223.8 frames, requiring 238 computations.

    Implementation errors: Implementation errors can result in critical securityproblems. A good example is the Bluesnarf attack discovered by Laurie [122]. Itis possible, on some mobile phones, to connect to the device without alerting theowner of the target device of the request, and gain access to restricted portionsof the stored data in the phone. The Bluesnarf attack can also be extended bycombining it with a backdoor attack [122]. The result of this combined attack isthat not only the private data of the mobile phone can data be retrieved, butother services, such as access to the Internet, WAP and GPRS gateways, or evensending an SMS are available for the attacker without the owner’s knowledge.These attacks are caused by implementation errors and hence can be fixed bythe vendors.

  • 12 CHAPTER 1. INTRODUCTION

    Other security problems: When two Bluetooth devices are being paired,these devices will send their “name” to each other. This user-friendly name canbe exploited by a malicious user in a Bluejacking attack [22], by sending arbitraryinformation to the other party. By choosing a misleading name, one could alsotry to force a pairing process with a particular victim.

    There are also some security problems in the challenge-response protocol,which uses the algorithm E1, which is based on the SAFER+ block cipher.Kelsea [109] discovered a weakness in the key schedule of SAFER+ that allows akey search to be performed slightly faster than by exhaustive search. This attackis only a theoretical issue and does not really endanger the security of Bluetooth.

    Another security flaw is the lack of integrity checks on the Bluetooth packets.An attacker can always modify a transmitted Bluetooth packet without this beingdetected.

    Man-in-the-middle attacks are also not prevented in Bluetooth. The reasonis that the data is never authenticated by the sender. And there are almost notime stamps or nonces in the protocols, so the freshness of the messages is notguaranteed.

    1.2.2 ZigBee

    ZigBee [218] is a specification set of high level communication protocols that op-erate on top of the low-power Media Access Control (MAC) and Physical (PHY)layers described in the IEEE 802.15.4 standard for WPANs [90]. In 2003, theIEEE 802.15.4-2003 standard [91] was approved by the TG4 task group of theIEEE 802.15 Working Group. The ZigBee v1.0 specifications were ratified in2004, based on the IEEE 802.15.4-2003 standard. The TG4 task group put itselfinto hibernation in 2004, after forming the TG4b task group. The task of TG4bis to resolve ambiguities, reduce unnecessary complexity, etc. in the ZigBee stan-dard. In 2006, the IEEE 802.15.4-2006 standard was approved, which supersedesthe 2003 standard. This latest version is currently not publicly available yet.

    ZigBee is aimed at extending battery life times of low power devices. The pri-mary use of ZigBee is control and monitoring in wireless sensor networks, mostsuited for large networks with small load of communication over short distances.The maximum range is about 30 m and the theoretical maximum bandwidthis 250 kbit/s. ZigBee operates in the same unlicensed 2.4 GHz radio band asBluetooth. The radios use direct-sequence spread spectrum coding to avoid in-terference. The technology is intended to be simpler and cheaper than otherWPANs such as Bluetooth. The most capable ZigBee node type is said to re-quire only about 10% of the software of a typical Bluetooth or Wireless Internetnode, while the simplest nodes are about 2%. Because of these characteristicsand similarities with Bluetooth, ZigBee can also be used to create a WPAN. Bothtechnologies also share some security weaknesses, as we will demonstrate later inthis section.

  • 1.2. CASE STUDIES 13

    ZigBee uses 2 kinds of addressing. There is a 64-bit IEEE address that can becompared to the IP address on the Internet. There is also a 16-bit short address.The short addresses are used once a network is set up. A network can consist ofmaximally 216 = 65, 536 devices.

    Security architecture of ZigBee

    An important device in a ZigBee network is the ZigBee trust center. This deviceis trusted by all other devices within the ZigBee network and is responsible fordistributing and establishing keys in the network. The ZigBee trust center alsoenforces the policies in the network. These policies state how a device can join orleave the network (securely or insecurely), if and when keys have to be updated,etc. The trust center can be configured to operate in either commercial or resi-dential mode. The former is designed for high-security commercial applications,while the latter is designed for low-security residential applications.

    Several types of keys are used in ZigBee; they form a key hierarchy. Thisis shown in Fig. 1.2. If the trust center works in commercial mode, the secu-rity manager of each device (situated in the application layer) will perform thefollowing steps:

    1. Obtain the trust center master key: Initially, each device shares a trustcenter master key with the trust center. The device can obtain this trustcenter master key (together with the address of the trust center) in twoways. Or the device acquires the trust center master key via insecure key-transport (e.g., it is sent in clear from the trust center to the device at lowpower), or it acquires this key via pre-installation (e.g., factory installationor based upon data entered by a user).

    2. Establish link key with trust center: The trust center and the device,that share a trust center master key, will execute a Symmetric-Key Authen-ticated Key Agreement (SKKE ) protocol to establish a link key with eachother. This is done by feeding two random 128-bit challenges (each devicegenerates one of these challenges and sends it to the other party in clear)together with the trust center master key to a key derivation function. TheSKKE protocol offers key authentication1.

    3. Compute key-load key: The key-load key is derived from the link keyand is used by the trust center to transport an application master keysecurely to a device.

    1Key authentication is the property whereby one party is assured that no other party asidefrom a specifically identified second party (and possibly additional identified trusted parties)may gain access to a particular secret key [140].

  • 14 CHAPTER 1. INTRODUCTION

    4. Compute key-transport key: The key-transport key is derived from thelink key and is used by the trust center to transport an application link keyor a network (NWK ) key securely to a device.

    5. Obtain the network key: The trust center puts the current networkkey in a specially constructed command frame, secures it with the key-transport