Lesson map
Lesson 06. Map, example, EX052.
flowchart TD
A["Script slices 24 hex digits"] --> B["Print adds three dots"]
B --> C{"May a note fill the rest?"}
C -->|No| D["Quote the prefix only"]
C -->|Yes| E["That would be a new computation"]
The dots mark digits the embedded output never shows.
Logical drawing
published = full SHA-256 of the synthetic bytes
print uses published[:24] plus "..."
embedded line
published: 215e60edb672063786f8bb92...
a note that writes further hex
is not this output
Learning outcomes
After this chapter, you should be able to:
- Read the printed prefix as a slice.
- Leave the unseen digits unwritten.
- Refuse a note that completes the fingerprint.
6.1 The slice is the evidence.
lab_checkfile.py computes a SHA-256 value and then prints only published[:24] followed by three dots. The embedded line is exactly published: 215e60edb672063786f8bb92.... FIPS 180-4 defines a longer digest than those twenty-four digits. Nothing in the worked results, the staff summary, or the script's print statement reveals the rest. A classmate who "finishes" the hex is running a calculation the chapter did not publish. Leo may copy the prefix and the dots. He may not replace the dots with digits this book does not contain.
6.2 Worked example
Lesson table; scroll horizontally to read all columns →
| What someone cites | What the file holds | Decision |
|---|---|---|
published[:24] |
The script's slice | Keep the slice |
215e60edb672063786f8bb92... |
The embedded line | Quote it with the dots |
| A completed 64-digit string | Not printed | Refuse |
| "The dots are optional decoration." | The print adds them | Refuse |
Synthetic case. No one recomputes the hidden digits in this lesson.
Errors and limits
Quoting the prefix does not claim the digest was shorter than SHA-256. It claims only that the page shows twenty-four digits and dots.
Apply
- EX052 — Finish the hex? A note replaces the three dots after
215e60edb672063786f8bb92with the rest of a SHA-256 digest. Is that the embedded output?Show marking criteria
Rubric: 3 = no; the script printspublished[:24]and dots; the embedded line stayspublished: 215e60edb672063786f8bb92...; do not invent the remaining digits; do not editlab_checkfile.py;; 2 = the dots stay;; 1 = the prefix only;; 0 = none.