mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-05 20:10:35 +00:00
Add convenience wrapper around mult_by_pow_2 to clear cofactor
This commit is contained in:
parent
42c2578f4c
commit
4a5d7052a9
1 changed files with 8 additions and 0 deletions
|
|
@ -634,6 +634,14 @@ impl ExtendedPoint {
|
|||
h
|
||||
}
|
||||
|
||||
/// Multiply by the cofactor: compute `8 * self`.
|
||||
///
|
||||
/// Convenience wrapper around `mult_by_pow_2`.
|
||||
#[inline]
|
||||
pub fn mult_by_cofactor(&self) -> ExtendedPoint {
|
||||
self.mult_by_pow_2(3)
|
||||
}
|
||||
|
||||
/// Compute `2^k * self` by successive doublings.
|
||||
/// Requires `k > 0`.
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Reference in a new issue