Hacker News new | ask | show | jobs
by noodlesUK 1426 days ago
Note: this is only for write protection passwords. Files that require a password to read are actually encrypted. I think any password that would prevent editing but allow reading would necessitate a fairly complex digital signature management scheme for data provenance (which might be useful in some settings).
1 comments

I feel like a hash of the contents + some secret bytes could be a convincing signature that only the owners of the secret bytes could author.

Alternatively, hash the contents and signed using asymmetric keys. This would allow for non private key owners to validate the integrity

> I feel like a hash of the contents + some secret bytes could be a convincing signature that only the owners of the secret bytes could author.

How would you validate the signature?

Parent is describing a keyed HMAC scheme. JWTs sometimes use them, but key management is a massive PITA.