diff --git a/ferveo/src/pvss.rs b/ferveo/src/pvss.rs index 050e3dfd..e7236941 100644 --- a/ferveo/src/pvss.rs +++ b/ferveo/src/pvss.rs @@ -374,6 +374,7 @@ impl PubliclyVerifiableSS { .map_err(|e| e.into()) } + // TODO: Consider relocate to different place, maybe PrivateKeyShare? pub fn update_private_key_share_for_recovery( &self, validator_decryption_key: &E::ScalarField, diff --git a/ferveo/src/refresh.rs b/ferveo/src/refresh.rs index da6bd8e7..ec2b1a20 100644 --- a/ferveo/src/refresh.rs +++ b/ferveo/src/refresh.rs @@ -22,6 +22,7 @@ pub fn prepare_share_updates_for_recovery( prepare_share_updates_with_root::(domain_points, h, x_r, threshold, rng) } +// TODO: Consider relocating to PrivateKeyShare /// From PSS paper, section 4.2.3, (https://link.springer.com/content/pdf/10.1007/3-540-44750-4_27.pdf) pub fn apply_updates_to_private_share( private_key_share: &PrivateKeyShare, @@ -147,6 +148,7 @@ mod tests_refresh { remaining_participants: &[PrivateDecryptionContextSimple], ) -> Vec> { // Each participant prepares an update for each other participant + // TODO: Extract as parameter let domain_points = remaining_participants[0] .public_decryption_contexts .iter() diff --git a/tpke/src/combine.rs b/tpke/src/combine.rs index a46477fb..f9d8ddbb 100644 --- a/tpke/src/combine.rs +++ b/tpke/src/combine.rs @@ -56,6 +56,8 @@ pub fn prepare_combine_fast( .collect::>() } +// TODO: Combine `tpke::prepare_combine_simple` and `tpke::share_combine_simple` into +// one function and expose it in the tpke::api? pub fn prepare_combine_simple( domain: &[E::ScalarField], ) -> Vec { diff --git a/tpke/src/decryption.rs b/tpke/src/decryption.rs index 01ae5df7..0622e6a8 100644 --- a/tpke/src/decryption.rs +++ b/tpke/src/decryption.rs @@ -56,11 +56,13 @@ impl ValidatorShareChecksum { h: &E::G2, ciphertext: &Ciphertext, ) -> bool { + // See https://github.com/nucypher/ferveo/issues/42#issuecomment-1398953777 // D_i == e(C_i, Y_i) if *decryption_share != E::pairing(self.checksum, *share_aggregate).0 { return false; } + // TODO: use multipairing here (h_inv) // e(C_i, ek_i) == e(U, H) if E::pairing(self.checksum, *validator_public_key) != E::pairing(ciphertext.commitment, *h)