Class AbstractNamedCurve
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.security.crypto.ec.curves.AbstractNamedCurve
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,NamedCurve
- Direct Known Subclasses:
BrainpoolP256r1,BrainpoolP320r1,BrainpoolP384r1,BrainpoolP512r1,Secp112r1,Secp112r2,Secp128r1,Secp128r2,Secp160k1,Secp160r1,Secp160r2,Secp192k1,Secp192r1,Secp224k1,Secp224r1,Secp256k1,Secp256r1,Secp384r1,Secp521r1,Sect113r1,Sect113r2,Sect131r1,Sect131r2,Sect163k1,Sect163r1,Sect163r2,Sect193r1,Sect193r2,Sect233k1,Sect233r1,Sect239k1,Sect283k1,Sect283r1,Sect409k1,Sect409r1,Sect571k1,Sect571r1,X962c2tnb191v1,X962c2tnb191v2,X962c2tnb191v3,X962c2tnb239v1,X962c2tnb239v2,X962c2tnb239v3,X962c2tnb359v1,X962c2tnb431r1,X962prime192v2,X962prime192v3,X962prime239v1,X962prime239v2,X962prime239v3
public abstract class AbstractNamedCurve extends AbstractInitializableComponent implements NamedCurve
Abstract base class for implementations ofNamedCurve.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.private ECParameterSpecparamSpecInstance ofECParameterSpeccorresponding to the curve.
-
Constructor Summary
Constructors Constructor Description AbstractNamedCurve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ECParameterSpecbuildParameterSpec()Build an instance ofECParameterSpeccorresponding to this curve.protected voiddoInitialize()ECParameterSpecgetParameterSpec()Get the curve'sECParameterSpec.StringtoString()-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opensaml.security.crypto.ec.NamedCurve
getKeyLength, getName, getObjectIdentifier, getURI
-
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
Logger.
-
paramSpec
@NonnullAfterInit private ECParameterSpec paramSpec
Instance ofECParameterSpeccorresponding to the curve.
-
-
Method Detail
-
getParameterSpec
@NonnullAfterInit public ECParameterSpec getParameterSpec()
Get the curve'sECParameterSpec.- Specified by:
getParameterSpecin interfaceNamedCurve- Returns:
- the parameter spec instance
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
buildParameterSpec
@Nullable protected ECParameterSpec buildParameterSpec()
Build an instance ofECParameterSpeccorresponding to this curve.The default implementation here is that it first attempts to resolve the curve from Bouncy Castle's
ECNamedCurveTable. If that is unsuccessful then it attempts a brute force approach by generating a key pair using aECGenParameterSpecbased on the curve's name fromNamedCurve.getName(), returning the parameter instance from the resultingECPublicKey.- Returns:
- the parameter spec instance, or null if can not be built
-
-