Hashing
Hashing gives an artifact a compact cryptographic identity.
Basic concept
Section titled “Basic concept”Artifact Bytes ↓Hash Function ↓DigestA verification workflow can later calculate the digest again and compare it with the preserved expected value.
PowerShell example
Section titled “PowerShell example”Get-FileHash ".\artifact.json" -Algorithm SHA256Representation matters
Section titled “Representation matters”A hash is calculated over bytes.
That means these can change a hash even when a human considers the content equivalent:
- property ordering
- whitespace
- line endings
- character encoding
- serialization differences
For structured semantic state, DigiEmu therefore separates:
Raw Representation ↓Canonicalization ↓Stable Representation ↓HashHashing is not signing
Section titled “Hashing is not signing”A hash can detect change.
A digital signature adds a claim tied to control of a private key.
These are separate mechanisms.
Verification pattern
Section titled “Verification pattern”Preserved Hash │ │ compare ▼Computed Hash ↓MATCH / MISMATCHDeveloper rule
Section titled “Developer rule”Never compare hashes from two systems unless both systems agree on the exact representation being hashed.
Continue with Signatures →.