Nirmion
Help Find a tool

MODULAR ARITHMETIC / UNKNOWN EXPONENT

Discrete Logarithm Prime Calculator

Solve base raised to x congruent to a target modulo a bounded prime. Review the bounded integer domain, method trace, and verification evidence with the result.

  • 01 Calculated in this tab
  • 02 Values stay in this browser tab
  • 03 Use boundary

Conversion input

Known value

Filter by unit name, symbol, or code. Your current selections remain available.

Preparing the calculator...

METHOD / WORKED EXAMPLE

Audit the Discrete Logarithm Prime result step by step

Solve base raised to x congruent to a target modulo a bounded prime. The result panel preserves the defining recurrence, residue, or counting identity so the output can be checked without trusting an unexplained number.

WORKED DEFAULT

Check the calculation with the default inputs

For base 3, target 13, and prime 17, x = 4 because 3^4 = 81 leaves remainder 13 modulo 17.

  1. Build baby stepsStore powers 3^j modulo 17
  2. Advance giant stepsMatch target-scaled blocks
  3. Verify exponent3^4 mod 17 = 13

READ THE RESULT

Interpret the output in context

A missing solution means the target is outside the subgroup generated by the supplied base, not that the prime modulus is invalid.

ASSUMPTIONS AND LIMITS

Know where the model stops

  • The modulus is prime and the search covers exponents zero through p minus two.
  • The reported candidate is verified by modular exponentiation.

The modulus cap bounds memory and square-root search work; this educational solver is unsuitable for attacking cryptographic keys.

COMMON QUESTIONS

Discrete Logarithm Prime Calculator FAQs

What definition does Discrete Logarithm Prime Calculator use?

Build baby powers, advance target-scaled giant steps by the inverse width power, and verify the least intersecting exponent. The target must lie in the subgroup generated by the normalized nonzero base. Inputs remain whole numbers inside the displayed domain, and the page never rounds a decimal into an accepted integer. This keeps the reported result tied to one explicit mathematical definition rather than an unstated convention.

How can I verify the Discrete Logarithm Prime output?

A missing solution means the target is outside the subgroup generated by the supplied base, not that the prime modulus is invalid. Raise the base to the displayed exponent with the existing modular-power tool and compare residues. Reuse the displayed recurrence, congruence, or counting identity with the same inputs. The verification evidence checks this calculator's result, but it does not establish assumptions or conclusions outside the stated mathematical domain.

Why is the Discrete Logarithm Prime input bounded?

The modulus cap bounds memory and square-root search work; this educational solver is unsuitable for attacking cryptographic keys. The search intentionally cannot be used for production-size cryptographic groups. A finite limit prevents browser stalls and avoids presenting an unsafe floating-point integer as exact. Work beyond that limit belongs in arbitrary-precision software with explicit resource controls and independent validation.

Use boundary

Calculation path

Build baby powers, advance target-scaled giant steps by the inverse width power, and verify the least intersecting exponent.

Calculation path

base^x is congruent to target modulo p.