Merge pull request #175 from zcash/note-decryption-wnaf

Use w-NAF in `ka_orchard`
This commit is contained in:
str4d 2021-08-06 15:00:19 +01:00 committed by GitHub
commit 506b6a6dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ fpe = "0.4"
group = "0.10"
halo2 = "0.0"
lazy_static = "1"
pasta_curves = "0.1"
pasta_curves = "0.1.2"
proptest = { version = "1.0.0", optional = true }
rand = "0.8"
nonempty = "0.7"

View File

@ -218,7 +218,8 @@ pub(crate) fn ka_orchard(
sk: &NonZeroPallasScalar,
b: &NonIdentityPallasPoint,
) -> NonIdentityPallasPoint {
NonIdentityPallasPoint(b.deref() * sk.deref())
let mut wnaf = group::Wnaf::new();
NonIdentityPallasPoint(wnaf.scalar(sk.deref()).base(*b.deref()))
}
/// Coordinate extractor for Pallas.