Package org.apache.sshd.common.kex
Class XDH
java.lang.Object
org.apache.sshd.common.kex.AbstractDH
org.apache.sshd.common.kex.XDH
Provides Diffie-Hellman SSH key exchange algorithms for the Montgomery curves specified in RFC 8731.
- See Also:
-
Field Summary
Fields inherited from class org.apache.sshd.common.kex.AbstractDH
myKeyAgree
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
Lazy-called byAbstractDH.getE()
if the public key data has not been generated yet.protected byte[]
Lazy-called byAbstractDH.getK()
if the shared secret data has not been calculated yetgetHash()
void
void
void
setF
(byte[] f) Methods inherited from class org.apache.sshd.common.kex.AbstractDH
checkKeyAgreementNecessity, getE, getK, isPublicDataAvailable, isSharedSecretAvailable, stripLeadingZeroes, toString
-
Field Details
-
curve
-
f
protected byte[] f
-
-
Constructor Details
-
XDH
- Throws:
Exception
-
-
Method Details
-
calculateE
Description copied from class:AbstractDH
Lazy-called byAbstractDH.getE()
if the public key data has not been generated yet.- Specified by:
calculateE
in classAbstractDH
- Returns:
- The calculated public key data
- Throws:
Exception
- If failed to generate the relevant data
-
setF
public void setF(byte[] f) - Specified by:
setF
in classAbstractDH
-
putE
- Overrides:
putE
in classAbstractDH
-
putF
- Overrides:
putF
in classAbstractDH
-
calculateK
Description copied from class:AbstractDH
Lazy-called byAbstractDH.getK()
if the shared secret data has not been calculated yet- Specified by:
calculateK
in classAbstractDH
- Returns:
- The shared secret data
- Throws:
Exception
- If failed to calculate it
-
getHash
- Specified by:
getHash
in classAbstractDH
- Throws:
Exception
-