# Discrete Logarithm Problem

<figure><img src="/files/2RWFd8eLlZEgDIWH7sx8" alt=""><figcaption></figcaption></figure>

This lesson introduces the **Discrete Logarithm Problem (DLP)** — a core concept used in cryptosystems like **ECDSA**. To make sense of it, we first need to understand **cyclic groups** and **generators**.

***

### Cyclic Groups

A group is called **cyclic** if its elements start repeating after a certain number of operations.

* The repeating cycle is driven by a special element called the **generator**.
* The **generator (g)** can produce *every element* in the group by repeated application of the group operation.

📌 *Example:*

* Consider a group **G** with generator **g**.
* Every element **a** in G can be written as **gⁱ = a**, for some integer i.

👉 This property is fundamental to cryptography because generators allow us to create predictable yet hard-to-reverse structures.

<figure><img src="/files/vLOuqu7nqPPOU6ODIicD" alt=""><figcaption></figcaption></figure>

### The Discrete Logarithm Problem (DLP)

The DLP can be stated as follows:

* Let **p** be a large prime.
* Let **ℤₚ\*** be the group of integers modulo **p**.
* Let **g** be a generator of this group.
* For an element **β ∈ ℤₚ\***, we want to find **x** such that:

**gˣ ≡ β (mod p)**

***

#### Why It’s Hard

* When **p** is small, solving for **x** is easy.
* But as **p** becomes very large (hundreds or thousands of digits), finding **x** becomes **computationally infeasible**.
* This hardness is exactly what gives cryptosystems their **security**.

<figure><img src="/files/AdY6yIOxqJCGOnJqn3TX" alt=""><figcaption></figcaption></figure>

### Generalized DLP

The Discrete Logarithm Problem is not limited to integers modulo a prime.

* It can be defined over **any cyclic group**.
* This generality makes the DLP extremely versatile and a cornerstone of **modern cryptography**.

For example, **ECDSA** uses the DLP in the context of **elliptic curve groups**, where the problem remains computationally hard.

<figure><img src="/files/FzDavg1vpYSXOn3uZh1C" alt=""><figcaption></figcaption></figure>

### Key Takeaway

* The **Discrete Logarithm Problem** asks: given **g, β, and p**, find **x** such that **gˣ ≡ β (mod p)**.
* Computing the forward direction (gˣ mod p) is easy, but reversing it (finding x) is hard when p is large.
* This one-way property is what makes DLP the backbone of cryptographic security in systems like **ECDSA**.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-primitives-digital-signatures/ecdsa-prerequisites/discrete-logarithm-problem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
