bcrypt Cost Time Scaling Lookup

Scale caller measured bcrypt time under explicit ideal2^cost assumption only, not recommended cost/hardware benchmark or password security guarantee.

Description

A bcrypt cost exponent implies an idealized doubling of work for each increment.

A bcrypt cost exponent implies an idealized doubling of work for each increment.1

Scaling one timing measurement does not run bcrypt or choose a secure deployment cost. Use bcrypt Cost Time Scaling Lookup to evaluate the supplied inputs under the specific model below.

When to use bcrypt Cost Time Scaling Lookup

Use bcrypt Cost Time Scaling Lookup to evaluate the supplied inputs under the specific model below. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.

How to use bcrypt Cost Time Scaling Lookup and understand its results

  1. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
  2. Enter Observed bcrypt cost, Observed bcrypt milliseconds, Target bcrypt cost using the field table and validation rules below, then run the tool.
  3. Read Ideal doubling scaled milliseconds, Cost doubling factor and interpret units, signs, ordering and placeholders as explained below.
  4. If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
Input fieldMeaningValue typeRequirement
observedBcryptCostObserved bcrypt costnumberRequired; constraints below
observedBcryptMillisecondsObserved bcrypt millisecondsnumberRequired; constraints below
targetBcryptCostTarget bcrypt costnumberRequired; constraints below

Enter observed and target integer bcrypt costs from 4 to 31 and a positive observed hash time in ms. Multiply time by 2 raised to target cost minus observed cost and return that factor and estimate. Lower target costs yield a fractional factor. No bcrypt hashing or hardware benchmark is executed; overhead and implementation differences may change actual time.

factor = 2^(targetCost−observedCost); estimatedTimeMs = observedTimeMs×factor

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
idealDoublingScaledMillisecondsIdeal doubling scaled millisecondsnumber
costDoublingFactorCost doubling factornumber
json
{
  "input": {
    "observedBcryptCost": 10,
    "observedBcryptMilliseconds": 100,
    "targetBcryptCost": 12
  },
  "output": {
    "idealDoublingScaledMilliseconds": 400,
    "costDoublingFactor": 4
  }
}

Limitations and assumptions

Scaling one timing measurement does not run bcrypt or choose a secure deployment cost. Apply the exact scope and assumptions described above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.

Alternative or Complementary methods

Use KDF Iterations Doubling-Time Check for a related task: Iteration scaling compares an observed work factor with an observed timing factor.

Use Argon2 Memory Tradeoff Note Lookup for a related task: Argon2 memory is declared per invocation and shared among its lanes.

References

  1. bcrypt Cost Time Scaling Lookup — tool.io

Similar or alternative tools

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