Polynomial evaluation related functions added #89
+1,483
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We implemented few other functions related to the GF(2) polynomial evaluation:
x_i
, where there arex_0, ..., x_{block_size}
terms. I.e., it is a projection of the input, of i-th bit eachblock_size
bits. This can later serve as basis to construct more complex polynomials evaluated on the whole input data repeatedly.base[i] = base[i].eval_monic(input, i, block_size) for i in range(block_size)]
x_2 * x_8 + x_14 = base[2] * base[8] + base[14]
HW(x_2 * x_8 + x_14) = (base[2] * base[8]).fast_hw_xor(base[14])
- the last XOR is performed in-memory, which is fasterWe also used vector operations from #20.
Check if there is something usable, I can make a PR using just some parts of this code.