Class EcdsaAlgorithm
Elliptic Curve Digital Signature Algorithm (ECDSA)
Implementation of the ECDSA digital signature scheme within the ZeroEcho cryptographic framework. This algorithm supports signing and verification using elliptic curve keys defined byEcdsaCurveSpec.
Roles
KeyUsage.SIGN- Create digital signatures using aPrivateKeyon a selected curve.KeyUsage.VERIFY- Verify digital signatures using aPublicKeyon the same curve.
Key builders
EcdsaCurveSpec- Used to generate a new key pair for a chosen curve.EcdsaPublicKeySpec- Used to import an existing ECDSA public key.EcdsaPrivateKeySpec- Used to import an existing ECDSA private key.
Provider model
This implementation leverages the Java Cryptography Architecture (JCA) with algorithm identifiers supplied byEcdsaCurveSpec.jcaFactory(). The GenericJcaSignatureContext
is used internally to provide streaming-friendly signing and verification
with strict enforcement of fixed-length signatures.
Default configuration
If no curve specification is explicitly provided, the default isEcdsaCurveSpec.P256.
// Example: Sign and verify with ECDSA/P-256
KeyPair kp = session.keyBuilders().asymmetric().generateKeyPair("ECDSA", EcdsaCurveSpec.P256);
SignatureContext signer = session.createContext("ECDSA", KeyUsage.SIGN, kp.getPrivate(), EcdsaCurveSpec.P256);
SignatureContext verifier = session.createContext("ECDSA", KeyUsage.VERIFY, kp.getPublic(), EcdsaCurveSpec.P256);
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ECDSA algorithm instance and registers its capabilities:KeyUsage.SIGNwithPrivateKeyandEcdsaCurveSpecKeyUsage.VERIFYwithPublicKeyandEcdsaCurveSpecAsymmetric key builders forEcdsaCurveSpec,EcdsaPublicKeySpec, andEcdsaPrivateKeySpec -
Method Summary
Modifier and TypeMethodDescriptionList<ParameterSetDescriptor<? extends AlgorithmKeySpec>> Returns the discoverable parameter sets (or parameterized templates) supported by this algorithm.Methods inherited from class AbstractCryptoAlgorithm
capabilityMethods inherited from class CryptoAlgorithm
addCapability, asymmetricKeyPairGenerator, bindContext, createContext, displayName, id, keyOperations, listCapabilities, priority, privateKeyImporter, providerName, publicKeyImporter, registerAsymmetricKeyPairGenerator, registerPrivateKeyImporter, registerPublicKeyImporter, registerSymmetricKeyGenerator, registerSymmetricKeyImporter, requiresStatefulSigning, roles, supports, symmetricKeyGenerator, symmetricKeyImporter
-
Constructor Details
-
EcdsaAlgorithm
public EcdsaAlgorithm()Constructs a new ECDSA algorithm instance and registers its capabilities:KeyUsage.SIGNwithPrivateKeyandEcdsaCurveSpecKeyUsage.VERIFYwithPublicKeyandEcdsaCurveSpec- Asymmetric key builders for
EcdsaCurveSpec,EcdsaPublicKeySpec, andEcdsaPrivateKeySpec
On construction, the algorithm declares its supported roles and registers builders with the
CryptoAlgorithminfrastructure so they can be discovered by theCryptoCatalogor invoked through the session-boundKeyBuildersentry point.
-
-
Method Details
-
parameterSets
Description copied from class:CryptoAlgorithmReturns the discoverable parameter sets (or parameterized templates) supported by this algorithm.Callers (UIs, provisioning tools, policy engines) use this list to present users with valid, named key-generation options without prior knowledge of the concrete algorithm. Each entry is either a pre-built
ParameterSetDescriptor.Concrete(ready spec) or aParameterSetDescriptor.Template(user-supplied arguments produce the spec).The default implementation returns an empty list. Algorithms with finite, enumerable parameter sets should override this method. Overrides must return immutable lists in stable order, with unique nonblank descriptor identifiers. Registry loading validates a snapshot; external providers remain responsible for maintaining the contract on subsequent calls. Implementations may use
ParameterSetDescriptor.snapshot(List)to validate and copy their list.- Overrides:
parameterSetsin classCryptoAlgorithm- Returns:
- immutable list of parameter set descriptors; never
null
-