Package io.github.mahmoudimus.quic.tls
Enum Class NamedGroup
- All Implemented Interfaces:
Serializable,Comparable<NamedGroup>,Constable
The groups the handshake offers and accepts for key exchange (RFC 8446 section 4.2.7): (EC)DHE
groups and the X25519MLKEM768 hybrid.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNIST P-256,secp256r1.NIST P-384,secp384r1.NIST P-521,secp521r1.X25519 (RFC 7748).X25519MLKEM768 (draft-ietf-tls-ecdhe-mlkem), the post-quantum hybrid browsers offer first: a key encapsulation, so the client's share (an ML-KEM-768 encapsulation key and an X25519 key, 1216 bytes) and the server's (a ciphertext and an X25519 key, 1120 bytes) differ. -
Method Summary
Modifier and TypeMethodDescriptionintcode()The group's TLS code point.static NamedGroupforCode(int code) The group with a TLS code point.static NamedGroupReturns the enum constant of this class with the specified name.static NamedGroup[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
X25519
X25519 (RFC 7748). -
SECP256R1
NIST P-256,secp256r1. -
SECP384R1
NIST P-384,secp384r1. -
SECP521R1
NIST P-521,secp521r1. -
X25519_MLKEM768
X25519MLKEM768 (draft-ietf-tls-ecdhe-mlkem), the post-quantum hybrid browsers offer first: a key encapsulation, so the client's share (an ML-KEM-768 encapsulation key and an X25519 key, 1216 bytes) and the server's (a ciphertext and an X25519 key, 1120 bytes) differ.
-
-
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
-
code
public int code()The group's TLS code point.- Returns:
- the two-byte code, such as
0x001dfor X25519
-
forCode
The group with a TLS code point.- Parameters:
code- the code point- Returns:
- the group, or null if it is not one of these
-