mirror of https://github.com/zcash/orchard.git
Add `impl subtle::ConstantTimeEq for note::Nullifier`
This commit is contained in:
parent
3d79ba47fe
commit
ff7287e392
|
@ -7,6 +7,9 @@ and this project adheres to Rust's notion of
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- `impl subtle::ConstantTimeEq for note::Nullifier`
|
||||
|
||||
## [0.7.0] - 2024-01-26
|
||||
### Licensing
|
||||
- The license for this crate is now "MIT OR Apache-2.0". The license
|
||||
|
|
|
@ -3,7 +3,7 @@ use halo2_proofs::arithmetic::CurveExt;
|
|||
use memuse::DynamicUsage;
|
||||
use pasta_curves::pallas;
|
||||
use rand::RngCore;
|
||||
use subtle::CtOption;
|
||||
use subtle::{CtOption, ConstantTimeEq};
|
||||
|
||||
use super::NoteCommitment;
|
||||
use crate::{
|
||||
|
@ -62,6 +62,12 @@ impl Nullifier {
|
|||
}
|
||||
}
|
||||
|
||||
impl ConstantTimeEq for Nullifier {
|
||||
fn ct_eq(&self, other: &Self) -> subtle::Choice {
|
||||
self.0.ct_eq(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Generators for property testing.
|
||||
#[cfg(any(test, feature = "test-dependencies"))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "test-dependencies")))]
|
||||
|
|
Loading…
Reference in New Issue