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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.3 Runtime Protection Mechanism<br />

and integrity stack, respectively. Furthermore, the runtime security manager will also<br />

generate a random number and stores it as S r . The rationale <strong>for</strong> using the random number<br />

will become apparent in the subsequent discussion.<br />

V 7<br />

Push(V 7 )<br />

V 7<br />

Push(V Ins-7 = V Ins-6 ⊕V 7 )<br />

V Ins-7<br />

V 6<br />

Push(V 6 )<br />

V 6<br />

Push(V Ins-6 = V Ins-5 ⊕V 6 )<br />

V Ins-6<br />

V 5<br />

Push(V 5 )<br />

V 5<br />

Push(V Ins-5 = V Ins-4 ⊕V 5 )<br />

V Ins-5<br />

V 4<br />

Push(V 4 )<br />

V 4<br />

Push(V Ins-4 = V Ins-3 ⊕V 4 )<br />

V Ins-4<br />

V 3<br />

Push(V 3 )<br />

V 3<br />

Push(V Ins-3 = V Ins-2 ⊕V 3 )<br />

V Ins-3<br />

V 2<br />

Push(V 2 )<br />

V 2<br />

Push(V Ins-2 = V Ins-1 ⊕V 2 )<br />

V Ins-2<br />

V 1<br />

Push(V 1 )<br />

V 1<br />

Push(V Ins-1 = S r ⊕V 1 )<br />

V Ins-1<br />

Operand Stack<br />

Integrity Stack<br />

Figure 8.5: Operand and integrity stack push operations<br />

Consider there are seven values (V 1 , V 2 , V 3 , ... , V 7 ) that are going to be pushed onto an<br />

operand stack. The operations per<strong>for</strong>med at each push operation <strong>for</strong> these seven values are<br />

shown in gure 8.5. When V 1 is pushed onto the operand stack, the integrity stack does not<br />

have any value. There<strong>for</strong>e, at the beginning integrity stack will XOR V 1 with the generated<br />

random value S r : it is the starting point of the integrity calculation. When an item is<br />

pushed on to the operand stack, we XOR the pushed value with the value on the top of the<br />

integrity stack. The result is pushed back on to the integrity stack. The push operation<br />

can be represented as V Ins-n =V Ins-(n-1) ⊕V n , where n is index to the integrity stack, V Ins-n<br />

is the value stored on the integrity stack. Furthermore, the value on the top of an integrity<br />

stack is V Ins-n =S r ⊕Σ n i=1 V i. There<strong>for</strong>e, if a card manufacturer wants to implement the α<br />

as proposed by the Barbu et al. [217] then it can simply do it by α = S r ⊕V Ins-n .<br />

The rationale <strong>for</strong> using a random number is to avoid parallel fault injections that try to<br />

change the values on both operand and integrity stack simultaneously. Such a parallel<br />

fault injection will become dicult if an adversary cannot predict the values stored on the<br />

integrity stack, as each value on the integrity stack will be chained with the generated<br />

random number. One point to note is that, although the attacker's capability dened in<br />

section 8.3.2 prohibits parallel fault injection but we still try to accommodate it in our<br />

proposals; as such attacks might become realistic in future.<br />

When a value is popped out of the operand stack, we also pop the integrity value from the<br />

integrity stack, XOR it with the popped value from the operand stack and compare it with<br />

the new top value on the integrity stack. If the values match then integrity of the popped<br />

value from the operand stack is veried; otherwise, it has been corrupted and the runtime<br />

security manager requests the JCVM to terminate the execution as shown in listing 8.2.<br />

To explain it further, consider that we pop V 7 from the operand stack in gure 8.5. The<br />

runtime security manager will also pop V Ins-7 from the integrity stack, calculate InsValue<br />

= V Ins-7 ⊕V Ins-6 and compare the InsValue with the V 7 . If InsValue and V 7 match, then<br />

the JCVM will proceed with the execution; otherwise, it will abort the execution.<br />

202

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

Saved successfully!

Ooh no, something went wrong!