w3f / ring-vrf

MIT License
39 stars 17 forks source link

EcVrfSigner trait support consumable preproofs #77

Open burdges opened 9 months ago

burdges commented 9 months ago

We make the EcVrfSinger trait consume self instead of borrow &self, so then in future it can work on preprepared proof types, where the proof should be consumed and destroyed once used.

We have a problem if we want to do this with the proofs generated elsewhere though: How do you ensure deletion of something serializable? We'd maybe compute the blinding factor using a key exchange run before the proof is generated, so then the signer device enforces the limit.

We maybe do not care though since parity vault always runs on fairly hefty devises, like androids or iphones, so then this change alone permits a direct implementation of session types that prevent reuse. It's only maybe kampela that's problematic here.