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

389 i f ( this . signGenerate ( inArray , i n O f f s e t , inLength ,<br />

390 ClientAppVerificationKey , S i g n a t u r e .MODE_VERIFY) ) {<br />

391 return true ;<br />

392 } else {<br />

393 ISOException . throwIt ( ( short ) 0 x6666 ) ;<br />

394 }<br />

395 } catch ( Exception ce ) {<br />

396 ISOException . throwIt ( ( short ) 0xAB23) ;<br />

397 }<br />

398 return true ;<br />

399 } else {<br />

400 ISOException . throwIt ( ( short ) 0xFA18) ;<br />

401 }<br />

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

403 }<br />

404 void parseMessage ( byte [ ] i n B u f f e r ) {<br />

405 byte c h i l d L e f t = i n B u f f e r [ ( short ) ( this . CTLVDataOffset − ( short ) 1)<br />

406 ] ;<br />

407 short p o i n t e r = ( short ) this . CTLVDataOffset ;<br />

408 try {<br />

409 while ( c h i l d L e f t > 0) {<br />

410 i f ( U t i l . arrayCompare ( ClientAppDHChallengeTag , ( short ) 0 , i n B u f f e r ,<br />

411 pointer , ( short ) 4) == 0) {<br />

412 U t i l . arrayCopy ( i n B u f f e r , pointer ,<br />

this . ClientAppDHChanllengerArray ,<br />

413 ( short ) 0 , ( short )<br />

414 this . ClientAppDHChanllengerArray . l e n g t h ) ;<br />

415 p o i n t e r += ( short ) this . ClientAppDHChanllengerArray . l e n g t h ;<br />

416 } else i f ( U t i l . arrayCompare ( this . ClientAppRandomNumberTag ,<br />

( short ) 0 ,<br />

417 i n B u f f e r , pointer , ( short ) 4) == 0) {<br />

418 U t i l . arrayCopyNonAtomic ( i n B u f f e r , pointer ,<br />

419 this . ClientAppRandomNumberArray ,<br />

( short ) 0 ,<br />

420 ( short )<br />

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

422 p o i n t e r += ( short ) ( this . ClientAppRandomNumberArray . l e n g t h ) ;<br />

423 } else i f ( U t i l . arrayCompare ( this . ClientAppCookieTag , ( short ) 0 ,<br />

424 i n B u f f e r , pointer , ( short ) 4) == 0) {<br />

425 U t i l . arrayCopyNonAtomic ( i n B u f f e r , pointer ,<br />

426 this . ClientAppCookieArray , ( short ) 0 ,<br />

427 ( short ) ( this . ClientAppCookieArray . l e n g t h ) ) ;<br />

428 p o i n t e r += ( short ) ( this . ClientAppCookieArray . l e n g t h ) ;<br />

429 }<br />

430 c h i l d L e f t −= ( short ) 1 ;<br />

431 }<br />

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

433 ISOException . throwIt ( ( short ) c h i l d L e f t ) ;<br />

434 }<br />

435 }<br />

436 void protocolImplementation ( ) {}<br />

400

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

Saved successfully!

Ooh no, something went wrong!