Skip to content

Commit

Permalink
Remove unused & incorrect ciphertext length method
Browse files Browse the repository at this point in the history
  • Loading branch information
cygnusv committed Aug 1, 2023
1 parent 0ec84b6 commit f427f0d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tpke/src/ciphertext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::ops::Mul;

use ark_ec::{pairing::Pairing, AffineRepr};
use ark_ff::{One, UniformRand};
use ark_serialize::{CanonicalSerialize, Compress};
use ark_serialize::CanonicalSerialize;
use chacha20poly1305::{
aead::{generic_array::GenericArray, Aead, KeyInit, Payload},
ChaCha20Poly1305,
Expand Down Expand Up @@ -60,12 +60,6 @@ impl<E: Pairing> Ciphertext<E> {
Err(Error::CiphertextVerificationFailed)
}
}

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

pub fn encrypt<E: Pairing>(
Expand Down

0 comments on commit f427f0d

Please sign in to comment.