Welcome to ankasecure

ANKASecure© — Crypto Agility Orchestration Platform

Transforming cryptographic change from disruptive engineering projects into controlled, policy-driven operations.


How It Works

Most platforms force your application to specify a cryptographic algorithm directly. ANKASecure© inverts that model.

Your application references a Key ID. The platform resolves the algorithm, hybrid configuration, lifecycle state, and policy constraints dynamically at runtime.

App references Key ID
  → Platform maps: Key ID → Algorithm Family → Execution Engine
  → Policy enforces: hybrid requirements, jurisdiction rules, lifecycle state
  → Result: cryptographic operation executed — algorithm invisible to caller

When your organization needs to migrate from AES-256 to a composite ML-KEM + AES hybrid, you update a policy — not your application code.


Authentication

All API calls require a Bearer JWT. Applications authenticate using client credentials — a clientId and clientSecret issued by the platform administrator for your tenant.

Obtain a token

curl -s -X POST https://<host>/api/v3/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grantType": "client_credentials",
    "clientId": "your-client-id",
    "clientSecret": "your-client-secret"
  }'
{
  "accessToken": "eyJ...",
  "tokenType": "Bearer",
  "expiresIn": 3600
}

Use the token on every request

Authorization: Bearer eyJ...

Tokens are scoped to a tenant and carry the permissions granted to the client application. They are not transferable across environments or tenants.

Scopes

ScopePermission
crypto.encryptEncrypt using keys assigned to the caller
crypto.decryptDecrypt
crypto.signSign data
crypto.verifyVerify signatures
crypto.keys.readList and inspect keys available to the caller
crypto.keys.createCreate keys
crypto.keys.rotateRotate keys

API Reference

Cryptographic Operations

MethodEndpointScope requiredDescription
POST/api/v3/crypto/encryptcrypto.encryptEncrypt a payload using a key ID
POST/api/v3/crypto/decryptcrypto.decryptDecrypt a payload
POST/api/v3/crypto/signcrypto.signSign data — classical, PQC, or composite hybrid
POST/api/v3/crypto/verifycrypto.verifyVerify a digital signature
POST/api/v3/crypto/reencryptcrypto.encrypt + crypto.decryptRe-encrypt under a new key — no plaintext exposure
POST/api/v3/crypto/reencrypt/streamcrypto.encrypt + crypto.decryptStreaming re-encryption for large files (multi-GB)

Key Management

MethodEndpointScope requiredDescription
POST/api/v3/crypto/keyscrypto.keys.createCreate a key (classical, PQC, or composite hybrid)
GET/api/v3/crypto/keyscrypto.keys.readList keys available to the caller
GET/api/v3/crypto/keys/{keyId}crypto.keys.readGet key metadata and algorithm configuration
POST/api/v3/crypto/keys/{keyId}/rotatecrypto.keys.rotateRotate a key — zero-downtime, backward-compatible
POST/api/v3/crypto/keys/{keyId}/revokecrypto.keys.rotateRevoke a key immediately

Quick Start

Step 1 — Authenticate

curl -s -X POST https://<host>/api/v3/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grantType": "client_credentials",
    "clientId": "acme-app",
    "clientSecret": "••••••••"
  }'

Step 2 — Create a key

curl -s -X POST https://<host>/api/v3/crypto/keys \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "customer-data-key",
    "type": "COMPOSITE_HYBRID",
    "securityLevel": "HIGH"
  }'
{
  "keyId": "customer-data-key",
  "type": "COMPOSITE_HYBRID",
  "algorithm": "ML-KEM-768+AES-GCM-256",
  "status": "ACTIVE",
  "createdAt": "2026-04-13T10:00:00Z"
}

The algorithm is resolved by the tenant's cryptographic policy. Your application never hardcodes it.

Step 3 — Encrypt

curl -s -X POST https://<host>/api/v3/crypto/encrypt \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "customer-data-key",
    "plaintext": "sensitive payload"
  }'
{
  "ciphertext": "BASE64_ENCODED_CIPHERTEXT",
  "keyId": "customer-data-key",
  "algorithm": "ML-KEM-768+AES-GCM-256",
  "correlationId": "req-abc-123"
}

Step 4 — Decrypt

curl -s -X POST https://<host>/api/v3/crypto/decrypt \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "customer-data-key",
    "ciphertext": "BASE64_ENCODED_CIPHERTEXT"
  }'
{
  "plaintext": "sensitive payload",
  "keyId": "customer-data-key",
  "correlationId": "req-abc-124"
}

Key Types

TypeAlgorithm familiesTypical use
SYMMETRICAES-GCM-256, ChaCha20-Poly1305, Camellia-GCMBulk data encryption
ASYMMETRIC_CLASSICALRSA-OAEP, ECDSA, Ed25519Signatures, asymmetric encryption
POST_QUANTUMML-KEM (Kyber), ML-DSA (Dilithium), SLH-DSA (SPHINCS+)PQC-only workloads
COMPOSITE_HYBRIDClassical + PQC combined — e.g. ML-KEM-768 + AES-GCM-256Hybrid transition — recommended

125+ algorithms across 21+ families. The algorithm is never specified in your API call — it is resolved by policy.


SDK & CLI

Java SDK

ANKASecureClient client = ANKASecureClient.builder()
    .baseUrl("https://<host>")
    .clientId("acme-app")
    .clientSecret("••••••••")
    .build();

// Create a key
client.keys().create(KeyRequest.composite("customer-data-key", SecurityLevel.HIGH));

// Encrypt
EncryptResponse resp = client.crypto()
    .encrypt(EncryptRequest.of("customer-data-key", plaintextBytes));

// Decrypt
byte[] plaintext = client.crypto()
    .decrypt(DecryptRequest.of("customer-data-key", resp.getCiphertext()));

CLI

# Authenticate
ankasecure auth login --client-id acme-app --client-secret ••••••••

# Create a key
ankasecure keys create --key-id customer-data-key --type COMPOSITE_HYBRID

# Encrypt a file
ankasecure encrypt --key customer-data-key --input data.bin --output data.enc

# Decrypt
ankasecure decrypt --key customer-data-key --input data.enc --output data.bin

# Stream re-encrypt a large archive
ankasecure reencrypt \
  --source-key legacy-aes-key \
  --target-key pqc-composite-key \
  --input archive.bin \
  --output archive-pqc.bin

Error Responses

All errors follow RFC 7807 — Content-Type: application/problem+json.

{
  "type": "https://api.ankatech.co/problems/key-not-found",
  "title": "Key Not Found",
  "status": 404,
  "detail": "Key 'customer-data-key' does not exist for this tenant.",
  "instance": "/api/v3/crypto/encrypt"
}
StatusMeaning
400Invalid request — see detail for field-level validation errors
401Missing, expired, or invalid JWT
403Insufficient scope for this operation
404Key or resource not found in this tenant
409Conflict — e.g., key ID already exists
412Key lifecycle state prevents this operation — key may be revoked or expired

Multi-Tenant Isolation

Every API call is automatically scoped to the tenant embedded in the JWT. There are no tenant parameters in requests.

  • A client from Tenant A cannot read, use, or discover keys from Tenant B.
  • Keys, policies, and audit logs are fully isolated per tenant.
  • This isolation is architectural — it cannot be bypassed through any API parameter.

Environments

EnvironmentBase URLNotes
Staginghttps://demo.ankatech.coMirrors production

Tokens issued in one environment are not valid in another. clientId and clientSecret credentials are environment-specific.


What to Read Next

GoalSection
Full request/response schemasAPI Reference
Step-by-step integration walkthroughGuides → Quick Start
Composite and hybrid key patternsGuides → Composite Keys
Streaming large filesGuides → File Operations
Java SDK setupGuides → Java SDK
CLI command referenceGuides → CLI

ANKASecure© | Crypto Agility Orchestration Platform | ANKATech Solutions INC