public class EcDhKeyAgreement extends PKCS11KeyAgreement
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
KEY_AGREEEMENT_ALGORITHM_NAME
The JCA standard name of this signature algorithm.
|
protected iaik.pkcs.pkcs11.Mechanism |
mechanism_
The current cryptoki mechanism to use.
|
currentKeyIsSoftwareKey_, initialized_, initKey_, initKeyObject_, keyAgreementSpec_, keyAgreementSpecChanged_, phaseKey_, pkcs11OperationInitialized_, session_, softwareDelegate_, tokenManager_, usedMechanismInfos_, usedMechanisms_| Constructor and Description |
|---|
EcDhKeyAgreement()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInitKeyObject(iaik.pkcs.pkcs11.objects.Key key)
Check the key object used for initialization, if it is acceptable for this agreement
implementation.
|
protected void |
checkPhaseKeyObject(iaik.pkcs.pkcs11.objects.Key key)
Check the key object used for a phase, if it is acceptable for this agreement implementation.
|
protected void |
engineInit(java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes this KeyAgreement with the given key, algorithm parameters, and random seed.
|
protected java.lang.String |
getAlgorithmName()
Get the JCA standard name of this signautre algorithm.
|
protected int |
getMaxSecretLength(iaik.pkcs.pkcs11.objects.Key phaseKey)
Get the maximum length in bytes of the resulting shared secret key.
|
protected iaik.pkcs.pkcs11.Mechanism |
getMechanism()
Get the mechanism that this key agreement uses.
|
protected iaik.pkcs.pkcs11.Mechanism[] |
getUsedMechanisms()
Returns an array of Mechanisms that this engine class uses.
|
engineDoPhase, engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, extractValue, finalize, finalizePkcs11Operation, getUsedMechanismFeatures, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy, pkcs11DoPhase, pkcs11GenerateSecret, pkcs11GenerateSecret, pkcs11GenerateSecret, pkcs11Init, pkcs11Initprotected static final java.lang.String KEY_AGREEEMENT_ALGORITHM_NAME
protected iaik.pkcs.pkcs11.Mechanism mechanism_
protected iaik.pkcs.pkcs11.Mechanism[] getUsedMechanisms()
getRequiredMechanismFeatures() method.getUsedMechanisms in class PKCS11KeyAgreementgetUsedMechanismFeatures(). May be empty, but must not be null.protected java.lang.String getAlgorithmName()
getAlgorithmName in class PKCS11KeyAgreementprotected void engineInit(java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
PKCS11KeyAgreementdoFinal methods will represent
public key material of another participated entity or key material resulting from some
previously performed phase (if there are more than two entities involved in the key agreement).
This implementation delegates this call to the software provider, if the key is a software key.
If the key is a key of this provider, it delegates the call to the corresponding pkcs11 method
with prefix pkcs11 instead of engine.engineInit in class PKCS11KeyAgreementkey - the private key information of the entity involved in the key agreementparams - The algorithm parameters used for this key agreement algorithm. It must be a
PKCS11KeyAgreementSpec for this implementation.random - The random seed. This implementation ignores this parameter.java.security.InvalidKeyException - if the given key cannot be used for this key agreementjava.security.InvalidAlgorithmParameterException - if the given parameters do not match to this key agreement algorithmprotected void checkInitKeyObject(iaik.pkcs.pkcs11.objects.Key key)
throws java.security.InvalidKeyException
checkInitKeyObject in class PKCS11KeyAgreementkey - The initialization key object to check.java.security.InvalidKeyException - If this implementation cannot work with this type of key object.protected void checkPhaseKeyObject(iaik.pkcs.pkcs11.objects.Key key)
throws java.security.InvalidKeyException
checkPhaseKeyObject in class PKCS11KeyAgreementkey - The phase key object to check.java.security.InvalidKeyException - If this implementation cannot work with this type of key object.protected int getMaxSecretLength(iaik.pkcs.pkcs11.objects.Key phaseKey)
The provided phase key may help the implementatin in determining the maximum length; e.g. for Diffie-Hellman in getting the length of the prime P.
getMaxSecretLength in class PKCS11KeyAgreementphaseKey - The (last) phase key which has been passed to
PKCS11KeyAgreement.engineDoPhase(java.security.Key, boolean).protected iaik.pkcs.pkcs11.Mechanism getMechanism()
getMechanism in class PKCS11KeyAgreementIAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4