Class ExampleScenario1
java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario1
Scenario 1 – End-to-End ML-KEM-512 Life-cycle (Streaming)
This scenario walks through a complete post-quantum key life-cycle 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.
- Generate an
ML-KEM-512
key-pair. - Export its public metadata to JSON.
- Stream-encrypt a local file (detached JWE).
- Stream-decrypt the ciphertext.
- Validate round-trip integrity.
Prerequisite: a valid access-token must be present in the CLI configuration.
Implementation notes (Java 21+):
- All file handling relies on the
Path
API. - 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
AnkaSecureSdk
instance is created inside main
.
- Since:
- 2.1.0
- Author:
- ANKATech – Security Engineering
-
Method Summary
-
Method Details
-
main
Entry-point.
-