0Pricing
Cryptology Academy · Lesson

Public-Key Cryptography Concepts

Understand key pairs, public distribution, and private-key secrecy.

Public-Key Cryptography Concepts is a free Cryptology Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Welcome

Public-key cryptography solved the ancient key distribution problem. In this lesson we understand key pairs, public vs private keys, and the trust model.

The Key Distribution Problem

Before 1976, two parties needed to exchange a secret key before communicating securely. This required a secure channel — but if you had a secure channel, why encrypt at all?

The Key Pair Concept

Asymmetric cryptography uses a mathematically linked key pair: public key (shareable with everyone) and private key (never shared). They are inverse operations: Enc(pub, M) → C; Dec(priv, C) → M.

One-Way Trapdoor Function

Public-key crypto relies on trapdoor one-way functions: easy to compute forward (multiply large primes), infeasible to reverse (factor the product) without the trapdoor (the prime factors).

Confidentiality with Public Keys

Alice wants to send Bob a secret: she encrypts with Bob's public key. Only Bob's private key can decrypt. Eve can see Bob's public key but cannot decrypt the message.

Authentication with Private Keys

Bob proves his identity: he signs a message with his private key. Anyone with Bob's public key can verify the signature. Forging requires the private key — infeasible if secure.

Asymmetric vs Symmetric Speed

RSA-2048 encryption: ~100,000× slower than AES-128. This is why asymmetric crypto is only used to encrypt a short symmetric key, then AES handles bulk data. This is hybrid encryption.

Key Pair Generation Overview

RSA: choose two large primes p, q. ECC: choose a random scalar k on an elliptic curve. Both generate a key pair. Private key is the random secret; public key is derived from it.

Trust & Public Key Distribution

How do you know a public key really belongs to Alice? You need a trusted third party: a Certificate Authority (CA) signs Alice's public key, creating a certificate. This is PKI.

Web of Trust

PGP uses a decentralized web of trust: friends sign each other's keys. If you trust Carol and she signed Bob's key, you can trust Bob's key — no central CA required.

Public Key Infrastructure (PKI) Preview

PKI is the infrastructure for issuing, distributing, revoking, and validating public key certificates. TLS relies on PKI. Browser trust stores contain ~150 root CA certificates.

Quick Check

To send an encrypted message that only Bob can read, which key do you encrypt with?

Recap

Public-key concepts are clear! Next we generate RSA keys step by step and trace the mathematical operations.

Frequently asked questions

Is the “Public-Key Cryptography Concepts” lesson free?

Yes — the full text of “Public-Key Cryptography Concepts” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.

What will I learn in “Public-Key Cryptography Concepts”?

Understand key pairs, public distribution, and private-key secrecy. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Public-Key Cryptography Concepts” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Public-Key Cryptography Concepts
  2. RSA Key Generation Step by Step
  3. RSA Encryption & Decryption Math
  4. RSA Real-World Use Cases & Key Sizes
← Back to Cryptology Academy