Class PqcTransportConfig
java.lang.Object
co.ankatech.ankasecure.sdk.transport.PqcTransportConfig
Configuration holder for PQC transport encryption settings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe KEM used when "pqc.kem.algorithm" is absent.static final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionPqcTransportConfig(Properties props) Reads PQC transport settings from provided CLI properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StringresolveKemAlgorithm(String configured) Resolves a "pqc.kem.algorithm" value to the catalogue name of the KEM it names.
-
Field Details
-
KEY_ENABLED
- See Also:
-
KEY_SESSION_TTL
- See Also:
-
KEY_KEM_ALGORITHM
- See Also:
-
DEFAULT_KEM_ALGORITHM
The KEM used when "pqc.kem.algorithm" is absent.- See Also:
-
-
Constructor Details
-
PqcTransportConfig
Reads PQC transport settings from provided CLI properties.When the transport is enabled, "pqc.kem.algorithm" must name one of
supportedKemAlgorithms(); it is resolved here, so a misconfigured KEM is refused when the client is built rather than at the first request.- Parameters:
props- CLI properties containing pqc.* keys- Throws:
InvalidInputException- when the transport is enabled and the configured KEM is not supported
-
-
Method Details
-
resolveKemAlgorithm
Resolves a "pqc.kem.algorithm" value to the catalogue name of the KEM it names.- Parameters:
configured- the configured value, case-insensitive;nullmeans the default- Returns:
- the catalogue name (e.g.
"HQC-128"for"hqc-128") - Throws:
InvalidInputException- when the value is not one ofsupportedKemAlgorithms()
-
supportedKemAlgorithms
- Returns:
- the catalogue names of the KEMs "pqc.kem.algorithm" accepts
-
getKemAlgorithm
- Returns:
- the KEM the handshake uses: its catalogue name when the transport is enabled, the configured value as written otherwise
-
isEnabled
public boolean isEnabled()- Returns:
- true if PQC transport encryption is enabled
-
getSessionTtl
- Returns:
- session time-to-live duration
-