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.9 Plat<strong>for</strong>m Binding Protocol<br />

170 i n i t i a l P o i n t e r = U t i l . arrayCopyNonAtomic<br />

171 ( this . SCA<strong>User</strong>CertificateTag , ( short ) 0 ,<br />

172 this . SCA<strong>User</strong>Certificate , ( short ) 0 , ( short )<br />

173 this . SCA<strong>User</strong>CertificateTag . l e n g t h ) ;<br />

174 this . shortToBytes ( this . SCA<strong>User</strong>Certificate , ( short ) 4 , ( short )<br />

175 ( this . SCA<strong>User</strong>Certificate . l e n g t h − ( short ) 7) ) ;<br />

176 i n i t i a l P o i n t e r = U t i l . arrayCopyNonAtomic ( this . ExponentTag ,<br />

177 ( short ) 0 , this . SCA<strong>User</strong>Certificate , ( short ) ( i n i t i a l P o i n t e r +<br />

178 ( short ) 3) , ( short ) this . ExponentTag . l e n g t h ) ;<br />

179 RSAPublicKey myPublic = ( RSAPublicKey )<br />

180 this . ph<strong>User</strong>KeyPair . g e t P u b l i c ( ) ;<br />

181 short kLen = myPublic . getExponent ( this . SCA<strong>User</strong>Certificate ,<br />

182 ( short ) ( i n i t i a l P o i n t e r + ( short ) 2) ) ;<br />

183 this . shortToBytes ( this . SCA<strong>User</strong>Certificate , i n i t i a l P o i n t e r , kLen )<br />

184 ;<br />

185 i n i t i a l P o i n t e r += ( short ) ( kLen + ( short ) 2) ;<br />

186 this . SCA<strong>User</strong>Certificate [6]++;<br />

187 i n i t i a l P o i n t e r = U t i l . arrayCopyNonAtomic ( this . ModulusTag ,<br />

188 ( short ) 0 , this . SCA<strong>User</strong>Certificate , ( short ) ( i n i t i a l P o i n t e r ) ,<br />

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

190 kLen = myPublic . getModulus ( this . SCA<strong>User</strong>Certificate , ( short )<br />

191 ( i n i t i a l P o i n t e r + ( short ) 2) ) ;<br />

192 this . shortToBytes ( this . SCA<strong>User</strong>Certificate , i n i t i a l P o i n t e r , kLen )<br />

193 ;<br />

194 this . SCA<strong>User</strong>Certificate [6]++;<br />

195 this . SCBIdentity = JCSystem . makeTransientByteArray ( ( short ) 24 ,<br />

196 JCSystem .MEMORY_TYPE_TRANSIENT_RESET) ;<br />

197 SCBVerificationKey = ( RSAPublicKey ) KeyBuilder . buildKey<br />

198 ( KeyBuilder .TYPE_RSA_PUBLIC,<br />

199 KeyBuilder .LENGTH_RSA_512, f a l s e ) ;<br />

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

201 ISOException . throwIt ( ( short ) 0xCCCC) ;<br />

202 }<br />

203 try {<br />

204 this . SCACertificate = JCSystem . makeTransientByteArray ( ( short ) 86 ,<br />

205 JCSystem .MEMORY_TYPE_TRANSIENT_DESELECT) ;<br />

206 i n i t i a l P o i n t e r = U t i l . arrayCopyNonAtomic ( this . SCACertificateTag ,<br />

207 ( short ) 0 , this . SCACertificate , ( short ) 0 , ( short )<br />

208 this . SCACertificateTag . l e n g t h ) ;<br />

209 this . shortToBytes ( this . SCACertificate , ( short ) 4 , ( short )<br />

210 ( this . SCACertificate . l e n g t h − ( short ) 7) ) ;<br />

211 i n i t i a l P o i n t e r = U t i l . arrayCopyNonAtomic ( this . ExponentTag ,<br />

212 ( short ) 0 , this . SCACertificate , ( short ) ( i n i t i a l P o i n t e r +<br />

213 ( short ) 3) , ( short ) this . ExponentTag . l e n g t h ) ;<br />

214 RSAPublicKey myPublic = ( RSAPublicKey )<br />

215 this . phSCAKeyPair . g e t P u b l i c ( ) ;<br />

216 short kLen = myPublic . getExponent ( this . SCACertificate , ( short )<br />

217 ( i n i t i a l P o i n t e r + ( short ) 2) ) ;<br />

218 this . shortToBytes ( this . SCACertificate , i n i t i a l P o i n t e r , kLen ) ;<br />

219 i n i t i a l P o i n t e r += ( short ) ( kLen + ( short ) 2) ;<br />

220 this . SCACertificate [6]++;<br />

408

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

Saved successfully!

Ooh no, something went wrong!