entropyxyz/synedrion

Bundle the public key with `Ciphertext`

Closed this issue · 1 comments

fjarri commented

Instead of specifying the public key with each homomorphic operation on Ciphertexts (clunky and error-prone), we can create a bundled struct with the public key inside. So instead of

let x = y
    .homomorphic_mul(&pk, &a)
    .homomorphic_add(&pk, &b);

we will be able to just write

let x = y
    .homomorphic_mul(&a)
    .homomorphic_add(&b);
fjarri commented

This bundled Ciphertext may also have its value converted to Montgomery space, to streamline successive operations.