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.

C.8 Application Binding Protocol - Distributed<br />

387 copyPointer = U t i l . arrayCopyNonAtomic ( this . ServerAppIdentity ,<br />

( short )<br />

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

389 this . ServerAppIdentity . l e n g t h ) ;<br />

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

391 copyPointer =<br />

U t i l . arrayCopyNonAtomic ( this . ClientAppRandomNumberArray ,<br />

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

393 this . ClientAppRandomNumberArray . l e n g t h ) ;<br />

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

395 copyPointer =<br />

U t i l . arrayCopyNonAtomic ( this . ServerAppRandomNumberArray ,<br />

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

397 this . ServerAppRandomNumberArray . l e n g t h ) ;<br />

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

399 try {<br />

400 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 />

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

402 phClientAppKeyPair . g e t P r i v a t e ( ) ,<br />

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

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

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

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

407 }<br />

408 copyPointer = U t i l . arrayCopyNonAtomic ( this . C l i e n t A p p C e r t i f i c a t e ,<br />

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

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

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

412 try {<br />

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

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

415 ( short ) ( copyPointer −<br />

416 ( encryptedChildPointer + ( short ) 1) ) ) ;<br />

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

418 ISOException . throwIt ( ( short ) ( copyPointer −<br />

419 encryptedChildPointer + ( short ) 1) ) ;<br />

420 }<br />

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

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

423 ( copyPointer − ( short ) ( encryptedChildPointer<br />

424 + ( short ) 1) ) ) ;<br />

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

426 + ( short ) 1) , ( short ) ( copyPointer −<br />

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

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

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

430 copyPointer = U t i l . arrayCopyNonAtomic ( this . ServerAppCookieArray ,<br />

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

432 this . ServerAppCookieArray . l e n g t h ) ;<br />

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

434 this . shortToBytes ( this . r e c e i v i n g B u f f e r , mainLengthPointer ,<br />

386

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

Saved successfully!

Ooh no, something went wrong!