Class ExampleScenario1
This scenario walks through a complete post-quantum data-plane round-trip using the streaming endpoints of ANKASecure©. In streaming mode the service produces a detached JWE (General-JSON header + raw ciphertext stream) instead of a single compact JWE string.
- Resolve a pre-provisioned
ML-KEM-512key from the demo playground (the SDK is data-plane-only — it does not create keys). - Stream-encrypt a local file (detached JWE).
- Stream-decrypt the ciphertext.
- Validate round-trip integrity.
Prerequisite: a cli.properties for the
playground actor of the demo environment,
carrying the ankasecure.demo.kids catalogue (supplied with the
playground credentials). Key lifecycle (generate/rotate/export) lives in
the Key Management SDK, not in this SDK.
Implementation notes (Java 21+):
- All file handling relies on the
PathAPI. - UTF-8 is enforced explicitly to avoid platform-dependent defaults.
- Temporary artefacts are written under temp_files/.
Thread-safety: the class is stateless and immutable; a fresh
AuthenticatedSdk instance is created inside main(String[]).
- See Also:
-
Method Summary
-
Method Details
-
main
Runs the ML-KEM-512 streaming encryption scenario on a pre-provisioned key.Loads CLI properties, authenticates against ANKASecure©, resolves a pre-provisioned ML-KEM-512 playground key, and delegates to the scenario logic. On any unrecoverable error the JVM terminates via
ExampleUtil.fatal(String, Throwable).- Parameters:
args- command-line arguments (ignored)
-