w3f / schnorrkel

Schnorr VRFs and signatures on the Ristretto group
BSD 3-Clause "New" or "Revised" License
306 stars 92 forks source link

Adapt ::aead to name change of NewAead to KeyInit #97

Closed nc7s closed 8 months ago

nc7s commented 9 months ago

I'm interested in using schnorrkel derived keys as DH keys, but the ::aead module seems unfinished: can not compile, lacks documentation, etc.

A first commit adapts to the name change of NewAead to KeyInit in aead crate (https://github.com/w3f/schnorrkel/issues/90), while I look forward to finishing the module along the line.

burdges commented 9 months ago

This is just an update of the aead module? okay cool.

We should ideally discuss if this module is in a good enough form, especially if folks want to use it with key derivation.

We should provide a noise feature & module which implements noise_protocol::DH trait probably, but..

Almost anyone using this wants one-off messages not handshakes I think, so that's not noise. I suppose derivation provides an interesting option here, but not sure soft derivations play nicely.

nc7s commented 9 months ago

My intended use case would be that, with only a signing key of Alice, Bob can derive an encryption from it, while Alice can later derive the corresponding decryption key. Basically, to avoid a "standing" encryption key. There's no prolonged data exchange here, so it's indeed "one-off".

On a second thought, a PR isn't the best place to track something like this, and I'm no cryptographer either. Like, I don't really understand how Noise works, although it seems good to have.

burdges commented 8 months ago

Is this useful to you in its current state? I can try to figure out the failed CI, which may not be anything to do with you, and then go ahead and merge.. and other stuff can be another topic.

nc7s commented 8 months ago

Just saw the failures so tried to fix them. Also this is just a normal PR to fix a few things, no need to change your course ;)

burdges commented 8 months ago

I fixed the CI and merged this. I'm not sure what AEAD functionality would be possible without getrandom, but maybe something.