nucypher/ferveo

Serialize Ciphertext G1 and G2 points in compressed form

cygnusv opened this issue · 1 comments

pub fn serialized_length(&self) -> usize {
self.commitment.serialized_size(Compress::No)
+ self.auth_tag.serialized_size(Compress::No)
+ self.ciphertext.len()
}

This function is either incorrect & unused (in which case, it should be fixed/removed), or it's hinting that we're serializing the U and W components in uncompressed form (which is slightly wasteful).

The method above is not used and will be removed by #149. Regarding the original question, G1 and G2 points in ciphertexts are serialized in compressed form as seen on ferveo-common/src/serialization.rs.