Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbl: retire crate and vendor implementation into downstream users? #1077

Open
tarcieri opened this issue May 31, 2024 · 1 comment
Open

dbl: retire crate and vendor implementation into downstream users? #1077

tarcieri opened this issue May 31, 2024 · 1 comment

Comments

@tarcieri
Copy link
Member

tarcieri commented May 31, 2024

The dbl crate contains an implementation of doubling / multiply-by-x for the polynomial x^128 + x^7 + x^2 + x + 1 over GF(2^128).

It's used in aes-siv, cmac, pmac, and ocb3. The same polynomial is used by GHASH, although the ghash crate doesn't use it because it's implemented in terms of POLYVAL, which uses the "reverse" polynomial.

The question is does it deserve its own crate, or is it trivial enough to simply be vendored as needed?

It might make more sense if we provided e.g. SIMD implementations which operate in parallel over multiple blocks.

@tarcieri
Copy link
Member Author

tarcieri commented Sep 6, 2024

Another way to go might be a gf128 crate with support for this polynomial which has more operations than just dbl.

Perhaps it could be useful for implementing MGM, for example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant