← ACARA Digital Technologies Years 9–10

Code signing and trusted sources

Adding a digital signature to software so a computer can check it came from the named publisher and has not been changed since it was signed.

Understanding Code signing and trusted sources in ACARA Digital Technologies Years 9–10

What it does: A changed file no longer matches its signature, so the check fails. This is how code signing detects tampering. A signature and a trusted source work together: the signature shows who published it and that it is unchanged, and the trusted source lowers the risk of fakes. Signing is about trust in the source. It is not the same as encryption, which hides the content. Showing who published the software is verifying the publisher. Tamper detection is checking the code has not been changed. An unknown publisher means the source cannot be verified. Check it before you trust it. Trusted sources reduce the risk of malware. Random links may lead to fake or tampered software.

Common mistakes: Anyone checking a signature uses the publisher's public key. The private key is kept secret by the publisher, so it should be pubKey, not privKey. The program would trust the publisher only when the certificate has expired. It should check cert.expired = FALSE so only valid certificates are trusted.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 828–859) and word search (Modules 810–859).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does code signing let a computer check about a piece of software?
That it contains no bugs at allWho published it and that it has not been changed
Matches
Unknown publisher - installing anyway because it looks fine
↓
An 'Unknown publisher' warning means the code signature could not be verified, so the software may not come from who it claims. Ignoring it skips the code signing check.
Applying
Meanings
Term
code signing
Meaning
Adding a digital signature to software so a computer can check it came from the named publisher and has not been changed since it was signed.
Practice
IF signature_valid AND publisher_trusted THEN
Testing
Gaps
signedApp = (app, privateKey)
Check Answer
Spots
3hash ← sha256(app)
4IF verify(sig, hash, privKey)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Manta Ray' badge — Graceful Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does code signing let a computer check about a piece of software?
A. That it contains no bugs at all
B. Who published it and that it has not been changed ✓
A digital signature proves the publisher and shows the code is unchanged since signing. It does not promise the software is bug free.
2. A developer signs an app before releasing it. What does the signature help prove?
A. The app came from the named publisher ✓
B. The app is encrypted so nobody can read it
Signing is about trust in the source. It is not the same as encryption, which hides the content.
3. A signed installer is edited by an attacker after it was signed. What happens when the computer checks the signature?
A. The check fails because the code was changed ✓
B. The check still passes because the publisher is the same
Any change to the code breaks the signature match. This is how tamper detection works.
4. Which sub-theme of code signing is being used when your computer shows the publisher's name before you install?
A. Verifying the publisher ✓
B. Tamper detection
Showing who published the software is verifying the publisher. Tamper detection is checking the code has not been changed.
5. Your computer warns that an app has an 'Unknown publisher'. What is the safest response?
A. Click Install anyway because warnings are usually wrong
B. Stop and check where the app came from ✓
An unknown publisher means the source cannot be verified. Check it before you trust it.

Match the Pairs

code signing → Adding a digital signature to software so a computer can check who published it and that it has not been changed since it was signed.
Verified publisher: Example Pty Ltd → The software's signature checked out, so the computer can confirm the named publisher really signed it.
Tamper detection: if even one byte of a signed installer is changed, the signature check fails. → signature_valid = false
Only install software from a trusted source, such as the publisher's official site, and check that it is signed. → if signed and trusted_source: install()
Unknown publisher - installing anyway because it looks fine → An 'Unknown publisher' warning means the code signature could not be verified, so the software may not come from who it claims. Ignoring it skips the code signing check.
signed_file = edit(signed_file); still_trusted = true → Changing a file after it was signed breaks the signature, so it can no longer be trusted. Assuming it is still valid ignores tamper detection.

Key Term

code signing
Adding a digital signature to software so a computer can check it came from the named publisher and has not been changed since it was signed.

Fill in the Blanks

1. signedApp = sign(app, privateKey)
Hint: Type the function name for what a publisher does to software with their private key.
2. ok = verify(app, signature, publicKey)
Hint: Type the name of the key the computer uses to check the publisher's signature.
3. IF newHash != signedHash THEN warn("File was changed!")
Hint: Type the operator that shows the two hashes do not match, meaning the file was tampered with.
4. IF signatureValid THEN install(app)
Hint: Type the keyword that starts a decision, so the software installs only when the signature passes.
5. newHash = hash(downloadedFile)
Hint: Type the function that turns a file into a fixed-length fingerprint, used to detect changes.

Spot the Error

Question 1
A app ← download('editor.exe')
B sig ← app.signature
C hash ← sha256(app)
D IF verify(sig, hash, privKey)
E THEN install(app)
F ELSE block(app)
Line D — Anyone checking a signature uses the publisher's public key. The private key is kept secret by the publisher, so it should be pubKey, not privKey.
Question 2
A cert ← app.publisherCert
B IF cert.expired = TRUE
C trust(cert.publisher)
D ELSE warn('Cert expired')
Line B — The program would trust the publisher only when the certificate has expired. It should check cert.expired = FALSE so only valid certificates are trusted.
Question 3
A signedHash ← decrypt(sig, pubKey)
B newHash ← sha256(file)
C IF signedHash = newHash
D DISPLAY 'File was changed'
Line C — Tampering is detected when the two hashes do NOT match. With = the warning shows when the file is unchanged. It should be ≠.
Question 4
A file ← 'update.exe'
B sig ← sign(file, publicKey)
C publish(file, sig)
Line B — A publisher signs with its secret private key. The public key is shared with everyone, so anyone could forge a signature with it. It should be privateKey.
Question 5
A hash ← base64(file)
B sig ← sign(hash, privateKey)
C attach(file, sig)
Line A — Base64 is just encoding that anyone can reverse, not a hash. Tamper detection needs a hash function such as sha256 to make a fingerprint of the file.

Student with a class code? Join your class →