Start with the asset and the consequence
A research dataset may need restricted reading, protection from incorrect changes and access for authorized researchers when needed. Describe the data, users and task, then ask what happens if it is exposed, altered or unavailable.
Confidentiality concerns unauthorized disclosure. Integrity concerns improper modification or destruction. Availability concerns reliable access for authorized use when needed. One incident can affect more than one goal.
Further reading: NIST FIPS 199: Security Categorization
Connect controls to threats and observable results
Access controls constrain who can read and write. Version history and verifiable backups support tracing and recovery. Redundancy and recovery drills support availability. A control’s effectiveness requires evidence in the stated scenario, not merely evidence that a product is installed.
Controls can create tradeoffs. Shutting a system down may prevent immediate network access while also stopping legitimate work. A decision should preserve the task, impact assumptions and acceptable recovery time rather than optimize one measure alone.
Matching hashes do not establish trusted origin
SHA-256 maps input bytes to a fixed-length digest. Comparing a file with a trusted expected digest checks whether its contents match that expectation. Comparing two locally generated digests demonstrates a change in the example, but does not authenticate a sender.
If a file and its digest come from the same compromised location, both may have been replaced. Integrity checking therefore also asks how the reference is trusted. The cryptography module distinguishes encryption, hashing and digital signatures.
Further reading: Python: hashlib
Example: a missing zero in a research table
A public synthetic dataset contains a value of 100, later changed to 10. Readers can still download it, and it contains no private data.
The central problem is an unexpected content change, so the main concern is integrity. Change history is needed to distinguish malice from error. Successful downloading supports availability at that moment, not correctness.
Conclusion: Compare a trusted version, trace the change and correct it. Do not automatically label this example a data disclosure.
Offline exercise: compare SHA-256 for synthetic data
Use local Python 3. The program hashes bytes defined inside it, reads no personal files, writes no files and makes no network connections.
- Download integrity_demo.py, read its two synthetic strings and predict the equal and changed comparisons.
- Run python3 integrity_demo.py and inspect the equal and changed booleans.
- Write one sentence about what the output supports and one about what it does not establish.
from hashlib import sha256
a = b'sample=100'
b = b'sample=10'
print('equal=' + str(sha256(a).digest() == sha256(a).digest()))
print('changed=' + str(sha256(a).digest() != sha256(b).digest()))Expected result
equal=True and changed=True. Identical bytes have matching digests; changing a character in this example changes the digest.
Check your work
Can you explain why this result establishes neither encryption nor sender authentication?
Finish and clean up
The program creates no files. Keep your explanation; retain or delete the downloaded demonstration as you prefer.