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.8 Application Binding Protocol - Distributed<br />

291 childPM1 = ( short ) 6 ;<br />

292 copyPointer = U t i l . arrayCopyNonAtomic ( this . MessageHandlerTagTwo ,<br />

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

294 this . MessageHandlerTagTwo . l e n g t h ) ;<br />

295 copyPointer = U t i l . arrayCopyNonAtomic ( this . ServerAppDHData ,<br />

( short ) 0 ,<br />

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

297 this . ServerAppDHData . l e n g t h ) ;<br />

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

299 copyPointer =<br />

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

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

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

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

303 copyPointer = U t i l . arrayCopyNonAtomic ( this . EncryptedDataTag ,<br />

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

305 this . EncryptedDataTag . l e n g t h ) ;<br />

306 copyPointer += 3 ;<br />

307 childPM2 = ( short ) ( copyPointer − ( short ) 1) ;<br />

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

309 copyPointer = U t i l . arrayCopyNonAtomic ( this . Plat<strong>for</strong>mHash , ( short )<br />

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

311 this . Plat<strong>for</strong>mHash . l e n g t h ) ;<br />

312 copyPointer += 2 ;<br />

313 MessageDigest myHashGen = MessageDigest . g e t I n s t a n c e<br />

314 ( MessageDigest .ALG_SHA_256, f a l s e ) ;<br />

315 short tempLength = ( short )myHashGen . doFinal ( this . ClassDH . dhModulus ,<br />

316 ( short ) 0 , ( short ) this . ClassDH . dhModulus . length ,<br />

317 r e c e i v i n g B u f f e r , copyPointer ) ;<br />

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

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

320 ( short ) 2) , tempLength ) ;<br />

321 copyPointer += tempLength ;<br />

322 copyPointer = U t i l . arrayCopyNonAtomic ( this . ServerAppIdentityTag ,<br />

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

324 this . ServerAppIdentityTag . l e n g t h ) ;<br />

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

326 copyPointer =<br />

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

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

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

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

330 copyPointer =<br />

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

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

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

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

334 try {<br />

335 this . signGenerate ( this . r e c e i v i n g B u f f e r , ( short ) ( childPM2 +<br />

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

337 ( childPM2 + ( short ) 1) ) ,<br />

398

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

Saved successfully!

Ooh no, something went wrong!