Class ExampleScenario8

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

public final class ExampleScenario8 extends Object

Scenario 8 – EC-521 → ML-KEM-768 Bulk Re-encryption (Compact JWE)

This scenario performs a non-streaming migration of ciphertext from a classical EC-521 key to a post-quantum ML-KEM-768 key, entirely on the server side (no plaintext exposure):

  1. Generate an EC-521 key and encrypt a file (Compact JWE).
  2. Generate an ML-KEM-768 key.
  3. Re-encrypt the EC ciphertext on the server (EC-521 → ML-KEM-768).
  4. Decrypt the new KEM ciphertext.
  5. Validate round-trip integrity.

Implementation notes (Java 21+):

  • Filesystem operations rely on the Path API.
  • UTF-8 encoding is enforced explicitly for deterministic behaviour.
  • Temporary artefacts are written under temp_files/.

Thread-safety: this class is stateless and immutable.

Since:
2.1.0
Author:
ANKATech – Security Engineering
  • Method Details

    • main

      public static void main(String[] args)
      Entry-point.