https://github.com/ericlagergren/polyval
POLYVAL per RFC 8452
https://github.com/ericlagergren/polyval
galois-field gf128 ghash go polyval
Last synced: 4 months ago
JSON representation
POLYVAL per RFC 8452
- Host: GitHub
- URL: https://github.com/ericlagergren/polyval
- Owner: ericlagergren
- License: bsd-2-clause
- Created: 2022-01-30T09:38:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-05T20:25:42.000Z (almost 3 years ago)
- Last Synced: 2024-06-18T22:59:04.590Z (almost 2 years ago)
- Topics: galois-field, gf128, ghash, go, polyval
- Language: Go
- Homepage:
- Size: 93.8 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# polyval
[](https://pkg.go.dev/github.com/ericlagergren/polyval)
This module implements POLYVAL per [RFC 8452](https://datatracker.ietf.org/doc/html/rfc8452).
The universal hash function POLYVAL is the byte-wise reverse of
GHASH.
## Installation
```bash
go get github.com/ericlagergren/polyval@latest
```
## Performance
The x86-64 and ARMv8 assembly backends run at about 0.25 cycles
per byte. The x86-64 implementation requires SSE2 and PCLMULQDQ
instructions. The ARMv8 implementation requires NEON and PMULL.
The default Go implementation will be selected if the CPU does
not support either assembly implementation. (This implementation
can also be selected with the `purego` build tag.) It is much
slower at around 9 cycles per byte.
## Security
### Disclosure
This project uses full disclosure. If you find a security bug in
an implementation, please e-mail me or create a GitHub issue.
### Disclaimer
You should only use cryptography libraries that have been
reviewed by cryptographers or cryptography engineers. While I am
a cryptography engineer, I'm not your cryptography engineer, and
I have not had this project reviewed by any other cryptographers.