nucypher / rust-umbral

Umbral implementation in Rust
52 stars 20 forks source link

port "IndisputableEvidence.evaluation_arguments()" from pyUmbral into rust-umbral #106

Closed bzzzzzzzzzzzzz closed 1 year ago

bzzzzzzzzzzzzz commented 2 years ago

If the IndisputableEvidence class (from pyUmbral ver<5.2.0) and its functions were available in rust-umbral (and its associated bindings: typescript, wasm, etc), browser applications could be more easily built that make use of a cfrag's NIZK proof on-chain (by calling the existing Adjudicator/UmbralDeserializer/ReEncryptionValidator contracts).

Possibly this could be a function that takes arguments

gather_evidence(capsule, cfrag, delegating_pubkey, receiving_pubkey, verifying_publkey, ursula_pubkey)

and would return the evaluation_arguments shared with Adjudicator.sol

Thanks! noad

bzzzzzzzzzzzzz commented 2 years ago

links for reference:

IndisputableEvidence https://github.com/nucypher/nucypher/blob/v5.1.0/nucypher/policy/collections.py#L575 Adjudicator.sol https://github.com/nucypher/nucypher-contracts/blob/main/contracts/contracts/Adjudicator.sol#L86

jMyles commented 1 year ago

Makes sense in broad terms. I do wonder if there's a simpler way to do browser verification; perhaps in nucypher-ts.

But yeah, I don't see a reason that evaluation_arguments ought to be available only in the python implementation.