public class DhKeyAgreement 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 |
---|
DhKeyAgreement()
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 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, engineInit, extractValue, finalize, finalizePkcs11Operation, getUsedMechanismFeatures, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy, pkcs11DoPhase, pkcs11GenerateSecret, pkcs11GenerateSecret, pkcs11GenerateSecret, pkcs11Init, pkcs11Init
protected static java.lang.String KEY_AGREEEMENT_ALGORITHM_NAME
protected iaik.pkcs.pkcs11.Mechanism mechanism_
protected iaik.pkcs.pkcs11.Mechanism[] getUsedMechanisms()
getRequiredMechanismFeatures()
method.getUsedMechanisms
in class PKCS11KeyAgreement
getUsedMechanismFeatures()
. May be empty, but must not be null.protected java.lang.String getAlgorithmName()
getAlgorithmName
in class PKCS11KeyAgreement
protected void checkInitKeyObject(iaik.pkcs.pkcs11.objects.Key key) throws java.security.InvalidKeyException
checkInitKeyObject
in class PKCS11KeyAgreement
key
- 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 PKCS11KeyAgreement
key
- 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 PKCS11KeyAgreement
phaseKey
- The (last) phase key which has been passed to
PKCS11KeyAgreement.engineDoPhase(java.security.Key, boolean)
.protected iaik.pkcs.pkcs11.Mechanism getMechanism()
getMechanism
in class PKCS11KeyAgreement
IAIK 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