public class X942DhKeyPairGenerator extends PKCS11KeyPairGenerator
java.security.spec.DSAParameterSpec
object which provides the prime, sub-prime and base component. This interface has been chosen
because DSA requires the same parameters for generating key pairs.
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 |
---|
X942DhKeyPairGenerator()
Construct new generator.
|
Modifier and Type | Method and Description |
---|---|
protected iaik.pkcs.pkcs11.objects.Object |
createPrivateKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
Create the public key template to use as input for the key-pair generation.
|
protected iaik.pkcs.pkcs11.objects.Object |
createPublicKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
This implementation accepts internal parameters of type
java.security.spec.DSAParameterSpec . |
protected java.lang.String |
getAlgorithmName()
Returns
DH/X9.42 . |
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/X9.42
.getAlgorithmName
in class PKCS11KeyPairGenerator
DH/X9.42
.protected iaik.pkcs.pkcs11.objects.Object createPrivateKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
PKCS11KeyPairGenerator
createPrivateKeyCreationTemplate
in class PKCS11KeyPairGenerator
keyPairGenerationSpec
- The algorithm parameters provided by the application.protected iaik.pkcs.pkcs11.objects.Object createPublicKeyCreationTemplate(PKCS11KeyPairGenerationSpec keyPairGenerationSpec)
java.security.spec.DSAParameterSpec
. We use DSA parameters because they are the
same as those for X9.42 DH, but for X9.42 DH there are no extra specs. 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 java.security.spec.DSAParameterSpec
. We
use DSA parameters because they are the same as those for X9.42 DH, but for X9.42 DH there are
no extra specs.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