Class PqcSessionManager

java.lang.Object
co.ankatech.ankasecure.sdk.transport.PqcSessionManager

public class PqcSessionManager extends Object
Manages PQC transport sessions: generates PQC key pairs, performs handshake, unwraps AES keys, and caches sessions until TTL expires.
  • Constructor Details

    • PqcSessionManager

      public PqcSessionManager(co.ankatech.ankasecure.openapi.client.AnkaSecureOpenApiClient client, PqcTransportConfig config, String kemAlgorithm)
      Constructs manager with the given client, config, and KEM algorithm.
      Parameters:
      client - AnkaSecure client to perform handshake
      config - PQC transport config
      kemAlgorithm - the post-quantum KEM algorithm name (e.g. "ML-KEM-1024")
  • Method Details

    • getSession

      public PqcTransportSession getSession() throws co.ankatech.secure.client.invoker.ApiException
      Returns an active session, or performs a new handshake if none exists or TTL expired.
      Returns:
      active transport session containing sessionId and AES key
      Throws:
      co.ankatech.secure.client.invoker.ApiException - on handshake or unwrap errors
    • invalidateSession

      public void invalidateSession()
      Invalidates the current session, forcing handshake on next request.