3 ms·
> One way to do this is to hash the file and store that hash somewhere you trust, which i think is what the person is suggesting. This approach has somewhat lim
by lijogdfljk 4y ago
> One way to do this is to hash the file and store that hash somewhere you trust, which i think is what the person is suggesting. This approach has somewhat limited applicability, because if you already have a trusted channel, why are you using cryptography? (Yes there are lots of exceptions to that where crrypto still makes sense, but in general the point stands)
Yup. In my case my system is content addressed, so everything is a hash. So one one hand, sign-less encryption will work fine if i know the HEAD hash, as you mentioned. However i also want these backups to work from no local store. Ie i don't know the HEAD, and in that case someone could tamper with my pointer.
Kinda surprising that Age doesn't have a way to handle this. Shame, but good to learn.
Cryptopals is interesting, appreciate the link! I'll also look into that book, thank you! Did you find the book a bit deep? I have no intention of writing my own crypto, i just want to use it reliably and correctly.
- bawolff 4y ago> Kinda surprising that Age doesn't have a way to handle this. Shame, but good to learn. The big problem is there are no really good ways to deal with this problem fully. If you use digital signatures, you have to have a trusted method of distributing the verification keys. If you have a secure method of distributing keys, you could also just distribute the encrypted file (or its hash) via that secure method. Digital signatures usually work best when you previously had a secure channel but dont anymore (which is actually fairly common). But once you start doing that, often you start to want doing complex key management (e.g. PKI, tofu etc. Who manages the trust store), and how most appropriately to do that can be application specific (lots of tradeoffs and all options suck in different ways). So i kind of get why the author wants people to use a separate tool for that (even if it is a bit of a cop out). > Did you find the book a bit deep? I have no intention of writing my own crypto, i just want to use it reliably and correctly. Its been a while since i read it, but it was mostly about how to use different crypto primitives properly. It was not about how to design a block cipher or anything like that.
- lijogdfljk 4y ago> If you have a secure method of distributing keys, you could also just distribute the encrypted file (or its hash) via that secure method. Well in my case the central thing is mutable, changing. Ie it's a pointer to the HEAD, in git terms. So yes, i have to distribute keys but the keys are immutable and can be distributed. The HEAD however can't, or at least can't with assurances that it's trusted. Which is kinda the root issue i suppose. To answer the question of "the file on S3 is mutable, did i actually write it?". I have to be able to answer that > Its been a while since i read it, but it was mostly about how to use different crypto primitives properly. It was not about how to design a block cipher or anything like that. That actually sounds great. Definitely interested, thank you!