Commit 85d3529b authored by garciay's avatar garciay
Browse files

Add fx_extractPrivateKey() external function

parent 80d0282b
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -181,6 +181,16 @@
            external function fx_extractPublicKey(in octetstring p_dgfile, out octetstring p_publicKey) return KeyAgreementAlgorithm;
            external function fx_extractPublicKey(in octetstring p_dgfile, out octetstring p_publicKey) return KeyAgreementAlgorithm;


        	/**
        	/**
            /**
             * @desc	Extract the private key information from the provided DGxx file content
             * @param	dgfile The DGxx file content
             * @param	key The private key in byte format
             * @return	The algorithm
             * @see		LDS 1.7 2004-05-18 document - Page 90 for DG14/DG15 ASN.1 structure (and use ASN.1 editor to vizualize the files content)
             */
            external function fx_extractPrivateKey(in octetstring p_dgfile, out octetstring p_privateKey) return KeyAgreementAlgorithm;

			/*
        	 * @desc	Compute a Diffie-Hellman shared secret
        	 * @desc	Compute a Diffie-Hellman shared secret
        	 * @param	p_privateKeyPicc Private key of peer A
        	 * @param	p_privateKeyPicc Private key of peer A
        	 * @param	p_publicKeyPiccAndDomainInfo Public key of peer A (not used) and DH domain info
        	 * @param	p_publicKeyPiccAndDomainInfo Public key of peer A (not used) and DH domain info
@@ -361,6 +371,13 @@
    		return fx_extractPublicKey(p_dgfile, p_publicKey);
    		return fx_extractPublicKey(p_dgfile, p_publicKey);
    	} // end f_extractPublicKey
    	} // end f_extractPublicKey
    	
    	
    	function f_extractPrivateKey(
    		in octetstring p_dgfile,
    		out octetstring p_privateKey)
    	return KeyAgreementAlgorithm {
    		return fx_extractPrivateKey(p_dgfile, p_privateKey);
    	} // end f_extractPrivateKey
    	
    	function f_extractXcoordinateFromEcPublicKey(in octetstring p_ecPublicKey) return octetstring {
    	function f_extractXcoordinateFromEcPublicKey(in octetstring p_ecPublicKey) return octetstring {
    	    return fx_extractXcoordinateFromEcPublicKey(p_ecPublicKey);    	    
    	    return fx_extractXcoordinateFromEcPublicKey(p_ecPublicKey);    	    
    	} // end f_extractXcoordinateFromEcPublicKey
    	} // end f_extractXcoordinateFromEcPublicKey