mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Tighten a too-permissive debug_assert in NafLookupTable8.
This issue was found by Laurent Grémy & Nicolas Surbayrole of Quarkslab.
This commit is contained in:
parent
90baabe50b
commit
a480844992
1 changed files with 1 additions and 1 deletions
|
|
@ -171,7 +171,7 @@ pub(crate) struct NafLookupTable8<T>(pub(crate) [T; 64]);
|
|||
impl<T: Copy> NafLookupTable8<T> {
|
||||
pub fn select(&self, x: usize) -> T {
|
||||
debug_assert_eq!(x & 1, 1);
|
||||
debug_assert!(x < 256);
|
||||
debug_assert!(x < 128);
|
||||
|
||||
self.0[x / 2]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue