Enum Class HashToCurveProfile
- All Implemented Interfaces:
Serializable, Comparable<HashToCurveProfile>, Constable
Supported profiles for instantiating an instance of HashToEllipticCurve. Each profile supports
both hash_to_curve and encode_to_curve operations, according to RFC 9380
_NU_ is identical to _RO_, except that the encoding type is encode_to_curve. encode_to_curve is not yet implemented in this lib, thus these options are not yet included
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionintgetH()Retrieves the value of the field 'h', representing the cofactor associated with this instance.intgetK()Retrieves the security level in bits associated with this instance.intgetL()Retrieves the value of the field 'L' representing the internal block size in bytes associated with this instance.getmJ()Retrieves the value of the field 'mJ' representing the associated Montgomery equation parameter AgetmK()Retrieves the value of the field 'mK' representing the associated Montgomery equation parameter B specific to the hash-to-curve profile.getZ()Retrieves the value of the field 'Z'.static HashToCurveProfileReturns the enum constant of this class with the specified name.static HashToCurveProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
P256_XMD_SHA_256
-
P384_XMD_SHA_384
-
P521_XMD_SHA_512
-
CURVE25519W_XMD_SHA_512_ELL2
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getK
public int getK()Retrieves the security level in bits associated with this instance.- Returns:
- the value of the field 'k' representing security level in bits
-
getL
public int getL()Retrieves the value of the field 'L' representing the internal block size in bytes associated with this instance.- Returns:
- the value of the field 'L' representing the internal block size
-
getZ
Retrieves the value of the field 'Z'.- Returns:
- the value of the field 'Z' as a BigInteger
-
getH
public int getH()Retrieves the value of the field 'h', representing the cofactor associated with this instance.- Returns:
- the value of the field 'h' as an integer
-
getmJ
Retrieves the value of the field 'mJ' representing the associated Montgomery equation parameter A- Returns:
- the value of the field 'mJ' as an Integer
-
getmK
Retrieves the value of the field 'mK' representing the associated Montgomery equation parameter B specific to the hash-to-curve profile.- Returns:
- the value of the field 'mK' as an Integer
-