Cyber security assignment support for university students
Private & confidentialWhatsApp +44 7949 817583
Solved Assignment

Question 2: End to End Encryption and Question 3: Digital Signature Analysis

Read the requirement first, then follow the completed solution. Each part below shows what the question expects, how the supplied answer addresses it, what evidence supports the answer, and what a student should understand from the result.

Topic: Double Ratchet Algorithm • Topic: Verifying product files with GPG • Tool: GPG (Command Line)
Question 2 topicDouble Ratchet Algorithm
Question 2 focusEnd to End Encryption
Security propertiesForward Secrecy + Post Compromise Security
Question 3 toolGPG Command Line
Authentic fileproduct_3.txt
Key lessonValidity is not the same as trust
00
Start here

Assignment Overview

This solved assignment covers two different cybersecurity tasks. Question 2 explains the Double Ratchet Algorithm and its security properties. Question 3 uses GPG to determine which supplied product file is authentic and then explains why signature validity and public-key trust are separate decisions.

Topic: Double Ratchet Algorithm | Reference: Perrin & Marlinspike, "The Double Ratchet Algorithm", 2016

01
Understand the questions

Requirement → Solution Map

02
Requirement + answer together

Step-by-Step Solved Assignment

01
Assignment part

Explain the Double Ratchet Architecture

What the assignment asked

Explain the architecture and design of the Double Ratchet Algorithm, including the Diffie Hellman ratchet, symmetric key ratchet and message flow.

What the solution did

The Double Ratchet Algorithm is what apps like Signal, WhatsApp, and Facebook Messenger use for end to end encryption. The main idea is simple: every single message gets its own unique key. It does this by combining two ratchets.

Evidence

The solution separates the design into the Diffie Hellman ratchet and the symmetric key ratchet, then shows the Alice-to-Bob message flow and a complete text diagram.

Why this matters

This makes it clear how root keys, chain keys and one-time message keys work together instead of treating the algorithm as a single black box.

ResultThe architecture is explained as two coordinated ratchets that continually derive new key material.

1. Diffie Hellman (DH) Ratchet

This runs whenever you receive a new DH public key from the other person. It does a DH exchange between your current private key and their new public key. The result goes into a KDF which makes a new Root Key (RK) and Chain Key (CK). You also make a fresh DH key pair for your next sending chain.

2. Symmetric Key Ratchet

This runs for every message inside a chain. It takes the current Chain Key and uses a KDF to create a Message Key (MK) plus the next Chain Key. The Message Key encrypts or decrypts just one message, then gets deleted right away.

How messages flow (Alice → Bob)

Alice uses her sending chain key to make a message key, encrypts her plaintext, and sends the ciphertext with her current DH public key. Bob receives it, does a DH ratchet step with his private key and Alice's public key to get the same root key and a new receiving chain key, then uses his symmetric ratchet to derive the message key and decrypt.

View the Double Ratchet diagram
ALICE                              BOB
+----------+                       +----------+
| RK, CKs  |                       | RK, CKr  |
| DHs      |                       | DHr      |
+----------+                       +----------+
     |                                  |
     | 1. DH Ratchet:                   | 1. DH Ratchet:
     | RK, CKr = KDF(RK, DH(DHs,DHr))   | RK, CKs = KDF(RK, DH(DHr,DHs))
     |                                  |
     | 2. Symmetric Ratchet (send):     | 2. Symmetric Ratchet (receive):
     | MK, CKs = KDF(CKs)               | MK, CKr = KDF(CKr)
     |                                  |
     | 3. C = ENC(MK, Plaintext)        | 3. Plaintext = DEC(MK, C)
     |                                  |
     | 4. Send (DHs, C) --------------> | 4. Receive (DHs, C)
     |                                  |
     v                                  v
[delete MK, old CKs]               [delete MK, old CKr]
02
Assignment part

Explain the Security Properties

What the assignment asked

Explain how the design provides Forward Secrecy and Post Compromise Security.

What the solution did

This means if an attacker steals your current keys, they still cannot read old messages. The symmetric ratchet gives this because each message key is derived and then deleted immediately. Since the KDF is one way, you cannot reverse it. Old DH private keys are also deleted. So even if a device is compromised today, old conversations remain safe. This is the self healing property. If an attacker compromises the current state, the session recovers once a new DH exchange happens. When one party sends a message with a new DH public key, a fresh DH secret is computed. The attacker does not have the new private keys, so they cannot compute this secret. All future messages become secure again. This is the major advantage over just using a symmetric ratchet alone.

Evidence

The solution connects deletion of old message keys to Forward Secrecy and a fresh Diffie Hellman exchange to recovery after compromise.

Why this matters

The answer does more than name the properties. It explains which ratchet behaviour creates each security property.

ResultThe report distinguishes protection of past messages from recovery of future messages after a compromise.
Forward Secrecy

This means if an attacker steals your current keys, they still cannot read old messages. The symmetric ratchet gives this because each message key is derived and then deleted immediately. Since the KDF is one way, you cannot reverse it. Old DH private keys are also deleted. So even if a device is compromised today, old conversations remain safe.

Post Compromise Security

This is the self healing property. If an attacker compromises the current state, the session recovers once a new DH exchange happens. When one party sends a message with a new DH public key, a fresh DH secret is computed. The attacker does not have the new private keys, so they cannot compute this secret. All future messages become secure again. This is the major advantage over just using a symmetric ratchet alone.

03
Assignment part

Verify the Product Files with GPG

What the assignment asked

Use the supplier public key and detached signature to determine which of the three product files is authentic.

What the solution did

I need to find out which of the three product files is the real one from the supplier. The supplier gave us a signature file (product.txt.sig) and their public key (supplier_public_key.asc). I used GPG on the command line to check each file.

Evidence

The public key is imported, each file is checked against the same detached signature, and only product_3.txt produces a valid signature.

Why this matters

The verification result proves which file matches the exact content that was signed with the corresponding private key.

ResultConclusion: Only product_3.txt is authentic. The other two have been modified and should not be trusted.

Product Files

View the three supplied product files
product_1.txt
PRODUCT INFORMATION

Product ID: ACS-1047
Product Name: Security Scanner 1.2.335
Category: Computer Security
Supplier: ACS (11907 and 11940) Pty Ltd
Status: Active
Additional: kzvPM0kcBCRWsBKCah2Li+V9W/hG4QsFz3wMlkkdLbYq/1+ooq3A9TCWTgUNzU/jrxmnb3INwMvsYpV2rg4w2w
product_2.txt
PRODUCT INFORMATION

Product ID: ACS-1047
Product Name: Security Scanner 1.2.335
Category: Computer Security
Supplier: ACS (11907 and 11940) Pty Ltd
Status: Active
Additional: kzvPM0kcBCRWsBKCah2Li-V9W/hG4QsFz3wMlkkdLbYq/1+ooq3A9TCWTgUNzU/jrxmnb3INwMvsYpV2rg4w2w
product_3.txt
PRODUCT INFORMATION

Product ID: ACS-1047
Product Name: Security Scanner 1.5.335
Category: Computer Security
Supplier: ACS (11907 and 11940) Pty Ltd
Status: Active
Additional: kzvPM0kcBCRWsBKCah2Li-V9W/hG4QsFt3wMlkkdLbYq/1+ooq3A9TCWTgUNzU/jrxmnb3INwMvsYpV2rg4w2w

GPG Verification

Step 1: Import the Supplier's Public Key

First I imported the public key into my GPG keyring:

gpg --import supplier_public_key.asc

I confirmed the key was imported:

gpg --list-keys

Step 2: Verify product_1.txt

gpg --verify product.txt.sig product_1.txt

Result: INVALID

Step 3: Verify product_2.txt

gpg --verify product.txt.sig product_2.txt

Result: INVALID

Step 4: Verify product_3.txt

gpg --verify product.txt.sig product_3.txt

Result: VALID

gpg: Signature made Sat 05 Sep 2026 08:56:19 AM PKT
gpg:                using RSA key A3B6F51E2371E88D9D943C92443546227039069C
gpg: Good signature from "ACS (11907 and 11940) Pty Ltd" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: A3B6 F51E 2371 E88D 9D94  3C92 4435 4622 7039 069C

Verification Summary

FileProduct NameStatus
product_1.txtSecurity Scanner 1.2.335INVALID
product_2.txtSecurity Scanner 1.2.335INVALID
product_3.txtSecurity Scanner 1.5.335VALID
  • product_3.txt is the real one. The signature matches perfectly, so nobody changed the file after the supplier signed it. It correctly shows "Security Scanner 1.5.335" and the Additional field has Ft3wMlkkdLbYq.
  • product_1.txt has an older product name. It says "Security Scanner 1.2.335" instead of "1.5.335" and the Additional field has Fz3wMlkkdLbYq instead of Ft3wMlkkdLbYq. The signature fails, which means the file was modified after signing. It is not authentic.
  • product_2.txt looks similar to product_1.txt. It also shows "Security Scanner 1.2.335" with the Additional field Fz3wMlkkdLbYq. The signature fails here too. Even though it may look like a valid product file, the hash is different from the signed original, so GPG reports a BAD signature. It is not authentic.
04
Assignment part

Separate Signature Validity from Key Trust

What the assignment asked

Explain the difference between a mathematically valid digital signature and trust in the identity behind the public key.

What the solution did

These two sound similar but they are actually totally different.

Evidence

Validity = "The math works". Trust = "I believe this key is really from who it says".

Why this matters

A valid signature can prove that a file matches a key, while key trust asks whether that key really belongs to the claimed supplier.

Resultproduct_3.txt is cryptographically valid, but the public-key fingerprint should still be verified through a trusted channel.
Signature Validity
  • This is just math. It asks: "Does this signature match this file using this public key?"
  • If yes, the file has not been changed since signing, and the signature was made with the matching private key.
  • A "Good signature" just means the cryptography checks out. That is it.
  • In our case, product_3.txt had a good signature. product_1 and product_2 did not.
Key Trust
  • This is about identity. It asks: "Is this public key really owned by who it claims to be?"
  • Just because a signature is valid does not mean the key actually belongs to the supplier. Anyone could make a key pair, sign a file, and pretend to be "ACS Pty Ltd".
  • Trust is built by:
    • Checking the fingerprint through a separate channel (like calling them)
    • Having others you trust sign the key (web of trust)
    • Using a certificate authority
  • During verification, GPG warned us: "This key is not certified with a trusted signature!". This means the key works, but we have not confirmed it is really ACS.
Simple way to rememberValidity = "The math works"

Trust = "I believe this key is really from who it says"

So you could have a file with a valid signature but from an untrusted key. In that case, you should verify the key's fingerprint through another trusted method before trusting the file. In our assignment, product_3.txt is valid, but we would still want to confirm the key's fingerprint with the supplier directly to be completely certain.

Need support with a similar task?

Need help with a similar assignment or project?

Send your assignment brief, marking rubric or existing work for originality-focused support, technical review, troubleshooting and project guidance tailored to your requirements.

03
Revision notes

What Students Should Learn From This Assignment

01

The Double Ratchet should be explained as two linked key-evolution processes, not only as a definition.

02

Forward Secrecy protects earlier messages, while Post Compromise Security explains how future messages can become secure again after fresh Diffie Hellman material is introduced.

03

Digital signatures should be verified against the exact file content. A small content change is enough to invalidate the signature.

04

A valid signature proves that the mathematics checks out for a key, but it does not by itself prove that the key belongs to the claimed organisation.

05

Good technical answers connect command output or diagrams to an explanation of what the evidence proves.

WhatsApp