06.11.2014 Views

A User Centric Security Model for Tamper-Resistant Devices

A User Centric Security Model for Tamper-Resistant Devices

A User Centric Security Model for Tamper-Resistant Devices

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.3 Runtime Protection Mechanism<br />

idea of operand stack integrity. They dene a variable α, and all values that are pushed on<br />

or popped from the operand stack are XORed with the α. There<strong>for</strong>e, α is the summation<br />

of all the values that are on the operand stack at any point of an application execution. For<br />

example, if values o 1 , o 2 , o 3 , and o 4 are on a stack then the α will be α = o 1 ⊕ o 2 ⊕ o 3 ⊕ o 4 ,<br />

which can be written as α = Σ n i=1 o i where n=4.<br />

According to Barbu et al. [217] on every jump instruction beyond the scope of the current<br />

frame (method), the runtime environment XORs all the values stored on the operand and<br />

compares the result with α. If they match then the integrity of the operand stack is veried.<br />

Their proposal does not measure the integrity of the operand stack on instructions like ifelse<br />

or loops, which could be the target of the malicious user. In fact, Barbu et al. [217]<br />

detail an attack that targets the conditional statement (e.g. if-else) and showed how a<br />

malicious user can circumvent the PIN verication in their example application. However,<br />

the second-rened method do not protect against such attacks. In their proposed countermeasures<br />

they sacriced security and (to some extent) per<strong>for</strong>mance <strong>for</strong> the sake of memory<br />

use, whereas our proposal focuses on security rather than saving the memory. A point to<br />

note is that in a traditional smart card (in ICOM) memory is crucial as to keep the cost<br />

of the smart card in a reasonable range; however, in the UCOM we focus on the security<br />

- sacricing the (crucial) cost of the nal product (e.g. UCTD).<br />

1 // Executed by runtime s e c u r i t y manager when a v a l u e i s pushed onto an<br />

i n t e g r i t y s t a c k .<br />

2 On_Stack_Push ( pushedValue ) {<br />

3 push ( InS [ top ] XOR pushedValue ) ;<br />

4 }<br />

5 // Executed by runtime s e c u r i t y manager when a v a l u e i s popped from an<br />

operand s t a c k .<br />

6 On_Stack_Pop( poppedValue ) {<br />

7 i f ( pop ( InS ) XOR poppedValue := InS [ top ] ) {<br />

8 } else {<br />

9 terminateExecution ( ) ;<br />

10 }<br />

11 }<br />

Listing 8.2: Operand stack integrity operations.<br />

In our proposal, we use a Last In First Out (LIFO) stack referred as integrity stack that<br />

can store values of a word size, which is the most elementary data structure dened in a<br />

JCVM. As already mentioned, the actual size of the word is plat<strong>for</strong>m dependent and it is left<br />

to the discretion of plat<strong>for</strong>m implementers. One thing to note is that JCVM knows the size<br />

of the operand stack when it loads a frame (section 8.2.1); there<strong>for</strong>e, the runtime security<br />

manager just creates an integrity stack of the size n where n is the size of the respective<br />

operand stack (created by the JCVM). We refer to the integrity stack as InS in listing 8.2.<br />

When a frame is loaded, the JCVM and runtime security manager will create an operand<br />

201

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!