nucypher/ferveo

Sketch client-facing and server-facing APIs

piotr-roslaniec opened this issue · 4 comments

  • Related to creating protocol description
  • Relevant issues:
theref commented

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?

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

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

Closed by #62