Presentation on theme: "Flash Memory for Ubiquitous Hardware Security Functions"— Presentation transcript:
1Flash Memory for Ubiquitous Hardware Security Functions Yinglei Wang, Wing-kei Yu, Shuo Wu, Greg Malysa,G. Edward Suh, and Edwin C. KanCornell UniversityMay 21st, 2012
2Outline Motivation Flash memory basics Device fingerprinting True Random number generation (RNG)Summary
3Hardware Security Functions Device-specific fingerprints or secretsPhysically unclonable functions (PUF)Authenticate hardware, bind IP/secret to a device, etc.True random number generators (RNG)Ensure freshness of communicationPseudo-random numbers on a virtual machine can be predictableUntrusted Supply Chain / EnvironmentsAuthenticIC???Is this ICauthentic?PUFPUFChallengesResponsesBits in software can be easily copieda recent study showed that reuse of virtual machine (VM) snapshots can break the Transport Level Security (TLS) protocol due to predictable random numbersChallengesResponses=?
4State of the Art - Device Fingerprinting Need special circuits; interference with normal operationFlash memory fingerprints, speed and applicability issuesIdentical ring oscillators, Suh et al., DAC 2007Initial state of SRAM, Holcomb et al., RFID security, 2007Rare disturb phenomena, Prabhu et al., Trust 2011
5State of the Art - Hardware RNG Hardware random number generation (RNG)Without quantum-random propertiesLow-temperature attack; Need special circuitPhase noise, Sunar et al., IEEE Transactions on Computers, 2007Delay paths, Odonnell et al., MIT, 2004Avalanche noise, Entropy key productMetastability, Cox et al., Hot Chips, 2011
6Flash-Based Security Functions Unmodified Flash memory for security functionsDevice fingerprintingTrue random number generatorFlash memory is ubiquitousMobile devices, SSD, USB, etc.Pure software implementationsWorks with TI MSP430F2274 Microcontroller(16-bit RISC mixed-signal, used in sensor networks)TI OMAP4430 / NVIDIA Tegra 3 (ARM architecture) should also work (smartphones--android, galaxy, kindle fire)Show the msp430 device and say we can demo it (same code, device-specific output)If you are interested, you can come to us during the breaks and we can show you how the same code can produce device specific results.
7Outline Motivation Flash memory basics Device fingerprinting True Random number generation (RNG)Summary
9Outline Motivation Flash memory basics Device fingerprinting True Random number generation (RNG)Summary
10Flash PUF (Fingerprints) Process variation makes every Flash bit uniqueThreshold voltage (program/erase time)Wear-out from P/E cyclesProgram/read disturb [Prabhu et al., TRUST 2011]Quantization margins in sense amplifiersHowever, digital interfaces are built to hide such analog variationsHow to expose the variations?
11Partial ProgrammingStandard Flash interfaces (such as ONFI – Open NAND Flash Interface) support an abort operationProgram/erase can be interruptedEnables partial programming of individual bitsBit 2Partial ProgramsBit 1ProgramThreshold VoltageVth ‘1’ReadVth ‘0’
12Fingerprinting Algorithm Erase a block, pick a pagePartial programRead the page and record the bits flipped in this partial programRepeat the above two steps until most bits flipped1234Explain number on right means how many parital programs we have done so far,Explain final results by saying that bit 1 took 4 PP’s to flip to 0, bit 8 took 35Final results:
13Experimental Setup Flash test board Flash chips ARM microcontroller Socket for commercial off-the-shelf (COTS) FlashUSB outputAll components available COTSFlash chipsGo through this quicklyManufacturerCapacityQuantityTechnologyNumonyx4Gbit357nm SLCHynix10SLCMicron2Gbit2434nm SLC16Gbit5MLC
14Partial Program Number Fingerprints Correlation Function:Same page, same chipSame page, different chipsSame chip, highDifferent chip: lowCan effectively authenticate a chip
15Larger Scale Experiments 24 Micron chips24 pages from each chip10 measurements from each page16,384 bits per page
16Uniqueness (Inter-Chip Variations) Compare measurements of the same page on different chips66,240 pairs compared(24 chips choose 2) 24 pages 10 measurementsHistogram with Gaussian fit in red outlineThe transition sentence on this page: Here are the results. As we mentioned before, every chip is unique and this is shown by the inter-chip variations. When we compare two measurements on the same page from different chips, the correlation should be very low. Here is a histogram of ….
17Robustness (Intra-chip variations) Compare multiple measurements from the same page on the same chip25,920 comparisonsAlso, the same chip should be identified as the same chip and this is shown by the intra-chip variations.
18Performance False negatives False positives Time Measurements from different pages show as the same pageProbability from overlapping Gaussians isFalse positivesMeasurements from same page show as two different pagesProbability from overlapping Gaussians isTime~10 seconds for all 16,384 bits in one page< 1 second for a 1,024-bit fingerprintThe original version used the conservative estimation t=0.3 and t=0.7, I changed to using threshold of 0.5
19Temperature Variation and Aging Correlation between measurements on the same pages is lower, but high enoughAgingFlash memory chips change with aging (program/erase stress)Correlation is again reduced, but high enough even after 500,000 cyclesExplain x axis of agingSpecified flash chip lifetime
20Fingerprint SecurityWhat does it take to fully characterize and memorize fingerprints for the entire Flash chip?Takes about 10 bits to store ordering10x storageMany pages, ~10 seconds to characterize a page16Gbit 1 million pages ~17 weeksThese would make the cost of faking a chip too high for economic purposes.
21Outline Motivation Flash memory basics Device fingerprinting True Random number generation (RNG)Summary
22Noises in Flash Memory Two types of noises Noise extraction Thermal noise (without quantum property)Random telegraph noise (RTN, caused by single electron capture and emission in the device, quantum noise)Noise extractionPartial ProgramsSingle Electron EmissionSingle Electron CaptureLink RNG to noise… our rng is based on noise in flash memory.From the threshold voltage perspectiveVth ‘1’Vth ‘0’Threshold VoltageStable ‘1’Thermal noise regionStable ‘0’
23Observed Noise TypesWant RTN as quantum noise from single electron interactionPure thermalRTNEither don’t show this, or go through it quicklyRTN + Thermal NoiseMoving average fromRTN + Thermal Noise
24RNG Algorithm Erase Partial program Read the page N times, if one oscillating bit shows RTN, record its position and partial program numberRepeat above 2 steps until all bits are programmedErase, partial program all RTN bits to proper levelRead these bits M timesDebiasing11111111111111111111111121111113.1k1110 0 01 1 111Parallel
25Randomness Use NIST Statistical Test Suite 2.2.1 (Aug. 2010) 10 sequences of 200,000 bitsGenerated from flash bits with pure RTNAll pass!10 sequences of 600,00 bits testedGenerated from flash bits with RTN componentsTo evaluate our results
26Throughput: bits with Pure RTN ChipHynix SLCNumonyx SLCMicron SLCMicron MLCReading speed (KHz)46.545.343.117.8Number of bits characterized3034781030134Number of bits identified9165Max throughput (Kbits/sec)8.035.352.71--Avg. throughput (Kbits/sec)3.271.790.848Min throughput (bits/sec)10734.88.14All throughputs are for single flash bit
27Throughput: bits with RTN component ChipHynix SLCNumonyx SLCMicron SLCMicron MLCReading speed (KHz)46.545.343.117.8Number of bits characterized3034781030134Number of bits identified27815828Max throughput (Kbits/sec)11.59.6810.03.83Avg. throughput (Kbits/sec)3.283.873.531.26Min throughput (bits/sec)28.410.28.1455.1If we don’t care about RTN or thermal, we can use every bitWe can use all of the bits if both thermal and RTN are used!
28Environmental Variations Tested at -5 °C and -80 °CThermal noise goes down with temperatureRTN exists even at low temperatureAgingTested at 103 and 104 P/E cyclesMore noisy bits from agingTheoretically, the amplitude of RTN is independent of the temperature and some work shows the switching of RTN behavior even exists when the temperature approaches absolute zero
29Outline Motivation Flash memory basics Device fingerprinting True Random number generation (RNG)Summary
30SummaryFlash memory is everywhere and can be used for computer security purposes without hardware changesFlash memory device fingerprintingFastRobust and unique signaturesResistant to temperature variations and agingFlash memory as a True RNGQuantum noise from RTN and thermal noiseViable across temperature ranges, aging
31Applicability Erase/program/read to the same physical address Accept RESET command when the chip is busyDisable ECC
32NIST Test Suites Test Name Test Description 1 The Frequency (Monobit) Test:Tests proportion of zeros and ones for the whole sequence.2 Frequency Test within a BlockTests the proportions of ones within M-bit Block.3 The Run TestTests the total number of runs in the sequence, where a run is an uninterrupted sequence of identical bits4 Tests for the Longest-Run-of-Ones in a BlockTests the longest run of ones within M-bit Block and consistency with theory5 The Binary Matrix Rank TestTests rank of disjoint sub-matrices of the entire sequence and independence6 The Discrete Fourier Transform (Spectral) TestTests the peak heights in the Discrete Fourier Transform of the sequence, to detect periodic features that indicates deviation of randomness7 The Non-overlapping Template Matching TestTests the number of occurrences of a pre-specified target strings8 The Overlapping Template Matching TestTests the number of occurrences of a pre-specified target strings. When window found, slide only one bit before the next search9 Maurer’s “Universal Statistics” TestTests the number of bits between matching patterns10 The Linear Complexity TestTests the length of a linear feedback shift register, test complexity11 The Serial TestTests the frequency of all possible overlapping m-bit pattern12 The Approximate Entropy TestTests the frequency of all possible overlapping m-bits pattern across the entire sequence13 The Cumulative Sums (Cusums) TestTests maximal excursion from the random walk defined by the cumulative sum of adjusted (-1, +1) digits in the sequence14 The Random Excursion TestTests the number of cycles having exactly K visits in a cumulative sum random walk15 The Random Excursions Variant TestTests the total number of times that a particular state is visited in a cumulative sum random walk
34More Uniqueness: Different Pages Compare correlation coefficients from measurements of different pages on different chips1,656,000 pairs compared((24 chips 24 pages) choose 2) 10 measurementsOptional, perhaps not