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 of
NamedCurve
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Logger.private ECParameterSpec
Instance ofECParameterSpec
corresponding to the curve. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ECParameterSpec
Build an instance ofECParameterSpec
corresponding to this curve.protected void
Get the curve'sECParameterSpec
.toString()
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 Details
-
log
private final org.slf4j.Logger logLogger. -
paramSpec
Instance ofECParameterSpec
corresponding to the curve.
-
-
Constructor Details
-
AbstractNamedCurve
public AbstractNamedCurve()
-
-
Method Details
-
getParameterSpec
Get the curve'sECParameterSpec
.- Specified by:
getParameterSpec
in interfaceNamedCurve
- Returns:
- the parameter spec instance
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
buildParameterSpec
Build an instance ofECParameterSpec
corresponding 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 aECGenParameterSpec
based 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
-
toString
-