Package org.jmrtd.protocol
Class PACEGMWithECDHAgreement
- java.lang.Object
-
- org.jmrtd.protocol.PACEGMWithECDHAgreement
-
public class PACEGMWithECDHAgreement extends Object
An ECDH key agreement implementation, used by PACE protocol for the Generic Mapping case, which is able to return the shared secret in the form of an EC point. Specifically this implementation is able to keep both X and Y coordinate instead of only returning the X coordinate.- Version:
- $Revision: 1751 $
- Author:
- The JMRTD team ([email protected])
-
-
Constructor Summary
Constructors Constructor Description PACEGMWithECDHAgreement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ECPoint
doPhase(PublicKey publicKey)
Performs a key agreement protocol.void
init(PrivateKey privateKey)
Initializes the key agreement implementation.
-
-
-
Method Detail
-
init
public void init(PrivateKey privateKey) throws InvalidKeyException
Initializes the key agreement implementation.- Parameters:
privateKey
- this party's private key- Throws:
InvalidKeyException
- if the private key is not an instance ofECPrivateKey
-
doPhase
public ECPoint doPhase(PublicKey publicKey) throws InvalidKeyException, IllegalStateException
Performs a key agreement protocol.- Parameters:
publicKey
- the other party's public key- Returns:
- the resulting shared secretin the form of an EC point
- Throws:
InvalidKeyException
- if the provided key is not an instance ofECPublicKey
IllegalStateException
- if this key agreement has not been initialized
-
-