All Classes and Interfaces
Class
Description
AlgorithmInfo
describes a supported algorithm in Anka Secure.AnkaSecureSdk
is a high-level facade that applications or CLI tools
can use to interact with the AnkaSecure REST API.AnkaSecureSdkException
is a custom unchecked exception indicating that
an error occurred during a call to the Anka Secure SDK.ExampleMenu is the CLI entry point that provides an interactive menu of example scenarios.
Scenario 1 Example:
Scenario 10 Example (non-streaming):
Generates a post-quantum key (ML-KEM-1024) via
generateKey(GenerateKeySpec)
Exports the resulting key data (JSON) to a file
Encrypts a file (non-streaming) with the newly created key
Decrypts the file (non-streaming)
Validates that the decrypted data matches the original
Scenario 11 Example (non-streaming signatures):
Generates a Dilithium5 key (post-quantum signature algorithm) via
generateKey(GenerateKeySpec)
Signs a file in non-streaming mode
Exports the public key portion (as part of the entire key data)
Verifies the signature in non-streaming mode
Scenario 12 Example:
Generate an RSA-2048 key (oldKid)
Sign a file (streaming) with RSA-2048
Generate a FALCON-1024 key (newKid)
Re-sign the file in streaming mode (oldSignature => newSignature)
Verify the new signature in streaming mode
Scenario 13 Example:
Create a temporary PKCS#12 file containing an RSA keypair + self-signed cert.
Import that .p12 into the encryption service as a new kid.
Sign a file (streaming) using that kid.
Export the key data from that kid (the entire JSON, which includes public key information).
Encrypt using that kid (non-streaming).
Decrypt using that same kid (private key) in the encryption service.
Scenario 14 Example:
List existing keys.
Create (generate) a post-quantum key using
kty="ML-KEM"
and alg="ML-KEM-768"
.
Export the entire key (including public key info) to a JSON file.
Remove the newly generated key from the service.
Import the key back in (public part only) by reading the JSON file and calling importKey
.
Obtain license info and print it.
Scenario 15 Example:
Create (generate) a post-quantum signature key (Dilithium5) via
GenerateKeySpec
.
Export the entire key (JSON), which includes the public key.
Sign a file in streaming mode with the private key on the server.
Verify the signature using verifySignatureUtilityStream
, reading the exported JSON to extract the public key.
Scenario 16 Example:
Create (generate) a post-quantum asymmetric key (ML-KEM-1024).
Export the entire key (JSON), which includes the public key.
Encrypt a file using the public key (utility-stream) without storing that key on the server.
Decrypt the file using the private key (kid) in streaming mode.
Validate that the decrypted content matches the original data.
Scenario 2 Example:
Authenticates with
clientId
and clientSecret
.
Generates an asymmetric RSA key (e.g.Scenario 3 Example:
Authenticates using
clientId
and clientSecret
Generates a symmetric AES-256 key (using generateKey(GenerateKeySpec)
)
Encrypts a file in streaming mode with that key
Decrypts the file in streaming mode
Compares original and decrypted content
Scenario 4 Example:
Generate an RSA-2048 key
Encrypt a file (streaming) with RSA
Generate an ML-KEM-1024 key (post-quantum KEM)
Re-encrypt the file (streaming) from RSA to ML-KEM-1024
Decrypt using ML-KEM-1024 (streaming)
Scenario 5 Example (non-streaming):
Generates a post-quantum asymmetric key (ML-KEM-512)
Exports the entire key data (JSON) to a file
Encrypts a file (non-streaming) with the newly created key
Decrypts the file (non-streaming)
Verifies final decrypted content matches the original
Scenario 6 Example (non-streaming signatures):
Authenticates with
clientId
and clientSecret
Generates a post-quantum Dilithium5 key (using generateKey(GenerateKeySpec)
)
Signs a file in non-streaming mode
Exports the entire key data (JSON), which includes the public portion
Verifies the signature in non-streaming mode
Scenario 7 Example (non-streaming):
Authenticates using
clientId
and clientSecret
Generates a symmetric AES-256 key (using generateKey(GenerateKeySpec)
)
Encrypts a file (non-streaming)
Decrypts the file (non-streaming)
Verifies that the decrypted content matches the original
Scenario 8 Example (non-streaming):
Generates an EC-521 key (classical)
Encrypts a file with EC-521 (non-streaming)
Generates an ML-KEM-768 key (post-quantum KEM)
Re-encrypts the file from EC-521 to ML-KEM-768 (non-streaming)
Decrypts the file using ML-KEM-768 (non-streaming)
Scenario 9 Example (non-streaming):
Generates an RSA-2048 key (oldKid)
Signs a file (non-streaming) with RSA-2048
Generates a Dilithium3 key (newKid)
Re-signs the data from RSA to Dilithium3 (non-streaming)
Verifies the newly created signature using Dilithium3
ExportedKeySpec
is a streamlined model representing an exported
cryptographic key.GenerateKeySpec
is a streamlined model for clients to request
generation of a new cryptographic key, without exposing all fields of
internal classes.ImportKeySpec
is a streamlined model for clients to import an
existing cryptographic key (public or private material, or both),
without exposing the entire internal OpenAPI KeyImportRequest
class.LicenseInfo
describes the licensing details for a particular client
or organization.Pkcs12ImportSpec
holds the information required to import a
private key from a PKCS#12 (.p12) file, provided in Base64-encoded form.