java.lang.Object
java.security.KeyPairGeneratorSpi
net.i2p.crypto.eddsa.KeyPairGenerator
net.i2p.crypto.eddsa.RedKeyPairGenerator
Default keysize is 256 (Ed25519).
Field Summary
Fields inherited from class KeyPairGenerator
DEFAULT_KEYSIZE, edParams, initialized, randomModifier and TypeFieldDescriptionprotected static final intKey size in bits used when initialize() supplies no strength.protected EdDSAParameterSpecEdDSA parameter specification, set by initialize().protected booleanWhether the generator has been initialized.protected SecureRandomThe random number source, set by initialize().Constructor Summary
ConstructorsConstructorDescriptionAn uninitialised generator;generateKeyPair()falls back to the default key size and the global RandomSource if the caller has not called initialize().Method Summary
All MethodsMethods inherited from class KeyPairGenerator
createNamedCurveSpec, initialize, initializeModifier and TypeMethodDescriptionprotected EdDSANamedCurveSpeccreateNamedCurveSpec(String curveName) Create an EdDSANamedCurveSpec from the provided curve name.voidinitialize(int keysize, SecureRandom random) Initialize with the given key size.voidinitialize(AlgorithmParameterSpec params, SecureRandom random) Initialize with the given parameter spec.
Constructor Details
RedKeyPairGenerator
public RedKeyPairGenerator()An uninitialised generator;generateKeyPair()falls back to the default key size and the global RandomSource if the caller has not called initialize().
Method Details
generateKeyPair
Description copied from class:KeyPairGeneratorGenerate a new EdDSA key pair.- Overrides:
generateKeyPairin classKeyPairGenerator- Returns:
- the generated key pair