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

[dkml] Virtual library for mirage-crypto-pk #197

Open
jonahbeckford opened this issue Feb 21, 2024 · 0 comments
Open

[dkml] Virtual library for mirage-crypto-pk #197

jonahbeckford opened this issue Feb 21, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jonahbeckford
Copy link
Contributor

TLDR: Having a virtual library so that GMP is not a hard-dependency of mirage-crypto-pk.

This was forked off from #137.

The specific request:

  • Create a virtual library (https://dune.readthedocs.io/en/stable/variants.html). Let's call it mirage-crypto-bigint for now.
  • Inside it has a mirage_crypto_bigint.mli specifying exactly what types and functions mirage-crypto needs from Zarith.
  • Make an implementation library mirage-crypto-bigint.zarith that just passes through to Zarith.

With a virtual library we could use the slower but much more portable num to implement the virtual library (ie. mirage-crypto-bigint.num). That would allow a slow Windows implementation. That slowness would be fine for many use cases (ex. testing out a web server on a Windows desktop) since I think the common use case is to deploy TLS endpoints on Linux. I believe TLS is the main use case for mirage-crypto-pk.

Someone would also be able to implement a new constant-time bignum implementation. I might even port a bignum from Rust or bind another C bignum library myself eventually, but that is a small chance since for most of my needs I prefer TLS offloading. (Yet if I had to use in-process TLS I would avoid the GMP library both because of its license and how difficult GNU software is to build with the MSVC compiler)

@hannesm hannesm added enhancement New feature or request help wanted Extra attention is needed labels Feb 22, 2024
@hannesm hannesm changed the title Virtual library for mirage-crypto-pk [dkml] Virtual library for mirage-crypto-pk Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants