Class ExampleScenario12

java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario12

public final class ExampleScenario12 extends Object
Scenario 12 — ML-DSA-65 → SLH-DSA-SHA2-128S Streaming Re-sign (Detached JWS).

This scenario migrates a detached JWS signature from an ML-DSA-65 key to a SLH-DSA-SHA2-128S key, fully server-side — no payload re-upload.

The SDK is data-plane-only: it does not create keys. This scenario operates on the pre-provisioned granted cross-kid pair of the demo-cli playground — source cli-resign3-source (ML-DSA-65) and target cli-resign3-target (SLH-DSA-SHA2-128S). The cli-reference actor holds the cross-kid RESIGN grant on this pair plus the atomic sign/verify grants on each endpoint.

  1. Resolve the granted ML-DSA-65 source and SLH-DSA-SHA2-128S target kids.
  2. Stream-sign a file under the source.
  3. Re-sign the existing detached JWS on the server (ML-DSA-65 → SLH-DSA-SHA2-128S).
  4. Stream-verify the new SLH-DSA signature.

Implementation notes (Java 21+):

  • All filesystem work relies on Path.
  • UTF-8 encoding is enforced explicitly for deterministic behaviour.
  • Temporary artefacts reside under temp_files/.

Thread-safety: the class is stateless and immutable.

Since:
3.0.0
Author:
ANKATech Solutions Inc.
See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Runs the ML-DSA-65 to SLH-DSA-SHA2-128S streaming re-sign scenario.

      Loads CLI properties, authenticates against ANKASecure©, and delegates to the scenario logic. On any unrecoverable error the JVM terminates via ExampleUtil.fatal(String, Throwable).

      Parameters:
      args - command-line arguments (ignored)