Class COSEEllipticCurves
java.lang.Object
com.authlete.cose.constants.COSEEllipticCurves
COSE Elliptic Curves
Name Value Key Type Description P-2561 EC2NIST P-256 also known as secp256r1 P-3842 EC2NIST P-384 also known as secp384r1 P-5213 EC2NIST P-521 also known as secp521r1 X255194 OKPX25519 for use w/ ECDH only X4485 OKPX448 for use w/ ECDH only Ed255196 OKPEd25519 for use w/ EdDSA only Ed4487 OKPEd448 for use w/ EdDSA only secp256k18 EC2Ed448 for use w/ EdDSA only
- Since:
- 1.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intEd25519 (6)static final String"Ed25519"static final intEd448 (7)static final String"Ed448"static final intP-256 (1)static final String"P-256"static final intP-384 (2)static final String"P-384"static final intP-521 (3)static final String"P-521"static final intsecp256k1 (8)static final String"secp256k1"static final intX25519 (4)static final String"X25519"static final intX448 (5)static final String"X448" -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetNameByValue(int value) Get the name of the elliptic curve to which the integer identifier has been assigned to.static intgetValueByName(String name) Get the integer identifier assigned to the elliptic curve.
-
Field Details
-
P_256
public static final int P_256P-256 (1)- See Also:
-
P_384
public static final int P_384P-384 (2)- See Also:
-
P_521
public static final int P_521P-521 (3)- See Also:
-
X25519
public static final int X25519X25519 (4)- See Also:
-
X448
public static final int X448X448 (5)- See Also:
-
Ed25519
public static final int Ed25519Ed25519 (6)- See Also:
-
Ed448
public static final int Ed448Ed448 (7)- See Also:
-
SECP256K1
public static final int SECP256K1secp256k1 (8)- See Also:
-
P_256_NAME
-
P_384_NAME
-
P_521_NAME
-
X25519_NAME
-
X448_NAME
-
Ed25519_NAME
-
Ed448_NAME
-
SECP256K1_NAME
-
-
Method Details
-
getValueByName
Get the integer identifier assigned to the elliptic curve.- Parameters:
name- An elliptic curve name such as"P-256". Ifnullis given, 0 is returned.- Returns:
- The integer identifier assigned to the elliptic curve. If the given name is not recognized, 0 is returned.
-
getNameByValue
Get the name of the elliptic curve to which the integer identifier has been assigned to.- Parameters:
value- An integer identifier assigned to an elliptic curve.- Returns:
- The name of the elliptic curve to which the integer identifier
has been assigned to. If the given identifier is not recognized,
nullis returned.
-