Konstas.Engineering Notes
Networking · Cybersecurity · Infrastructure
Cryptography

Public-Key Cryptosystems Based on the Discrete Logarithm Problem

Articles · 2026 · Ioannis (John) Konstas

Public-key cryptography depends on trapdoor one-way functions: mathematical operations that are computationally efficient in the forward direction but intractable to reverse without specific private trapdoor knowledge. Alongside integer factorization (the basis of RSA), the Discrete Logarithm Problem (DLP) constitutes the primary mathematical foundation for secure key exchange, asymmetric encryption, and digital signature algorithms across the global internet infrastructure.

                    ┌────────────────────────────────────────────────────────┐
                    │               Discrete Logarithm Problem               │
                    │               Given (g, p, y), find x in:             │
                    │                    y ≡ gˣ (mod p)                      │
                    └───────────────────────────┬────────────────────────────┘
                                                │
       ┌────────────────────────┬───────────────┴───────────────┬────────────────────────┐
       ▼                        ▼                               ▼                        ▼
┌──────────────┐      ┌────────────────────┐          ┌────────────────────┐    ┌─────────────────┐
│ Multiplicative│     │   Diffie-Hellman   │          │      ElGamal       │    │ Elliptic Curves │
│ Group ℤₚ*    │      │    Key Exchange    │          │  Asymmetric Scheme │    │     E(𝔽ₚ)       │
│ • Order p-1  │      │ • Forward Secrecy  │          │ • IND-CPA Security │    │ • Chord & Tangent│
│ • Generators │      │ • CDH / DDH Proofs │          │ • Homomorphic Mult │    │ • ECDLP Hardness│
└──────────────┘      └────────────────────┘          └────────────────────┘    └─────────────────┘

1. The Multiplicative Group ℤp* and the DLP

Group Structure & Algebraic Properties

For any prime p, the set of integers coprime to p forms a finite cyclic group under modular multiplication, denoted ℤp*:

ℤp* = {1, 2, 3, ..., p − 1}

The Discrete Logarithm Problem Formulation

Given a generator g ∈ ℤp*, a modulus p, and a target element y ∈ ℤp*, find the unique integer x ∈ ℤp−1 such that:

y ≡ gˣ (mod p)

2. Diffie-Hellman Key Exchange (DHKE)

Introduced in 1976 by Whitfield Diffie and Martin Hellman, DHKE was the first published mechanism enabling two parties to establish a shared cryptographic secret over an unencrypted channel without transmitting the secret itself.

       Alice (Private: a)                                  Bob (Private: b)
  ─────────────────────────────                       ───────────────────────────
   Public Parameters: (p, g)                           Public Parameters: (p, g)
   
   Computes: A = gᵃ mod p          ─── Public A ───►   Computes: B = gᵇ mod p
                                   ◄─── Public B ───
   
   Computes Shared Secret:                             Computes Shared Secret:
   K = Bᵃ mod p                                        K = Aᵇ mod p
     = (gᵇ)ᵃ = gᵃᵇ mod p                                 = (gᵃ)ᵇ = gᵃᵇ mod p

Protocol Execution

  1. Parameter Selection: Public prime p and generator g ∈ ℤp*.
  2. Key Generation:
    • Alice picks private exponent a ∈ [2, p − 2] and sends A = gᵃ mod p.
    • Bob picks private exponent b ∈ [2, p − 2] and sends B = gᵇ mod p.
  3. Shared Secret Derivation:
    • Alice computes: K = Bᵃ mod p = gᵃᵇ mod p.
    • Bob computes: K = Aᵇ mod p = gᵃᵇ mod p.
    • Both arrive at identical secret K = gab mod p.

Why Diffie-Hellman Is Critical


3. ElGamal Public-Key Encryption

Published in 1985 by Taher Elgamal, this system adapted Diffie-Hellman into a full asymmetric encryption and digital signature scheme.

                                  ElGamal Encryption
  
   Public Key: (p, g, y = gˣ mod p)                    Private Key: x
  
   Sender (Alice):                                     Receiver (Bob):
   - Choose ephemeral random k                         - Receives (c₁, c₂)
   - Compute c₁ = gᵏ mod p                             - Computes shared mask: s = c₁ˣ mod p
   - Compute shared mask s = yᵏ mod p                  - Computes s⁻¹ mod p via EEA
   - Compute c₂ = m · s mod p                          - Recovers message: m = c₂ · s⁻¹ mod p
   
   Ciphertext: C = (c₁, c₂)

Mathematical Specification

  1. Key Generation (Bob): Selects private key x ∈ [2, p − 2]; computes public key y = gˣ mod p. Full public key: (p, g, y).
  2. Encryption (Alice): Plaintext m ∈ ℤp*, fresh ephemeral nonce k ∈ [2, p − 2] with gcd(k, p − 1) = 1:
    c₁ = gᵏ mod p
    c₂ = (m · yᵏ) mod p
    
  3. Decryption (Bob): Computes mask s = c₁ˣ mod p = gᵏˣ mod p, inverts s⁻¹ mod p via Extended Euclidean Algorithm, and recovers plaintext:
    m = (c₂ · s⁻¹) mod p = m mod p
    

Distinct Capabilities


4. Introduction to Elliptic Curves over Finite Fields E(𝔽p)

Elliptic Curve Cryptography (ECC) transfers the discrete logarithm problem from the multiplicative group ℤp* to the additive group formed by points on an algebraic curve.

Short Weierstrass Equation

Over a prime field 𝔽p (for p > 3), an elliptic curve E(𝔽p) is defined by the set of solutions (x, y) satisfying:

y² ≡ x³ + ax + b (mod p)

along with a point at infinity Ο acting as the group identity, subject to the non-singularity discriminant condition 4a³ + 27b² ≠ 0 (mod p).

        Point Addition (P ≠ Q)                      Point Doubling (P = Q)
   
        y │       . (Curve)                         y │       . (Curve)
          │      / \                                  │      / \
        P ┼─────/───\─── Q                          P ┼─────*   (Tangent Line)
          │    /     \                                │    / \
          │   /       \                               │   /   \
        ──┼──/─────────\────── x                    ──┼──/─────\────── x
          │ /           \                             │ /       \
      P+Q ┼* (Reflect -R)                         2P  ┼* (Reflect -R)
          │                                           │

The Group Law (Chord-and-Tangent)

For points P = (x₁, y₁) and Q = (x₂, y₂):

  1. Identity: P + Ο = P and P + (−P) = Ο, where −P = (x₁, −y₁ mod p).
  2. Slope λ:
    λ = (y₂ − y₁) / (x₂ − x₁) mod p    (if P ≠ Q: Secant Line)
    λ = (3x₁² + a) / (2y₁) mod p          (if P = Q: Tangent Line)
    
  3. Point Sum R = P + Q = (x₃, y₃):
    x₃ ≡ λ² − x₁ − x₂ (mod p)
    y₃ ≡ λ(x₁ − x₃) − y₁ (mod p)
    

Elliptic Curve Discrete Logarithm Problem (ECDLP)

Given a generator base point P ∈ E(𝔽p) of prime order n and a public point Q = [k]P = P + P + ... + P (k times), finding the scalar multiplier k ∈ ℤn is the ECDLP.


5. Bit Lengths of Public-Key Algorithms for Different Security Levels

Because subexponential algorithms (GNFS and Index Calculus) exist for integer factorization and finite field discrete logarithms, their key sizes must grow superlinearly to keep pace with security levels. In contrast, elliptic curves lack subexponential structure, allowing key lengths to scale linearly (2 × security bits):

Algorithm Family Cryptosystems 80-bit Security (Legacy) 128-bit Security (Standard) 192-bit Security (High) 256-bit Security (Top-Secret)
Integer Factorization RSA 1024 bit 3072 bit 7680 bit 15360 bit
Discrete Logarithm (Finite Field) DH, DSA, ElGamal 1024 bit (q ≥ 160) 3072 bit (q ≥ 256) 7680 bit (q ≥ 384) 15360 bit (q ≥ 512)
Elliptic Curves (ECDLP) ECDH, ECDSA, Ed25519 160 bit 256 bit (P-256, Curve25519) 384 bit (P-384) 512–521 bit (P-521, Ed448)
Symmetric Key (Baseline) AES, 3DES 80 bit (2TDEA / 3DES) 128 bit (AES-128) 192 bit (AES-192) 256 bit (AES-256)

6. Algebraic Correspondence & Cryptanalytic Comparison

The mathematical operations and security parameters compare directly:

Mathematical Property Multiplicative Group ℤp* Elliptic Curve Group E(𝔽p)
Elements Integers {1, 2, ..., p − 1} Point pairs (x, y) ∈ 𝔽p × 𝔽p plus Ο
Group Operation Modular Multiplication (a · b mod p) Point Addition (P + Q) via Chord-and-Tangent
Identity Element e = 1 Point at infinity Ο
Inverse Element Modular Inverse a⁻¹ mod p (EEA) Reflection across x-axis: −P = (x, −y mod p)
Repeated Operation Modular Exponentiation: gᵏ mod p Scalar Multiplication: [k]P
Discrete Logarithm Find x in y ≡ gˣ (mod p) Find k in Q = [k]P (ECDLP)
Best Classical Attack Subexponential: Index Calculus (L_p[1/3]) Exponential: Pollard's ρ (O(√n))
NIST 128-bit Key Size 3072 bits 256 bits (Curve25519, secp256r1)

Hardening Requirements


← All articles

Research and direction by Ioannis (John) Konstas; compiled and finalized with AI assistance.

👁· views