Loading ePassport/ttcn/ePassport_Altsteps.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ f_chipAuthentication(v_publicKeyPcd); mrtdport.send(m_responseOK); vc_simu.securityStatus := e_chipAuthenticated; f_setKeysForSecureMessaging(vc_simu.kEnc & vc_simu.kMac); f_setInitialSscForMessageAuthentication(c_8ZeroBytes); repeat; } } // end a_chipAuthentication Loading ePassport/ttcn/ePassport_Functions.ttcn +4 −5 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ out octetstring p_publicKey) return KeyAgreementAlgorithm { return fx_extractPublicKey(p_dgfile, p_publicKey); } } // end f_extractPublicKey function f_computeSharedSecret( in octetstring p_privateKeyPicc, Loading Loading @@ -449,7 +449,7 @@ var octetstring v_k; var octetstring v_h; var octetstring v_dg14; var KeyAgreementAlgorithm algo; var KeyAgreementAlgorithm v_algo; var octetstring v_dummy; var octetstring v_dg14PrivateKey; Loading @@ -458,12 +458,11 @@ log("DG14: ", v_dg14); log("Read c_filePrCA: ", f_readFileData(c_filePrCA, 0, -1, v_dg14PrivateKey)); log("DG14.sk: ", v_dg14PrivateKey); algo := f_extractPublicKey(v_dg14, v_dummy); // Is it possible to set a function parameter optional? v_k := f_computeSharedSecret(v_dg14PrivateKey, algo, p_publicKeyPcd); v_algo := f_extractPublicKey(v_dg14, v_dummy); // Is it possible to set a function parameter optional? v_k := f_computeSharedSecret(v_dg14PrivateKey, v_algo, p_publicKeyPcd); // b) The session keys KMAC and KEnc derived from K for Secure Messaging. f_deriveKeys(v_k, vc_simu.kEnc, vc_simu.kMac); f_setKeysForSecureMessaging(vc_simu.kEnc & vc_simu.kMac); // c) The hash of the inspection system's ephemeral public key H(^PKPCD) for Terminal Authentication. v_h := f_digest(e_sha1, p_publicKeyPcd); Loading Loading
ePassport/ttcn/ePassport_Altsteps.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ f_chipAuthentication(v_publicKeyPcd); mrtdport.send(m_responseOK); vc_simu.securityStatus := e_chipAuthenticated; f_setKeysForSecureMessaging(vc_simu.kEnc & vc_simu.kMac); f_setInitialSscForMessageAuthentication(c_8ZeroBytes); repeat; } } // end a_chipAuthentication Loading
ePassport/ttcn/ePassport_Functions.ttcn +4 −5 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ out octetstring p_publicKey) return KeyAgreementAlgorithm { return fx_extractPublicKey(p_dgfile, p_publicKey); } } // end f_extractPublicKey function f_computeSharedSecret( in octetstring p_privateKeyPicc, Loading Loading @@ -449,7 +449,7 @@ var octetstring v_k; var octetstring v_h; var octetstring v_dg14; var KeyAgreementAlgorithm algo; var KeyAgreementAlgorithm v_algo; var octetstring v_dummy; var octetstring v_dg14PrivateKey; Loading @@ -458,12 +458,11 @@ log("DG14: ", v_dg14); log("Read c_filePrCA: ", f_readFileData(c_filePrCA, 0, -1, v_dg14PrivateKey)); log("DG14.sk: ", v_dg14PrivateKey); algo := f_extractPublicKey(v_dg14, v_dummy); // Is it possible to set a function parameter optional? v_k := f_computeSharedSecret(v_dg14PrivateKey, algo, p_publicKeyPcd); v_algo := f_extractPublicKey(v_dg14, v_dummy); // Is it possible to set a function parameter optional? v_k := f_computeSharedSecret(v_dg14PrivateKey, v_algo, p_publicKeyPcd); // b) The session keys KMAC and KEnc derived from K for Secure Messaging. f_deriveKeys(v_k, vc_simu.kEnc, vc_simu.kMac); f_setKeysForSecureMessaging(vc_simu.kEnc & vc_simu.kMac); // c) The hash of the inspection system's ephemeral public key H(^PKPCD) for Terminal Authentication. v_h := f_digest(e_sha1, p_publicKeyPcd); Loading