-
Notifications
You must be signed in to change notification settings - Fork 11
Implement and benchmark windowing point multiplication ops #94
Commits on Oct 14, 2019
-
This operation is needed in order to implement high-speed Point multiplication algorithms. - Refactored `two_pow_k` impl for `Scalar` which wasn't working propperly.
Configuration menu - View commit details
-
Copy full SHA for c8b7aab - Browse repository at this point
Copy the full SHA c8b7aabView commit details -
Implement
into_bits
forScalar
It gives the bit-representation of the given `Scalar` as an array of 256 bits represented as u8's. This method is useful in order to implement other algorithms that require binary decomposition of a given `Scalar`.
Configuration menu - View commit details
-
Copy full SHA for 3c9c896 - Browse repository at this point
Copy the full SHA 3c9c896View commit details
Commits on Oct 15, 2019
-
Implement
Display
forFieldElement
This is required by `BenchmarkId::new()` in order to print the blackboxed inputs. Also added `Panic` docs of the `inverse` function.
Configuration menu - View commit details
-
Copy full SHA for 48698be - Browse repository at this point
Copy the full SHA 48698beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1926af3 - Browse repository at this point
Copy the full SHA 1926af3View commit details -
Implement "Shift Left to Right Binary Point Mul"
This algorithm performs point multiplication in with an estimated cost of: `(t*A/2)+tD. This may improve the status of #93
Configuration menu - View commit details
-
Copy full SHA for 0e7ceda - Browse repository at this point
Copy the full SHA 0e7cedaView commit details -
Update benchmarks to Criterion v0.3
Implemented benchmarks for `FieldElement` ops and blackboxed the inputs.
Configuration menu - View commit details
-
Copy full SHA for 4dfe10d - Browse repository at this point
Copy the full SHA 4dfe10dView commit details -
Finnish benchmark update to Criterion v0.3
Also compared lrbs method against the double_and_add. It performs slightly better so it's good news for #93
Configuration menu - View commit details
-
Copy full SHA for 5c59d18 - Browse repository at this point
Copy the full SHA 5c59d18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 528d0da - Browse repository at this point
Copy the full SHA 528d0daView commit details -
Add ristretto benchmarks and finnish refactor.
This finished the benchmarking refactor.
Configuration menu - View commit details
-
Copy full SHA for 6879088 - Browse repository at this point
Copy the full SHA 6879088View commit details
Commits on Oct 16, 2019
-
Implement fast modulo-4 op for
Scalar
This op is a requirement for computing the Not Adjacent Form of a number. Which is used on the most performant Point mul algorithms.
Configuration menu - View commit details
-
Copy full SHA for 3e1c1d2 - Browse repository at this point
Copy the full SHA 3e1c1d2View commit details -
Optimize
mod4
function forScalar
It does not even need to turn the `Scalar` into bytes. We just apply & 0b0000_0011 to the first limb.
Configuration menu - View commit details
-
Copy full SHA for b446445 - Browse repository at this point
Copy the full SHA b446445View commit details -
Implement NAF computation algorithm
- Implemented Non-Adjacent transformation algorithm. - Implemented conversions from `i8` into `Scalar`. - Add tests for both.
Configuration menu - View commit details
-
Copy full SHA for 2aa512a - Browse repository at this point
Copy the full SHA 2aa512aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 903f917 - Browse repository at this point
Copy the full SHA 903f917View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d4ab5d - Browse repository at this point
Copy the full SHA 9d4ab5dView commit details -
Implement binary NAF method for Point mul.
The benchmarks implemented show an improvement over the `double_and_add` method currently used.
Configuration menu - View commit details
-
Copy full SHA for c40f2a8 - Browse repository at this point
Copy the full SHA c40f2a8View commit details -
Implement
mod4()
more generically for powers of 2Now the function takes not just the `Scalar` but also a the exponent of a power of 2. Then it computes `Scalar (mod 2^exponent)`. The exponent has to be <= 256.
Configuration menu - View commit details
-
Copy full SHA for 5e325b8 - Browse repository at this point
Copy the full SHA 5e325b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef766df - Browse repository at this point
Copy the full SHA ef766dfView commit details -
Implement, test & benchmark
windowed_naf()
function.This computes the width-wNAF of a positive integer.
Configuration menu - View commit details
-
Copy full SHA for 255f186 - Browse repository at this point
Copy the full SHA 255f186View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1910ff - Browse repository at this point
Copy the full SHA f1910ffView commit details
Commits on Oct 18, 2019
-
Configuration menu - View commit details
-
Copy full SHA for b579dbf - Browse repository at this point
Copy the full SHA b579dbfView commit details -
Remove inlining compiler hints and refactor benchmarks
- profile.release section created in Cargo.toml with optimizations.
Configuration menu - View commit details
-
Copy full SHA for 7878f6c - Browse repository at this point
Copy the full SHA 7878f6cView commit details
Commits on Oct 20, 2019
-
Refactor Window-w NAF method and implemented tests
The algorithm now is working so it should be the base for the Window-W NAF Point Mul method.
Configuration menu - View commit details
-
Copy full SHA for daa3f53 - Browse repository at this point
Copy the full SHA daa3f53View commit details
Commits on Oct 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for f5376ea - Browse repository at this point
Copy the full SHA f5376eaView commit details -
Remove
kalinski_inverse
function since it's not needed anymoreAlso: - refactored benchmarks. - removed related tests. - Bench all of the point ops benchmarks with `RistrettoPoint` inputs.
Configuration menu - View commit details
-
Copy full SHA for 0ceb707 - Browse repository at this point
Copy the full SHA 0ceb707View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51be815 - Browse repository at this point
Copy the full SHA 51be815View commit details -
Refactor
Half
andinner_half
implementations.We got rid of them both and applyed a simple pre-computed constant which is `1/2 (mod l)` so we just need to multiply the `FieldElement` by the constant and we directly get it's half. Everything has been reduced to the `Half` implementation now.
Configuration menu - View commit details
-
Copy full SHA for 13d484f - Browse repository at this point
Copy the full SHA 13d484fView commit details -
Fork
Half
impl in two different implementations.- `fast_even_half` should be used for even `FieldElements` only and performs almost 4x faster than the `Half` trait impl. - `Half` trait should be used when we don't know if the `FieldElement` will be even or not. - Implemented benchmarks for both functions that implement the same operation. - Modified `mod_sqrt()` implementation to work with the fast `half` implementation.
Configuration menu - View commit details
-
Copy full SHA for 713cf40 - Browse repository at this point
Copy the full SHA 713cf40View commit details
Commits on Oct 22, 2019
-
Refactor a wrong implementation of
Shr
forScalar
Tests are now passing.
Configuration menu - View commit details
-
Copy full SHA for ef51a7e - Browse repository at this point
Copy the full SHA ef51a7eView commit details -
Optimize
legendre_symbol
with pre-computed const.- Defined `MINUS_ONE_HALF` on constants in order to not perform an operation for which we know the result previously on every `legendre_symbol` call. - Refactored the function with the constant usage. - Refactored some doc-comments on `FieldElement` functions.
Configuration menu - View commit details
-
Copy full SHA for db3440a - Browse repository at this point
Copy the full SHA db3440aView commit details -
Optimized
Pow
implementation by usingfast_even_half
Since the algorithm allows you to just divide by two even numbers but it also manages to get always even numbers, we can apply `fast_even_half` every iteration.
Configuration menu - View commit details
-
Copy full SHA for 71f1680 - Browse repository at this point
Copy the full SHA 71f1680View commit details -
Refactor
Half
implementations as done withFieldElement
Applied the same changes that were done in 13d484f but for `Scalar`. Also left `fast_half_without_modulo` for point mul implementations.
Configuration menu - View commit details
-
Copy full SHA for fe7a1b4 - Browse repository at this point
Copy the full SHA fe7a1b4View commit details
Commits on Oct 24, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a98f210 - Browse repository at this point
Copy the full SHA a98f210View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9be36b - Browse repository at this point
Copy the full SHA d9be36bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80bbfb2 - Browse repository at this point
Copy the full SHA 80bbfb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7839d20 - Browse repository at this point
Copy the full SHA 7839d20View commit details -
Merge branch 'windowing' of https://github.com/dusk-network/dusk-zerocaf into windowing
Configuration menu - View commit details
-
Copy full SHA for dbd5b70 - Browse repository at this point
Copy the full SHA dbd5b70View commit details