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-cli 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
cli-reference actor of the provisioned demo-cli playground,
carrying the ankasecure.demo.kids catalogue (emitted by the
demo-provisioning tool). Key lifecycle (generate/rotate/export) lives in
cli-admin, not the 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[]).
- Since:
- 3.0.0
- Author:
- ANKATech Solutions Inc.
- 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)
-