hardware security - indian institute of technology madraschester/courses/18o_sse/slides/... ·...

90
Hardware Security 1 Chester Rebeiro IIT Madras

Upload: others

Post on 25-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareSecurity

1

ChesterRebeiroIITMadras

Page 2: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Physically Unclonable Functions

PhysicalUnclonableFunctionsandApplications:ATutorialhttp://ieeexplore.ieee.org/document/6823677/

Page 3: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

EdgeDevices

3

1000softhemexpectedtobedeployedLowpower(solarorbatterypowered)SmallfootprintConnectedtosensorsandactuatorsExpectedtooperate24x7almostunmanned24x7thesedeviceswillbecontinuouslypumpingdataintothesystem,whichmayinfluencethewaycitiesoperateWillaffectusinmultipleways,andwemaynotevenknowthattheyexist.

Page 4: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

AuthenticatingEdgeDevices•  Storedkeys

–  EEPROMmanufactureisanoverhead–  Publickeycryptographyisheavy–  Canbeeasilycopied/cloned

4

EncryptiondoneinedgedevicePublickeysstoredinserver

Privatekeys

Page 5: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PhysicallyUnclonableFunctions•  Nostoredkeys•  Nopublickeycryptography•  Cannotbecloned/copied•  Usesnano-scalevariationsinmanufacture.Notwodevicesareexactlyidentical

5

EncryptiondoneinedgedevicePublickeysstoredinserver

challenge/response

DigitalFingerprints

Page 6: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFs

6

Afunctionwhoseoutputdependsontheinputaswellasthedeviceexecutingit.

Page 7: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

WhatisExpectedofaPUF?(InterandIntraDifferences)

7

challenge

response

response

challenge

Response

Response

(Reliable)SameChallengetoSamePUFDifferencebetweenresponsesmustbesmallonexpectationIrrespectiveoftemperature,noise,aging,etc.

(Unique)SameChallengetodifferentPUFDifferencebetweenresponsesmustbelargeonexpectationSignificantvariationduetomanufacture

Page 8: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

WhatisExpectedofaPUF?(Unpredictability)

8

challenge

response

response

DifficulttopredicttheoutputofaPUFtoarandomlychosenchallengewhenonedoesnothaveaccesstothedevice

Page 9: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

IntrinsicPUFs•  Completelywithinthechip

–  PUF–  Measurementcircuit–  Post-processing

•  Nofancyprocessingsteps!–  eg.MostSiliconbasedPUFs

9

Page 10: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SiliconPUFseg.RingOscillatorPUF

10

f = 12nt

FrequencyofringoscillatorNumberofstagesDelayofeachstage

fnt

RingOscillatorwithoddnumberofgates

Frequencyaffectedbyprocessvariation.

Page 11: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Whyvariationoccurs?

11

Whengate voltage is less than threshold no current flows When gate voltate is greater than threshold current flows from source to drain Threshold voltage is a function of doping concentration, oxide thickness

Delaydependsoncapacitance

ProcessVariations•  Oxidethickness•  Dopingconcentration•  Capacitance

MOSTransistor CMOSInverter

Page 12: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SiliconPUFseg.RingOscillatorPUF

12

>enable

counter

counter

Nbitchallenge

1

2

3

N

N-1

N-2

1bitresponse

RA

RB

response = 10

fA > fBfA ≤ fB

⎧⎨⎪

⎩⎪

Page 13: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ResultsofaROPUF15Xilinx,Virtex4FPGAs;1024ROsineachFPGA;EachROhad5inverterstagesand1ANDgate

13

Physical Unclonable Functions for Device Authentication and Secret Key Generation https://people.csail.mit.edu/devadas/pubs/puf-dac07.pdf

InterChipVariations(Uniquenessmeasurement)

challenge

response

responseWhen128bitsareproduced,

Avg59.1bitsoutof128bitsdifferent

Page 14: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ResultsofaROPUF15Xilinx,Virtex4FPGAs;1024ROsineachFPGA;EachROhad5inverterstagesand1ANDgate

14

Physical Unclonable Functions for Device Authentication and Secret Key Generation https://people.csail.mit.edu/devadas/pubs/puf-dac07.pdf

IntraChipVariations(Reproducabilitymeasurement)

challenge

response

response0.61bitsonaverageoutof128bitsdiffer

120oC1.08V

20oC;1.2V

Page 15: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ArbiterPUF

15

0

0

1

10

0

1

1

01

IdeallydelaydifferencebetweenRedandBluelinesshouldbe0iftheyaresymmetricallylaidout.Inpracticevariationinmanufacturingprocesswillintroducerandomdelaysbetweenthetwopaths

Switch

Page 16: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Arbiter

16

DFFD

clk

Q ?

IfthesignalatDreachesfirstthenQwillbesetto1IfthesignalatclkreachesfirstthenQwillbesetto0

DFF

Page 17: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ArbiterPUF

17

…challenge

rising Edge

1 if toppath is faster,else 0

D Q1

1

0

0

1

1

0

0

1

1

0

0

1 0 10 0 1

01

GThe image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

13.56MHzChipForISO14443Aspec.

Page 18: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ResultsforROPUF

18DesignandImplementationofPUF-Based“Unclonable”RFIDICsforAnti-CounterfeitingandSecurityApplicationsIEEEInt.Conf.onRFID,2008,S.Devdaset.Al.

Page 19: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ComparingROandArbiterPUF

19

NumberofChallenge:ResponsePairs:

NumberofChallenge:ResponsePairs:

N2

⎝⎜

⎠⎟ 2N

#CRPslinearlyrelatedtothenumberofcomponents

#CRPsexponentiallyrelatedtothenumberofcomponents

WEAKPUF STRONGPUF

Page 20: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

WeakPUFvsStrongPUF

20

•  ComparativelyfewnumberofChallengeResponsePairs(CRPs)

•  HugenumberofChallengeResponsePairs(CRPs)

•  CRPsmustbekeptsecret,becauseanattackermaybeabletoenumerateallpossibleCRPs

•  WeakPUFsusefulforcreatingcryptographickeys

•  ItisassumedthatanattackercannotEnumerateallCRPswithinafixedtimeinterval.ThereforeCRPscanbemadepublic

•  Formally,anadversarygivenapoly-sizedsample

ofadaptivelychosenCRPscannotpredicttheResponsetoanewrandomlychosenchallenge.

•  Typicallyusedalongwithacryptographicscheme(likeencryption/HMACetc)tohidetheCRP(sincetheCRPsmustbekeptsecret)

•  Doesnotrequireanycryptographicscheme,sinceCRPscanbepublic.

WeakPUF StrongPUF

•  VeryGoodInterandIntradifferences

Page 21: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFBasedAuthentication(withStrongPUF)

21

CRPs

challenge

response

Bootstrapping:Atmanufacture,serverbuildsadatabaseofCRPsforeachdevice.Atdeployment,serverpicksarandomchallengefromthedatabase,queriesthedeviceandvalidatestheresponse

Page 22: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFBasedAuthenticationManintheMiddle

22

CRPs

challengeresponse

ManinthemiddlemaybeabletobuildadatabaseofCRPsTopreventthis,CRPsarenotusedmorethanonce

Page 23: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFBasedAuthenticationCRPTables

23

CRPs

challengeresponse

EachdevicewouldrequireitsownCRPtableandsecurelystoredinatrustedserver.Tablesmustbelargeenoughtocatertotheentirelifetimeofthedeviceorneedstoberechargedperiodically(scalabilityissues)

CRPs

Page 24: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFbasedAuthentication(AlleviatingCRPProblem)

SecretModelofPUF

24

GateDelaysofPUFcomponents Bootstrapping:Atmanufacture,serverbuildsa

databaseofgatedelaysofeachcomponentinthePUF.Atdeployment,serverpicksarandomchallengeconstructsitsexpectedresponsefromsecretmodel,queriesthedeviceandvalidatestheresponse

StillRequiresSecureBootstrapping

andSecureStorage

Page 25: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFbasedAuthentication(AlleviatingCRPProblem)

•  PPUF:PublicModelPUF

25

GateDelaysofPUFComponents(Public)

Trustedserver(PKI)

Bootstrapping:DownloadthepublicmodelofPUFfromthetrustedserver.Atdeployment,serverpicksarandomchallengeconstructsexpectedresponsefrompublicmodel,queriesthedeviceandvalidatestheresponse.Iftimeforresponseislessthanathresholdacceptresponseelserejects.

Assumption:AdevicetakesmuchlesstimetocomputeaPUFresponsethananattackerwhomodelsthePUF.

T<T0?

Page 26: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PUFbasedAuthentication(AlleviatingCRPProblem)

HomomorphicEncryption

26

EncryptedCRPs

UntrustedCloud

Response

Page 27: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Conclusions•  DifferenttypesofPUFsbeingexplored

–  AnalogPUFs,SensorPUFsetc.

•  CRPissuestillabigproblem

•  SeveralattacksfeasibleonPUFs.–  Modelbuildingattacks(SVMs)–  TamperingwithPUFcomputation(eg.Forcingasine-waveonthegroundplane,

canaltertheresultsofthePUF)

•  PUFsareaverypromisingwayforlightweightauthenticationofedgedevices.

27

Page 28: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojans

Hardware Security: Design, Threats, and Safeguards; D. Mukhopadhyay and R.S. Chakraborty Slides from R. S. Chakraborty, Jayavijayan Rajendran, Adam Waksman

Page 29: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojan

29

•  MaliciousanddeliberatelystealthymodificationmadetoanelectronicdevicesuchasanIC

•  ItcanchangethechipsfunctionalitytherebyunderminetrustinsystemsthatusethisIC

cryptoModule

key

inputciphertext

Page 30: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojan

30

•  MaliciousanddeliberatelystealthymodificationmadetoanelectronicdevicesuchasanIC

•  ItcanchangethechipsfunctionalitytherebyunderminetrustinsystemsthatusethisIC

cryptoModule

key

inputciphertext

1

0

Page 31: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

cryptoModule

key

inputciphertext

ExampleofaHardwareTrojanCheatCode(combinationaltrojans)

31

Trigger

If(input==0xcafebeef)select=1elseselect=0

PropertiesofHardwareTrojan:•  verysmall•  mostlypassive

0xcafebeef1

0

Page 32: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

cryptoModule

key

inputciphertext

ExampleofaHardwareTrojanSequentialTrojan(Timebombs)

32

Trigger

PropertiesofHardwareTrojan:•  verysmall•  mostlypassive

0xca0xaf0xee0xbe0xef

1

0

time

select=1select=0ca

af

eebe

ef

Page 33: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ICLifeCycle(VulnerableSteps)

33

IP ToolsStd. Cells Models

DesignSpecifications Fab Interface Mask Fab

WaferProbe

Dice and Package

PackageTest

Deploy and

Monitor

Trusted

Either

Untrusted

Wafer

*http://www.darpa.mil/MTO/solicitations/baa07-24/index.html

Offshore

Third-party

PropertiesofHardwareTrojan:*verysmall•  mostlypassive•  Canbeaddedatmultiplestages

Page 34: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojanStructure

34

PayloadTriggerCircuit

TriggerCircuit:Basedonaseldomoccurringevent.Forexample,•  whenaddressonaddressbusis0xdeadbeef.•  Aparticularlyrarepacketarrivesonnetwork•  Sometimehaselapsed

Payload:Dosomethingnefarious:•  Makeapageinmemory(un)privileged•  Leakinformationtotheoutsideworldthroughnetwork,

covertchannels,etc•  Causethesystemtofail

Trojancanbeinsertedanywhereinduringthemanufacturingprocess(eg.InthirdpartyIPcorespurchased,byfabricationplant,etc.)

Page 35: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

TrojansinIPs•  ThirdpartyIPs

–  Cantheybetrusted?–  Willtheycontainmalicious

backdoors

•  Developersdon’t/can’tsearch1000soflinesofcodelookingoutfortrojans.

35

Page 36: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

FANCI:IdentificationofStealthyMaliciousLogic

•  FANCI:evaluatehardwaredesignsautomaticallytodetermineifthereisanypossiblebackdoorshidden

•  Thegoalistopointouttotestersofpossibletrojanlocationsinahugepieceofcode

36

http://www.cs.columbia.edu/~simha/preprint_ccs13.pdf(someofthefollowingslidesareborrowedfromAdamWaksman’sCCStalk)

Page 37: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

BackdoorsareStealthy•  Small

–  Typicallyafewlinesofcode/area•  Stealth

–  Cannotbedetectedbyregulartestingmethodologies(raretriggers)–  Passivewhennottriggered

37

Page 38: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Unfortunately…Withsomuchofcodeitishighlylikelythatstealthyportionsofthecodearemissedornottestedproperly.

38

FANCI:willdetectthesestealthycircuits.ThesepartsaremostlikelytohaveTrojans.Theaimistohavenofalsenegatives.Afewfalsepositivesareacceptable

Page 39: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ControlValues

A B C O

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 039

ByhowmuchdoesaninputinfluencetheoutputO?

A

B

C

O

Page 40: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ControlValues

A B C O

0 0 0 0

1 0 0 1

0 0 1 1

1 0 1 1

0 1 0 1

1 1 0 0

0 1 1 0

1 1 1 040

Byhowmuchdoesainputinfluencetheoutput0?

A:hasacontrolof0.5ontheoutput(Amattersinthisfunction)

1 1 0 0A B C 0

A

B

C

O

Page 41: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ControlValues

A B C O

0 0 0 0

1 0 0 0

0 0 1 1

1 0 1 1

0 1 0 0

1 1 0 0

0 1 1 0

1 1 1 041

Byhowmuchdoesainputinfluencetheoutput0?

A:hasacontrolof0ontheoutput(Adoesnotmatterinthisfunction)(Aiscalledunaffecting)

1 1 0 0A B C 0

A

B

C

O

Page 42: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ControlValuesforaTriggerinaTrojan

42

if (addr == 0xdeadbeee) then{ trigger = 1 }

A31 A30 A2 A1 A0 trigger

0 0 … 0 0 0 0

0 0 … 0 0 1 0

0 0 … 0 1 0 0

0 0 … 0 1 1 0

: : : : : :

1 1 1 1 0 1

: : : : : :

1 1 1 1 1 1 0

A31hasacontrolvalue1/216

EasiertohideatrojanwhenlargerinputsetsareconsideredAlowchanceofaffectingtheoutputLendsitselftostealthinessàeasiertohideamaliciouscode

Page 43: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

AnExampleofaMux

43

<A,B,C,D,S1,S2>=<0.25,0.25,0.25,0.25,0.5,0.5>

Notrojanpresenthere(intutively):*Allmuxinputshaveacontrolvaluearoundmidrange(nottoocloseto0)

Page 44: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

AnExampleofaMaliciousMux

44

66extraselectlineswhichareonlymodifyMwhenwheyaresettoaparticularvalue

M

ThecontrolvaluesEandS3toS66aresuspiciousbecausetheyrarelyinfluencethevalueofM.Perfectfordisguisingmaliciousbackdoors

JustsearchingforMINvaluesisoftennotenough.Bettermetricsareneeded.

Page 45: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ComputingStealthfromControl

45

Page 46: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ComputingStealthfromControl

46

Page 47: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

FANCI:TheCompleteAlgorithm

47

Page 48: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ICLifeCycle(TheFab)

48

IP ToolsStd. Cells Models

DesignSpecifications Fab Interface Mask Fab

WaferProbe

Dice and Package

PackageTest

Deploy and

Monitor

Trusted

Either

Untrusted

Wafer

*http://www.darpa.mil/MTO/solicitations/baa07-24/index.html

Third-party

Page 49: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DetectingTrojansinICs•  OpticalInspectionbasedtechniques

ScanningOpticalMicroscopy(SOM),ScanningElectronMicroscopy(SEM),andpico-secondimagingcircuitanalysis(PICA)

–  Drawbacks:CostandTime!

•  Testingtechniques–  Notaverypowerfultechnique

•  Sidechannelbasedtechniques–  Nonintrusivetechnique–  Compareside-channelswithagoldenmodel

49ASurveyonHardwareTrojanDetectionTechniqueshttp://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7169073

Page 50: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SideChannelBasedTrojanDetection

50

LightweightPRESENTImplementation PowerTraces

Hardwaretrojandesignanddetection:apracticalevaluationhttps://dl.acm.org/citation.cfm?id=2527318

Page 51: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SideChannelBasedTrojanDetection(ICwithTrojan)

51

Page 52: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DifferenceofDistributions

52

Page 53: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojanPrevention(Ifyoucan’tdetectthenprevent)

53

SilencingHardwareBackdoorswww.cs.columbia.edu/~simha/preprint_oakland11.pdfSlidestakenfromAdamWaksman’sOaklandtalk

Page 54: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojanPrevention

54

EnsurethatahardwareTrojanisneverdeliveredthecorrectTrigger

Page 55: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Example(A5stageprocessor)

55

Page 56: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

Example(A5stageprocessor)

56

Page 57: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

TypesofTrojans

57

Page 58: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

TickingTimebomb

58

Page 59: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

TickingTimebomb

59

Page 60: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

CheatCodes

60

Page 61: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

CheatCodes

61

Page 62: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SequenceCheatCodes

62

Page 63: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HardwareTrojanSilencing(withObfuscation)

63

Page 64: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SilencingTickingTimebombs•  PowerResets:flushpipeline,writecurrentIPandregistersto

memory,savebranchhistorytargets

64

Page 65: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SilencingTickingTimebombs•  Cantriggerbestoredtoarchitecturalstateandrestoredlater

–  No.Unitvalidationtestspreventthis–  Reasonfortrustingvalidationepoch

LargevalidationteamsOrganizedhierarchically

•  Cantriggersbestoredinnon-volatilestateinternaltotheunit?–  Eg.Malwareconfiguresahiddennon-volatilememory

•  UnmaskableInterrupts?–  UseaFIFOtostoreunmaskableinterrupts

•  PerformanceCountersarehiddentimebombs 65

Page 66: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DataObfuscation

66

HomomorphicEncryption(Gentry2009)IdealsolutionButpracticalhurdles

Page 67: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DataObfuscation

67

Page 68: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DataObfuscation

68

StoreData5toAddress7

Page 69: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DataObfuscation(ComputationalCase)

69

Page 70: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SequenceBreaking(Reordering)

70Ensurefunctionalityismaintained

Page 71: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SequenceBreaking(Insertingevents)

71Insertarbitraryeventswhenreorderingisdifficult

Page 72: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

CatchAll(Duplication)

72

Expensive:Non-recurring:design;verificationcostsduetoduplicationRecurring:Powerandenergycosts

Page 73: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PowerAnalysis

73

Page 74: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

CMOSTechnology•  AlmosteverydigitaldeviceisbuiltusingCMOS

technology.•  CMOS–complimentarymetaloxide

semiconductor

74

Page 75: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

CMOSInverter

•  Whentheinputswitchesfrom0à1,TransistorT1turnsonandT2turnsoff.CapcitorCLgetscharged.

•  Whentheinputswitchsfrom1à0,transitorT1isturnedoffandT2turnson.CapacitorCLdischarges.

75

T1

T2

Page 76: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PowerConsumptionofaCMOSInverter

•  PowerisconsumedwhenCLchargesordischarges(i.e.thereisatransitionintheoutputfrom0à1or1à0)

•  Usinganoscilloscopewecanmeasurethepowertodeterminewhentheinverteroutputchangesstate

76

Outputofinverter

Powerconsumption

Page 77: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SynchronousDigitalCircuits•  Mostelectronicequipmentuseaclockasreference•  Allstatetransitionsaredonewithrespecttothisclock

–  Powerconsumptionisthereforeatclockedges

77

Page 78: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

EssenceofPowerAnalysis•  Wedon’tknowwhatishappeninginsidethedevice,butweknowthepower

consumption•  Canwededucesecretinformationfromthepowerconsumption

78

Page 79: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

TheTypesofPowerAnalysis•  SPA:SimplePowerAnalysis

•  DPA:DifferentialPowerAnalysis

Requiresmorestrategyandstatisticstogleansecretinformation

•  Templatebasedattacks

79

Page 80: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DifferentialPowerAnalysis(asaglance)

80

Inputdata

Key

Guessedkey

deviceundertest

Modelof

device

StatisticallyCompare

Powerconsumption Hypotheticalpowerconsumption

Page 81: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

HypotheticalPowerConsumption•  CMOScircuitsfollowtheHammingweightandHammingdistancepower

models•  HammingDistanceModel

–  ConsidertransitionsofregisterR

•  HammingWeightModel

TheHammingweightmodelwillwork,whenRisprechargedtoeither0or1

81

K

P CFR

(1011)à(1101)à(1001)à(0010)à(0011)3131#toggles

(1011)à(1101)à(1001)à(0010)à(0011)3213#toggles

Page 82: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

ASmallExample

P K C

0000 1010 1010

0001 1010 1011

0010 1010 1000

0011 1010 1001

0100 1010 1110

0101 1010 1111

.. … …82

K

P C

Device

Malloryhascontrolofthisdevice.--Shecanmonitoritspowerconsumption--ShecanfeedinputsP--Sheevenknowswhatoperationsgoesoninside.Thethingsshedoesn’tknowisKandCHeraimistoobtainthesecretkeyK

F

Page 83: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DPAAttack

83

P Kguess C HypotheticalPower

RealPowerMeasured

0000 1111 1111 4

0001 1111 1110 3

0010 1111 1101 3

0011 1111 1100 2

0100 1111 1011 3

0101 1111 1010 2

⁞ ⁞ ⁞ ⁞ ⁞

notethatthisisawaveformwhichchangesw.r.ttime

P=0000

P=0001

P=0010Chereiscomputedwrttotheguessedkeyi.e.C=F(P,Kguess)

Page 84: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

84

DPA:WhatwemeanbycorrelationHypotheticalPower

4

3

3

Thesewaveformsarediscrete,theyhaveseveralpointsPerformcorrelationofhypotheticalPowerwrteachpointinthewaveformsConsideronlythemaximumcorrelation

correlate

Page 85: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DPA:Asmallexample

85

P Kguess C HypotheticalPower

RealPowerMeasured

0000 1111 1111 4 xx

0001 1111 1110 3 xx

0010 1111 1101 3 xx

0011 1111 1100 2 xx

0100 1111 1011 3 xx

0101 1111 1010 2 xx

⁞ ⁞ ⁞ ⁞ ⁞

correlate

ρ15

P Kguess C HypotheticalPower

RealPowerMeasured

0000 1110 1110 3 xx

0001 1110 1111 4 xx

0010 1110 1100 2 xx

0011 1110 1101 3 xx

0100 1110 1010 2 xx

0101 1110 1011 3 xx

⁞ ⁞ ⁞ ⁞ ⁞correlate

ρ14

P Kguess C HypotheticalPower

RealPowerMeasured

0000 1101 1101 3 xx

0001 1101 1100 2 xx

0010 1101 1111 4 xx

0011 1101 1110 3 xx

0100 1101 1001 2 xx

0101 1101 1000 1 xx

⁞ ⁞ ⁞ ⁞ ⁞correlate

ρ13 ρ12 ρ11 ρ10Findmaximumcorrelation

Page 86: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

SampleOutput

86https://iis-people.ee.ethz.ch/~kgf/acacia/acacia.html

Page 87: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

StatisticalComparison•  Correlation:

Providesavaluebetween-1and+1.Avalueclosertothesignifieslineardependencebetweenthehypotheticalpowerandtherealpowerconsumption

•  MutualInformationQuantifiesmutualdependencebetweenhypotheticalpowerandrealpowerconsumption

87

Page 88: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

StatisticalComparison•  BayesAnalysisWhatistheprobabilityofahypothesisgivenaspecificleakage

Pr[Hypothesis|Leakage]•  DifferenceofMeansnext…

88

Page 89: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

DifferenceofMeans•  Guessakey:kguess•  ComputeCguess=F(P,Kguess)•  Findthekguesssuchthat|AVG(B0)–AVG(B1)|ismaximum

89

Device

B0 B1

BIT(Cguess,0)=0

P=0000Cguess=1111

P=0001Cguess=1110

P=0010Cguess=1101

K

P CF

BIT(Cguess,0)=1

Page 90: Hardware Security - Indian Institute of Technology Madraschester/courses/18o_sse/slides/... · Chester Rebeiro IIT Madras Physically Unclonable Functions Physical Unclonable Functions

PreventingDPA•  Byhardwaremeans

–  Differentiallogic•  ByImplementation

–  Masking

•  ByAlgorithm–  DPAresistantciphers(DRECON)–  Rekeying

90