API Version 2.1.0

Developer Portal

Welcome to the VajraShield API reference. Use our REST API to seamlessly integrate Post-Quantum Cryptography (PQC), hardware attestation, and AI active defense into your enterprise applications.

All API endpoints are authenticated using a Zero-Trust session model. Responses are JSON-encoded and follow predictable RESTful standards.

Quickstart Downloads

ZERO-TRUST ARCHITECTURE

Deployment Architecture

VajraShield binds encryption to the physical Silicon DNA of the server executing the cryptographic core. To cater to different enterprise needs, we support two deployment models:

Model A: On-Premise / Sidecar

Recommended for Defense and Critical Infrastructure.
You deploy the VajraShield engine locally on your own hardware. Your application points to http://localhost:8080.

Advantage: The Silicon DNA used for encryption belongs to your exact hardware, ensuring true Zero-Trust isolation.

Model B: Cloud API Gateway

Recommended for rapid integration.
Connect over the internet to a centralized VAJRA API gateway (e.g., https://api.vajrashield.com).

Advantage: Zero maintenance. The VAJRA server uses its own highly secure Cloud Enclave Hardware DNA to lock the keys.

SILICON DNA ANCHORING

Client Login

POST /api/auth/login

Authenticate as a client using your 256-bit Sovereign Mnemonic. Returns a secure HTTP-only session cookie (vajra_session).

ParameterTypeDescription
mnemonic string Your 24-word or 256-bit hex seed.
Request
cURL
Python
curl -X POST https://api.vajrashield.com/api/auth/login \ -H "Content-Type: application/json" \ -d '{"mnemonic": "your-secret-hex-seed"}' \ -c cookies.txt
import requests session = requests.Session() response = session.post( "https://api.vajrashield.com/api/auth/login", json={"mnemonic": "your-secret-hex-seed"} )

Admin Login

POST /api/admin/login

Authenticate as an administrator using the environment Admin Key. This is required for fetching metrics and generating attestations.

ParameterTypeDescription
admin_key string The Master Admin Key (set via ENV).
Request
cURL
curl -X POST https://api.vajrashield.com/api/admin/login \ -H "Content-Type: application/json" \ -d '{"admin_key": "YOUR_ADMIN_KEY"}' \ -c cookies.txt

Generate Hybrid Key

GET /api/pqc/generate_hybrid

Generates a new FIPS 203 compliant ML-KEM-768 keypair combined with a classical X25519 keypair for hybrid zero-downtime integration.

Note: Requires active client or admin session.
Request
cURL
curl -X GET https://api.vajrashield.com/api/pqc/generate_hybrid \ -b cookies.txt
Response (200 OK)
{ "status": "SUCCESS", "pqc_pk": "04e5...", "pqc_sk": "f1b8...", "x25519_pk": "8c21...", "x25519_sk": "12aa...", "engine": "ML-KEM-768 + X25519" }

PQC Encrypt

POST /api/pqc/encrypt

Encrypt sensitive plaintext into a hybrid Post-Quantum envelope using the recipient's ML-KEM public key.

ParameterTypeDescription
data string Sensitive plaintext to encrypt.
public_key string Recipient's ML-KEM-768 public key.
x25519_pk string Optional. Classical X25519 public key.
Request
cURL
curl -X POST https://api.vajrashield.com/api/pqc/encrypt \ -H "Content-Type: application/json" \ -b cookies.txt \ -d '{ "data": "Launch codes: ALPHA-7", "public_key": "recipient_mlkem_pk_hex", "x25519_pk": "recipient_x25519_pk_hex" }'
Response (200 OK)
{ "status": "SUCCESS", "envelope": "vajra_enc_9f2b...", "ai_valuation": { "score": 100.0, "classification": "SOVEREIGN_CORE", "policy_enforced": "STANDARD" } }

PQC Decrypt

POST /api/pqc/decrypt

Decrypt a VAJRA envelope securely. The operation happens strictly inside the Rust Sovereign boundary.

ParameterTypeDescription
envelope string The VAJRA ciphertext envelope.
private_key string Your ML-KEM-768 private key.
x25519_sk string Optional. Classical X25519 private key.
Request
cURL
curl -X POST https://api.vajrashield.com/api/pqc/decrypt \ -H "Content-Type: application/json" \ -b cookies.txt \ -d '{ "envelope": "vajra_enc_9f2b...", "private_key": "your_mlkem_sk_hex", "x25519_sk": "your_x25519_sk_hex" }'

TEE Attestation

GET /api/pqc/attestation

Returns cryptographic proof that the VAJRA server is running within a secured Hardware Enclave (TPM 2.0 / Silicon DNA).

Note: Requires Admin session.
Request
cURL
curl -X GET https://api.vajrashield.com/api/pqc/attestation \ -b cookies.txt

System Metrics

GET /api/admin/system/metrics

Retrieve real-time telemetry from the Autonomous AI SOC and core Rust engine. Used for health dashboards.

Note: Requires Admin session.
Request
cURL
curl -X GET https://api.vajrashield.com/api/admin/system/metrics \ -b cookies.txt

Core Neutralization

POST /api/pqc/neutralize

For Military or Sovereign applications, VAJRA features a Neutralize endpoint (God Mode).

CAUTION: This action is irreversible. If a server is physically compromised, this endpoint immediately and permanently scrubs the memory and destroys cryptographic keys.
Request
cURL
curl -X POST https://api.vajrashield.com/api/pqc/neutralize \ -b cookies.txt