Turns out yet another variant of EC_POINT_mul is allowed!
This commit is contained in:
parent
9dca8f06e7
commit
b914f779e8
|
|
@ -144,8 +144,25 @@ impl EcPointRef {
|
|||
}
|
||||
}
|
||||
|
||||
/// Computes `generator * n + q * m`, storing the result in `self`.
|
||||
/// Computes `generator * n`, storing the result ing `self`.
|
||||
pub fn mul_generator(&mut self,
|
||||
group: &EcGroupRef,
|
||||
n: &BigNumRef,
|
||||
ctx: &BigNumContextRef)
|
||||
-> Result<(), ErrorStack> {
|
||||
unsafe {
|
||||
cvt(ffi::EC_POINT_mul(group.as_ptr(),
|
||||
self.as_ptr(),
|
||||
n.as_ptr(),
|
||||
ptr::null(),
|
||||
ptr::null(),
|
||||
ctx.as_ptr()))
|
||||
.map(|_| ())
|
||||
}
|
||||
}
|
||||
|
||||
/// Computes `generator * n + q * m`, storing the result in `self`.
|
||||
pub fn mul_full(&mut self,
|
||||
group: &EcGroupRef,
|
||||
n: &BigNumRef,
|
||||
q: &EcPointRef,
|
||||
|
|
|
|||
Loading…
Reference in New Issue