3 ms·
"it's not hard to add a hash to the messages that will be a commitment scheme to ensure that you have all horcruxes and they haven't been tampered with" Oh dea
by maqp 6y ago
"it's not hard to add a hash to the messages that will be a commitment scheme to ensure that you have all horcruxes and they haven't been tampered with"
Oh dear god. No, hashes aren't to provide authenticity and integrity for messages under hostile conditions, look into Message Authentication Codes (effectively keyed hashes) like HMAC-SHA256, or use modern hash function (SHA3-256 or BLAKE2) in H(key+message), or since you're going for information theoretic security, look into unconditionally secure MACs like one-time MAC and Carter-Wegman MAC. Also, make sure to compare the purported tag to the evaluated one with a constant time function. This is so low level I'm not at all confident at your ability to implement this stuff so please take a course in cryptography before implementing anything and if you do, make sure to put a huge banner "This is a hobby project intended to learn about cryptography, do not use it in production". This is to protect you and others.
- ljlolel 6y agoThat's why I wrote "commitment scheme" of which there are many and which secure one you use doesn't really matter.
- maqp 6y ago"That's why I wrote "commitment scheme" of which there are many and which secure one you use doesn't really matter." Please see https://en.wikipedia.org/wiki/Commitment_scheme https://en.wikipedia.org/wiki/Commitment_scheme It's a completely different thing. Authentication isn't about committing to something that's revealed later. Authentication is about detecting any changes in the plaintext content -- that would indicate the new message is from different author.