Keyspace Size Calculator

Return the exact keyspace size for independent positions chosen from a fixed-size alphabet, with bounded output materialization.

Description

A fixed-length keyspace has A choices at each of L positions when every position can use the same alphabet independently.

A fixed-length keyspace has A choices at each of L positions when every position can use the same alphabet independently. Its size is a count of possible strings rather than a measure of how a particular generator chooses among them.1

Return the exact keyspace size for independent positions chosen from a fixed-size alphabet, with bounded output materialization.

When to use Keyspace Size Calculator

Use this tool to return the exact keyspace size for independent positions chosen from a fixed-size alphabet, with bounded output materialization.

Choose the text, counts, explicit reference time or format parameters requested by this tool. Follow the stated byte, epoch-time and randomness assumptions.

How to use Keyspace Size Calculator and understand its results

  1. Choose the text, counts, explicit reference time or format parameters requested by this tool. Follow the stated byte, epoch-time and randomness assumptions.
  2. Enter alphabetSize, length using the field table and calculation rules, then run the tool.
  3. Read keyspace. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
alphabetSizeAlphabet sizeinteger; minimum: 1; maximum: 9007199254740991Required
lengthPosition countinteger; minimum: 0; maximum: 10000Required

Enter a positive safe-integer alphabetSize and an integer length from 0 through 10,000. Exact big-integer exponentiation returns the keyspace as a decimal string. Length zero produces 1, representing the single empty string; alphabet size one also produces 1 at every accepted length.

keyspace = alphabetSize^length

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
keyspaceExact keyspace sizestring
json
{
  "input": {
    "alphabetSize": 10,
    "length": 4
  },
  "output": {
    "keyspace": "10000"
  }
}

Limitations and assumptions

It does not enumerate candidates, enforce password composition rules or assess bias and correlations. Output materialization is bounded by the length limit. The potentially large string is not directly a safe numeric input to tools that require finite safe-integer keyspaces.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Entropy Bits From Charset × Length: Calculate ideal entropy for independent uniform draws from a supplied character-set size. For a complementary task, use Brute-Force Time Estimate At Hash Rate: Estimate exhaustive and average search time for a known finite keyspace and a positive constant guess rate, assuming one uniformly located target.

References

  1. Keyspace Size Calculator — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies