Commit 2d58e61
authored
polyval: unify state for intrinsics backends (#299)
Instead of having each intrinsics backend (i.e. `avx2`, `neon`) define
its own `State`, this defines a single `ExpandedKey` struct that can be
shared between both intrinsics backends and a fallback software
implementation, all defined in terms of `FieldElement`, as well as a
common `State` struct.
The `State` struct replacing the old union becomes a good place to put
`InitToken`, so we don't need to have a dummy `InitToken` for the soft
backend.
The `soft` backend now is only compiled in if we're not using intrinsics
whatsoever, and uses a much more compact implementation which stores `h`
directly instead of a powers-of-H expansion, intended for low-power
targets where resource conservation is more important than performance.1 parent 48e5f64 commit 2d58e61
File tree
9 files changed
+617
-682
lines changed- polyval/src
- backend
- intrinsics
9 files changed
+617
-682
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 2 | + | |
| 3 | + | |
12 | 4 | | |
13 | 5 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 6 | + | |
| 7 | + | |
19 | 8 | | |
20 | 9 | | |
21 | | - | |
| 10 | + | |
| 11 | + | |
22 | 12 | | |
23 | 13 | | |
This file was deleted.
This file was deleted.
0 commit comments