Sketch client-facing and server-facing APIs
piotr-roslaniec opened this issue · 4 comments
piotr-roslaniec commented
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?
piotr-roslaniec commented
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 commented
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 intoDkg::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
takesDkg
as a parameter: Can we rollAggregatedTranscript
methods intoDkg
?- 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).
- It would make for a more straightforward server API. Still, it requires mutating
- Should we closely follow naming nomenclature from Ferveo or use something simpler in bindings?
- Example:
PubliclyVerifiableDkg
vsDkg
- Example:
piotr-roslaniec commented
Closed by #62