java.lang.Object
java.security.spec.ECParameterSpec
java.security.spec.SM2ParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
The EC domain parameters used by SM2.
The parameters are defined by China's specification GB/T 32918.5-2017.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigInteger
The cofactor.static final EllipticCurve
The SM2 elliptic curve.static final ECPoint
The generator or base point.static final String
The OID of the SM2 elliptic curve.static final BigInteger
The order of the generator. -
Method Summary
Modifier and TypeMethodDescriptionstatic SM2ParameterSpec
instance()
Returns a singleton of SM2ParameterSpec.static boolean
isCurveSM2
(byte[] encodedOid) Indicates if the encoded OID is SM2 elliptic curve.static boolean
isCurveSM2
(String oid) Indicates if the OID is SM2 elliptic curve.Methods declared in class java.security.spec.ECParameterSpec
getCofactor, getCurve, getGenerator, getOrder
-
Field Details
-
CURVE
The SM2 elliptic curve. -
GENERATOR
The generator or base point. -
ORDER
The order of the generator. -
COFACTOR
The cofactor. -
OID
The OID of the SM2 elliptic curve.- See Also:
-
-
Method Details
-
instance
Returns a singleton of SM2ParameterSpec.- Returns:
- the singleton.
-
isCurveSM2
public static boolean isCurveSM2(byte[] encodedOid) Indicates if the encoded OID is SM2 elliptic curve.- Parameters:
encodedOid
- the encoded OID.- Returns:
- true if the encoded OID is SM2 elliptic curve; otherwise false.
-
isCurveSM2
Indicates if the OID is SM2 elliptic curve.- Parameters:
oid
- the encoded OID.- Returns:
- true if the OID is SM2 elliptic curve; otherwise false.
-