stellar / slingshot

A new blockchain architecture under active development, with a strong focus on scalability, privacy and safety
Apache License 2.0
415 stars 61 forks source link

zkvm: predicate to-key conversion #272

Open oleganza opened 5 years ago

oleganza commented 5 years ago

Based on https://github.com/interstellar/slingshot/pull/268/files#r275086852

We have two separate semantics for Predicate-to-Key conversion:

  1. On the prover's end, we need to convert ::Key/::Tree into "key witness thing". Say, to_key_witness()->Result<Multikey> (Multikey from MuSig). And fail if it's not unsignable, or if the predicate is ::Opaque.
  2. On the verifier's end, we need a separate method to_verification_key() that converts all variants into a VerificationKey and does not fail.