asia-17-michalevsky-mashable-mobile applications of secret ...€¦ · references 1. secret...

39
MASHaBLE: Mobile Applications of Secret Handshakes over Bluetooth Low-Energy Yan Michalevsky, Suman Nath, Jie Liu

Upload: others

Post on 18-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

MASHaBLE:MobileApplicationsofSecretHandshakesoverBluetoothLow-Energy

YanMichalevsky,Suman Nath,Jie Liu

Page 2: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Motivation• Privatecommunication

• Anonymousmessaging

• Secretcommunities

• Location-basedmessaging

• PrivacypreservingIoT applications

Page 3: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

MessagingApplications

AfterSchool

Page 4: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

YakServerknows everythingabouttheusers

Page 5: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Secretcommunities

• Memberswantidentifyeachother• Donotwanttobediscoveredbyanyonenotinthecommunity• Geo-locationprivacy• Anonymousmessagingandnotificationsdissemination

Page 6: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

“Trusted”CentralServer

• Theserverbecomesatargetforattacks• Communicatingwiththeservercanrevealaffiliation

Page 7: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

“Trusted”CentralServer

Internetconnectivityisnotalwaysavailable

Page 8: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

“Trusted”CentralServer

Also…GPSandcellularconsumealotofenergy

Suspendedstate Idlestate

GPS

Page 9: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Wewantto…

• Avoidinteractionwithaserver• Usephysicalproximity• Minimizeenergyconsumption

BluetoothLow-Energy(LE)soundslikeapromisingsolution

Page 10: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

BluetoothLE

Butfirst,thedevicesneedtotrusteachother…

Page 11: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Theproblemwithnegotiatingtrust

• Aliceiswillingtorevealitscredentialsonlytoanotherpartywithcertainclearance(needstoverifyBob’sidentityfirst)• Bobisalsowillingtorevealitscredentialsonlytoanotherpartywithcertainclearance(needstoverifyAlice’sidentityfirst)• Nopartyiswillingtorevealitscredentialsandprovideaproofoftheirauthenticityfirst

Page 12: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

PropertiesofaSecretHandshake• Partiesdonoknoweachother• Theyperformaprocedurethatestablishestrust• Ifitfails– noinformationisgainedbyeitherparty• Ifitsucceeds– partiesrevealmembershipinagroup• Inaddition,theycanestablishrespectiverolesinthatgroup(cryptographicsecrethandshakes)

Page 13: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Moreapplicationsofsecrethandshakes

• UsingiBeaconforheadcounting• Like• Currentlyexposesusersandeventtotracking

Page 14: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Headcounting

• Exposesuserstotracking

• Revealsinformationabouttheevent/gathering

• Howdowesupportprivate/secreteventsandprovideprivacytoattendants?

Page 15: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Secrethandshakefrompairings• BasedonBalfanzetal.[1]• Ifhandshakesucceeds– bothpartieshaveestablishedanauthenticatedandencryptedcommunicationchannel• Ifhandshakefails– noinformationisdisclosed• Collusionresistant• Corruptedgroupmemberscannotcolludetoperformahandshakeofanon-corruptedmember

• Compactcredentials– importantforembeddingintosmallpackets

Page 16: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Pairings

Wehaveelements𝑋 ∈ G$ and𝑌 ∈ G& whereG$, G& aregroups overEllipticCurves

Apairing𝑒 hasthefollowingproperty

𝑒 𝑎𝑋, 𝑏𝑌 = 𝑒 𝑋, 𝑌 ,-

Wheree 𝑋, 𝑌 ∈ 𝐺0

Page 17: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Secrethandshakefrompairings

Mastersecret𝑡 ∈ 𝑍:

𝑃< = "p93849", 𝑇<

𝑇< = 𝑡 ⋅ 𝐻(𝑃<)

𝑃C = "p12465", 𝑇C

𝑇C = 𝑡 ⋅ 𝐻(𝑃C)

Page 18: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

𝑃C = "p12465"

𝑃< = "p93849"

𝐾< = 𝑒 𝐻 𝑃C , 𝑇< = 𝑒 𝐻 𝑃C , 𝐻(𝑃<) F 𝐾C = 𝑒 𝑇C, 𝐻 𝑃< = 𝑒(𝐻(𝑃C), 𝐻 𝑃< )F

𝐸𝑛𝑐JK(𝑐ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒<)

𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒<, 𝐸𝑛𝑐JS 𝑐ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒C

𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒C

Secrethandshakefrompairings

Page 19: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Unlinkable Handshakes• Bytrackingthepseudonymanattackercantracktheuser• Naïvesolution:• Obtainmultiplepseudonymsfrommasterparty• Useadifferentpseudonymforeachhandshake

Page 20: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Unlinkable SecretHandshake

Mastersecret𝑡 ∈ 𝑍:

𝑃< ∈ 𝐺, 𝑇< = 𝑡 ⋅ 𝑃< 𝑃C ∈ 𝐺, 𝑇C = 𝑡 ⋅ 𝑃C

Page 21: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

𝑠 ⋅ 𝑃C

𝑟 ⋅ 𝑃<

𝐾< = 𝑒 𝑠 ⋅ 𝑃C, 𝑟 ⋅ 𝑇< = 𝑒 𝑃C, 𝑃< TUF 𝐾C = 𝑒 𝑠 ⋅ 𝑇C, 𝑟 ⋅ 𝑃< = 𝑒 𝑃C, 𝑃< TUF

𝐸𝑛𝑐JK(𝑐ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒<)

𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒<, 𝐸𝑛𝑐JS 𝑐ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒C

𝑟𝑒𝑠𝑝𝑜𝑛𝑠𝑒C

Unlinkable SecretHandshake

Page 22: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Somedetails• Needtohasharbitrarystringsonto𝐺&• SupportedbyType1orType3pairings

• Groupelementsizes• 128-bitsecurity:256-bitgroupelementsize=32bytes• 80-bitsecurity:160-bitelementsize=20bytes

Page 23: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Trackingprevention• Randomdeviceaddress forBluetoothsourceaddressfield• Setdynamicallyandchangedacrossdifferentconnections

Page 24: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Pairingmethods• JustWorks

• BasicallynoMITMprotectionduringpairingphase

• Passkeyentry• Proventobequiteweak[7]

• Out-of-Band(OOB)– credentialsprovidedbysomeothermethod

Page 25: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Proposal:NewpairingmodeA B

Selectionofpairingmethod

PairingConfirm(Mconfirm)- 𝑃V

PairingConfirm(Sconfirm)- 𝑃W, 𝐶ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒W

PairingRandom(Mrand)– 𝑅𝑒𝑠𝑝𝑜𝑛𝑠𝑒W, 𝐶ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒V

PairingRandom(Srand)𝑅𝑒𝑠𝑝𝑜𝑛𝑠𝑒V

Partiescalculatesharedkeyusingpairings– servesasSTK

Page 26: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

BluetoothLEAdvertisements• Scanningissupportedby• Windowsphone• Android• iOS

• Publishingadvertisementsissupportedon• Windowsphone10• Android:GoogleNexus5xandon• KitssuchasCypressandDialog

Page 27: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

BluetoothLEadvertisements• BluetoothLEsupportsbroadcastingadvertisements• Clientscanscanandfilteradvertisementsofspecifictypes• Alittlecustomdatacanbesqueezedin– 32bytes

• OnWindowsBTLEstackwecurrentlycanonlycontroltheManufacturerSpecificData(ADtype0xFF)– 20bytes

Page 28: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Choiceofplatform• Easyimplementationofpairings• JPBC– JavaportofStanfordPBClibrary

• SupportforBLEadvertisementpublishing• AndroidexposedtheAPIbutdidnotsupportadvertisinginpracticeatthetime(butNexus5Sandondo)

• WindowsPhone• Supportsscanningandadvertising• Possibletoscanandadvertiseatthesametime

Page 29: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Implementation• WindowsPhoneOS10• Failedattempt:portingJPBCto.NET• PairingsandgroupoperationsusingStanfordPBClibrary• PortedtoARM+ .NETwrapper(PbcProxy)• UsedMPIRlibrary (Multi-PrecisionIntegersandRationals,compatiblewithGMP)• Adaptedrandomnumbergeneration

• Communicationbetweentwophonesisbasedonalternationbetweenadvertisingandscanning

Page 30: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials
Page 31: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Evaluation:Functionality

• Twomobilephonesrunningourappandperforminghandshakes• Experimentduration:8296sec= 2hours18sec• 1handshakesevery8seconds• Total1068handshakes• 1025succeeded,43failed.Successrate:96%

Page 32: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Evaluation:EnergyConsumption• NokiaLumia920runningWindowsPhoneOS• Startingwith100%charge,Wi-FiandGPSoff• Modes:• Baseline• Advertising• Scanning• Advertising+handshake• Scanning+handshake

• Experimentduration:3hours

Page 33: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Evaluation:energyconsumption

Percentageofbatterydrain/hour.Enables>12hoursofoperation.

Page 34: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Communicationoverhead• Advertisementpacket:47bytes• Eachpartysends2packets:94bytes

Page 35: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Futurework• ImplementationforAndroid• NewNexusdeviceshavesufficientBLEsupport

• Pairingpreprocessing• Foreachhandshakeusingthesamecredentialspreprocessingcanbeapplied• SupportedbyPBClibrary

• UseBLEspecificidentifiersashandshakepseudonyms• Setacustomsourcedeviceaddress• Wouldprovideadditionalusablespaceforlongerpseudonyms

• MoreWindowsUniversalapplicationsusingPbcProxy

Page 36: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

BlackHatSoundBytes

• SecretHandshakes– aprovablysecureprimitivewithusefulapplications• WecaneasilyachievebettersecurityandprivacyformobileandIoT• Evaluationshowstheapplicationisfitforpracticaluseinmobiledevices

Page 37: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Thanksforattending!

Questions?

Page 38: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

Relatedwork• AutomaticTrustNegotiation(ATN)• Attribute-BasedEncryption(ABE)

• Decryptionispossibleifpartyiscertifiedaspossessingcertainattributesbyanauthority• Secrethandshakes[1]

• Eachpartyreceivesacertificatefromacentralauthority• Hiddencredentials[2]

• Protectthemessagesusingpoliciesthatrequirepossessionofmultiplecredentials• ObliviousSignature-BasedEnvelope(OSBE)[8]

• Allowscertificatesissuedbydifferentauthorities• SecrethandshakesfromCA-obliviousencryption[9]• Unlinkablesecrethandshakesandkey-privategroupkeymanagementschemes[10]

Page 39: asia-17-Michalevsky-MASHABLE-Mobile Applications of Secret ...€¦ · References 1. Secret handshakes from pairing-based key agreements [Balfanz et al. 2003] 2. Hidden credentials

References1. Secrethandshakesfrompairing-basedkeyagreements[Balfanzetal.2003]2. Hiddencredentials[Holtetal.2003]3. AuthenticatedIdentity-BasedEncryption[Lynn2002]4. Howtrackingcustomersinstoreswillsoonbenorm5. Howretailstorestrackyouusingyoursmartphone(andhowtostopit)6. Appleisquietlymakingitsmovetoownin-storedigitaltracking7. Bluetooth:WithLowEnergycomesLowSecurity[Ryan2013]8. ObliviousSignature-BasedEnvelope[Lietal.2003]9. SecrethandshakesfromCA-obliviousencryption[Castelucciaetal.2004]10. Unlinkablesecrethandshakesandkey-privategroupkeymanagementschemes[Jareckietal.

2007]