public class DhKeyPairGenerator extends PKCS11KeyPairGenerator
This implementation only supports 512, 768, 1024 and 2048 bit as key size. The default key size is 1024 bit.
initialized_, keyPairGenerationSpec_, pkcs11OperationInitialized_, session_, tokenManager_, usedMechanismInfos_, usedMechanisms_
Constructor and Description |
---|
DhKeyPairGenerator()
Construct new generator.
|
Modifier and Type | Method and Description |
---|---|
protected iaik.pkcs.pkcs11.objects.Object |
createPrivateKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
This implementation accepts internal parameters of type
javax.crypto.spec.DHParameterSpec . |
protected iaik.pkcs.pkcs11.objects.Object |
createPublicKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
This implementation accepts internal parameters of type
javax.crypto.spec.DHParameterSpec . |
protected java.lang.String |
getAlgorithmName()
Returns
DH . |
protected iaik.pkcs.pkcs11.Mechanism |
getMechanism()
Get the mechanism that this key-pair generator uses.
|
protected void |
validateAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters)
Check, if the given internal parameters are appropriate.
|
createPkcs11PrivateKey, createPkcs11PublicKey, finalize, finalizePkcs11Operation, generateKeyPair, getUsedMechanismFeatures, getUsedMechanisms, initialize, initialize, initializePkcs11Operation, initializeSession, isSupportedBy
protected iaik.pkcs.pkcs11.Mechanism getMechanism()
getMechanism
in class PKCS11KeyPairGenerator
protected java.lang.String getAlgorithmName()
DH
.getAlgorithmName
in class PKCS11KeyPairGenerator
DH
.protected iaik.pkcs.pkcs11.objects.Object createPrivateKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
javax.crypto.spec.DHParameterSpec
. If the inner parameters are of a different
type, this method ignores them. It adds these parameters to the key template, the parameters in
the key template have a higher priority.createPrivateKeyCreationTemplate
in class PKCS11KeyPairGenerator
keyPairGenerationSpec
- The algorithm parameters provided by the application.PKCS11KeyPairGenerator.createPrivateKeyCreationTemplate(iaik.pkcs.pkcs11.provider.keypairgenerators.PKCS11KeyPairGenerationSpec)
protected iaik.pkcs.pkcs11.objects.Object createPublicKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
javax.crypto.spec.DHParameterSpec
. If the inner parameters are of a different
type, this method ignores them. It adds these parameters to the key template, the parameters in
the key template have a higher priority.createPublicKeyCreationTemplate
in class PKCS11KeyPairGenerator
keyPairGenerationSpec
- The algorithm parameters provided by the application.PKCS11KeyPairGenerator.createPublicKeyCreationTemplate(iaik.pkcs.pkcs11.provider.keypairgenerators.PKCS11KeyPairGenerationSpec)
protected void validateAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters) throws java.security.InvalidAlgorithmParameterException
null
or parameters of type javax.crypto.spec.DHParameterSpec
.validateAlgorithmParameterSpec
in class PKCS11KeyPairGenerator
parameters
- The parameters to check.java.security.InvalidAlgorithmParameterException
- If the parameters are inappropriate.PKCS11KeyPairGenerator.validateAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec)
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