Extend modular addition to Barrett constants.

This commit is contained in:
2018-06-18 08:42:01 -07:00
parent a6def22bd1
commit 011ebc0c99
5 changed files with 58 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ pub trait ModSquare<T=Self>
}
// This is algorithm 14.16 from "Handbook of Applied Cryptography".
#[inline(always)]
pub fn raw_square(x: &[u64], result: &mut [u64])
{
assert_eq!(x.len() * 2, result.len());