Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketch client-facing and server-facing APIs #53

Closed
2 tasks done
piotr-roslaniec opened this issue Jan 28, 2023 · 4 comments
Closed
2 tasks done

Sketch client-facing and server-facing APIs #53

piotr-roslaniec opened this issue Jan 28, 2023 · 4 comments
Assignees
Labels
design decision 🚦 Requires a design decision help wanted Extra attention is needed product research
Milestone

Comments

@piotr-roslaniec
Copy link

piotr-roslaniec commented Jan 28, 2023

@piotr-roslaniec piotr-roslaniec added help wanted Extra attention is needed design decision 🚦 Requires a design decision product research labels Jan 28, 2023
@piotr-roslaniec piotr-roslaniec added this to the v0.2 milestone Jan 28, 2023
@theref theref changed the title Sketch client-facing and user-facing APIs Sketch client-facing and server-facing APIs Feb 1, 2023
@theref
Copy link

theref commented Feb 1, 2023

Client Side

  • create/initialise/build a cohort. Parameters are m, n, refresh_policy
  • can the client force a refresh?
  • encrypt
  • decrypt
  • revoke (this is really a protocol level endpoint, nothing to do with ferveo/tpke)
  • cohort/dkg ritual status?

@piotr-roslaniec
Copy link
Author

piotr-roslaniec commented Feb 1, 2023

create/initialise/build a cohort. Parameters are m, n, refresh_policy
can the client force a refresh?
revoke (this is really a protocol level endpoint, nothing to do with ferveo/tpke)
cohort/dkg ritual status?

Sounds like a job for nucypher-ts, nucypher/taco-web#166

encrypt
decrypt

Added encrypt, decrypt_with_shared_secret, decrypt_with_private_key to #59

@piotr-roslaniec
Copy link
Author

piotr-roslaniec commented Feb 1, 2023

Server API

Lifted from protocol description

  • Dkg::new(ritual_id: int, shares_num: int, threshold: int, validators: List[ExternalValidator], me: ExternalValidator)
  • Dkg::generate_transcript(rng): Transcript
  • Dkg::aggregate_transcripts(messages: List[(ExternalValidator, Transcript)]): AggregatedTranscript
  • AggregatedTranscript::validate(dkg: Dkg): Boolean
  • AggregatedTranscript::create_decryption_share(dkg: Dkg, ciphertext: Ciphertext, aad: bytes, unblinding_key: PrivateKey): DecryptionShare

Questions/design points:

  • Should we expose AggregatedTranscript::validate, or should it be baked into Dkg::aggregate_transcripts?
    • The former gives us the opportunity to provide the validator with some feedback, i.e. which transcript was bad
  • AggregatedTranscript::create_decryption_share takes Dkg as a parameter: Can we roll AggregatedTranscript methods into Dkg?
    • It would make for a more straightforward server API. Still, it requires mutating Dkg state in order to distinguish between two different DKG stages: transcript aggregation and decryption share creation (which is possible only after a sufficient number of transcripts was collected and validated).
  • Should we closely follow naming nomenclature from Ferveo or use something simpler in bindings?
    • Example: PubliclyVerifiableDkg vs Dkg

@piotr-roslaniec
Copy link
Author

Closed by #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design decision 🚦 Requires a design decision help wanted Extra attention is needed product research
Projects
Status: Completed
Development

No branches or pull requests

3 participants