Skip to content

Session 1: Cryptography

Assignment Questions and Answers

1. What is the public key?

Answer

The public key is one half of an asymmetric key pair that is freely shared with everyone. You can publish it on a website, include it in a certificate, or hand it to anyone who wants to communicate with you. It is mathematically derived from the private key, but knowing it does not allow anyone to reverse-engineer the private key.

2. What is the private key?

Answer

The private key is the other half of the pair, known only to its owner. It is generated first (as a large random number), and the public key is mathematically computed from it. The relationship between the two is one-way: easy to go from private → public, computationally infeasible to go the other direction.

3. What can this key pair be used for?

Answer

The pair serves three main purposes:

  • Encryption: Anyone can encrypt a message using your public key. Only you can decrypt it, using your private key. This lets strangers send you confidential messages without ever having shared a secret beforehand.

  • Digital Signatures: You sign a document using your private key. Anyone with your public key can verify the signature — proving the document came from you and hasn’t been altered. This also provides non-repudiation (you can’t later deny signing it).

  • Key Exchange / Authentication: During protocols like TLS (HTTPS), the key pair is used to authenticate identity and securely establish a shared session key, after which faster symmetric encryption takes over.

4. Why must the private key be protected?

Answer

It is the root of all security in the system. If your private key is stolen:

  • An attacker can decrypt all messages ever sent to you encrypted with your public key: including past recorded sessions (“harvest now, decrypt later”).

  • They can forge your digital signatures, impersonating you on any document or transaction.

  • They can authenticate as you to any system that trusts your identity.

  • Revocation is hard: certificates have expiration dates measured in months, and emergency revocation mechanisms (OCSP, CRLs) exist but aren’t always timely or reliable.

Unlike a password, a compromised private key cannot simply be “changed” without re-issuing certificates and notifying all parties who trusted the old key. This is why private keys are stored in hardware security modules (HSMs), encrypted keystores, or secure enclaves, and why you should never share or transmit them.