I'm trying to understand if this design is possible. I want to build a mapping that is zero-knowledge, between a
(pubkey, proposalId) => bytes form, without revealing the key.
Let's say we build a ZK circuit with private inputs
(pubkey, proposalId), and the public input (
sig = sign(H(pubkey, proposalId), pubkey). It's my understanding that if you sign with a public key, it's effectively public-key encryption, where you can only decrypt with the private key.
If the circuit logic verified that you could decrypt the sig, and hence the commit to
(pubkey, proposalId) was valid, then you could use
sig as a key in the ZK mapping. Am I correct in my thinking?