Class ExampleScenario9

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

public final class ExampleScenario9 extends Object
Scenario 9 — RSA-3072 → ML-DSA-87 Bulk Re-sign (Compact JWS).

This scenario migrates a Compact JWS signature from a classical RSA-3072 key to a post-quantum ML-DSA-87 key without uploading the payload again.

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-resign2-source (RSA-3072) and target cli-resign2-target (ML-DSA-87). 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 RSA-3072 source and ML-DSA-87 target kids.
  2. Sign a file under the source (compact JWS).
  3. Verify the RSA-based JWS.
  4. Re-sign the payload on the server (RSA → ML-DSA).
  5. Verify the new ML-DSA JWS.

Implementation notes (Java 21+):

  • Filesystem APIs rely on Path.
  • UTF-8 encoding is enforced explicitly for deterministic behaviour.
  • Temporary artefacts reside under temp_files/.

Thread-safety: this 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 RSA-3072 to ML-DSA-87 compact JWS 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)