{
  "tool": "msc-software--cybersecurity.password_keyspace",
  "name": "Secret entropy and exhaustive-search time (CDU-ICT-SEC-900)",
  "answers": "How many bits of entropy does a random secret of this length and alphabet have, and how long would an offline attacker need to exhaust it?",
  "degree": {
    "id": "competency:msc-software--cybersecurity",
    "code": "CDU-ICT-SEC-900",
    "name": "MSc Software & Cybersecurity",
    "version": "1.0.0"
  },
  "reference": "NIST SP 800-63B (Rev. 3) §5.1.1 memorised secrets, minimum length 8 (check the revision in force); entropy of a uniformly random string = L·log2(N)",
  "endpoint": "/faculty/msc-software--cybersecurity/password_keyspace",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "length",
      "alphabetSize",
      "guessesPerSecond"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "length": {
        "type": "number",
        "description": "Characters in the secret",
        "minimum": 1,
        "maximum": 256
      },
      "alphabetSize": {
        "type": "number",
        "description": "Characters the secret is drawn from (62 = a–z A–Z 0–9)",
        "minimum": 2,
        "maximum": 100000
      },
      "guessesPerSecond": {
        "type": "number",
        "description": "Attacker’s offline guessing rate",
        "minimum": 1
      },
      "minimumLength": {
        "type": "number",
        "description": "Length minimum the policy applies",
        "minimum": 1,
        "maximum": 256,
        "default": 8
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "entropyBits",
      "log10Keyspace",
      "log10YearsToExhaust",
      "meetsMinimumLength"
    ],
    "properties": {
      "entropyBits": {
        "type": "number",
        "description": "L·log2(N)"
      },
      "log10Keyspace": {
        "type": "number",
        "description": "log10(N^L)"
      },
      "log10YearsToExhaust": {
        "type": "number",
        "description": "log10 of the years to try every secret"
      },
      "meetsMinimumLength": {
        "type": "boolean",
        "description": "Length ≥ the minimum"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "length": 12,
    "alphabetSize": 62,
    "guessesPerSecond": 10000000000,
    "minimumLength": 8
  }
}