chore(integer): add getters to client keys

This commit is contained in:
tmontaigu
2023-03-13 11:47:10 +01:00
parent b0d059eef1
commit 8999ea3766
2 changed files with 8 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ impl CrtClientKey {
pub fn parameters(&self) -> crate::shortint::Parameters {
self.key.parameters()
}
pub fn moduli(&self) -> &[u64] {
self.moduli.as_slice()
}
}
impl From<(ClientKey, Vec<u64>)> for CrtClientKey {

View File

@@ -69,6 +69,10 @@ impl RadixClientKey {
pub fn decrypt_one_block(&self, ct: &ShortintCiphertext) -> u64 {
self.key.decrypt_one_block(ct)
}
pub fn num_blocks(&self) -> usize {
self.num_blocks
}
}
impl From<(ClientKey, usize)> for RadixClientKey {