Function reencrypt_with_rng

Source
pub fn reencrypt_with_rng(
    rng: &mut (impl CryptoRng + RngCore),
    capsule: &Capsule,
    verified_kfrag: VerifiedKeyFrag,
) -> VerifiedCapsuleFrag
Expand description

Reencrypts a Capsule object with a key fragment, creating a capsule fragment.

Having threshold (see generate_kfrags()) distinct fragments (along with the original capsule and the corresponding secret key) allows one to decrypt the original plaintext.

One can call KeyFrag::verify() before reencryption to check its integrity.