diff --git a/_typos.toml b/_typos.toml index d447ea570..01bdcee84 100644 --- a/_typos.toml +++ b/_typos.toml @@ -13,6 +13,7 @@ extend-ignore-identifiers-re = [ # Example in trivium "C9217BA0D762ACA1", "0x[0-9a-fA-F]+", + "xrt_coreutil", ] [files] diff --git a/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh b/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh index 278f48ee1..0bcadc9bf 100644 --- a/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh +++ b/backends/tfhe-cuda-backend/cuda/src/crypto/keyswitch.cuh @@ -36,7 +36,7 @@ __device__ Torus *get_ith_block(Torus *ksk, int i, int level, * */ // Each thread in x are used to calculate one output. -// threads in y are used to paralelize the lwe_dimension_in loop. +// threads in y are used to parallelize the lwe_dimension_in loop. // shared memory is used to store intermediate results of the reduction. // Note: To reduce register pressure we have slightly changed the algorithm, // the idea consists in calculating the negate value of the output. So, instead diff --git a/backends/tfhe-hpu-backend/config_store/sim/hpu_config.toml b/backends/tfhe-hpu-backend/config_store/sim/hpu_config.toml index 80e7a4827..fa5f5ab8f 100644 --- a/backends/tfhe-hpu-backend/config_store/sim/hpu_config.toml +++ b/backends/tfhe-hpu-backend/config_store/sim/hpu_config.toml @@ -26,7 +26,7 @@ lut_pc = {Hbm={pc=34}} fw_size= 16777215 # i.e. 16 MiB - fw_pc = {Ddr= {offset= 0x3900_0000}} # NB: Allocation must take place in the Discret DDR + fw_pc = {Ddr= {offset= 0x3900_0000}} # NB: Allocation must take place in the Discrete DDR bsk_pc = [ {Hbm={pc=8}}, diff --git a/backends/tfhe-hpu-backend/config_store/v80/hpu_config.toml b/backends/tfhe-hpu-backend/config_store/v80/hpu_config.toml index 0760956ac..889e8cfdc 100644 --- a/backends/tfhe-hpu-backend/config_store/v80/hpu_config.toml +++ b/backends/tfhe-hpu-backend/config_store/v80/hpu_config.toml @@ -31,7 +31,7 @@ lut_pc = {Hbm={pc=34}} fw_size= 16777216 # i.e. 16 MiB - fw_pc = {Ddr= {offset= 0x3900_0000}} # NB: Allocation must take place in the Discret DDR + fw_pc = {Ddr= {offset= 0x3900_0000}} # NB: Allocation must take place in the Discrete DDR bsk_pc = [ {Hbm={pc=8}}, diff --git a/backends/tfhe-hpu-backend/src/asm/dop/field.rs b/backends/tfhe-hpu-backend/src/asm/dop/field.rs index af45d80c4..c7805f5bb 100644 --- a/backends/tfhe-hpu-backend/src/asm/dop/field.rs +++ b/backends/tfhe-hpu-backend/src/asm/dop/field.rs @@ -81,7 +81,7 @@ pub enum ImmId { } impl ImmId { - /// Create new immediat template + /// Create new immediate template pub fn new_var(tid: u8, bid: u8) -> Self { Self::Var { tid, bid } } @@ -132,7 +132,7 @@ pub struct PeArithInsn { } /// PeaMsg instructions -/// Arithmetic operation that use one destination register, one source register and an immediat +/// Arithmetic operation that use one destination register, one source register and an immediate /// value #[derive(Clone, Copy, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct PeArithMsgInsn { diff --git a/backends/tfhe-hpu-backend/src/asm/dop/fmt.rs b/backends/tfhe-hpu-backend/src/asm/dop/fmt.rs index 48e68c623..94d1af5c7 100644 --- a/backends/tfhe-hpu-backend/src/asm/dop/fmt.rs +++ b/backends/tfhe-hpu-backend/src/asm/dop/fmt.rs @@ -69,7 +69,7 @@ impl From<&PeArithHex> for PeArithInsn { } /// PeaMsg instructions -/// Arithmetic operation that use one destination register, one source register and an immediat +/// Arithmetic operation that use one destination register, one source register and an immediate /// value #[bitfield(u32)] pub struct PeArithMsgHex { diff --git a/backends/tfhe-hpu-backend/src/asm/iop/arg.rs b/backends/tfhe-hpu-backend/src/asm/iop/arg.rs index 5c044b8a0..2f5d11710 100644 --- a/backends/tfhe-hpu-backend/src/asm/iop/arg.rs +++ b/backends/tfhe-hpu-backend/src/asm/iop/arg.rs @@ -4,7 +4,7 @@ use super::*; use field::{ - FwMode, IOpHeader, IOpcode, ImmBundle, Immediat, Operand, OperandBlock, OperandBundle, + FwMode, IOpHeader, IOpcode, ImmBundle, Immediate, Operand, OperandBlock, OperandBundle, }; use lazy_static::lazy_static; @@ -393,7 +393,7 @@ impl std::str::FromStr for ImmBundle { .map_err(|err| ParsingError::InvalidArg(err.to_string()))? }; - Ok(Immediat::from_cst(imm)) + Ok(Immediate::from_cst(imm)) }) .collect::, ParsingError>>()?; @@ -475,7 +475,7 @@ impl std::fmt::Display for IOp { // Source operands list write!(f, " <{}>", self.src)?; - // Immediat operands list [Optional] + // Immediate operands list [Optional] if self.header.has_imm { write!(f, " <{}>", self.imm)?; } diff --git a/backends/tfhe-hpu-backend/src/asm/iop/field.rs b/backends/tfhe-hpu-backend/src/asm/iop/field.rs index 7f9d6f418..bc3c96182 100644 --- a/backends/tfhe-hpu-backend/src/asm/iop/field.rs +++ b/backends/tfhe-hpu-backend/src/asm/iop/field.rs @@ -75,7 +75,7 @@ impl Operand { } } -/// Create a dedicated type for a collection of Immediat +/// Create a dedicated type for a collection of Immediate /// This is to enable trait implementation on it (c.f arg) #[derive(Debug, Clone)] pub struct OperandBundle(Vec); @@ -142,32 +142,32 @@ impl OperandBundle { // Immediate operands // ------------------------------------------------------------------------------------------------ -/// Immediat Size -/// => Number of valid digit in following immediat +/// Immediate Size +/// => Number of valid digit in following immediate /// To obtain the number of valid bits, user should multiply by the msg_width #[derive(Debug, Clone, Copy, PartialEq)] pub struct ImmBlock(pub u16); -/// Immediat header +/// Immediate header /// Use to implement top-level parser manually #[derive(Debug, Clone, Copy, PartialEq)] -pub struct ImmediatHeader { +pub struct ImmediateHeader { pub(super) lsb_msg: u16, pub(super) block: ImmBlock, pub(super) is_last: bool, pub(super) kind: OperandKind, } -/// Full Immediat representation (i.e. header + data) +/// Full Immediate representation (i.e. header + data) #[derive(Debug, Clone, PartialEq)] -pub struct Immediat { +pub struct Immediate { pub(super) kind: OperandKind, pub(super) is_last: bool, pub(super) block: ImmBlock, pub(super) msg: Vec, } -impl Immediat { +impl Immediate { /// Access imm msg for template patching /// Extract the correct block (i.e. MSG_WIDTH chunk) pub fn msg_block(&self, bid: u8) -> u16 { @@ -217,7 +217,7 @@ impl Immediat { } } -impl Immediat { +impl Immediate { #[tracing::instrument(level = "trace", ret)] pub fn from_words(stream: &[IOpWordRepr]) -> Result<(Self, usize), HexParsingError> { // Keep track of the current peak index @@ -226,7 +226,7 @@ impl Immediat { // 1. Parse header let header = if let Some(header_word) = stream.get(peak_words) { peak_words += 1; - ImmediatHeader::from(&fmt::ImmediatHeaderHex::from_bits(*header_word)) + ImmediateHeader::from(&fmt::ImmediateHeaderHex::from_bits(*header_word)) } else { return Err(HexParsingError::EmptyStream); }; @@ -276,13 +276,13 @@ impl Immediat { pub fn to_words(&self) -> Vec { let mut words = Vec::new(); - let header = ImmediatHeader { + let header = ImmediateHeader { lsb_msg: *self.msg.first().unwrap_or(&0), block: self.block, is_last: self.is_last, kind: self.kind, }; - words.push(fmt::ImmediatHeaderHex::from(&header).into_bits()); + words.push(fmt::ImmediateHeaderHex::from(&header).into_bits()); if self.msg.len() > 1 { for imm in self.msg[1..] @@ -302,10 +302,10 @@ impl Immediat { } } -/// Create a dedicated type for a collection of Immediat +/// Create a dedicated type for a collection of Immediate /// This is to enable trait implementation on it (c.f arg) #[derive(Debug, Clone)] -pub struct ImmBundle(Vec); +pub struct ImmBundle(Vec); impl ImmBundle { #[tracing::instrument(level = "trace", ret)] @@ -315,7 +315,7 @@ impl ImmBundle { let mut imm_list = Vec::new(); loop { - let (imm, peaked) = Immediat::from_words(&stream[peak_words..])?; + let (imm, peaked) = Immediate::from_words(&stream[peak_words..])?; peak_words += peaked; let is_last = imm.is_last; @@ -335,9 +335,9 @@ impl ImmBundle { } } -impl From> for ImmBundle { +impl From> for ImmBundle { #[tracing::instrument(level = "trace", ret)] - fn from(inner: Vec) -> Self { + fn from(inner: Vec) -> Self { let mut inner = inner; // Enforce correct is_last handling inner.iter_mut().for_each(|op| op.is_last = false); @@ -349,7 +349,7 @@ impl From> for ImmBundle { } impl std::ops::Deref for ImmBundle { - type Target = Vec; + type Target = Vec; fn deref(&self) -> &Self::Target { &self.0 @@ -392,7 +392,7 @@ use std::collections::VecDeque; /// Implement construction /// Used to construct IOp from Backend HpuVar impl IOp { - pub fn new(opcode: IOpcode, dst: Vec, src: Vec, imm: Vec) -> Self { + pub fn new(opcode: IOpcode, dst: Vec, src: Vec, imm: Vec) -> Self { let dst_align = dst.iter().map(|x| x.block).max().unwrap(); let src_align = src.iter().map(|x| x.block).max().unwrap(); let has_imm = !imm.is_empty(); @@ -504,7 +504,7 @@ impl IOp { src }; - // 4. Parse Immediat [Optional] + // 4. Parse Immediate [Optional] let (imm, peaked) = if header.has_imm { ImmBundle::from_words(&stream.as_slices().0[peak_words..])? } else { @@ -533,7 +533,7 @@ impl IOp { words.extend(self.dst.to_words()); // 3. Sources words.extend(self.src.to_words()); - // 4. Immediat + // 4. Immediate words.extend(self.imm.to_words()); words } diff --git a/backends/tfhe-hpu-backend/src/asm/iop/fmt.rs b/backends/tfhe-hpu-backend/src/asm/iop/fmt.rs index fe3baf7e6..fb98b3c9e 100644 --- a/backends/tfhe-hpu-backend/src/asm/iop/fmt.rs +++ b/backends/tfhe-hpu-backend/src/asm/iop/fmt.rs @@ -60,7 +60,7 @@ impl From<&Operand> for OperandHex { } #[bitfield(u32)] -pub struct ImmediatHeaderHex { +pub struct ImmediateHeaderHex { #[bits(16)] lsb_msg: u16, #[bits(12)] @@ -73,8 +73,8 @@ pub struct ImmediatHeaderHex { kind: u8, } -impl From<&ImmediatHeaderHex> for field::ImmediatHeader { - fn from(value: &ImmediatHeaderHex) -> Self { +impl From<&ImmediateHeaderHex> for field::ImmediateHeader { + fn from(value: &ImmediateHeaderHex) -> Self { let kind = if value.kind() == OperandKind::Src as u8 { OperandKind::Src } else if value.kind() == OperandKind::Dst as u8 { @@ -94,8 +94,8 @@ impl From<&ImmediatHeaderHex> for field::ImmediatHeader { } } -impl From<&field::ImmediatHeader> for ImmediatHeaderHex { - fn from(value: &field::ImmediatHeader) -> Self { +impl From<&field::ImmediateHeader> for ImmediateHeaderHex { + fn from(value: &field::ImmediateHeader) -> Self { Self::new() .with_lsb_msg(value.lsb_msg) .with_block(value.block.0) diff --git a/backends/tfhe-hpu-backend/src/asm/iop/mod.rs b/backends/tfhe-hpu-backend/src/asm/iop/mod.rs index 3f4f70b4a..6f764a394 100644 --- a/backends/tfhe-hpu-backend/src/asm/iop/mod.rs +++ b/backends/tfhe-hpu-backend/src/asm/iop/mod.rs @@ -2,7 +2,7 @@ //! IOp definition mod field; -pub use field::{HexParsingError, IOp, IOpcode, Immediat, Operand, OperandKind}; +pub use field::{HexParsingError, IOp, IOpcode, Immediate, Operand, OperandKind}; mod fmt; pub use fmt::{IOpRepr, IOpWordRepr}; mod iop_macro; diff --git a/backends/tfhe-hpu-backend/src/asm/tests/dop.asm b/backends/tfhe-hpu-backend/src/asm/tests/dop.asm index 4346a5ba1..419f74060 100644 --- a/backends/tfhe-hpu-backend/src/asm/tests/dop.asm +++ b/backends/tfhe-hpu-backend/src/asm/tests/dop.asm @@ -20,7 +20,7 @@ SUB R2 R1 R3 MUL R2 R1 R3 MAC R2 R1 R3 4 -; Test ArithMsg operation with various immediat template format +; Test ArithMsg operation with various immediate template format ADDS R2 R1 10 SUBS R2 R1 TI[4].0 SSUB R2 R1 TI[2].4 diff --git a/backends/tfhe-hpu-backend/src/asm/tests/iop.asm b/backends/tfhe-hpu-backend/src/asm/tests/iop.asm index 4a87e003b..0592127a2 100644 --- a/backends/tfhe-hpu-backend/src/asm/tests/iop.asm +++ b/backends/tfhe-hpu-backend/src/asm/tests/iop.asm @@ -2,7 +2,7 @@ ; with the != available arguments modes ; Simple Mode: -; 1 destination, 2 sources, no immediat +; 1 destination, 2 sources, no immediate ; With raw opcode -> 0x35 IOP[0x35] ; With raw opcode -> 40 and dynamic Fw generation @@ -11,7 +11,7 @@ IOP[0x35] ; With opcode alias -> MUL MUL -; Simple Mode with immediat +; Simple Mode with immediate ; Source operands are defined through vector mode MULS <0xaf> @@ -26,6 +26,6 @@ IOP[0x60] ; Previous operation could be defined with vector format. IOP[0x40] -; With multiple immediat +; With multiple immediate ; Example this operation could compute D <- A*4 + B*8 IOP[0x0] <0xdeadc0de> diff --git a/backends/tfhe-hpu-backend/src/ffi/v80/pdi/mod.rs b/backends/tfhe-hpu-backend/src/ffi/v80/pdi/mod.rs index 0614d9712..9cf24a403 100644 --- a/backends/tfhe-hpu-backend/src/ffi/v80/pdi/mod.rs +++ b/backends/tfhe-hpu-backend/src/ffi/v80/pdi/mod.rs @@ -84,7 +84,7 @@ impl HpuV80Pdi { } #[allow(unused)] - /// Deconstruct HpuV80Pdi into a folder with discret files + /// Deconstruct HpuV80Pdi into a folder with discrete files pub fn to_folder(&self, folder_path: &str) -> Result<(), Box> { let metadata_path = Path::new(folder_path).join("metadata.toml"); self.metadata.to_toml( diff --git a/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp.rs b/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp.rs index 700ee37c5..f978bf420 100644 --- a/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp.rs +++ b/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp.rs @@ -100,11 +100,11 @@ pub fn iop_adds(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic addx function iop_addx(prog, &mut dst, None, &src_a, &src_b); } @@ -134,18 +134,18 @@ pub fn iop_overflow_adds(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic addx function iop_addx(prog, &mut dst, Some(&mut flag[0]), &src_a, &src_b); } /// Generic Add operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_addx( prog: &mut Program, @@ -191,7 +191,7 @@ pub fn iop_sub(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -207,11 +207,11 @@ pub fn iop_subs(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic subx function iop_subx(prog, &mut dst, None, &src_a, &src_b); } @@ -224,7 +224,7 @@ pub fn iop_overflow_sub(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -241,18 +241,18 @@ pub fn iop_overflow_subs(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic subx function iop_subx(prog, &mut dst, Some(&mut flag[0]), &src_a, &src_b); } /// Generic sub operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_subx( prog: &mut Program, @@ -324,18 +324,18 @@ pub fn iop_ssub(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SSUB Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SSUB Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic subx function iop_ssubx(prog, &mut dst, None, &src_a, &src_b); } /// Generic SSUB operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_ssubx( prog: &mut Program, @@ -406,11 +406,11 @@ pub fn iop_overflow_ssub(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic ssubx function iop_ssubx(prog, &mut dst, Some(&mut flag[0]), &src_a, &src_b); } @@ -422,7 +422,7 @@ pub fn iop_mul(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -437,11 +437,11 @@ pub fn iop_muls(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic mulx function iop_mulx(prog, &mut dst, None, &src_a, &src_b); } @@ -454,7 +454,7 @@ pub fn iop_overflow_mul(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -471,18 +471,18 @@ pub fn iop_overflow_muls(prog: &mut Program) { let mut flag = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic mulx function iop_mulx(prog, &mut dst, Some(&mut flag[0]), &src_a, &src_b); } /// Generic mul operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_mulx( prog: &mut Program, @@ -994,11 +994,11 @@ pub fn iop_shift_scalar_right(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // Src -> Operand let src = prog.iop_template_var(OperandKind::Src, 0); - // Amount-> Immediat + // Amount-> Immediate let amount = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SHIFTS_R Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SHIFTS_R Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic rotx function iop_scalar_shiftrotx(prog, ShiftKind::ShiftRight, &mut dst, &src, &amount); } @@ -1010,11 +1010,11 @@ pub fn iop_shift_scalar_left(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // Src -> Operand let src = prog.iop_template_var(OperandKind::Src, 0); - // Amount-> Immediat + // Amount-> Immediate let amount = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SHIFTS_L Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SHIFTS_L Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic rotx function iop_scalar_shiftrotx(prog, ShiftKind::ShiftLeft, &mut dst, &src, &amount); } @@ -1026,11 +1026,11 @@ pub fn iop_rotate_scalar_right(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // Src -> Operand let src = prog.iop_template_var(OperandKind::Src, 0); - // Amount-> Immediat + // Amount-> Immediate let amount = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("ROTS_R Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("ROTS_R Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic rotx function iop_scalar_shiftrotx(prog, ShiftKind::RotRight, &mut dst, &src, &amount); } @@ -1041,11 +1041,11 @@ pub fn iop_rotate_scalar_left(prog: &mut Program) { let mut dst = prog.iop_template_var(OperandKind::Dst, 0); // Src -> Operand let src = prog.iop_template_var(OperandKind::Src, 0); - // Amount-> Immediat + // Amount-> Immediate let amount = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("ROTS_L Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("ROTS_L Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic rotx function iop_scalar_shiftrotx(prog, ShiftKind::RotRight, &mut dst, &src, &amount); } @@ -1118,7 +1118,7 @@ pub fn iop_cmp(prog: &mut Program, cmp_op: Pbs) { /// Generic Cmp operation /// One destination block and two sources operands -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_cmpx( prog: &mut Program, diff --git a/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp_div.rs b/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp_div.rs index ea5ac4a0f..58547e33e 100644 --- a/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp_div.rs +++ b/backends/tfhe-hpu-backend/src/fw/fw_impl/ilp_div.rs @@ -21,7 +21,7 @@ pub fn iop_div(prog: &mut Program) { let mut dst_remain = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -37,11 +37,11 @@ pub fn iop_divs(prog: &mut Program) { let mut dst_remain = prog.iop_template_var(OperandKind::Dst, 1); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("DIVS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("DIVS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic divx function // TODO: do computation on immediate directly for more efficiency. // Workaround: transform immediate into ct. @@ -52,7 +52,7 @@ pub fn iop_divs(prog: &mut Program) { /// Generic div operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate pub fn iop_divx( prog: &mut Program, dst_quotient: &mut [metavar::MetaVarCell], @@ -80,7 +80,7 @@ pub fn iop_mod(prog: &mut Program) { let mut dst_remain = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -95,11 +95,11 @@ pub fn iop_mods(prog: &mut Program) { let mut dst_remain = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("MODS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("MODS Operand::Dst Operand::Src Operand::Immediate".to_string()); // Deferred implementation to generic modx function // TODO: do computation on immediate directly for more efficiency. // Workaround: transform immediate into ct. @@ -110,7 +110,7 @@ pub fn iop_mods(prog: &mut Program) { /// Generic mod operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate pub fn iop_modx( prog: &mut Program, dst_remain: &mut [metavar::MetaVarCell], diff --git a/backends/tfhe-hpu-backend/src/fw/fw_impl/llt/mod.rs b/backends/tfhe-hpu-backend/src/fw/fw_impl/llt/mod.rs index 44103c224..35e5d5ec1 100644 --- a/backends/tfhe-hpu-backend/src/fw/fw_impl/llt/mod.rs +++ b/backends/tfhe-hpu-backend/src/fw/fw_impl/llt/mod.rs @@ -98,7 +98,7 @@ pub fn iop_add(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -123,11 +123,11 @@ pub fn iop_adds(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("ADDS Operand::Dst Operand::Src Operand::Immediate".to_string()); iop_addx(prog, dst, src_a, src_b); } @@ -138,7 +138,7 @@ pub fn iop_sub(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -152,11 +152,11 @@ pub fn iop_subs(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SUBS Operand::Dst Operand::Src Operand::Immediate".to_string()); iop_subx(prog, dst, src_a, src_b); } @@ -166,11 +166,11 @@ pub fn iop_ssub(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Imm, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 0); // Add Comment header - prog.push_comment("SSUB Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("SSUB Operand::Dst Operand::Src Operand::Immediate".to_string()); iop_subx(prog, dst, src_a, src_b); } @@ -199,7 +199,7 @@ pub fn iop_mul(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Src, 1); // Add Comment header @@ -215,11 +215,11 @@ pub fn iop_muls(prog: &mut Program) { let dst = prog.iop_template_var(OperandKind::Dst, 0); // SrcA -> Operand let src_a = prog.iop_template_var(OperandKind::Src, 0); - // SrcB -> Immediat + // SrcB -> Immediate let src_b = prog.iop_template_var(OperandKind::Imm, 0); // Add Comment header - prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediat".to_string()); + prog.push_comment("MULS Operand::Dst Operand::Src Operand::Immediate".to_string()); iop_mulx(prog, dst, src_a, src_b).add_to_prog(prog); } @@ -534,7 +534,7 @@ pub fn iop_mulx( /// Generic mul operation /// One destination and two sources operation -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_mulx_ser( prog: &mut Program, @@ -654,7 +654,7 @@ pub fn iop_mulx_ser( /// Generic Cmp operation /// One destination block and two sources operands -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_cmpx( prog: &mut Program, @@ -673,7 +673,7 @@ pub fn iop_cmpx( /// Generic Cmp operation /// One destination block and two sources operands -/// Source could be Operand or Immediat +/// Source could be Operand or Immediate #[instrument(level = "trace", skip(prog))] pub fn iop_cmpx_rtl( prog: &mut Program, diff --git a/backends/tfhe-hpu-backend/src/fw/mod.rs b/backends/tfhe-hpu-backend/src/fw/mod.rs index d0d41bd8d..d6cd9e0ef 100644 --- a/backends/tfhe-hpu-backend/src/fw/mod.rs +++ b/backends/tfhe-hpu-backend/src/fw/mod.rs @@ -3,7 +3,7 @@ //! //! Provide two concrete implementation of those traits //! * DigitOperations (DOp) -//! * IntegerOperarions (IOp) +//! * IntegerOperations (IOp) pub mod fw_impl; pub mod isc_sim; diff --git a/backends/tfhe-hpu-backend/src/fw/program.rs b/backends/tfhe-hpu-backend/src/fw/program.rs index 571990cc5..c79ced070 100644 --- a/backends/tfhe-hpu-backend/src/fw/program.rs +++ b/backends/tfhe-hpu-backend/src/fw/program.rs @@ -382,9 +382,9 @@ impl Program { } /// Create templated arguments - /// kind is used to specify if it's bind to src/dst or immediat template + /// kind is used to specify if it's bind to src/dst or immediate template /// pos_id is used to bind the template to an IOp operand position - // TODO pass the associated operand or immediat to obtain the inner blk properties instead of + // TODO pass the associated operand or immediate to obtain the inner blk properties instead of // using the global one pub fn iop_template_var(&mut self, kind: asm::OperandKind, pos_id: u8) -> Vec { let nb_blk = self.params().blk_w() as u8; diff --git a/backends/tfhe-hpu-backend/src/interface/cmd.rs b/backends/tfhe-hpu-backend/src/interface/cmd.rs index 7be7ee499..e59347d4f 100644 --- a/backends/tfhe-hpu-backend/src/interface/cmd.rs +++ b/backends/tfhe-hpu-backend/src/interface/cmd.rs @@ -2,11 +2,11 @@ /// Help with IOp management over HPU /// Track IOp status and handle backward update of associated HpuVariable use super::*; -use crate::asm::iop::{Immediat, Operand, OperandKind}; +use crate::asm::iop::{Immediate, Operand, OperandKind}; use crate::asm::{IOp, IOpcode}; use variable::HpuVarWrapped; -/// Underlying type used for Immediat value; +/// Underlying type used for Immediate value; pub type HpuImm = u128; /// Structure that hold an IOp with there associated operands @@ -15,7 +15,7 @@ pub struct HpuCmd { pub(crate) op: IOp, pub(crate) dst: Vec, pub(crate) src: Vec, - // NB: No need to track Immediat lifetime. It's simply constant completely held by the IOp + // NB: No need to track Immediate lifetime. It's simply constant completely held by the IOp // definition } @@ -75,7 +75,7 @@ impl HpuCmd { .collect::>(); let imm_op = imm .iter() - .map(|var| Immediat::from_cst(*var)) + .map(|var| Immediate::from_cst(*var)) .collect::>(); let op = IOp::new(opcode, dst_op, src_op, imm_op); diff --git a/mockups/tfhe-hpu-mockup/src/modules/ucore.rs b/mockups/tfhe-hpu-mockup/src/modules/ucore.rs index ee55fa8a9..4c93dd4a1 100644 --- a/mockups/tfhe-hpu-mockup/src/modules/ucore.rs +++ b/mockups/tfhe-hpu-mockup/src/modules/ucore.rs @@ -113,7 +113,7 @@ impl UCore { patch_imm(iop, imm); dop_patch } - // TODO Patch immediat + // TODO Patch immediate _ => dop_patch, } }) @@ -126,7 +126,7 @@ impl UCore { } } -/// Utility function to patch immediat argument +/// Utility function to patch immediate argument fn patch_imm(iop: &hpu_asm::IOp, imm: &mut hpu_asm::ImmId) { *imm = match imm { hpu_asm::ImmId::Cst(val) => hpu_asm::ImmId::Cst(*val), diff --git a/tfhe/docs/getting-started/quick-start.md b/tfhe/docs/getting-started/quick-start.md index 944a9f530..ea706e485 100644 --- a/tfhe/docs/getting-started/quick-start.md +++ b/tfhe/docs/getting-started/quick-start.md @@ -127,7 +127,7 @@ $ cargo run --release You can learn more about homomorphic types and associated compilation features in the [configuration documentation.](../configuration/rust-configuration.md) -## Perforance tips +## Performance tips Performance can be further improved by setting `lto="fat"` in `Cargo.toml` ```toml [profile.release] diff --git a/tfhe/examples/hpu/bench.rs b/tfhe/examples/hpu/bench.rs index e08ae0944..ffc80cb9f 100644 --- a/tfhe/examples/hpu/bench.rs +++ b/tfhe/examples/hpu/bench.rs @@ -56,7 +56,7 @@ pub struct Args { #[arg(long, value_parser = maybe_hex::)] pub src: Vec, - /// Force immediat input values + /// Force immediate input values #[arg(long, value_parser = maybe_hex::)] pub imm: Vec, diff --git a/tfhe/src/core_crypto/algorithms/modulus_switch_noise_reduction.rs b/tfhe/src/core_crypto/algorithms/modulus_switch_noise_reduction.rs index 402b404e9..7bf82c63f 100644 --- a/tfhe/src/core_crypto/algorithms/modulus_switch_noise_reduction.rs +++ b/tfhe/src/core_crypto/algorithms/modulus_switch_noise_reduction.rs @@ -92,8 +92,8 @@ pub enum Candidate { } pub enum CandidateResult { - SatisfiyingBound(Candidate), - BestNotSatisfiyingBound(Candidate), + SatisfyingBound(Candidate), + BestNotSatisfyingBound(Candidate), } pub fn choose_candidate_to_improve_modulus_switch_noise_for_binary_key( @@ -155,7 +155,7 @@ where let mut best_measure = base_measure; if base_measure <= bound.0 { - return CandidateResult::SatisfiyingBound(best_candidate); + return CandidateResult::SatisfyingBound(best_candidate); } for (index, encryption_of_zero) in encryptions_of_zero.iter().enumerate() { @@ -187,11 +187,11 @@ where } if measure <= bound.0 { - return CandidateResult::SatisfiyingBound(best_candidate); + return CandidateResult::SatisfyingBound(best_candidate); } } - CandidateResult::BestNotSatisfiyingBound(best_candidate) + CandidateResult::BestNotSatisfyingBound(best_candidate) } /// This function can be called before doing a modulus switch. @@ -222,13 +222,13 @@ pub fn improve_lwe_ciphertext_modulus_switch_noise_for_binary_key candidate, - CandidateResult::BestNotSatisfiyingBound(candidate) => candidate, + CandidateResult::SatisfyingBound(candidate) => candidate, + CandidateResult::BestNotSatisfyingBound(candidate) => candidate, }; match candidate { diff --git a/tfhe/src/core_crypto/algorithms/test/modulus_switch_noise_reduction.rs b/tfhe/src/core_crypto/algorithms/test/modulus_switch_noise_reduction.rs index a388b6766..304f48527 100644 --- a/tfhe/src/core_crypto/algorithms/test/modulus_switch_noise_reduction.rs +++ b/tfhe/src/core_crypto/algorithms/test/modulus_switch_noise_reduction.rs @@ -292,8 +292,8 @@ fn improve_modulus_switch_noise_test_average_number_checks(params: MsNoiseReduct input_variance, log_modulus, ) { - CandidateResult::SatisfiyingBound(candidate) => candidate, - CandidateResult::BestNotSatisfiyingBound(_) => { + CandidateResult::SatisfyingBound(candidate) => candidate, + CandidateResult::BestNotSatisfyingBound(_) => { panic!("No candidate was good enough") } }; diff --git a/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs b/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs index 42329af39..ae6270b60 100644 --- a/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs +++ b/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs @@ -534,8 +534,8 @@ impl + CastFrom> ParameterSetCo && lwe_ct_parameters.ct_modulus.is_power_of_two() && match lwe_ct_parameters.ms_decompression_method { MsDecompressionType::ClassicPbs => false, - MsDecompressionType::MultiBitPbs(expected_gouping_factor) => { - expected_gouping_factor.0 == grouping_factor.0 + MsDecompressionType::MultiBitPbs(expected_grouping_factor) => { + expected_grouping_factor.0 == grouping_factor.0 } } && *uncompressed_ciphertext_modulus == lwe_ct_parameters.ct_modulus diff --git a/tfhe/src/high_level_api/integers/oprf.rs b/tfhe/src/high_level_api/integers/oprf.rs index 0e31eea46..5a3b6111d 100644 --- a/tfhe/src/high_level_api/integers/oprf.rs +++ b/tfhe/src/high_level_api/integers/oprf.rs @@ -94,7 +94,7 @@ impl FheUint { } /// Generates an encrypted `num_block` blocks unsigned integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -188,7 +188,7 @@ impl FheUint { impl FheInt { /// Generates an encrypted signed integer /// taken uniformly in its full range using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -275,7 +275,7 @@ impl FheInt { } /// Generates an encrypted `num_block` blocks signed integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust diff --git a/tfhe/src/integer/gpu/server_key/radix/oprf.rs b/tfhe/src/integer/gpu/server_key/radix/oprf.rs index 9ffa019de..592734ec8 100644 --- a/tfhe/src/integer/gpu/server_key/radix/oprf.rs +++ b/tfhe/src/integer/gpu/server_key/radix/oprf.rs @@ -17,7 +17,7 @@ use crate::integer::gpu::{get_grouped_oprf_size_on_gpu, grouped_oprf_async, Cuda impl CudaServerKey { /// Generates an encrypted `num_block` blocks unsigned integer /// taken uniformly in its full range using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -56,7 +56,7 @@ impl CudaServerKey { /// Generates an encrypted `num_block` blocks unsigned integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -115,7 +115,7 @@ impl CudaServerKey { /// Generates an encrypted `num_block` blocks signed integer /// taken uniformly in its full range using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -155,7 +155,7 @@ impl CudaServerKey { /// Generates an encrypted `num_block` blocks signed integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust diff --git a/tfhe/src/integer/oprf.rs b/tfhe/src/integer/oprf.rs index 07388634a..acbe82473 100644 --- a/tfhe/src/integer/oprf.rs +++ b/tfhe/src/integer/oprf.rs @@ -8,7 +8,7 @@ pub use tfhe_csprng::seeders::{Seed, Seeder}; impl ServerKey { /// Generates an encrypted `num_block` blocks unsigned integer /// taken uniformly in its full range using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -78,7 +78,7 @@ impl ServerKey { /// Generates an encrypted `num_block` blocks unsigned integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -159,7 +159,7 @@ impl ServerKey { impl ServerKey { /// Generates an encrypted `num_block` blocks signed integer /// taken uniformly in its full range using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust @@ -206,7 +206,7 @@ impl ServerKey { /// Generates an encrypted `num_block` blocks signed integer /// taken uniformly in `[0, 2^random_bits_count[` using the given seed. - /// The encryted value is oblivious to the server. + /// The encrypted value is oblivious to the server. /// It can be useful to make server random generation deterministic. /// /// ```rust diff --git a/tfhe/src/shortint/atomic_pattern/mod.rs b/tfhe/src/shortint/atomic_pattern/mod.rs index e0ce31121..5c9c3382e 100644 --- a/tfhe/src/shortint/atomic_pattern/mod.rs +++ b/tfhe/src/shortint/atomic_pattern/mod.rs @@ -108,7 +108,7 @@ pub trait AtomicPattern { /// `full_bits_count` is the size of the lwe message, ie the shortint message + carry + padding /// bit. /// The output in in the form 0000rrr000noise (random_bits_count=3, full_bits_count=7) - /// The encryted value is oblivious to the server + /// The encrypted value is oblivious to the server fn generate_oblivious_pseudo_random( &self, seed: Seed, diff --git a/tfhe/src/shortint/oprf.rs b/tfhe/src/shortint/oprf.rs index f8167987f..1c4b36a5e 100644 --- a/tfhe/src/shortint/oprf.rs +++ b/tfhe/src/shortint/oprf.rs @@ -178,7 +178,7 @@ pub(crate) fn raw_seeded_msed_to_lwe>( /// `full_bits_count` is the size of the lwe message, ie the shortint message + carry + padding /// bit. /// The output in in the form 0000rrr000noise (rbc=3, fbc=7) -/// The encryted value is oblivious to the server. +/// The encrypted value is oblivious to the server. /// /// It is the reponsiblity of the calling AP to transform this into a shortint ciphertext. The /// returned LWE is in the post PBS state, so a Keyswitch might be needed if the order is PBS-KS. @@ -261,7 +261,7 @@ where impl GenericServerKey { /// Uniformly generates a random encrypted value in `[0, 2^random_bits_count[` /// `2^random_bits_count` must be smaller than the message modulus - /// The encryted value is oblivious to the server + /// The encrypted value is oblivious to the server pub fn generate_oblivious_pseudo_random( &self, seed: Seed, @@ -281,7 +281,7 @@ impl GenericServerKey { } /// Uniformly generates a random value in `[0, 2^random_bits_count[` - /// The encryted value is oblivious to the server + /// The encrypted value is oblivious to the server pub(crate) fn generate_oblivious_pseudo_random_message_and_carry( &self, seed: Seed,