{
  "format": "nodecrypto",
  "formatVersion": 1,
  "protection": "public",
  "manifest": {
    "label": "mlkem-768-decaps",
    "version": "",
    "description": "ML-KEM-768 decapsulation with the full-size (2400-byte) decapsulation key. Checked against an independent implementation's vector.",
    "category": "",
    "inputs": [
      {
        "id": "dk",
        "name": "Decapsulation Key",
        "dataType": "bytes",
        "spec": "2400 B",
        "required": true
      },
      {
        "id": "ct",
        "name": "Ciphertext",
        "dataType": "bytes",
        "spec": "1088 B",
        "required": true
      }
    ],
    "outputs": [
      {
        "id": "ss",
        "name": "Shared Secret",
        "dataType": "bytes"
      }
    ]
  },
  "requires": [],
  "workflow": {
    "id": "wf-790deb3a",
    "name": "mlkem-768-decaps",
    "description": "ML-KEM-768 decapsulation with the full-size (2400-byte) decapsulation key. Checked against an independent implementation's vector.",
    "viewport": {
      "x": 0,
      "y": 0,
      "zoom": 1
    },
    "nodes": [
      {
        "id": "in",
        "type": "cryptoNode",
        "position": {
          "x": 64,
          "y": 64
        },
        "width": 208,
        "data": {
          "id": "in",
          "type": "cryptoNode",
          "nodeType": "workflow-input",
          "label": "Workflow Input",
          "category": "input",
          "description": "Workflow ingress interface. Injects external API inputs or custom-node caller parameters.",
          "inputs": [],
          "outputs": [
            {
              "id": "dk",
              "name": "Decapsulation Key",
              "dataType": "bytes",
              "constraint": {
                "lengths": [
                  2400
                ]
              }
            },
            {
              "id": "ct",
              "name": "Ciphertext",
              "dataType": "bytes",
              "constraint": {
                "lengths": [
                  1088
                ]
              }
            }
          ],
          "size": "small",
          "dynamicOutputs": {
            "min": 0,
            "defaultNamePrefix": "Arg",
            "defaultDataType": "bytes"
          },
          "properties": {}
        }
      },
      {
        "id": "dec",
        "type": "cryptoNode",
        "position": {
          "x": 464,
          "y": 64
        },
        "width": 304,
        "data": {
          "id": "dec",
          "type": "cryptoNode",
          "nodeType": "pqc-mlkem-decaps",
          "label": "ML-KEM Decapsulate",
          "category": "pqc",
          "description": "Decapsulates shared key using secret key and ciphertext",
          "inputs": [
            {
              "id": "secretKey",
              "name": "Secret Key",
              "dataType": "bytes",
              "required": true
            },
            {
              "id": "ciphertext",
              "name": "Ciphertext",
              "dataType": "bytes",
              "required": true
            }
          ],
          "outputs": [
            {
              "id": "sharedSecret",
              "name": "Recovered Shared Key",
              "spec": "32B",
              "dataType": "bytes"
            }
          ],
          "properties": {
            "variant": 768
          },
          "note": "# ML-KEM-768 decapsulation\n- Secret key is the full 2400-byte decapsulation key\n- Vectors: C2SP CCTV `ML-KEM-768.txt` (dk, c, K); Decaps is unchanged between the draft and FIPS 203."
        }
      },
      {
        "id": "out",
        "type": "cryptoNode",
        "position": {
          "x": 864,
          "y": 64
        },
        "width": 208,
        "data": {
          "id": "out",
          "type": "cryptoNode",
          "nodeType": "workflow-output",
          "label": "Workflow Output",
          "category": "input",
          "description": "Workflow egress interface. Gathers final pipeline results for API response or caller return.",
          "inputs": [
            {
              "id": "ss",
              "name": "Shared Secret",
              "dataType": "bytes",
              "required": true
            }
          ],
          "outputs": [],
          "size": "small",
          "dynamicInputs": {
            "min": 0,
            "defaultNamePrefix": "Return",
            "defaultDataType": "bytes"
          },
          "properties": {}
        }
      }
    ],
    "edges": [
      {
        "id": "edge-in-dk-dec-secretKey",
        "source": "in",
        "sourceHandle": "dk",
        "target": "dec",
        "targetHandle": "secretKey",
        "type": "custom",
        "data": {
          "dataType": "bytes"
        }
      },
      {
        "id": "edge-in-ct-dec-ciphertext",
        "source": "in",
        "sourceHandle": "ct",
        "target": "dec",
        "targetHandle": "ciphertext",
        "type": "custom",
        "data": {
          "dataType": "bytes"
        }
      },
      {
        "id": "edge-dec-sharedSecret-out-ss",
        "source": "dec",
        "sourceHandle": "sharedSecret",
        "target": "out",
        "targetHandle": "ss",
        "type": "custom",
        "data": {
          "dataType": "bytes"
        }
      }
    ],
    "metadata": {}
  },
  "definitions": {}
}
