Loading ePassport/ttcn/ePassport_Functions.ttcn +23 −4 Original line number Diff line number Diff line Loading @@ -63,11 +63,29 @@ external function fx_verifySignature(in octetstring p_message, in octetstring p_signedMessage, in octetstring p_key) return boolean; /** * @desc Calculate a pseudo-random integer value as described in RFC2246 * @desc Generate a pseudo-random integer value as described in RFC2246 * @return A random integer value */ external function fx_random( ) return integer; /** * @desc Compute a cryptographic checksum using ISO/IEC 9797-1 MAC algorithm 3 * with block cipher DES, zero IV (8 bytes) and ISO9797-1 padding method 2. * @param p_ssc Send Sequence Counter * @param p_key DES key, concatenation of 2 equal-length keys (Ka || Kb) * @param p_data Data for which the cryptographic checksum is computed * @return Cryptographic checksum of p_data (8 bytes). */ external function fx_cryptographicChecksum(in octetstring p_ssc, in octetstring p_key, in octetstring p_data) return octetstring; /** * @desc Compute a digest * @param p_algorithm Hash algorithm to be used for computing digest * @param p_data Data for which the digest is computed * @return Digest value of p_data */ external function fx_digest(in HashAlgorithm p_algorithm, in octetstring p_data) return octetstring; } // end securityExternalFunctions group fileExternalFunctions { Loading Loading @@ -130,8 +148,8 @@ // ISO/IEC 9797-1 MAC Algorithm 3 function f_cryptographicChecksum(in octetstring p_key, in octetstring p_data) return octetstring { // TODO return ''O; // FIXME return fx_cryptographicChecksum(''O, p_key, p_data); } // end f_cryptographicChecksum // TDES Encryption Loading @@ -156,6 +174,7 @@ function f_digest(in HashAlgorithm p_algorithm, in octetstring p_data) return octetstring { // FIXME // return fx_digest(p_algorithm, p_data); return '0001020304050607'O; } //end f_digest Loading Loading
ePassport/ttcn/ePassport_Functions.ttcn +23 −4 Original line number Diff line number Diff line Loading @@ -63,11 +63,29 @@ external function fx_verifySignature(in octetstring p_message, in octetstring p_signedMessage, in octetstring p_key) return boolean; /** * @desc Calculate a pseudo-random integer value as described in RFC2246 * @desc Generate a pseudo-random integer value as described in RFC2246 * @return A random integer value */ external function fx_random( ) return integer; /** * @desc Compute a cryptographic checksum using ISO/IEC 9797-1 MAC algorithm 3 * with block cipher DES, zero IV (8 bytes) and ISO9797-1 padding method 2. * @param p_ssc Send Sequence Counter * @param p_key DES key, concatenation of 2 equal-length keys (Ka || Kb) * @param p_data Data for which the cryptographic checksum is computed * @return Cryptographic checksum of p_data (8 bytes). */ external function fx_cryptographicChecksum(in octetstring p_ssc, in octetstring p_key, in octetstring p_data) return octetstring; /** * @desc Compute a digest * @param p_algorithm Hash algorithm to be used for computing digest * @param p_data Data for which the digest is computed * @return Digest value of p_data */ external function fx_digest(in HashAlgorithm p_algorithm, in octetstring p_data) return octetstring; } // end securityExternalFunctions group fileExternalFunctions { Loading Loading @@ -130,8 +148,8 @@ // ISO/IEC 9797-1 MAC Algorithm 3 function f_cryptographicChecksum(in octetstring p_key, in octetstring p_data) return octetstring { // TODO return ''O; // FIXME return fx_cryptographicChecksum(''O, p_key, p_data); } // end f_cryptographicChecksum // TDES Encryption Loading @@ -156,6 +174,7 @@ function f_digest(in HashAlgorithm p_algorithm, in octetstring p_data) return octetstring { // FIXME // return fx_digest(p_algorithm, p_data); return '0001020304050607'O; } //end f_digest Loading