public final class EcdhPskServerKeyExchange extends ECDHServerKeyExchange
ServerKeyExchange message for PSK-ECDH based key exchange methods.
Contains the server's ephemeral public key as encoded point and the PSK
hint. See RFC
5489 for details. It is assumed, that the server's ECDH public key is not
in the servers'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.ECDHServerKeyExchange.EcdhDataFRAGMENT_LENGTH_BITS, FRAGMENT_OFFSET_BITS, MESSAGE_HEADER_LENGTH_BYTES, MESSAGE_LENGTH_BITS, MESSAGE_SEQ_BITS, MESSAGE_TYPE_BITS| Constructor and Description |
|---|
EcdhPskServerKeyExchange(PskPublicInformation pskHint,
XECDHECryptography ecdhe,
InetSocketAddress peerAddress)
Creates a new key exchange message with psk hint as clear text and ServerDHParams.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
fragmentToByteArray()
The serialization of the handshake body (without the handshake header).
|
static HandshakeMessage |
fromReader(org.eclipse.californium.elements.util.DatagramReader reader,
InetSocketAddress peerAddress)
Creates a new server key exchange instance from its byte representation.
|
PskPublicInformation |
getHint()
This method returns the preshared key hint used by server in
ServerKeyExchange
message. |
int |
getMessageLength()
Must be implemented by each subclass.
|
String |
toString() |
getEncodedPoint, getNamedCurveLength, getSupportedGroup, readNamedCurve, updateSignatureForNamedCurve, writeNamedCurvegetMessageTypefragmentChanged, fromByteArray, fromGenericHandshakeMessage, getContentType, getFragmentLength, getFragmentOffset, getMessageSeq, getNextHandshakeMessage, getRawMessage, setMessageSeq, setNextHandshakeMessage, size, toByteArray, writeTogetPeerpublic EcdhPskServerKeyExchange(PskPublicInformation pskHint, XECDHECryptography ecdhe, InetSocketAddress peerAddress)
pskHint - preshared key hint in clear textecdhe - XECDHECryptography including the supported group and the peer's public keypeerAddress - peer's addressNullPointerException - if the arguments pskHint or ecdhe are nullpublic byte[] fragmentToByteArray()
HandshakeMessageClientHello, the
fragments are considered to be not modified. If a modification is required,
call HandshakeMessage.fragmentChanged().fragmentToByteArray in class HandshakeMessagepublic static HandshakeMessage fromReader(org.eclipse.californium.elements.util.DatagramReader reader, InetSocketAddress peerAddress) throws HandshakeException
reader - reader for the binary encoding of the message.peerAddress - peer addressEcdhPskServerKeyExchangeHandshakeException - if the byte array includes unsupported curveNullPointerException - if either byteArray or peerAddress is nullpublic int getMessageLength()
HandshakeMessagegetMessageLength in class HandshakeMessagepublic PskPublicInformation getHint()
ServerKeyExchange
message. If psk hint not present this will return an empty string.public String toString()
toString in class ECDHServerKeyExchangeCopyright © 2023 Eclipse Foundation. All rights reserved.