Go to file
therealyingtong 0636a6f2ec Update window table formula.
Previously, the window table M for fixed-base scalar multiplication
computed M[w][k] = [(k+1)*(2^3)^w]B for each window w, where k is a
3-bit chunk in the scalar decomposition in the range [0..8).

However, in the case k_0 = 7, k_1= 0, the window table entries would
evaluate to:
* M[0][k_0] = [(7+1)*(2^3)^0]B = [8]B,
* M[1][k_1] = [(0+1)*(2^3)^1]B = [8]B,
which means the first addition would require complete addition.

To avoid this, we alter the formula to M[w][k] = [(k+2)*(2^3)^w]B.

We make a corresponding change to the formula for the last window
W. Previously, we had:
M[W][k] = [k * (2^3)^W - \sum((2^3)^j)]B, for j in [0..W-1).

Now, we have:
M[W][k] = [k * (2^3)^W - \sum(2^(3j+1))]B, for j in [0..W-1).
2021-06-02 22:51:37 +08:00
.github/workflows CI: Reduce noise of clippy lints 2021-05-04 09:18:30 +12:00
benches Add small key derivation benchmarks 2021-03-20 18:19:51 +13:00
book book: Refine types on Commitments page 2021-05-21 21:23:08 +01:00
proptest-regressions/constants Add proptest for decompose_scalar_fixed() 2021-05-13 12:52:03 +08:00
src Update window table formula. 2021-06-02 22:51:37 +08:00
.gitignore Initial commit 2020-10-20 15:12:37 -06:00
CHANGELOG.md Initialize the changelog 2021-01-22 23:57:34 +00:00
COPYING Changing TGPPL references to BOSL 2021-04-16 09:24:18 -07:00
Cargo.toml Migrate to latest revision of halo2 2021-06-01 17:37:44 +01:00
LICENSE-BOSL Changing TGPPL references to BOSL 2021-04-16 09:24:18 -07:00
README.md Changing TGPPL references to BOSL 2021-04-16 09:24:18 -07:00
katex-header.html Initial commit 2020-10-20 15:12:37 -06:00
rust-toolchain Set MSRV to 1.51.0 2021-03-26 08:13:25 +13:00

README.md

orchard Crates.io

IMPORTANT: This library is being actively developed and should not be used in production software.

Requires Rust 1.51+.

Documentation

License

Copyright 2020 The Electric Coin Company.

You may use this package under the Bootstrap Open Source Licence, version 1.0, or at your option, any later version. See the file LICENSE-BOSL for the terms of the Bootstrap Open Source Licence, version 1.0.

The purpose of the BOSL is to allow commercial improvements to the package while ensuring that all improvements are open source. See here for why the BOSL exists.