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.6 Application Acquisition and Contractual Agreement Protocol<br />

521 this . r e c e i v i n g B u f f e r , copyPointer ,<br />

( short ) this . U s e r I d e n t i t y . l e n g t h )<br />

522 ;<br />

523 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

524 copyPointer = U t i l . arrayCopyNonAtomic ( this . SPIdentity , ( short ) 0 ,<br />

525 this . r e c e i v i n g B u f f e r , copyPointer , ( short ) this . SPIdentity . l e n g t h ) ;<br />

526 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

527 copyPointer = U t i l . arrayCopyNonAtomic ( this . SCRandomNumberArray ,<br />

528 ( short ) 0 , this . r e c e i v i n g B u f f e r , copyPointer , ( short )<br />

529 this . SCRandomNumberArray . l e n g t h ) ;<br />

530 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

531 copyPointer = U t i l . arrayCopyNonAtomic ( this . SPRandomNumberArray ,<br />

532 ( short ) 0 , this . r e c e i v i n g B u f f e r ,<br />

( short ) copyPointer , ( short )<br />

533 this . SPRandomNumberArray . l e n g t h ) ;<br />

534 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

535 try {<br />

536 this . signGenerate ( r e c e i v i n g B u f f e r , ( short ) ( e n c r y p t i o n O f f s e t ) ,<br />

537 ( short ) ( copyPointer − e n c r y p t i o n O f f s e t ) ,<br />

538 phSCKeyPair . g e t P r i v a t e ( ) , S i g n a t u r e .MODE_SIGN) ;<br />

539 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

540 } catch ( Exception cE ) {<br />

541 ISOException . throwIt ( ( short ) 0xFA17) ;<br />

542 }<br />

543 copyPointer = U t i l . arrayCopyNonAtomic ( this . S C C e r t i f i c a t e , ( short ) 0 ,<br />

544 this . r e c e i v i n g B u f f e r , copyPointer , ( short )<br />

545 this . S C C e r t i f i c a t e . l e n g t h ) ;<br />

546 this . r e c e i v i n g B u f f e r [ encryptedChildPointer ]++;<br />

547 try {<br />

548 this . messageEncryption ( r e c e i v i n g B u f f e r , ( short )<br />

549 ( encryptedChildPointer + ( short ) 1) ,<br />

( short )<br />

550 ( copyPointer − ( encryptedChildPointer +<br />

551 ( short ) 1) ) ) ;<br />

552 } catch ( Exception cE ) {<br />

553 ISOException . throwIt ( ( short ) ( copyPointer − encryptedChildPointer +<br />

554 ( short ) 1) ) ;<br />

555 }<br />

556 this . shortToBytes ( this . r e c e i v i n g B u f f e r , ( short )<br />

557 ( encryptedChildPointer − ( short ) 2) , ( short )<br />

558 ( copyPointer − ( short ) ( encryptedChildPointer +<br />

559 ( short ) 1) ) ) ;<br />

560 this . macGenerate ( r e c e i v i n g B u f f e r , ( short ) ( encryptedChildPointer +<br />

561 ( short ) 1) , ( short ) ( copyPointer −<br />

562 ( encryptedChildPointer + ( short ) 1) ) ,<br />

563 S i g n a t u r e .MODE_SIGN) ;<br />

564 this . r e c e i v i n g B u f f e r [ mainChildPointer ]++;<br />

565 copyPointer = U t i l . arrayCopyNonAtomic ( this . SPCookieArray , ( short ) 0 ,<br />

566 this . r e c e i v i n g B u f f e r , copyPointer , ( short )<br />

567 this . SPCookieArray . l e n g t h ) ;<br />

568 this . r e c e i v i n g B u f f e r [ mainChildPointer ]++;<br />

344

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

Saved successfully!

Ooh no, something went wrong!