Make center_vt constant time#360
Conversation
- Implement `center` as a constant-time method in `Modulus`. - Implement `center_vec` as a constant-time vector method. - Update `center_vec_vt` to call `center_vec`. - Remove private `center_vt`. - Add tests. Co-authored-by: tlepoint <1345502+tlepoint@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Implement `center` as a constant-time method in `Modulus`. - Implement `center_vec` as a constant-time vector method. - Update `center_vec_vt` to call `center_vec` and update its documentation. - Remove private `center_vt`. - Add tests for `center` and `center_vec`. - Use `const_time_cond_select` for constant-time logic. Co-authored-by: tlepoint <1345502+tlepoint@users.noreply.github.com>
- Implement `center` as a constant-time method in `Modulus`. - Implement `center_vec` as a constant-time vector method. - Remove `center_vec_vt` and `center_vt`. - Update usages in `crates/fhe` and `crates/fhe-math` to use `center_vec` and remove `unsafe`. - Add tests for `center` and `center_vec`. - Use `const_time_cond_select` for constant-time logic. Co-authored-by: tlepoint <1345502+tlepoint@users.noreply.github.com>
This PR addresses the task to make
center_vtconstant time.It introduces a new
centermethod which is safe, constant-time, and public.It also introduces
center_vecand updatescenter_vec_vtto use the constant-time implementation.Tests are added to verify correctness.
PR created automatically by Jules for task 3415539913779892970 started by @tlepoint