Class MldsaKeyGenBuilder
java.lang.Object
zeroecho.core.alg.mldsa.MldsaKeyGenBuilder
- All Implemented Interfaces:
AsymmetricKeyPairGenerator<MldsaKeyGenSpec>
public final class MldsaKeyGenBuilder
extends Object
implements AsymmetricKeyPairGenerator<MldsaKeyGenSpec>
Key pair builder for ML-DSA (FIPS 204) using the Bouncy Castle provider.
This builder maps MldsaKeyGenSpec to the appropriate
org.bouncycastle.jcajce.spec.MLDSAParameterSpec constant. Reflection
is used to avoid a hard dependency on any particular set of parameter
constants across provider versions.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates a key pair according to the given specification.
-
Constructor Details
-
MldsaKeyGenBuilder
public MldsaKeyGenBuilder()Creates a stateless ML-DSA key-pair generator.
-
-
Method Details
-
generateKeyPair
Generates a key pair according to the given specification.- Specified by:
generateKeyPairin interfaceAsymmetricKeyPairGenerator<MldsaKeyGenSpec>- Parameters:
spec- key generation specification- Returns:
- generated key pair
- Throws:
GeneralSecurityException- if the JCA engine cannot be initialized or the parameter set is unknown
-