Interface TLSKDFExpandLabelSpec

All Superinterfaces:
AlgorithmParameterSpec

public interface TLSKDFExpandLabelSpec extends AlgorithmParameterSpec
This interface specifies the set of parameters used to instantiate a DerivationFunction implementing the Key Derivation HKDF-Expand-Label

It can be used with the label prefix "tls13 " to perform TLS 1.3 operations (RFC 8446) or with the label prefix "dtls13" to perform DTLS 1.3 operations (RFC 9147).

This interface is bound to the constant DerivationFunction.ALG_HKDF_EXPAND_LABEL_TLS13.

Since:
3.2
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    References the label prefix "dtls13" defined in DTLS 1.3 - IETF RFC 9147.
    static final short
    References the label prefix "tls13 " defined in TLS 1.3 - IETF RFC 8446.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Returns the HMAC Algorithm associated with the derivation function.
    byte[]
    Gets the context.
    byte[]
    Gets the label.
    short
    Requests the label prefix to use.
    short
    Returns the HKDF-Expand-Label output length in bytes.
    byte[]
    Gets the secret value for the key derivation function.
  • Field Details

    • LABEL_PREFIX_TLS13

      static final short LABEL_PREFIX_TLS13
      References the label prefix "tls13 " defined in TLS 1.3 - IETF RFC 8446. It is a value that can be returned by the method getLabelPrefix().
      See Also:
    • LABEL_PREFIX_DTLS13

      static final short LABEL_PREFIX_DTLS13
      References the label prefix "dtls13" defined in DTLS 1.3 - IETF RFC 9147. It is a value that can be returned by the method getLabelPrefix().
      See Also:
  • Method Details

    • getAlgorithm

      byte getAlgorithm()
      Returns the HMAC Algorithm associated with the derivation function.
      Returns:
      the HMAC algorithm associated with the derivation function
      See Also:
    • getSecret

      byte[] getSecret()
      Gets the secret value for the key derivation function.

      It may be an array view.

      Returns:
      the secret value
    • getLabelPrefix

      short getLabelPrefix()
      Requests the label prefix to use.

      Possible returned values are LABEL_PREFIX_TLS13 and LABEL_PREFIX_DTLS13.

      Returns:
      the requested label prefix
    • getLabel

      byte[] getLabel()
      Gets the label.

      It may be an array view. It may be null.

      Returns:
      the label
    • getContext

      byte[] getContext()
      Gets the context.

      It may be an array view. It may be null.

      Returns:
      the context
    • getOutputLength

      short getOutputLength()
      Returns the HKDF-Expand-Label output length in bytes. It specifies the total length of data that can be generated using subsequent calls to DerivationFunction.nextBytes(byte[], short, short) or DerivationFunction.nextBytes(javacard.security.SecretKey).
      Returns:
      the output length