Security problems of information stored on the Internet
On the Internet, data passes through many devices and servers, so it needs encryption. Cryptography studies methods of encrypting (turning plain text into ciphertext) and decrypting; a cipher must be unreadable without the key. One of the oldest examples is the Caesar cipher: each letter is moved k places along the alphabet. According to historical sources Julius Caesar used k = 3. This cipher can be broken by trying just 25 keys, so it is useless for real protection today, but it is handy for explaining the idea. Modern symmetric ciphers (for example AES) also encrypt and decrypt with one key, but the key is 128 or 256 bits long and the number of variants is astronomical. The problem of the symmetric method is delivering the key safely to both sides. The asymmetric method (RSA and similar) has a key pair: the public key is given to everyone, the private key stays with its owner. A message encrypted with the public key can be opened only by the private key. The idea of RSA: multiplying two primes is easy, but splitting the product back into its factors is very hard. The calculation: p and q are primes, n = p·q, φ = (p–1)(q–1), the public exponent e is coprime to φ, d is chosen so that (e·d) mod φ = 1; encryption is c = mᵉ mod n, decryption is m = cᵈ mod n. Real systems use n of at least 2048 bits; the small numbers here are only for understanding. The electronic digital signature works the other way round: the hash of a message is signed with the private key and anyone checks it with the public key; this shows the message was not changed (integrity) and who signed it. A hash function (for example SHA-256) makes a short “fingerprint” of any data. HTTPS in the browser combines both methods: the asymmetric method agrees on a key, then a fast symmetric cipher is used. Personal safety rules: do not post your address, phone number or a photo of a document openly on social networks; check privacy settings; every post leaves a “digital footprint” that is hard to delete; give a site only the data it needs; do not trust unreliable sources, and check information in 2–3 sources.
“Secret message”: in pairs choose a key from 1 to 25, write a short message with the Caesar cipher and give it to your partner, who opens it without knowing the key by trying the 25 options. Discuss why this cipher is not enough for modern protection.