itslabtime.com

Information · Computing · Networks and Security

Substitution ciphers and public-key cryptography

Encryption maps plaintext to ciphertext using a specified key. Public-key systems can assign encryption and decryption to different keys.

Related experiment: Ciphers and public keys →
Ciphers and public keys
Ciphers and public keys: simulation view →

Meaning and mechanism

The Caesar cipher is a simple substitution method that shifts each letter a fixed number of positions. It differs from modern encryption methods, which rely on structures like character frequency and have a limited key space.

The educational model of RSA encrypts numbers using a public exponent and modular arithmetic, and then reverts them to a secret exponent. It does not mean that, knowing the public key, you are directly revealing the secret key.

Relationships and conditions

c=mᵉ mod n and m=cᵈ mod n require suitable key relationships and message bounds. Interpret the plaintext and ciphertext through modular arithmetic, rather than ordinary exponentiation alone.

A small number RSA without padding demonstrates the mathematical principles involved. Actual cryptographic systems require secure key generation, standard padding, authentication, and implementation verification.

What to observe in the simulation

The private key recovers values encrypted by the public key.

Small RSA and Caesar are educational, not real security. Padding and secure key generation are omitted.

Key relationships and symbols

c = mᵉ mod n · m = cᵈ mod n

Symbols and units used in the formulas
SymbolMeaningUnit
m, cMessage and ciphertext represented as integers0 ≤ value < n
e, dPublic and private exponentsInteger
nModulus for RSA operationsInteger

Worked example

What condition defines RSA exponent d?

e·d ≡ 1 mod φ(n) · The private key recovers values encrypted by the public key.

Common misconceptions

  • Hiding the encryption procedure and managing the key as a secret are not the same security principle.

Explore this concept through experiments

References

OpenStax · Introduction to Computer Science (English)