Urgent.News

What's breaking now, across hundreds of outlets.

Tech

A matching SHA-256 checksum is useful only with a trustworthy reference

You download an installer and find a SHA-256 string next to the download button. Your local hash matches. What have you learned? You have evidence that your file matches the bytes represented by that digest, assuming a correct calculation. You have not independently established who published the file if an attacker could replace both the installer and the digest on the same page. A checksum needs…

Downloading an installer and comparing its SHA-256 checksum with the value provided can only confirm that the file's bytes match the digest, provided the calculation is accurate. It does not independently verify the identity of the file's publisher. To make a publisher's decision, a trustworthy reference is required. According to NIST FIPS 180-4 — Secure Hash Standard, it is essential to calculate the checksum separately, without running the download itself.

To ensure correctness, compute the SHA-256 hash of the file, e.g., using OpenSSL on macOS/Linux or PowerShell on Windows. Verify that the release page specifies the SHA-256 version, the same operating system, and architecture. Remember that a Linux archive and a Windows installer will not have the same hash.

If the hash values differ, it could be due to incomplete download, wrong release asset, changed file, or malicious replacement. However, a mismatch alone does not indicate the specific cause. Record the expected value, observed value, release version, and source URL for future reference. Do not attempt to "repair" the test by manually changing the expected digest to match the file you have.

A mismatch indicates that the bytes do not match the reference. This confirms that the file has been tampered with, but it does not confirm that the publisher's identity has been compromised. For a stronger guarantee of the publisher's identity, a digital signature is necessary. A digital signature, as per NIST FIPS 186-5 — Digital Signature Standard, allows verification of data using a public key associated with the signer.

However, fetching the public key from the same untrusted source as the signature does not establish the publisher's identity. Follow the publisher's documented verification process instead of copying an OpenSSL command for a different format.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

GL.iNet Router Malware: How to Check Yours (the Cloud Fix Doesn't Remove It)

GL.iNet says attackers used its cloud remote management service to install malware on "some GL.iNet routers and KVM devices." It also says the hole is closed.

  • GL.iNet routers exploited via cloud service to install malware
  • Update firmware resolves infection, but cloud fix alone insufficient
  • Check for "crond -i /tmp/.log" process, install firmware update

How to decode a JWT in Python (and what decoding does not prove)

How to decode a JWT in Python (and what decoding does not prove) Read any token with the stdlib or PyJWT, then see exactly where decoding stops and verifying starts.

  • Split JWT token on dots and restore "=" padding
  • Decode payload segment with base64.urlsafeb64decode
  • Payload contains issuer, subject, audience, role, timestamps

A different perspective on text, information and knowledge

We now produce more text than anyone can read. Agent instructions, specifications, pipelines, models, requirements, notes, and more and more of it written by AI.

  • ADP framework developed to handle AI-generated text deluge
  • ADP transforms text files into structured formats for better comprehension
  • ADP maintains original text while providing additional views of hidden structure

More from Monday 23 November →