{"id":"padding-and-integrity","title":"Padding and integrity: keep the denominator and the trust boundary","summary":"Recover original lengths and explain why a checksum is not sender authorization.","estimated_minutes":25,"learning_objectives":["Calculate two different padding percentages.","Explain the optional frame’s payload boundary.","Separate accidental-error detection from authentication."],"sections":[{"heading":"Retain the original message length","text":"The source permits final padding to an octet-aligned 21-byte container and requires the original length for recovery. If a legitimate message ends in 0xAA, stripping every trailing 0xAA loses content. Record the original length, validate it against the received frame length, and return exactly that many message bytes. Our independent examples include all lengths from zero through 256 and deliberately retain legitimate trailing 0xAA values."},{"heading":"Whole frames and payloads are different objects","text":"The optional source frame assigns six bits to a mode and six to a check, leaving 156 payload bits. Although the complete 168-bit frame divides evenly into six-, seven- and eight-bit groups, its payload does not divide evenly by seven or eight. The application needs an explicit segmentation, carry or padding rule for those boundaries. A property of the wrapper does not automatically become a property of its contents."},{"heading":"Check what the check establishes","text":"A framing check helps recognize boundaries; an error-detection code addresses a declared corruption model; authentication addresses authorized origin. A public digest alone does not establish who authorized a message. The manuscript’s reported checksum experiments have not been rerun in this course. The safe learning result is to specify the algorithm, covered bits and error model, and avoid converting a finite no-miss observation into a universal guarantee."}],"worked_example":{"question":"One byte is padded to a 21-byte container. How large is the padding?","steps":["Subtract one payload byte from 21 container bytes: 20 padding bytes.","Against the total container: 20 ÷ 21 × 100 ≈ 95.24%.","Against the original payload: 20 ÷ 1 × 100 = 2,000%.","State the denominator whenever quoting either percentage."],"equation":"padding/container = 20/21; added padding/payload = 20/1"},"exercises":[{"prompt":"What are the remainders when 156 payload bits are divided by seven and eight? Why do they matter?","answer":"156 = 22 × 7 + 2 and 156 = 19 × 8 + 4. The residual bits need a specified packing rule even though the total frame is aligned.","assessment_criteria":"Provide both quotients and remainders, then distinguish payload packing from whole-frame divisibility."},{"prompt":"Two raw records have different hashes but the same normalized label. Has fraud been proved?","answer":"No. The hashes establish differing input bytes under the stated hashing procedure. Benign normalization, import differences and deliberate substitution need additional evidence to distinguish.","assessment_criteria":"Identify what was observed and one further provenance or authorization check; do not infer intent from representation alone."}],"readings":[{"title":"Length, padding and overhead","url":"/articles/superframe-padding-length-and-overhead"},{"title":"Error detection versus authentication","url":"/articles/superframe-error-detection-and-authentication"},{"title":"Independent fixture record","url":"/methods/superframe-audit"}],"course_id":"data-representation","position":2,"hero":"/diagrams/superframe-168-alignment-and-meaning.svg","evidence_status":"Teaching synthesis of reviewed source articles. Source-reported tests, independent examples and hypothetical exercises retain their labels.","author":"Rejuvenati editorial","date_modified":"2026-11-29","url":"/courses/data-representation/padding-and-integrity","course_url":"/courses/data-representation","prerequisites":["Binary notation; a short primer is included in the first lesson.","Integer multiplication and division."],"assessment":"Self-assessment with worked solutions and explicit criteria; no grade, credit, certificate or accreditation is awarded.","academic_status":"Independent educational materials, not an accredited programme, professional qualification or claim of institutional adoption.","license":"Original course prose and exercises: CC BY 4.0. Linked source materials and reused illustrations retain their own stated rights.","sources":[{"title":"168-bit source manuscript","url":"/reading/GEO-017"},{"title":"Independent conformance audit","url":"/methods/superframe-audit"}]}