Encrypting data at rest and in transit
Encrypting data both while stored (databases, backups) and while moving over a network (TLS), so intercepted or stolen data stays unreadable without the key.
Understanding Encrypting data at rest and in transit in VCE Software Development U4O2
What it does: Fetching the key from a secrets vault keeps it away from the encrypted database, so stealing the data does not also give the attacker the key. Rejecting plain HTTP stops data travelling in readable form where a man-in-the-middle could capture it. Data at rest is data stored on a disk, in a database or in a backup. Encrypting it means a stolen file is unreadable without the key. Data in transit moves across a network. TLS encrypts the connection, which defends against interception such as man-in-the-middle attacks. If the key is stored with the data, an attacker who steals one gets both. Keys must be stored separately and protected with strict access.
Common mistakes: Data must be encrypted before it is stored in the database (encryption at rest). Calling decrypt on plain data does not protect it. Line 2 should use encrypt(data, key). HTTP sends data as plain text, so an attacker on the network could read the card number. Encryption in transit needs HTTPS (TLS), so the protocol should be "HTTPS".
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 49–72) and word search (Modules 49–130).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
Encryption at rest and in transitFill in the Blanks
Spot the Error
Student with a class code? Join your class →