Encryption — AQA A-Level Computer Science
Encryption is the mathematical transformation of plaintext into unreadable ciphertext to secure data transmission and storage across networks. For AQA A-Level Computer Science, students must master symmetric and asymmetric cryptography, digital signatures, hashing algorithms, and the mathematically unbreakable Vernam cipher.
Encryption explained
Encryption is the process of transforming readable data, called plaintext, into an unreadable form called ciphertext, using an algorithm and a key so that only authorised parties can recover the original data.
Read the full explanation
The purpose is to protect the confidentiality of data, whether it is stored on a device or sent across a network. To define encryption, a learner should state that it converts plaintext into ciphertext using a key, and that decryption reverses the process using the appropriate key to restore the plaintext. Encryption does not by itself guarantee integrity or authentication, although it can support them. Understanding the definition means recognising the three elements: the input plaintext, the transformation via an algorithm and key, and the output ciphertext. A useful check is whether an answer explains both the purpose of protecting data and the role of the key.
Your focus
- Understand what is meant by encryption and be able to define it.
Which command word is this?
Set out the mathematical or procedural stages clearly with causes and effects; e.g., explain how Bob decrypts a digital signature using Alice's public key.
Encryption exam tips
Topic Overview
Encryption is the computational process of encoding messages or information in such a way that only authorized parties can access it, transforming intelligible plaintext into unintelligible ciphertext. Within AQA A-Level Computer Science, this unit covers the foundational principles of cryptographic security, distinguishing between classical algorithmic approaches and modern mathematical techniques used in distributed networks.
Understanding encryption bridges theoretical computation with practical network security, exploring how public-key infrastructure, digital certificates, and hashing uphold the CIA triad (Confidentiality, Integrity, and Availability). Mastery of this topic requires students to evaluate symmetric versus asymmetric systems, execute bitwise XOR operations, and articulate how trust is established across untrusted channels like the Internet.
Key Concepts
- →Symmetric Encryption: Utilizes a single shared secret key for both encryption and decryption (e.g., AES), presenting a key distribution vulnerability.
- →Asymmetric Encryption: Uses a mathematically linked key pair (public key for encryption/verification, private key for decryption/signing) eliminating the key exchange issue.
- →Vernam Cipher & One-Time Pad: The only mathematically unbreakable cipher, relying on bitwise XOR with a truly random, non-repeating key equal in length to the plaintext.
- →Hashing & Digital Signatures: One-way cryptographic functions that generate a fixed-size digest used alongside private key encryption to verify message authenticity and data integrity.
- →Digital Certificates: Structured documents signed by a Certificate Authority (CA) that bind an entity's identity to their public key.
Marking Points
- Defines encryption as converting plaintext into ciphertext
- Identifies that an algorithm and a key are used in the transformation
- States that the purpose is to keep data confidential from unauthorised parties
- Explains that decryption reverses the process using the correct key to recover plaintext
Examiner Tips
- 💡Give a definition that names plaintext, ciphertext, algorithm and key
- 💡Include the purpose of confidentiality in your definition
- 💡Mention that decryption reverses encryption when the question asks for a full definition
- 💡When explaining digital certificates, always mention the role of the Certificate Authority (CA) and specify that the CA encrypts the digital certificate with the CA's own private key.
- 💡In Vernam cipher calculation questions, always show the truth table logic or column-by-column XOR alignment; showing intermediate workings prevents losing method marks if a single bit error occurs.
- 💡Be precise with key terminology: avoid vague phrases like 'Alice uses her key'; write 'Alice uses Bob's public key to encrypt the message' or 'Alice uses her own private key to sign the hash'.
Common Mistakes
- Describes encryption as compressing data; correct by stating it transforms data to protect confidentiality, not to reduce its size
- Says encryption makes data unchangeable; correct by noting it protects confidentiality and does not by itself prevent alteration
- Omits the role of the key in the definition; correct by stating that a key is needed for both encryption and decryption
- Assuming asymmetric encryption is preferred for all data transfers: In reality, asymmetric encryption is computationally slow and resource-heavy, so modern protocols (like TLS) use hybrid encryption where asymmetric ciphers merely exchange a fast symmetric session key.
- Confusing hashing with encryption: Encryption is a two-way process designed to be decrypted back to plaintext with a key, whereas cryptographic hashing is strictly a one-way deterministic mathematical function with no decrypting key.
- Believing pseudorandom keys can make a Vernam cipher unbreakable: Computer-generated pseudorandom sequences repeat over time, creating statistical vulnerabilities that can be broken by cryptanalysis; only physical, truly random noise provides perfect secrecy.
Revision Plan
- 1Week 1 (Days 1-3): Master symmetric ciphers (Caesar, substitution) and practice Vernam cipher XOR mechanics with binary and ASCII data until comfortable.
- 2Week 1 (Days 4-7): Contrast symmetric vs asymmetric systems; memorize the exact key sequences for confidentiality vs digital signing.
- 3Week 2 (Days 8-11): Study cryptographic hashing, digital signatures, and Certificate Authorities; draw flowcharts tracing data packets and cryptographic transformations across TLS/HTTPS.
- 4Week 2 (Days 12-14): Work through past paper exam questions under timed conditions, focusing on 6-mark and 9-mark evaluation and comparison questions.
Exam Question Types
- 📋Binary calculation questions: Calculating bitwise XOR for Vernam cipher encryption and decryption using ASCII character codes.
- 📋Step-by-step procedural questions: Explaining how asymmetric encryption and digital signatures authenticate users or securely transmit symmetric session keys.
- 📋Comparative essay questions: Evaluating the security, computational overhead, and key distribution challenges of symmetric versus asymmetric encryption.
Command Word Expectations (AQA)
Set out the mathematical or procedural stages clearly with causes and effects; e.g., explain how Bob decrypts a digital signature using Alice's public key.
Identify specific similarities and differences between two concepts (such as symmetric and asymmetric encryption), addressing both criteria across performance, key management, and practical application.
Provide structured mathematical or logical working step-by-step to arrive at a specified result, such as carrying out bitwise XOR operations on binary strings.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: Plaintext character 'K' has the 7-bit ASCII bit pattern 1001011. It is encrypted using a Vernam cipher with the one-time pad key bit pattern 0111101. Show the bitwise XOR operation used to generate the ciphertext, and demonstrate how the recipient decrypts the ciphertext back to the original plaintext.
- 1.Step 1: Align the 7-bit plaintext and key bit patterns vertically to perform bitwise XOR (where 1 XOR 0 = 1, 0 XOR 1 = 1, 1 XOR 1 = 0, and 0 XOR 0 = 0): Plaintext: 1 0 0 1 0 1 1 Key: 0 1 1 1 1 0 1
- 2.Step 2: Calculate the XOR result column by column: Bit 6: 1 XOR 0 = 1 Bit 5: 0 XOR 1 = 1 Bit 4: 0 XOR 1 = 1 Bit 3: 1 XOR 1 = 0 Bit 2: 0 XOR 1 = 1 Bit 1: 1 XOR 0 = 1 Bit 0: 1 XOR 1 = 0 Ciphertext generated = 1110110
- 3.Step 3: Demonstrate decryption by applying the identical bitwise XOR operation between the ciphertext and the one-time pad key: Ciphertext: 1 1 1 0 1 1 0 Key: 0 1 1 1 1 0 1 Decrypted: 1 0 0 1 0 1 1
- 4.Step 4: Confirm that the decrypted bit sequence matches the original 7-bit ASCII representation of 'K' (1001011).
Question: Explain the process of how Alice securely transmits a confidential document to Bob across the Internet using hybrid asymmetric and symmetric encryption, including verification of Alice's identity via a digital signature.
- 1.Step 1: Alice generates a cryptographic hash digest of the document using an algorithm such as SHA-256.
- 2.Step 2: Alice encrypts this hash digest using her own private key to generate the digital signature, ensuring authenticity and non-repudiation.
- 3.Step 3: Alice generates a random, temporary symmetric session key (e.g., for AES) and encrypts both the document and the digital signature using this session key for fast, computationally efficient bulk encryption.
- 4.Step 4: Alice encrypts the symmetric session key using Bob's public key and transmits the encrypted document, digital signature, and encrypted session key to Bob.
- 5.Step 5: Bob decrypts the symmetric session key using his own private key, then uses that session key to decrypt the document and digital signature.
- 6.Step 6: Bob decrypts the digital signature using Alice's public key to reveal Alice's original hash digest. He then hashes the received document independently and compares the two digests; identical digests verify integrity and authenticity.