Cryptography is the science and art of protecting information by transforming it into an unreadable format (ciphertext) to prevent unauthorized access. It involves a set of techniques used to secure communication, verify identities, ensure data integrity, and maintain confidentiality in the face of potential adversaries. Cryptography is a cornerstone of modern information security and underpins technologies like online banking, e-commerce, VPNs, and secure communications.
Encryption: The process of converting plaintext (readable data) into ciphertext (unreadable data) using an algorithm and a cryptographic key. Encryption ensures that only authorized parties can read the data.
Decryption: The process of converting ciphertext back into plaintext using a decryption key. The decryption key can either be the same as the encryption key (symmetric encryption) or different (asymmetric encryption).
Cryptographic keys are fundamental to the encryption and decryption process. A key is a string of data used by an algorithm to encrypt or decrypt information. The security of an encrypted message depends on the strength and secrecy of the key used.
Symmetric Key: A single key is used for both encryption and decryption. Both the sender and the receiver must share the same key.
Asymmetric Key: Two separate keys are used—one for encryption (public key) and one for decryption (private key). Only the recipient’s private key can decrypt messages encrypted with their public key.
Symmetric Cryptography (Private Key Cryptography):
In symmetric cryptography, the same key is used for both encryption and decryption. The key must remain secret, and it is shared between the sender and the receiver.
Advantages:
Disadvantages:
Common Algorithms:
Asymmetric Cryptography (Public Key Cryptography):
Asymmetric cryptography uses a pair of related keys: a public key, which can be shared openly, and a private key, which is kept secret. The public key encrypts the data, and only the corresponding private key can decrypt it, and vice versa.
Advantages:
Disadvantages:
Common Algorithms:
A cryptographic hash function is a mathematical algorithm that takes an input (or 'message') and returns a fixed-size string of characters, which is typically a digest. This hash is a "digital fingerprint" of the input data, and it should be computationally infeasible to reverse the hash back into the original input.
Properties of Cryptographic Hash Functions:
Common Hash Functions:
Applications: Cryptographic hashes are used in digital signatures, data integrity checks, and password storage.
A digital signature is a cryptographic mechanism used to verify the authenticity and integrity of digital messages or documents. It ensures that the message was sent by the claimed sender (authentication) and that it has not been altered in transit (integrity).
How Digital Signatures Work:
Applications: Digital signatures are widely used in email encryption, software distribution, and electronic contracts.
Common Algorithms: RSA, DSA (Digital Signature Algorithm), and ECDSA (Elliptic Curve Digital Signature Algorithm).
Public Key Infrastructure (PKI) is a framework that manages the creation, distribution, and management of public-key encryption. It provides the necessary tools for implementing asymmetric cryptography, including digital certificates, key management, and certificate authorities (CAs).
Key Components of PKI:
Applications: PKI is used in HTTPS (SSL/TLS), email encryption, VPNs, and secure communications.
Key exchange protocols are used to securely exchange cryptographic keys over a public channel. The goal is to ensure that two parties can securely share a key without an adversary intercepting it.
Diffie-Hellman Key Exchange: A method for two parties to securely share a secret key over an insecure channel by exchanging public values and computing a shared secret. This protocol is widely used in securing SSL/TLS sessions.
Elliptic Curve Diffie-Hellman (ECDH): A variant of Diffie-Hellman that uses elliptic curve cryptography for more efficient key exchange.
RSA Key Exchange: Although RSA is primarily used for encryption, it can also be used for securely exchanging symmetric keys.
Cryptography is used in a wide range of applications to ensure data privacy, integrity, and authenticity:
Open this section to load past papers