Loading ePassport/ttcn/ePassport_Functions.ttcn +7 −3 Original line number Diff line number Diff line Loading @@ -137,10 +137,11 @@ /** * @desc Compute a Diffie-Hellman shared secret * @param p_privateKeyPicc Private key of peer A * @param p_publicKeyPiccAndDomainInfo Public key of peer A (not used) and DH domain info * @param p_publicKeyPcd Public key of peer B * @return Diffie-Hellman shared secret */ external function fx_computeDhSharedSecret(in octetstring p_privateKeyPicc, in octetstring p_publicKeyPcd) return octetstring; external function fx_computeDhSharedSecret(in octetstring p_privateKeyPicc, in octetstring p_publicKeyPiccAndDomainInfo, in octetstring p_publicKeyPcd) return octetstring; /** * @desc Calculate the signature of a data block Loading Loading @@ -278,9 +279,10 @@ function f_computeSharedSecret( in octetstring p_privateKeyPicc, in octetstring p_publicKeyPiccAndDomainInfo, in octetstring p_publicKeyPcd) return octetstring { return fx_computeDhSharedSecret(p_privateKeyPicc, p_publicKeyPcd); return fx_computeDhSharedSecret(p_privateKeyPicc, p_publicKeyPiccAndDomainInfo, p_publicKeyPcd); } // end f_computeSharedSecret function f_build3DesKey(in octetstring p_keyPair) return octetstring { Loading Loading @@ -426,9 +428,11 @@ var octetstring v_k; var octetstring v_h; var octetstring v_dg14; // a) The shared secret K = KA(SKPICC;^PKPCD;DPICC) = KA(^SKPCD;PKPICC;DPICC) v_k := f_computeSharedSecret(vc_simu.dhPrivateKey, p_publicKeyPcd); v_dg14 := f_readFileData(c_fileDG14, 0, -1, v_dg14); v_k := f_computeSharedSecret(vc_simu.dhPrivateKey, v_dg14, 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); Loading Loading
ePassport/ttcn/ePassport_Functions.ttcn +7 −3 Original line number Diff line number Diff line Loading @@ -137,10 +137,11 @@ /** * @desc Compute a Diffie-Hellman shared secret * @param p_privateKeyPicc Private key of peer A * @param p_publicKeyPiccAndDomainInfo Public key of peer A (not used) and DH domain info * @param p_publicKeyPcd Public key of peer B * @return Diffie-Hellman shared secret */ external function fx_computeDhSharedSecret(in octetstring p_privateKeyPicc, in octetstring p_publicKeyPcd) return octetstring; external function fx_computeDhSharedSecret(in octetstring p_privateKeyPicc, in octetstring p_publicKeyPiccAndDomainInfo, in octetstring p_publicKeyPcd) return octetstring; /** * @desc Calculate the signature of a data block Loading Loading @@ -278,9 +279,10 @@ function f_computeSharedSecret( in octetstring p_privateKeyPicc, in octetstring p_publicKeyPiccAndDomainInfo, in octetstring p_publicKeyPcd) return octetstring { return fx_computeDhSharedSecret(p_privateKeyPicc, p_publicKeyPcd); return fx_computeDhSharedSecret(p_privateKeyPicc, p_publicKeyPiccAndDomainInfo, p_publicKeyPcd); } // end f_computeSharedSecret function f_build3DesKey(in octetstring p_keyPair) return octetstring { Loading Loading @@ -426,9 +428,11 @@ var octetstring v_k; var octetstring v_h; var octetstring v_dg14; // a) The shared secret K = KA(SKPICC;^PKPCD;DPICC) = KA(^SKPCD;PKPICC;DPICC) v_k := f_computeSharedSecret(vc_simu.dhPrivateKey, p_publicKeyPcd); v_dg14 := f_readFileData(c_fileDG14, 0, -1, v_dg14); v_k := f_computeSharedSecret(vc_simu.dhPrivateKey, v_dg14, 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); Loading