Package net.i2p.crypto.eddsa
Class KeyPairGenerator
java.lang.Object
java.security.KeyPairGeneratorSpi
net.i2p.crypto.eddsa.KeyPairGenerator
Default keysize is 256 (Ed25519)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EdDSANamedCurveSpeccreateNamedCurveSpec(String curveName) Create an EdDSANamedCurveSpec from the provided curve name.voidinitialize(int keysize, SecureRandom random) voidinitialize(AlgorithmParameterSpec params, SecureRandom random)
-
Constructor Details
-
KeyPairGenerator
public KeyPairGenerator()
-
-
Method Details
-
initialize
- Specified by:
initializein classKeyPairGeneratorSpi
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException - Overrides:
initializein classKeyPairGeneratorSpi- Throws:
InvalidAlgorithmParameterException
-
generateKeyPair
- Specified by:
generateKeyPairin classKeyPairGeneratorSpi
-
createNamedCurveSpec
protected EdDSANamedCurveSpec createNamedCurveSpec(String curveName) throws InvalidAlgorithmParameterException Create an EdDSANamedCurveSpec from the provided curve name. The current implementation fetches the pre-created curve spec from a table.- Parameters:
curveName- the EdDSA named curve.- Returns:
- the specification for the named curve.
- Throws:
InvalidAlgorithmParameterException- if the named curve is unknown.
-