@lynne
is the following:
KEK = SHA3-256("I like strawberry cake" || ecdhKeyShare)
secure?
If yes, then replacing the constant string in there with something more random should be at least as secure, right?
@lynne
is the following:
KEK = SHA3-256("I like strawberry cake" || ecdhKeyShare)
secure?
If yes, then replacing the constant string in there with something more random should be at least as secure, right?
@wolf480pl@mstdn.io @lynne@pars.ee yes, SHA3 is not vulnerable to length extension attacks or similar stuff
@wolf480pl@mstdn.io @lynne@pars.ee It's got to do with the sponge construction as far I'm aware, because there's hidden state and how it's updated depends both on the inputs and the state.
Though probably you'd want to use some kind of KDF for this anyways, SHA3 has a KDF mode that's faster than just using in HKDF
@ignaloidas @lynne
Why?
I mean, it's obviously safe in Random Oracle Model, where the only way to learn anything about a hash function's output is to feed it the exact input that produces that output. So knowing some of the bits of the input gives you nothing.
But Random Oracles don't exist IRL, and there are cryptographic schemes that are secure in Random Oracle Model but insecure with any real hash function.
So what is SHA-3 then? A collision-resistant function?
@ignaloidas @lynne what if it's H(a||b), you control a, but don't control b?
@wolf480pl@mstdn.io @lynne@pars.ee still safe for SHA3, AFAIK
@ignaloidas @lynne I don't think length exrension attacks are applicable here?
@wolf480pl@mstdn.io @lynne@pars.ee this very much feels like a length extension attack though, no?
You have some predefined bit at the start that you can't control, and then you're trying to get to some other state with what you control.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.