Commit graph

16 commits

Author SHA1 Message Date
Evgenii Stratonikov
026731b260 gf127: use build tags for different implemenations
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 12:30:08 +03:00
Evgenii Stratonikov
0fa6b1314e *: format assembly code with asmfmt
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 12:30:08 +03:00
Evgenii Stratonikov
a7201418ab Fix linter issues
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-29 13:23:05 +03:00
Evgenii Stratonikov
9b3f45993f gf127: remove branch in pure Go operations
```
name                 old time/op    new time/op    delta
Sum/PureGo_digest-8    16.1ms ± 3%    10.4ms ± 3%  -35.53%  (p=0.000 n=10+10)

name                 old speed      new speed      delta
Sum/PureGo_digest-8  6.22MB/s ± 3%  9.65MB/s ± 3%  +55.12%  (p=0.000 n=10+10)
```

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-29 11:00:27 +03:00
Evgenii Stratonikov
63834fe8c1 Remove non-AVX parts from avx package
Remove Inv(), Mul1(), And() because right now
they have no AVX optimizations.
2019-10-15 13:22:36 +03:00
Evgenii Stratonikov
0f8b498b58 Alias gf127.GF127 2019-10-15 13:22:36 +03:00
Evgenii Stratonikov
d891a9c591 Restructure code layout
Provide default implementations in gf127 package and
all optimizations in subpackages. This way it will be easier
to use from a client.
2019-10-15 13:22:31 +03:00
Evgenii Stratonikov
f296adb043 Remove usage of unsafe 2019-10-10 11:04:15 +03:00
Evgenii
9a258e8741 Add test for marshalling/unmarshalling 2019-06-24 11:02:42 +03:00
Evgenii
d9e26aa6de Use testify/require for testing 2019-06-24 10:56:15 +03:00
Evgenii
4618e1484c Add partial AVX2 support (multiplication by 10 and 11)
AVX2 permits working with 256-bit registers. Thus we can
multiply 2 GF(2^127) elements in parallel.
This commit adds 2 such functions for multiplication by 10 and 11).
2019-06-21 17:45:49 +03:00
Evgenii
d5efd8bdce add SubtractR/L operation on hashes
- add Inverse operation to sl2
- fix a bug in xN()
2019-01-29 16:11:50 +03:00
Evgenii
ebb124e812 add random GF(2^127)-element generator 2019-01-29 14:25:17 +03:00
Evgenii
b380bca1d2 add inversion function 2019-01-29 14:11:08 +03:00
Evgeniy Kulikov
42499b9eb0
Fix formatting 2019-01-03 11:04:43 +03:00
Evgeniy Kulikov
5cf44c62ac
Initial 2018-12-29 16:04:17 +03:00