iaik.security.ssl
Class NamedGroup

java.lang.Object
  extended by iaik.security.ssl.NamedGroup
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
SupportedEllipticCurves.NamedCurve, SupportedGroups.NamedFFDHEGroup

public class NamedGroup
extends java.lang.Object
implements java.lang.Cloneable

This class implements the NamedGroup element of the SupportedGroups (supported_groups) TLS extension as specified by RFC 7919, RFC 8446.

The SupportedGroups (supported_groups) extension replaces the SupportedEllipticCurves (elliptic_curves) extension to extend it about support for finite field based Diffie-Hellman (DH) key exchange. Although the [@link SupportedEllipticCurves SupportedEllipticCurves} class can still be used for backwards compatibility to former iSaSiLk versions it is recommended to use this SupportedGroups implementation instead of it.

A SupportedGroups extension might be sent by the client within an extended ClientHello message to tell the server which groups are supported by the client when using an ECDHE or DHE based cipher suite. The server uses the information sent by the client to select an ECC/DHE cipher suite in accordance with the ECDHE/FFDHE groups supported by the client. The server itself generally does not send a SupportedGroups extension.
TLS defines the SupportedGroups extension as list of named groups (see RFC 7919):

 enum {

      Elliptic Curve Groups (ECDHE) 
      secp256r1(0x0017), secp384r1(0x0018), secp521r1(0x0019),
      x25519(0x001D), x448(0x001E),

      // Finite Field Groups (DHE) 
      ffdhe2048(0x0100), ffdhe3072(0x0101), ffdhe4096(0x0102),
      ffdhe6144(0x0103), ffdhe8192(0x0104),

      // Reserved Code Points 
      ffdhe_private_use(0x01FC..0x01FF),
      ecdhe_private_use(0xFE00..0xFEFF),
      (0xFFFF)
 } NamedGroup;

 struct {
     NamedGroup named_group_list<2..2^16-1>;
 } NamedGroupList;
 
The client shall send the list of supported groups in its preference order.

In addition to the elliptic groups listed above, iSaSiLk supports the following Brainpool groups from RFC 7027:

      enum {
           brainpoolP256r1(26),
           brainpoolP384r1(27),
           brainpoolP512r1(28)
      } NamedGroup;
 

See Also:
SupportedGroups

Constructor Summary
NamedGroup(java.lang.String name, int id)
          Creates a group with the given name, oid string and id.
 
Method Summary
 java.lang.Object clone()
          Gets a clone of this NamedGroup object.
 boolean equals(java.lang.Object obj)
          Checks if this NamedGroup is equal to the given object.
 int getID()
          Gets the TLS id of this group.
 java.lang.String getName()
          Gets the name of the group.
 int hashCode()
          Gets a hash code of this NamedGroup object.
 java.lang.String toString()
          Gets a String representation of this NamedGroup.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedGroup

public NamedGroup(java.lang.String name,
                  int id)
Creates a group with the given name, oid string and id.

Parameters:
name - the name of the group
id - the TLS id of the group
Throws:
java.lang.IllegalArgumentException - if the given TLS id is out-of-range (not between 1 and 216-1); or name is null
Method Detail

getName

public java.lang.String getName()
Gets the name of the group.

Returns:
the name of the group (or "UNKNOWN" if the name is not known)

getID

public int getID()
Gets the TLS id of this group.

Returns:
the TLS id of this group

hashCode

public int hashCode()
Gets a hash code of this NamedGroup object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code of this NamedGroup object.

equals

public boolean equals(java.lang.Object obj)
Checks if this NamedGroup is equal to the given object.

Overrides:
equals in class java.lang.Object
Returns:
true if this NamedGroup is equal to the given object (same group id), false if it is not equal to it

clone

public java.lang.Object clone()
Gets a clone of this NamedGroup object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this NamedGroup object

toString

public java.lang.String toString()
Gets a String representation of this NamedGroup.

Overrides:
toString in class java.lang.Object

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

iSaSiLk 6.0, (c) 2002 IAIK, (c) 2003 - 2015 SIC