Package org.apache.sshd.common.kex
Class SNTRUP761.Client
- java.lang.Object
-
- org.apache.sshd.common.kex.SNTRUP761.Client
-
- All Implemented Interfaces:
KeyEncapsulationMethod.Client
- Enclosing class:
- SNTRUP761
static class SNTRUP761.Client extends java.lang.Object implements KeyEncapsulationMethod.Client
-
-
Constructor Summary
Constructors Constructor Description Client()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
extractSecret(byte[] encapsulated)
Extracts the secret from an encapsulation ciphertext.int
getEncapsulationLength()
Gets the required encapsulation length in bytes.byte[]
getPublicKey()
Gets the KEM public key.void
init()
Initializes the KEM and generates a new key pair.
-
-
-
Method Detail
-
init
public void init()
Description copied from interface:KeyEncapsulationMethod.Client
Initializes the KEM and generates a new key pair.- Specified by:
init
in interfaceKeyEncapsulationMethod.Client
-
getPublicKey
public byte[] getPublicKey()
Description copied from interface:KeyEncapsulationMethod.Client
Gets the KEM public key.- Specified by:
getPublicKey
in interfaceKeyEncapsulationMethod.Client
- Returns:
- the KEM public key.
-
extractSecret
public byte[] extractSecret(byte[] encapsulated)
Description copied from interface:KeyEncapsulationMethod.Client
Extracts the secret from an encapsulation ciphertext.- Specified by:
extractSecret
in interfaceKeyEncapsulationMethod.Client
- Parameters:
encapsulated
- ciphertext to process.- Returns:
- the secret from an encapsulation ciphertext.
-
getEncapsulationLength
public int getEncapsulationLength()
Description copied from interface:KeyEncapsulationMethod.Client
Gets the required encapsulation length in bytes.- Specified by:
getEncapsulationLength
in interfaceKeyEncapsulationMethod.Client
- Returns:
- the length required for a valid encapsulation ciphertext.
-
-