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.

C.9 Plat<strong>for</strong>m Binding Protocol<br />

582 phSign . i n i t ( ( RSAPublicKey ) kpSign , S i g n a t u r e .MODE_VERIFY) ;<br />

583 return phSign . v e r i f y ( i n b u f f , i n b u f f O f f s e t , i n b u f f l e n g t h , i n b u f f ,<br />

584 ( short ) ( i n b u f f O f f s e t + i n b u f f l e n g t h +<br />

585 this . PTLVDataOffset ) , ( short ) 64) ;<br />

586 }<br />

587 return f a l s e ;<br />

588 }<br />

589 public s t a t i c short bytesToShort ( byte [ ] ArrayBytes ) {<br />

590 return ( short ) ( ( ( ArrayBytes [ 0 ] <br />

600 ( short ) 0 x0008 ) ;<br />

601 Array [ ( short ) ( a r r a y O f f s e t + ( short ) 1) ] = ( byte ) ( inShort & ( short )<br />

602 0x00FF ) ;<br />

603 }<br />

604 }<br />

C.9 Plat<strong>for</strong>m Binding Protocol<br />

The Java Card implementation of the P BP discussed in section 7.5 is listed in subsequent<br />

sections.<br />

C.9.1<br />

Initiator Smart Card Implementation<br />

Implementation of a initiator smart card that request <strong>for</strong> the plat<strong>for</strong>m binding in the<br />

CDAM rewall mechanism is listed as below:<br />

1 package protocolSCA ;<br />

2<br />

3 import javacard . framework .APDU;<br />

4 import javacard . framework . Applet ;<br />

5 import javacard . framework . ISO7816 ;<br />

6 import javacard . framework . ISOException ;<br />

7 import javacard . framework . JCSystem ;<br />

8 import javacard . framework . U t i l ;<br />

9 import javacard . s e c u r i t y . AESKey ;<br />

10 import javacard . s e c u r i t y . Key ;<br />

11 import javacard . s e c u r i t y . KeyBuilder ;<br />

12 import javacard . s e c u r i t y . KeyPair ;<br />

13 import javacard . s e c u r i t y . MessageDigest ;<br />

14 import javacard . s e c u r i t y . RSAPrivateKey ;<br />

15 import javacard . s e c u r i t y . RSAPublicKey ;<br />

16 import javacard . s e c u r i t y . RandomData ;<br />

404

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

Saved successfully!

Ooh no, something went wrong!