mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Add mul_by_pow_2 for IFMA
This commit is contained in:
parent
8e38ff2859
commit
6faaef21df
1 changed files with 8 additions and 0 deletions
|
|
@ -93,6 +93,14 @@ impl ExtendedPoint {
|
|||
|
||||
ExtendedPoint(&tmp2.shuffle(Shuffle::DBBD) * &tmp2.shuffle(Shuffle::CACA))
|
||||
}
|
||||
|
||||
pub fn mul_by_pow_2(&self, k: u32) -> ExtendedPoint {
|
||||
let mut tmp: ExtendedPoint = *self;
|
||||
for _ in 0..k {
|
||||
tmp = tmp.double();
|
||||
}
|
||||
tmp
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'b> Add<&'b CachedPoint> for &'a ExtendedPoint {
|
||||
|
|
|
|||
Loading…
Reference in a new issue