public final class EcdhPskClientKeyExchange extends ECDHClientKeyExchange
ClientKeyExchange message for PSK-ECDH based key exchange methods.
Contains the client's ephemeral public key as encoded point and the PSK
idenity. See RFC
5489 for details. It is assumed, that the client's ECDH public key is not
in the client's certificate, so it must be provided here.
According RFC
8422, 5.1.1. Supported Elliptic Curves Extension only "named curves" are
valid, the "prime" and "char2" curve descriptions are deprecated. Also only
"UNCOMPRESSED" as point format is valid, the other formats have been
deprecated.FRAGMENT_LENGTH_BITS, FRAGMENT_OFFSET_BITS, MESSAGE_HEADER_LENGTH_BYTES, MESSAGE_LENGTH_BITS, MESSAGE_SEQ_BITS, MESSAGE_TYPE_BITS| Constructor and Description |
|---|
EcdhPskClientKeyExchange(PskPublicInformation identity,
byte[] encodedPoint,
InetSocketAddress peerAddress)
Creates a new key exchange message for an identity hint and a public key.
|
| Modifier and Type | Method and Description |
|---|---|
static HandshakeMessage |
fromReader(org.eclipse.californium.elements.util.DatagramReader reader,
InetSocketAddress peerAddress)
Creates a new client key exchange instance from its byte representation.
|
PskPublicInformation |
getIdentity()
This method returns the PSK identity as public information.
|
int |
getMessageLength()
Must be implemented by each subclass.
|
String |
toString() |
protected void |
writeFragment(org.eclipse.californium.elements.util.DatagramWriter writer)
Write fragment to writer.
|
fragmentToByteArray, getEncodedPoint, readEncodedPointgetMessageTypefragmentChanged, fromByteArray, fromGenericHandshakeMessage, getContentType, getFragmentLength, getFragmentOffset, getMessageSeq, getNextHandshakeMessage, getRawMessage, setMessageSeq, setNextHandshakeMessage, size, toByteArray, writeTogetPeerpublic EcdhPskClientKeyExchange(PskPublicInformation identity, byte[] encodedPoint, InetSocketAddress peerAddress)
identity - PSK identity as public informationencodedPoint - ephemeral public key as encoded pointpeerAddress - peer's addressNullPointerException - if either identity or clietPublicKey are nullprotected void writeFragment(org.eclipse.californium.elements.util.DatagramWriter writer)
writeFragment in class ECDHClientKeyExchangewriter - writerpublic static HandshakeMessage fromReader(org.eclipse.californium.elements.util.DatagramReader reader, InetSocketAddress peerAddress)
reader - reader for the binary encoding of the message.peerAddress - peer addressNullPointerException - if peerAddress is nullpublic int getMessageLength()
HandshakeMessagegetMessageLength in class ECDHClientKeyExchangepublic String toString()
toString in class ECDHClientKeyExchangepublic PskPublicInformation getIdentity()
Copyright © 2023 Eclipse Foundation. All rights reserved.