# The Protocol of Computation: API Contract ## Overview This document defines the exchange format between the Sovereign Scholastic Academy (Hub) and contributing Virtual Nodes. ## Security Constraints - All transport MUST use TLS 1.3. - All tasks MUST be delivered encrypted; keys are derived per-session using ephemeral Diffie-Hellman exchanges. - Final outputs MUST be signed by the node's private identity key. ## Endpoints ### 1. Node Registration `POST /api/nodes/register` Allows a node to authenticate and join the compute pool. - _Request:_ `{ "nodeId": string, "publicKey": string, "capabilities": object }` - _Response:_ `{ "nodeToken": string, "expiresAt": string }` ### 2. Task Acquisition `GET /api/nodes/tasks` Fetches an encrypted vulnerability enrichment task. - _Headers:_ `Authorization: Bearer ` - _Response:_ `{ "taskId": string, "payload": encrypted_blob, "checksum": string }` ### 3. Result Submission `POST /api/nodes/tasks/:taskId/result` Submits the encrypted, signed result of a computation. - _Request:_ `{ "result": encrypted_blob, "signature": string }` - _Response:_ `{ "status": "acknowledged" | "verified" }`