# Security Math – Shamir Secret Sharing Calculator

> Security Math – Shamir Secret Sharing Calculator is a paid API for AI agents from security-math.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Computes Shamir t-of-n secret sharing statistics: qualifying subsets, loss tolerance, recovery probability, and compromise odds — no secrets ever transmitted.

## Facts

- Endpoint: GET https://security-math.x402tookit.com/shamir-threshold?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/security-math-shamir-secret-sharing-calculator-b2fc9b86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0JWkdEPrW2H9IEaAWJcIF

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability security-math-shamir-secret-sharing-calculator-b2fc9b86
```

Example prompt: For a 5-of-8 Shamir secret sharing setup where each share has a 90% chance of surviving and a 0.5% chance of being independently compromised, calculate the recovery probability, breach odds, number of qualifying subsets, and how many shares I can afford to lose.

## When to prefer this

Choose this endpoint when you need to reason about the mathematical properties of a Shamir t-of-n configuration without transmitting any actual secret material. It is the right choice for capacity planning (how many shares to create), risk assessment (loss and compromise probabilities), and compliance documentation of key management schemes. Prefer it over generic combinatorics tools because it is purpose-built for Shamir statistics and returns cryptography-specific vocabulary (qualifying sets, threshold, breach probability) directly.

## Known failure modes

- t greater than n — returns validation error (t must be ≤ n)
- n outside 2–255 range — returns out-of-bounds error
- t less than 2 — returns validation error
- shareSurvival or shareCompromise outside 0–1 range — returns parameter error
- Missing required n or t query parameters — returns 400 bad request
- Payment failure or missing x402 header — returns 402 Payment Required

## How this service works

Shamir t-of-n secret sharing maths: qualifying subsets, loss tolerance, recovery and compromise odds. Counts only, no secrets.

## Output

Returns a JSON object with: total shares (n), threshold (t), count of all qualifying subsets, minimal qualifying sets, number of shares that can be lost (sharesYouCanLose), shares that reveal nothing (sharesThatRevealNothing), probability the secret is recoverable (probabilityRecoverable), probability it has been breached (probabilityBreached), storage overhead multiple, a human-readable verdict and summary, and optional degraded/disclaimer flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "n",
      "t"
     ],
     "properties": {
      "n": {
       "type": "integer",
       "description": "Total shares created, 2 to 255"
      },
      "t": {
       "type": "integer",
       "description": "Threshold: shares needed to reconstruct, 2 to n"
      },
      "shareSurvival": {
       "type": "number",
       "description": "Probability each share is still available when needed, 0 to 1 (default 0.9)"
      },
      "shareCompromise": {
       "type": "number",
       "description": "Probability each share is independently stolen or leaked, 0 to 1 (default 0.01)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "n": {
       "type": [
        "null",
        "number"
       ]
      },
      "t": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "allSubsets": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "perShareSize": {
       "type": [
        "null",
        "string"
       ]
      },
      "storageMultiple": {
       "type": [
        "null",
        "nu
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/security-math-shamir-secret-sharing-calculator-b2fc9b86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from security-math.x402tookit.com](https://www.zero.xyz/host/security-math.x402tookit.com/llms.txt)
