Tus opciones de privacidad

KiwiBee usa cookies opcionales de Google Analytics, Google Ads y Meta Pixel para entender a los visitantes adultos, medir los registros completados y mejorar las campañas. Las cookies esenciales siempre permanecen activas. El píxel de anuncios de ChatGPT de OpenAI también mide las visitas y las consultas enviadas tras aceptar la publicidad, y puede usar datos de contacto cifrados mediante hash para la atribución. Política de privacidad

Ir al contenido principal

Cryptography & Key Exchange

Sobre esta simulación

[Es] Cryptography & Key Exchange demystifies the mathematics protecting modern internet security. Three illuminated stations represent Alice (left), Eve the Eavesdropper monitoring the public channel (center), and Bob (right). In Diffie–Hellman mode, Alice mixes her secret integer a with the public generator g and prime modulus p to send A = gᵃ mod p across the bridge, while Bob sends B = gᵇ mod p. Even though Eve intercepts g, p, A, and B on her modular arithmetic clock ring, she faces the hard Discrete Logarithm Problem, whereas Alice computes Bᵃ mod p and Bob computes Aᵇ mod p to unlock the exact same glowing shared secret S = gᵃᵇ mod p. Switching to RSA mode shows asymmetric encryption C = Mᵉ mod n and decryption M = Cᵈ mod n.

Qué pueden explorar los alumnos

  • [Es] Drag or click Alice's blue private key crystal (a) or Bob's green private key crystal (b) and verify that both top vaults always light up with the exact same Shared Secret number and color!
  • [Es] Inspect Eve's Public Channel readout in the center to see everything crossing the wire (g, p, A, B), and notice why knowing gᵃ mod p does not directly reveal a.
  • [Es] Switch Prime modulus p between 23, 19, and 29 and watch the central Modular Clock hand jump to the new remainder S mod p.
  • [Es] Change Protocol to RSA Public/Private Padlock and adjust Alice's message M to watch it encrypt into ciphertext C = M³ mod 33 over the public bridge and decrypt back to M at Bob's station.
  • [Es] Drag Eve's red interceptor orb in the center to scrub the travelling public courier packets back and forth between Alice and Bob.

Objetivos de aprendizaje

  1. 1[Es] Trace the four steps of the Diffie–Hellman key exchange using modular exponentiation gᵃ mod p and gᵇ mod p.
  2. 2[Es] Prove algebraically why Alice and Bob arrive at the same shared secret: (gᵇ)ᵃ mod p = (gᵃ)ᵇ mod p = gᵃᵇ mod p.
  3. 3[Es] Explain why modular exponentiation acts as a one-way trapdoor function (easy forward, hard to invert via discrete logarithms).
  4. 4[Es] Contrast symmetric key establishment (Diffie–Hellman) with asymmetric public/private padlock encryption (RSA).

Preguntas frecuentes de los docentes

[Es] How can Alice and Bob agree on a secret key when Eve sees every message they send?

[Es] They never send their private numbers a or b. Instead, they send the mixed modular results A = gᵃ mod p and B = gᵇ mod p. Because raising to a power modulo p wraps around the clock ring repeatedly, Eve cannot easily undo A to find a, yet Alice and Bob can each apply their own secret power to the other's public number to reach gᵃᵇ mod p.

What is the Discrete Logarithm Problem?

[Es] Computing gᵃ mod p is fast even for 2048-bit numbers, but given g, p, and the remainder A = gᵃ mod p, finding the exponent a requires searching through an astronomical number of possibilities when p is a large prime.

[Es] Why does this simulation use small primes like p = 23 instead of huge primes?

[Es] Small primes like p = 23 let you verify every calculation by hand (for example, 5⁶ mod 23 = 15625 mod 23 = 8). Real TLS connections use the exact same equation with primes hundreds of digits long so Eve cannot brute-force them.

How does RSA differ from Diffie–Hellman?

[Es] Diffie–Hellman lets two parties jointly create a shared secret key. RSA is an asymmetric padlock: Bob publishes a public lock (e, n) that anyone like Alice can snap shut on a message (C = Mᵉ mod n), while only Bob holds the private key d needed to open it (M = Cᵈ mod n).

Insertar esta simulación

Colócala en tu LMS, blog o sitio de clase, gratis.

<iframe src="https://kiwibee.io/es/simulations/public-key-cryptography-diffie-hellman-3d-simulation/embed" title="Cryptography &amp; Key Exchange | KiwiBee" loading="lazy" allowfullscreen style="width:100%;height:min(70vh,620px);min-height:420px;border:0;border-radius:16px"></iframe>

Sigue explorando

Lleva la ciencia interactiva a tu aula

El espacio de trabajo gratuito para docentes de KiwiBee reúne en un solo lugar la planificación de clases, las fichas, las herramientas de aula y el libro de calificaciones.

Empieza gratis y crea tu primera clase

o explora el espacio de trabajo docente →